

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The mid-term exam for the operating systems course (cs 571) at george mason university, which was held in fall 1995. The exam covers various topics related to operating systems, including mutexes, condition variables, process management, memory management, and file systems. Students are required to answer questions related to implementing solaris mutexes and condition variables using semaphores, the behavior of cond wait calls, process resource allocation, forking a process, and page replacement policies.
Typology: Exams
1 / 3
This page cannot be seen from the preview
Don't miss anything!


R 1 R 2 R 3 R 4 R 1 R 2 R 3 R 4 R 1 R 2 R 3 R 4 P 0 3 0 1 1 1 1 0 0 1 0 2 0 P 2 0 1 0 0 0 1 1 2 P 3 1 1 1 0 3 1 0 0 P 4 1 1 0 1 0 0 1 0 P 5 0 0 0 0 2 1 1 0
Here the Al l ocation matrix shows the number of instances of a resource type allocated to a particular process. Similarly, the N eed matrix shows the number of instances of a resource that could be requested by a particular process (in addition to the resources are already allocated to it). The Av ail abl e vector shows the number of instances of each resource type that are currently free.
(a) The system is currently in a safe state. Explain why. (b) Suppose process P 5 now requests an instance of resource R 1. If the system is using a deadlock avoidance approach, should this request be granted? Explain why or why not. (5)
address is split up into two fields: the highest 9 bits are used as an index into the page table, and the remaining 9 bits are used as an offset into a page.
The current content of physical memory is as follows:
.. ..
Process A, PAGE 3
Process B, PAGE 10
Process B, PAGE 65
Process B, PAGE 9
Process A, PAGE 9
Assume that the page table for process A is stored in physical memory starting at location 0, while the page table for process B is stored in physical memory starting at location 512. Assume that one of the hardware registers is used as a page table base register , and that the process currently being executed is process A.
a. ASSUMING THAT PAGE TABLES CONTAIN PAGE FRAME NUMBERS (RATHER THAN PHYSICAL MEMORY ADDRESSES), show the current contents of the page tables for process A and process B. b. Assuming that address translation was done using an inverted page table, what would be the current contents of the inverted page table (show only the entries corresponding to the contents of memory as shown in the figure). c. What are the current contents of the page table base register? What actions would be taken by the operating system on a context switch from process A to process B?
For your information: 1536 = 512 3; 2048 = 512 4; 3072 = 512 6; 3584 = 512 7; 4608 = 512 9; 5120 = 512 10; 17408 = 512 34; 33280 = 512 65; 2 3 = 8; 2 4 = 16; 2 5 = 32; 2 6 = 64; 2 7 = 128; 2 8 = 256; 2 9 = 512; (10)