In-depth technology research: finding new ways to recover data, accessing firmware, writing programs, reading bits off the platter, recovering data from dust.
Forum rules
Please
do not post questions about data recovery cases here (use
this forum instead). This forum is for topics on finding new ways to recover data. Accessing firmware, writing programs, reading bits off the platter, recovering data from dust...
October 22nd, 2011, 12:47
Hey,
I have a noob question, so please bare with me...
HDDs are random access, but there are still HDDs with controllers that come with buffers... how do these controllers predict what blocks of memory to write into the buffer?
Thanks
J
October 22nd, 2011, 18:42
There are two types of memory buffers on HDDs
All HDDs have first type - RAM buffer. Modern HDDs have RAM buffer up to 64MB. This buffer used for reading and writing. The caching algorithm is very simple: drive uses look ahead feature when reads (reads some sectors ahead of current sector) and collects writing requests from host if buffer has free space when writes. SATA HDDs also support queuing where host can tag each request to know when it's done and also can set a priority for request. Data in RAM buffer will be lost if there is no power applied to a drive
Some HDDs have additional type of a buffer based on flash memory - these HDDs called hybrid HDDs. Flash buffer can be several GBs in size. There are several algorithms which a drive might use to store data to the flash buffer. The simplest would be calculating number of requests for particular sector and setting priority. Sectors with lowest priority will leave the flash buffer if there is no more free space in the buffer. Data in flash will be stored even w/o power
Powered by phpBB © phpBB Group.