-3

Solid State Drives (SSD) pose new challenges and opportunities for designers and implementers of file systems. On the one hand, an SSd has no rotational delay and no seek time because no rotational media is involved. On the other hand, space is costlier: SSDs are 10-20 times more expensive per byte.

Assume - transfer time is the same as a typical traditional rotating disk.

A) Describe a strategy for implementing a file system on a rotational device

B) How would that strategy change for an SSD? Be sure to discuss issues of latency and fragmentation in both, as well as main-memory demand.

Community
  • 1
  • 1
Busturdust
  • 2,447
  • 24
  • 41
  • 1
    Sounds like homework. – Sirko May 04 '15 at 16:34
  • Studying for Master's comprehensive exam. I havent taken OS in 3 years and can't find it - never learned anything about SSDs :( – Busturdust May 04 '15 at 16:35
  • 1
    @Busturdust- Ok, the answer to Part A requires no knowledge of SSDs. So do you need help with that? – Craig S. Anderson May 04 '15 at 23:14
  • @CraigS.Anderson My answer to A) I am familiar with contiguous allocation , and linked list allocation. I am not to familiar with what the answer is probably getting at, which is the use of inodes to index file allocation. I am finishing up studying the rest of OS class (processes, threads, scheduling, IPC) and am heading to that topic. (test on thursday ugh). but my answer using indexes would be: use an index pointer. Each block of data belonging to the file, has its own pointer. As we create new data in the file, keep updating the file blocwith more indexes pointing to its appropriate block – Busturdust May 04 '15 at 23:27

1 Answers1

2

A filesystem on rotational media is designed to minimize the amount of seeking that is needed to read the blocks that make up a file. In the ideal case, the blocks of a file are contiguous on disk. If a file is small enough, it will be placed in a single track. If it won't fit in one track, the blocks will be placed in contiguous tracks.

The difficulty comes when files are deleted. This creates non-contiguous free space on disk, otherwise known as fragmentation. Window's NTFS has a defragmentation utility to coalesce the free space and make it contiguous. Linux filesystems like ext2 use other ways to avoid fragmentation.

SSDs don't have seek overhead, so fragmentation is not a performance issue. A filesystem for SSDs would prioritize reducing writes to the device, since SSDs have a limit on how many times each block can be written. SSDs controllers actually spread writes out over the entire device to spread out the wear due to writes. Defragmenting an SSD is not needed and actually reduces the life of the device.

The part of the question about "main memory demand" does not make much sense. I suppose rotational media would have more main memory demand because of the desire to schedule reads and writes to minimize seek latency.

Community
  • 1
  • 1
Craig S. Anderson
  • 6,966
  • 4
  • 33
  • 46
  • Thanks this was quite informative. But wouldnt fragmentation still be an issue? If we have a block of size n, and appropriate it contiguously, wouldnt holes still be an issue for appropriation, if the required n blocks were split over seperated holes? even if they are not a performance issue? – Busturdust May 06 '15 at 00:56
  • 1
    Since the cost of reading a page in an SSD does not depend on its location, it doesn't really matter if a file is allocated to contiguous pages or not. Even if you do allocate a file to contiguous pages, modifying the file will likely cause it to be discontiguous, since writing an existing page causes it to be remapped elsewhere. – Craig S. Anderson May 06 '15 at 02:42