OS Assignment 2
OS Assignment 2
Gharuan, Mohali
Unit-2
Assignment 2
Institute/Department: AIT-CSE
Division: 3rd Sem
Subject Name: Operating System
Subject Code: CST-205
Assignment No.: 2
Max. Marks: 12
Course Outcomes:
CO Title Level
Number
CO1 Understand fundamental concepts of operating systems and Understand
compare the various algorithms for CPU scheduling.
CO2 Understand and analyze process synchronization, various Understand
concepts related with Deadlock to solve problems of resources
allocation.
CO3 Analyze the various Data Structures and algorithms used in Analysis
Memory Management, File Management and Device
management.
CO4 Understand basic concepts related to protection and Security, Remember
Distinguish between Distributed and Network Operating Systems
SET-1
Questions:
Sr. Question CO Number
No.
1. Let the page fault service time be 10ms in a computer with avg memory access time CO3
being 20ns. If one page fault is generated for every 10^6 memory accesses. What is
Effective access time for the memory.
4. What is thrashing? How will you identify it? What the system can do for handling CO3
thrashing? Explain in detail.
SET-2
Sr. Question CO Number
No.
1. Consider the requests from processes in given order 300K, 25K, 125K and 50K. Let CO3
there be two blocks of memory available of size 150K followed by a block size 350K.
Which of the following partition allocation schemes can satisfy above requests? Discuss
each option in detail.
A) Best fit but not first fit.
B) First fit but not best fit.
C) Both First fit & Best fit.
D) neither first fit nor best fit.
3. Suppose the time to service a page fault is on the average 10 milliseconds, while a CO3
memory access takes 1 microsecond. Then a 99.99% hit ratio results in average memory
access time of??.
4. What is segmentation with paging? Explain in detail CO3
SET-3
3. Consider the following disk request sequence for a disk with 100 tracks 45, 21, 67, 90, 4, CO3
50, 89, 52, 61, 87, 25
Head pointer starting at 50 and moving in left direction. Find the number of head
movements in cylinders using FCFS scheduling.
4. Which algorithm suffers from belady’s anomly? What is it? Explain in detail by CO3
considering an example.
SET-4
Sr. Question CO Number
No.
1. Consider a single level paging scheme with a TLB. Assume no page fault occurs. It CO3
takes 20 ns to search the TLB. If TLB hit ratio is 50% and effective memory access
time is 170 ns, main memory access time is ______.
2. A process refers to 5 pages A, B, C, D, and E in the order –A,B,C,D,A,B,E,A,B,C,D,E. CO3
If the page replacement algorithm is FIFO, what would be the number of page transfers
with empty internal store of 3 frames.
3. A system is having 10 user processes each requiring 3 units of resource R. The minimum
number of units of R such that no deadlock will occur _____? CO3
4. What is the need of memory hierarchy? What will happen if memory hierarchy is not CO3
implemented in the system? Explain.
SET-5
S. No. Questions CO Number
1. Consider a single level paging scheme with a TLB. Assume no page fault occurs. It CO3
takes 20 ns to search the TLB and 100 ns to access the physical memory. If effective
memory access time is 130 ns, TLB hit ratio is ______.
2. A process has been allocated 3 page frames and the reference string is: CO3
1,2,1,3,7,4,5,6,3,1. How many more page faults occur with LRU than the optimal page
replacement policy?
3. A system is having 3 user processes P1, P2 and P3 where P1 requires 2 units of resource CO3
R, P2 requires 3 units of resource R, P3 requires 4 units of resource R. Calculate
minimum number of units of R that ensures no deadlock.
4. What is segmentation with paging? Explain in detail CO3
SET-6
S. No. Questions CO Number
1. Consider the following segment table- CO3
Which of the following logical address will produce trap addressing error?
Calculate the physical address if no trap is produced
2. A process has been allocated 3 page frames and the reference string is: CO3
1,2,1,3,7,4,5,6,3,1. Calculate the number of page faults in FIFO.
Head pointer starting at 50. Find the number of head movements in cylinders
using SSTF scheduling.
SET-7
Head pointer starting at 54 and moving in left direction. Find the number of
head movements in cylinders using SCAN scheduling.
4. Differentiate between static linking and dynamic linking. CO3