This quiz checks your understanding of the lectures and reading assignments during the past two weeks. You may reference the textbook, lecture slides, and your notes. Online sites (e.g., Wikipedia) may also be consulted but you must cite them in your writeup. Please strive for clarity and brevity in your answers.
Submit your answers by clicking the "submit" link on the lecture schedule page. Only online submissions will be accepted. Please use this template when preparing your answers, and submit a plain ASCII text file.
RAID (4 points). Suppose a RAID4 system has a total of 5 disks. Describe how it works using no more than 1-4 bullets for each of the questions below.
Transactions (2 points). In the lecture, we showed how to implement a transaction example with a write- ahead log:
BeginTransaction S = S - $100; C = C + $100; Commit
We showed that before transaction, S = $800 and C = $10. The log has three things: {S = $700} {C = $110} {Commit}. Is it possible to replace them with {S = S - $100} {C = C + $100} {Commit}? Please explain why or why not, using no more than two sentences.
Journaling File System (3 points). We discussed in class that “Journaling File System” uses a transaction mechanism to implement file system updates. Suppose we append a data block to a file. This operation may require update three on-storage data structures: i- node (a new pointer to the data block, file size, modified time, etc), bitmap (block allocation), and the data block itself. A journaling file system writes the following to the write-ahead log:
{updated i-node block}{updated bitmap block}{data block}{Commit}
Suppose that each of above needs a block. We will need to write 4 blocks to disk storage. But, we do not have control over exactly how the disk blocks of the log are allocated on disk and what disk-scheduling algorithm is used in the storage layer. In this case, it is not safe to combine the writing of the 4 blocks into one large logical write operation to the log.