Reference no: EM132146306
Question 1
Answer the following questions: 10 marks a. Consider the following page reference string: 3, 1, 4, 1, 2, 3, 5, 3, 2, 1, 2,5, 4, 3, 5, 2, 4,2, 5,3
Using the above page reference string display the contents of the frames after each page reference (cf. Figures 9.12, 9.14, or 9.15 of the text book, either edition). Mark when a page fault occurs.
Assume 3 frames and use the following algorithms e LRU replacement e FIFO replacement e Optimal replacement
Repeat using 4 frames.
Remember that all frames are initially empty, so the first unique pages will cost one fault each.
b. The VAX/VMS system used a FIFO replacement algorithm for resident pages and a free-frame pool of recently used pages. Assume that the free-frame pool is managed using the least recently used (LRU) replacement policy. Answer the following questions:
(i) If a page fault occurs and if the page does not exist in the free-frame pool, how is free space generated for the newly requested page?
(ii) If a page fault occurs and if the page exists in the free- frame pool, how is the resident page set and the free- frame pool managed to make space for the requested page?
(iii) What does the system's paging algorithm reduce to if the number of resident pages is set to one?
(iv) What does the system's paging algorithm reduce to if the number of pages in the free-frame pool is zero?
Question 2
Answer the following questions:
a. Unix has the concept of a "hard link" and a "soft link". Ex- plain how a Unix file-system implements each type of link.
b. Based on the file-system implementation discussed above explain why Unix does not allow a "hard link" to a directory but will allow a "soft link" to a directory.
c. When copying a file to a USB flash drive on a Unix system it is extremely important to unmount the flash drive before removing the device. Explain why. If the USB flash drive is removed before unmounting then the copied file will nor- mally appear on the flash drive's file system (have a directory entry and an inode) but will be empty. Explain why the file meta data is copied synchronously but the file data is copied asynchronously.
Question 3
What are the steps required to be performed by the Ext2 file system driver to delete a file? Assume you know and have in memory a copy of the inode of the directory the file is in and the inode of the file to be deleted. Also assume the block size is 1024 bytes. Either list the steps required or use a flowchart. (See the week11 practical for information on the Ext2 file system and examples of listing the required steps or writing a flowchart)
Question 4
Answer the following questions:
a. In most multiprogramming systems, user programs access memory through virtual addresses, while the operating sys- tem and DMA controllers use raw physical addresses to ac- cess memory. What are the implications of this design on the initiation of I/O operations by the user program and their ex- ecution by the operating system?
b. An open-file table is used to maintain information about files that are currently being accessed by a process. Should the operating system maintain a separate table for each process or just maintain one table that contains references to files that are being accessed by all processes at the current time, or use both types of tables? Justify your answer.