COMP
COMP3511-hw4-Spring 2018(sol)(updated).docx

Volume control block per volume contains volume or

Info icon This preview shows pages 3–6. Sign up to view the full content.

- Volume control block (per volume) contains volume (or partition) details Total # of blocks, # of free blocks, block size, free block count and pointers, a free FCB count and pointer In UFS, this is called superblock. In NTFS, it is stored in the master file table - A directory structure (per file system) is used to organize files 3
Image of page 3

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

In UFS, this includes file names and associate inode numbers (FCB in Unix). In NTFS, it is stored in the master file table - Per-file File Control Block (FCB) contains many details about a file It has a unique identifier number to associate with a directory entry. In UFS, inode number, permissions, size, dates NFTS stores into in master file table using relational DB structure, with a row per file in-memory: Any three below e.g. heap, stack, hash table, etc o An in-memory mount table contains information about each mounted volume o An in-memory directory-structure cache holds the directory information of recently accessed directories. o The system-wide open-file table contains a copy of the FCB of each open file, as well as other information o The per-process open-file table contains a pointer to the appropriate entry in the system-wide open- file tale, as well as other process-specific information such as access right and etc. 5) (3 points) Discuss the hardware support required to support demand paging. Answer: For every memory access operation, the page table needs to be consulted to check whether the corresponding page is resident or not and whether the program has read or write privileges for accessing the page. These checks would have to be performed in hardware. A TLB could serve as a cache and improve the performance of the lookup operation. 3. (26 points) Virtual memory. 1) Consider the following page reference string: 2, 0, 1, 4, 0, 5, 2, 4, 0, 2, 3, 4, 2, 5, 0, 4, 1, 3, 2, 1 Assuming demand paging with four frames allocated to a process with local allocation scheme used. Please illustrate each step that the following replacement algorithms work for this reference string and compute the page faults in each algorithm. (18 points) a. FIFO replacement b. LRU replacement c. Optimal replacement Answer: a. FIFO replacement 2 0 1 4 0 5 2 4 0 2 3 4 2 5 0 4 1 3 2 1 2 2 2 2 5 5 5 5 4 4 4 4 0 0 0 0 2 2 2 2 5 5 5 1 1 1 1 0 0 0 0 1 1 4 4 4 4 3 3 3 3 2 Page faults: 12 4
Image of page 4
b. LRU replacement 2 0 1 4 0 5 2 4 0 2 3 4 2 5 0 4 1 3 2 1 2 2 2 2 5 5 3 3 0 0 0 2 0 0 0 0 0 0 5 5 5 3 3 1 1 1 2 2 2 2 1 1 1 4 4 4 4 4 4 4 4 4 Page faults: 12 c. Optimal replacement 2 0 1 4 0 5 2 4 0 2 3 4 2 5 0 4 1 or 1 3 2 1 2 2 2 2 2 2 2 2 2 0 0 0 0 3 3 3 3 1 1 5 5 0 0 1 4 4 4 4 1 4
Image of page 5

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

Image of page 6
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '14
  • page faults, average seek distance

{[ 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