Homework 5 Solution

$30.00

Category:

Description

(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

10211

11214

00X11

Process B

20111

22210

Process C

11010

21310

Process D

11111

11221

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:

123412512345

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.

UCSC BSOE CMPS111 Spring 2018 Copyright © 2017-2018 David C. Harrison. All Rights reserved.


error: Content is protected !!