Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

CHANDIGARH UNIVERSITY

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

Date of Allotment: 23/09/2019


Last date of Submission: 26/09/2019

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.

2. Consider the virtual page reference string CO3


1,2,3,2,4,1,3,2,4,1
On demand paged virtual memory system running on a computer, having 3 memory
frames which are initially empty. Calculate the number of page faults in FIFO.
3. A system uses FIFO policy for page replacement. It has 4 page frames with no pages CO3
loaded to begin with. The system first accesses 100 distinct pages in some order and then
accesses the same 100 pages but now in the reverse order. How many page faults will
occur?

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.

2. . Consider the virtual page reference string CO3


1,2,3,2,4,1,3,2,4,1
On demand paged virtual memory system running on a computer, having 3 memory
frames which are initially empty. Calculate the number of page faults in LRU.

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

Sr. Question CO Number


No.
1. Consider a single level paging scheme with a TLB. Assume no page fault occurs. It takes CO3
100 ns to access the physical memory. If TLB hit ratio is 60% and effective memory
access time is 130 ns, TLB access time is ______.

2. Consider the virtual page reference string CO3


1,2,3,2,4,1,3,2,4,1
On demand paged virtual memory system running on a computer, having 4 memory
frames which are initially empty. Calculate the number of page faults in FIFO.

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.

3. A system is having 3 user processes each requiring 2 units of resource R. CO3


Calculate minimum number of units of R such that no deadlock will occur.
4. Consider the following disk request sequence for a disk with 100 tracks CO3

45, 21, 67, 90, 4, 89, 52, 61, 87, 25

Head pointer starting at 50. Find the number of head movements in cylinders
using SSTF scheduling.

SET-7

S. No. Questions CO Number


1. Calculate the size of memory if its address consists of 22 bits and the CO3
memory is 2-byte addressable.
2. A process refers to 5 pages A, B, C, D, and E in the order – CO3
A,B,C,D,A,B,E,A,B,C,D,E. If the page replacement algorithm is LRU, what
would be the number of page transfers with empty internal store of 3 frames.
3. Consider the following disk request sequence for a disk with 100 tracks CO3

98, 137, 122, 183, 14, 133, 65, 78

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

You might also like