Once changes are copied safe to remove log redo

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a Blocks Copy on Write/Write Anywhere Root Inode Slots Inode File’s Indirect Blocks Inode Array (in Inode File) Indirect Blocks Data Blocks Update Last Block of File Copy on Write Batch Update Root Inode New Root Inode Root Inode’s Indirect Blocks Inode File File’s Indirect Blocks File’s Data Blocks New Indirect Nodes New Indirect Nodes of Inode File New Data Block of Inode File New Data Blocks Copy on Write Garbage Collec'on •  For write efficiency, want con'guous sequences of free blocks –  Spread across all block groups –  Updates leave dead blocks scaYered •  For read efficiency, want data read together to be in the same block group –  Write anywhere leaves related data scaYered => Background coalescing of live/dead blocks Copy On Write •  Pros –  Correct behavior regardless of failures –  Fast recovery (root block array) –  High throughput (best if updates are batched) •  Cons –  Poten'al for high latency –  Small changes require many writes –  Garbage collec'on essen'al for performance Logging File Systems •  Instead of modifying data structures on disk directly, write changes to a journal/log –  Inten'on list: set of changes we intend to make –  Log/Journal is append- only •  Once changes are on log, safe to apply changes to data structures on disk –  Recovery can read log to see what changes were intended •  Once changes are copied, safe to remove log Redo Logging •  Prepare –  Write all changes (in transac'on) to log •  Commit –  Single disk write to make transac'on durable •  Redo –  Copy changes to disk •  Garbage collec'on –  Reclaim space in log •  Recovery –  Read log –  Redo any oper...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern