As illustrated in the resource allocation graph,
Thread 0 owns resource type Y’s instance and is waiting for resource type X.
Thread 1 owns one instance of resource type X.
Thread 2 owns the other instance of resource type X and is waiting for resource type Y.
a. (8 pts) Are Coffman conditions true in the current state represented by the resource allocation graph? must justify.
b. (7 pts) Is there any deadlock in the current state represented by the resource allocation graph? Why or why not? 2. (15 pts) Both segment table and page table are used to translate from logical address to physical address. But the structures of these tables are different; Each entry in a segment table is {limit, base} while each entry in a page table is {frame#}.
a. Why the differences? b. Can we record base in a page table (and if so why we do not do it)? c. Why there is no limit (or length) in a page table? 3. (30 pts) On a machine with 16 bytes page size, given the following page table for a process, and four of these 8 entries are mapped to page frames. Frame 0 starts at physical address 0. (All numbers given are in decimals.) Page number Frame number 02 10
2 Not in main memory 31
4 Not in main memory
5 Not in main memory
63
7 Not in main memory
(15 pts) Make a list of all logical address ranges (in decimals, byte-level) that would cause page faults.
(3 pts each) What are the corresponding physical addresses (in decimals, byte-level) of the following logical addresses (in decimals, byte-level)? If any address conversion is not possible, explain its reason. •1 • 50 • 95 • 96 • 120