Tribhuwan University

Institute of Science and Technology

2079

Bachelor Level / Second Year / Fourth Semester / Science

B.Sc in Computer Science and Information Technology (CSC264)

(Operating Systems)

Full Marks: 60

Pass Marks: 24

Time: 3 Hours

Candidates are required to give their answers in their own words as for as practicable.

The figures in the margin indicate full marks.

Section A

Long Answers Questions

Attempt any TWO questions.
[2*10=20]
1.
Discuss about single level and two level directory system. Consider the following process and answer the following questions. a. What is the content of matrix Need? b. Is the system in safe state? c. If P1 request (0,4,2,0) can the request be granted immediately?

$\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline \text{Process} & A & B & C & D & A & B & C & D & A & B & C & D \\ \hline & \text{Allocation} & & & & \text{Max} & & & & \text{Available} & & & \\ \hline P0 & 0 & 0 & 1 & 2 & 0 & 0 & 1 & 2 & 1 & 5 & 2 & 0 \\ P1 & 1 & 0 & 0 & 0 & 1 & 7 & 5 & 0 & & & & \\ P2 & 1 & 3 & 5 & 4 & 2 & 3 & 5 & 6 & & & & \\ P3 & 0 & 6 & 3 & 2 & 0 & 6 & 5 & 2 & & & & \\ P4 & 0 & 0 & 1 & 4 & 0 & 6 & 5 & 6 & & & & \\ \hline \end{array}$
[10]
2.
When does race condition occur in inter process communication? What does busy waiting mean and how it can be handled using sleep and wakeup strategy?[10]
3.
Define shell and system call. Suppose a disk has 201 cylinders, numbered from 0 to 200. At same time the disk arm is at cylinder 95, and there is a queue of disk access requests for cylinders 82,170,43,140,24,16 and 190. Calculate the seek time for the disk scheduling algorithm FCFS,SSTF,SCAN and C-SCAN.[10]
Section B

Short Answers Questions

Attempt any Eight questions.
[8*5=40]
4.
Distinguish between starvation and deadlock. How does the system schedule process using multiple queues? [5]
5.
List any two demerits of disabling interrupt to achieve mutual exclusion. Describe about fixed and variable partitioning. [5]
6.
For the following dataset, compute average waiting time for SRTN and SJF.

$\begin{array}{|c|c|c|} \hline \text{Process} & \text{Arrival Time} & \text{Burst Time} \\ \hline P0 & 0 & 7 \\ P1 & 2 & 4 \\ P2 & 4 & 1 \\ P3 & 5 & 4 \\ \hline \end{array}$
[5]
7.
Discuss the advantages disadvantages of implementing file system using Linked List. [5]
8.
Consider the page references 7,0,1,2,0,3,0,4,2,3,0,3,2. Find the number of page fault using OPR and FIFO, with 4 page frame. [5]
9.
Describe the working mechanism of DMA. [5]
10.
What is the task of disk controller? List some drawback of segmentation. [5]
11.
Write the structure and advantages of TLB. [5]
12.
Why do we need the concept of locality of reference? List the advantages and disadvantages of Round Robin algorithm. [5]