You are on page 1of 2

Assignment No.

04
Semester: Fall 2016
CS604: Operating System

Total Marks: 15
Due Date:
31/01/2017

Instructions:
Please read the following instructions carefully before submitting the
assignment. It should be clear that your assignment will not get any credit if:
The assignment is submitted after the due date.
The submitted assignment does not open or file is corrupt.
Assignment is copied (partial or full) from any source (websites,
forums, students, etc)
Note: You have to upload only .doc file. Assignment in any other format
(extension) will not be accepted and will be awarded with zero marks.
Objective:
The objective of this assignment is to provide hands on experience of:
Understanding of Memory Management
To know the algorithm of deadlock handling mechanisms
For any query about the assignment, contact at CS604@vu.edu.pk
Assignment

Question No. 1 (10 marks):


Suppose a logical address space of 32 pages of 2048 words. There are 64 frames
in the main memory. According to given information calculate the various
parameters related to paging.
Calculate the size of Logical Address?
Calculate the size of Physical Address?
SOLUTION:_
p = [log2 32] bits = 5 bits
f = [log2 64] bits = 6 bits
d = [log2 4096] bits = 12 bits
Logical Address Size = |p| + |d| = 5 + 12 = 17 bits
Physical Address Size = |f| + |d| = 6 + 12 = 18 bits

Question No. 2 (05 marks):


There is a system with 14 tape drives and three processes.To follow the deadlock
avoidance algorithm create a Safe Sequence of the following processes by
calculating the available tape drives.
SOLUTION:_
Processes
P0

Max Need of Allocated


tape drives
tape drives
12
5

Available tape
drives
3

P1

P2

Be Best of Luck st of Luck

You might also like