week10_friday - CSCC 69H3 Operating Systems Spring 2010...

Info icon This preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CSCC 69H3 Operating Systems Spring 2010 Professor Bianca Schroeder U of T
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Will return and go over midterm today Questions on your midterm: Come to my office after class 3-3:30pm Questions on A3? Come to my office Monday 11-12 or in the afternoon Brief announcement
Image of page 2
How does the OS implement the abstraction of files and directories? Files and directories …
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Disk Layout Strategies Files span multiple disk blocks How do you allocate the blocks for a file? 1. Contiguous allocation
Image of page 4
Contiguous Allocation 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 File Name Start Blk Length File A 2 3 File B 9 5 File C 18 8 File D 27 2 directory Disk
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Disk Layout Strategies Files span multiple disk blocks How do you find all of the blocks for a file? 1. Contiguous allocation Like memory Fast, simplifies directory access Inflexible, causes fragmentation, needs compaction 2. Linked, or chained, structure
Image of page 6
Linked Allocation 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 File Name Start Blk Last Blk File B 1 22 directory
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Disk Layout Strategies Files span multiple disk blocks How do you find all of the blocks for a file? 1. Contiguous allocation Like memory Fast, simplifies directory access Inflexible, causes fragmentation, needs compaction 2. Linked, or chained, structure Each block points to the next, directory points to the first Good for sequential access, bad for all others 3. Indexed structure (indirection, hierarchy) An “index block” contains pointers to many other blocks Handles random better, still good for sequential May need multiple index blocks (linked together)
Image of page 8
Indexed Allocation: Unix Inodes Unix inodes implement an indexed structure for files Each inode contains 15 block pointers First 12 are direct block pointers (e.g., 4 KB data blocks) Then single, double, and triple indirect 0 12 13 14 1
Image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the 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