You are on page 1of 2

GLOBAL INSTITUTE OF SCIENCE & TECHNOLOGY

Course Name: Operating Systems

A. Answer any five questions. 1×5


i. What is the use of paging in operating system?
ii. What is of demand paging?
iii. What is safe state?
iv. What is virtual memory?
v. What is internal fragmentation?
vi. What is external fragmentation?
vii. What is thrashing?
viii. What is Belady's Anomaly?
ix. What are overlays?
x. What is a bootstrap program in OS?

B. Answer any three questions.

1. What is fragmentation? How it can be solved?


2. Consider the following page reference and reference time strings for a program:
Page reference string: 5,4,3,2,1,4,3,5,4,3,2,1,5,…..
Show how pages will be allocated using the FIFO and LRU page replacement policy. Calculate
the total number of page faults when allocated page block is 3.
3. Explain the necessary conditions for deadlock to occur.
4. Consider the following system snapshot using data structures in the Banker’s algorithm, with
resources A, B, C, and D, and process P0 to P4:
Max Allocation Available
ABCD ABCD ABCD
P0 6012 4001 3 2 1 1
P1 1750 1100
P2 2356 1254
P3 1653 0633
P4 1656 0212
Using Banker’s algorithm, answer the following questions.
(a) What are the contents of the Need matrix?
(b) Is the system in a safe state? Why
5. Consider the situation in which the disk read/write head is currently located at track 45 (of tracks
0-255) and moving in the positive direction. Assume that the following track requests have been
made in this order: 40, 67, 11, 240, 87. What is the order in which optimized C-SCAN would
service these requests and what is the total seek distance?
6. Given memory partitions of 100K, 500K, 200K, 300K, and 600K (in order), how would each of
the First-fit, Best-fit, and Worst-fit algorithms place processes of 212K, 112K, and 426K (in
order)? Which algorithm makes the most efficient use of memory?
7. If a paging system requires 30 nanoseconds to search the TLB and 150 nanoseconds to access the
memory, calculate the effective access time for the system having 70% hit ratio?

You might also like