new solve

Assignment1
Second Semester
Session 1445 AH
Student Name
:
Student ID
:
Student Signature
:
Department
Course Code
Total Marks
: Department of Computer Science
: COCS 361
Course Name
Deadline
Time
: Operating Systems
Number of Exam Pages
: 4
: Wednesday, May 05, 2024
: 11:00 – 12:00
20
Marks
S.O 1



/10 Marks
Signature:
S.O 2
/10 Marks
Examiner: Prof Dr Ali Ahmed
Total Marks
(In Figure)
Total Marks
(In Words)
/20 Marks
1. Consider a user program of logical address of size 6 pages and page size is 4 bytes.
The physical address contains 300 frames. The user program consists of 22 instructions
a,b, c, . . . u, v . Each instruction takes 1 byte. Assume at that time the free frames are 7,
26, 52, 20, 55, 6, 18, 21, 70, and 90. Find the following?
a) Draw the logical and physical maps and page tables?
b) Allocate each page in the corresponding frame?
c) Find the physical addresses for the instructions m, d,v, r?
d) Calculate the fragmentation ifexist
[SO1: 10.0 Marks]
2
2. Consider apaging system with the page table stored in memory
a) If amemory reference takes 50 nanoseconds, how long does a paged memory
reference take?
b) If we add TLBs, and if 75 percent of all page-table references are found in the
TLBs, what is the effective memory reference time? (Assume that finding a
page-table entry in the TLBs takes 2 nanoseconds, if the entry is present.)
[SO2: 4.0 Marks]
3
3. Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
How many page faults would occur for the following replacement algorithms, assuming
one, three , five and seven frames? Remember that all frames are initially empty, so your
first unique pages will cost one fault each.
a) LRU Replacement
b) FIFO Replacement
c) Optimal Replacement
[SO2: 6.0 Marks]
4

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER