Operating
System- CS604
Assignment
# 4
Solution
Fall 2010
Marks: 20
Due Date
Your assignment must be uploaded before or on 28th Jan 2010.
Objective
The objective of this assignment is to familiarize
with Memory Management.
Instructions
Ø
Avoid Plagiarism. No marks will be given in case of cheating
or copying from the internet or from other students.
Ø Submit
the assignment through your account on VULMS. No assignment will be accepted
through email after the due date.
Ø If
you have any problem related to assignment, feel free to discuss it by email at
cs604@vu.edu.pk
Question # 1
The logical address space of the process is 32 pages and the
size of each page is 4 Kb. There are 256 frames in the main memory. The size of
a frame is equivalent to the size of a page. With the given information, answer
to the following questions:
- Calculate the size of Logical Address?
- Find the size of the Logical Memory?
- Calculate the size of Physical Address?
- Determine the size of the Physical Memory?
Solution:
Logical Address
Pages=32
No. of bits required for p = Log2 [32] = 5 bits
No. of bits required for d = Log2
[4 Kb] = Log [4096] = 12 bits
Size of logical address= 5 + 12 = 17 bits
Size of the logical
memory:
No. of pages = 32
Size of each page = 4 Kb
Size of Logical Memory = No. of pages * size of each page
= 32 * 4Kb
= 128
Kb
Size of Physical
Address
Total number of frames= 256
No. of bits required for f= Log2 [256] = 8 bits
No. of bits required for d= Log2
[4 Kb] = Log [4096] = 12 bits
Size of Physical address = 8 +12 = 20 bits
Size of Physical
memory:
No. of frames= 256
Size of each frame= 4 Kb
Size of Physical Memory = No. of frames * size of each page
= 256 * 4 Kb
= 1024
Kb
No comments:
Post a Comment