CMPS111 Homework 5 solution

$25.00

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (7 votes)

(4 Marks) Question 1. Consider a computer with a 32-bit processor and 8 KB pages. Calculate the
number of linear page table entries required if virtual addresses are 48-bit.
(6 Marks) Question2. A system has four processes and five allocatable resources. The current
allocation and maximum needs are as follows:
Allocated Maximum Available
Process A 1 0 2 1 1 1 1 2 1 4 0 0 X 1 1
Process B 2 0 1 1 1 2 2 2 1 0
Process C 1 1 0 1 0 2 1 3 1 0
Process D 1 1 1 1 1 1 1 2 2 1
Calculate the smallest value of X for which this is a state from which most processes can run to
completion without deadlock. Show your work and explain your answer.
(5 Marks) Question 3. Can two kernel-level threads in the same user-level process synchronize
using a kernel-level semaphore? What if the threads are implemented entirely at user-level?
Assume that no threads in any other processes have access to the semaphore. Discuss your
answers.
(6 Marks) Question 4. Early computers did not have Direct Memory Access (DMA); the CPU
handled every byte of data read or written. (a) Briefly describe the mechanism by which these early
computers handled non-DMA read operations. (b) What impact did the lack of DMA have on
multiprogramming? Use diagrams if you feel they make your answers clearer.
(4 Marks) Question 5. Consider the FIFO page replacement algorithm and the reference string:
1 2 3 4 1 2 5 1 2 3 4 5
If the number of page frames increases from three to four, does the number of page faults go down,
stay the same, or increase? Explain you answer using diagrams as appropriate.