Note in the last replacement there is insufficient

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

View Full Document Right Arrow Icon
Note: in the last replacement, there is insufficient future frames to refer to for decision making in OPTIMAL method, can either use LRU, or FIFO for this last page replacement.since they have similar number of page faults. i.e. either 2301 or 2314 are correct for this last page replacement. Page faults: 8 2) If delta = 6, what is the working set at the point t as shown: 2, 0, 1, 4, 0, 5, 2, 4, 0, 2, 3, 4, 2, 5, 0, 4, 1, 3, 2, 1 (8 points) Answer: working set = {0, 1, 2, 4, 5} 4. (10 points)Consider a UNIX file system that uses inodes to represent files. The logical address has 32 bits, and disk block size is 4KB. The combined scheme is used for disk allocation, with 10 direct disk blocks, plus one single, one double, and one triple indirect disk blocks. What is the maximum file size that can be supported in this file system? Answer: With a 32-bit address, each pointer needs 32 bit or 4 bytes. So one block with 4KB has 1024 pointers (2 points). The maximum file size is 10x4KB + 1024x4KB+1024x1024x4KB + 1024x1024x1024x4KB = 4TB (approximately) 5. (20 points) Disk scheduling problem Suppose that a disk drive has 200 cylinders, numbered 0 to 199. The drive is currently serving a request at cylinder 100, and the previous request was at cylinder 20. The queue of pending requests, in FIFO order, is: 55 58 39 18 90 160 150 38 184 Starting from the current head position (100), what is the average distance (in cylinders) that the disk arm moves to satisfy all the pending requests for each of the following disk-scheduling algorithms? a) FCFS b) SSTF c) SCAN 5 t
Image of page 5

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

View Full Document Right Arrow Icon
d) C-SCAN e) LOOK f) C-LOOK Answer: The FCFS schedule is 55, 58, 39, 18, 90, 160, 150, 38, 184. The average seek distance is 55.3. (498/9) The SSTF schedule is 90, 58 ,55, 39, 38, 18, 150, 160, 184. The average seek distance is 27.6. (248/9) The SCAN schedule is 150, 160, 184,(199), 90, 58, 55, 39, 38, 18. The average seek distance is 31.3. (280/9) The C-SCAN schedule is 150, 160, 184, (199), (0), 18, 38, 39, 55, 58, 90. The average seek distance is 43.1. (388/9) The LOOK schedule is 150, 160, 184, 90, 58, 55, 39, 38, 18. The average seek distance is 27.8. (250/9) The C-LOOK schedule is 150, 160, 184, 18, 38, 39, 55, 58, 90. The total seek distance is 35.8. (322/9) 6
Image of page 6
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