The University of Texas at Dallas--Computer Science Program

CS 4348.501—Quiz III          

Name:_____________________

UTD ID Num:_________________

 

1.      Consider the following state when deadlock avoidance is done:

 

Process

 h(i)

r(i)

P1

(1,1,2)

(1,1,4)

P2

(2,0,2)

(0,3,0)

P3

(1,1,2)

(0,0,1)

P4

(1,0,2)

(3,3,4)

P5

(0,0,1)

(2,1,1)

 h(i) is what is being held by Pi and r(i) is what Pi’s remaining request is. Test if this state is safe or unsafe and show your work.

 

 

 

 

 

 

 

 

 

 

2.      When memory management is done using paging, why is the page size chosen to be a power of 2?

 

 

 

 

3. Describe the contents of a segmentation table and how dynamic address translation is done when memory allocation is by segmentation.