Question 1 (marks 20) 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 • LRU replacement • FIFO replacement • Optimal replacement Repeat using 4 frames. Remember that all frames are initially empty, so the first unique pages will cost one fault each. 10 marks 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 freeframe pool, how is the resident page set and the freeframe 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 (marks 25) Answer the following questions: 10 marks a. Unix has the concept of a “hard link” and a “soft link”. Explain how a Unix file-system implements each type of link. 8 marks 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. 4 7 marks 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 normally 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 (marks 30) 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 (marks 25) Answer the following questions: 13 marks a. In most multiprogramming systems, user programs access memory through virtual addresses, while the operating system and DMA controllers use raw physical addresses to access memory. What are the implications of this design on the initiation of I/O operations by the user program and their execution by the operating system? 12 marks 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.

    • 6 years ago
    Operating Systems A+ Tutorial use as Guide
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      operating_systems.docx