released: 04/07, 9:00 due: 04/13, 23:59 Answer the following questions. Submit your answers to Canvas assignments. There is an entry for this homework. 1. Disk performance Here is some numbers of a disk, CS5600-Disk: --Spindle Speed: 12000 RPM note: ** this speed number is per minute. ** on average, it takes the disk to rotate half a circle to reach a sector. ** So, on average, how long does CS5600-Disk rotate to a sector? [this isn't a question you need to answer but one you should think of.] --Avg Seek Time, read/write: 5ms / 6 ms (note: this is the time moving heads to the right track.) --Transfer rate: 64 MB/s (note: this is the rate of reading/writing sequential data. Assume 1MB=10^6B here.) When CS5600-Disk reads/writes a sector (512 Bytes), it needs to (1) move the head to the right track, (2) wait rotating to the right sector, and (3) read/write the data. Questions: (a) How long would it take to do 500 sector reads, spread out randomly over the disk (and serviced in FIFO order)? (2 points) [Write down your calculation and write the final result in seconds with two decimal place accuracy.] (b) How long would it take to do 500 sector writes, spread out randomly over the disk (and serviced in FIFO order)? (2 points) [Write down your calculation and write the final result in seconds with two decimal place accuracy.] (c) How long would it take to do 500 sector reads, SEQUENTIALLY on the CS5600-Disk? (FIFO order once more) (2 points) [hint: notice that some actions only appear once in this case.] [Write down your calculation and write the final result in milliseconds with one decimal place accuracy.] 2. SSD CS5600-SSD is an SSD that has 1 flash bank, 4 blocks (in the same bank), and 8 pages (2 in each block). CS5600-SSD uses the log-structured FTL we learn in class. The current state of the CS5600-SSD is as follows: +---------------------------------------+ blocks | block 0 | block 1 | block 2 | block 3 | +---------+---------+---------+---------+ pages | P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | +----+----+----+----+----+----+----+----+ data | D | B | C | A' | | | | | +----+----+----+----+----+----+----+----+ mapping: A' => P4, B => P2, C => P3, D => P1 -- A, B, C, and D are four logical pages. -- Whenever a page gets updated, we add an apostrophe ("'") to their names. -- For example, after an update to page A, A becomes A'. -- In other words, (A, A', A'', A''',...) is a series of snapshots to page A. But they refer to the same logical page (from a program's point of view). Questions: (2 points) (a) draw the CS5600-SSD status (including the mapping) after running write(B') write(C') write(A'') write(B'') (2 points) (b) (following the last question) now CS5600-SSD runs a round of garbage collection which recycles all blocks that do not contain valid pages. [updated 04/10: note that this is a naive GC; it **only** "recycles all blocks that do not contain valid pages"] Draw the SSD status after the garbage collection.