Final Exam - Operating Systems - Fall 2002 | COP 4600, Exams of Operating Systems

Material Type: Exam; Class: Operating Systems; Subject: Computer Programming; University: University of Central Florida; Term: Fall 2002;

Typology: Exams

Pre 2010

Uploaded on 02/24/2010

koofers-user-t59
koofers-user-t59 🇺🇸

10 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
UCF
School of Electrical Engineering and Computer Science
COP 4600: Operating Systems, Fall 2002
Final Exam (total 100 pts)
Name:_________________________________ SSN:__________________________
(1) _____ Least Recently Used (LRU) page replacement algorithm can suffer from Belady’s anomaly (4 pts)
A) True B) False
(2) _____ Increasing the degree of multiprogramming can resolve thrashing problem (4 pts)
A) True B) False
(3) _____ Linked allocation scheme for file system can cause external fragmentation (4pts)
A) True B) False
(4) _____ If the page size increases, the page table size decreases (4pts)
A) True B) False
(5) _____ SSTF(Shortest Seek Time First) may cause starvation (4pts)
A) True B) False
(6) _____ Contiguous allocation need less disk accesses than linked or indexed allocation schemes generally
(4pts) A) True B) False
(7) _____ If we increase the size of memory and use FIFO page replacement algorithm, then the number of
page faults decreases (4pts)
A) True B) False
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Final Exam - Operating Systems - Fall 2002 | COP 4600 and more Exams Operating Systems in PDF only on Docsity!

UCF

School of Electrical Engineering and Computer Science

COP 4600: Operating Systems, Fall 2002

Final Exam (total 100 pts)

Name:_________________________________ SSN:__________________________

(1) _____ Least Recently Used (LRU) page replacement algorithm can suffer from Belady’s anomaly (4 pts) A) True B) False

(2) _____ Increasing the degree of multiprogramming can resolve thrashing problem (4 pts) A) True B) False

(3) _____ Linked allocation scheme for file system can cause external fragmentation (4pts) A) True B) False

(4) _____ If the page size increases, the page table size decreases (4pts) A) True B) False

(5) _____ SSTF(Shortest Seek Time First) may cause starvation (4pts) A) True B) False

(6) _____ Contiguous allocation need less disk accesses than linked or indexed allocation schemes generally (4pts) A) True B) False

(7) _____ If we increase the size of memory and use FIFO page replacement algorithm, then the number of page faults decreases (4pts) A) True B) False

(8) Explain the following briefly (8.a) Thrashing (4pts)

(8.b) Belady’s anomaly (4pts)

(8.c) Seek time (4pts)

(8.d) Inverted page table (4pts)

(10) Suppose that we have a paged virtual memory where the virtual address is 32 bits and the physical address is 24 bits. The lower 12 bits of each address provides the page offset and the memory is byte addressable.

(10.a) What is the page size? ( 3pts )

(10.b) What is the page table size if we use a one-level page table? Note that each page table entry has the starting address of the corresponding physical page frame. ( 3pts )

(10.c) The page table is stored in the main memory and no page fault happens for page table reference. It takes 10 ms to service a page fault if an empty frame is available or if the replaced page is not modified, and 20 ms if the replaced page is modified. Page fault ratio is 1% and the page to be replaced is modified 50% of the time. The access to read from or write to the main memory is 100ns. What is the effective access time? ( 5pts )

(11) In a file allocation scheme, there are several ways that disk blocks can be allocated to a file. We could have: (i) a linked allocation where the last word of a block is a disk address of another block, and (ii) a indexed allocation where the first block, called index block, has a set of pointers to the other blocks for data. Assume that a disk block is 10 bytes and a word, a disk address, is 1 byte.

(11.a) If you want to access the 40th byte in a file, how many disk accesses are required for linked allocation and indexed allocation respectively? Also, explain why. (4pts)

(11.b) A variation of linked allocation is a File Allocation Table (FAT) used by MS-DOS operating system, where a section of disk at the beginning of each partition is set aside to contain the table about linked list. Assume that FAT is initially loaded into main memory. What would be the advantage of FAT over linked allocation? For accessing 30th byte in a file, how many disk accesses are required? Also explain why. (4pts)

(12) Tow basic I/O schemes for interaction between CPU and the controllers are polling and interrupts. Explain and compare them briefly. (5pts)

(13) Suppose that there is a disk that has 200 cylinders. Consider a disk queue with requests for I/O to disk blocks on cylinders 100, 180, 40, 120, 10, 120, 60, 70. Currently disk head is at cylinder 50.What is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests for each of the following disk scheduling algorithms? Show how you get the answer.

FCFS (First Come First Served) ( 2 pts )

SSTF (Shortest Seek Time First) ( 2 pts )

C-LOOK (Circular LOOK) ( 2 pts )

(14.b) Although LRU page replacement algorithm is theoretically realizable, it required special hardware to fully implement LRU to maintain the linked list of the least recently used pages and to update the list for every memory reference. LRU can be implemented in Software that approximates LRU replacement. Suppose that the system provides 8 reference bits for each page. Explain how we can use these reference bits to approximate LRU algorithm. ( 5pts )