Roll No. …………………..
TCS–302
B. Tech. (CSE) (Third Semester)
EXAMINATION, 2023-24
OPERATING SYSTEM
Time : Three Hours
Maximum Marks : 60
Note : Question paper has three Sections. Read carefully
instructions for each Section.
Section—A
(Very Short Answer Type Questions)
1. Attempt all questions. 1 each
(a) What is the requirement of Operating System ?
(CO1, UN)
(b) What is the purpose of system calls ? How are
these used by the users ? (CO1, UN)
(c) What are the advantages of multithreading ?
(CO1, UN)
(d) Describe fork(), getppid(). (CO1, UN)
P. T. O.
[2] TCS–302
(e) Differentiate Internal and External
Fragmentation. (CO1, UN)
(f) What is concept of ageing in detection and
recovery based algorithms of deadlock handling ?
(CO2, UN)
(g) Write the purpose of binary semaphore.
(CO2, UN)
(h) What is Critical region ? (CO2, UN)
(i) Explain Belady’s anomaly. (CO3, UN)
(j) What is Segmented paging ? Explain. (CO3, UN)
(k) Explain Page Fault. (CO3, UN)
(l) List various operations performed on a file.
(CO4, UN)
Section—B
(Short Answer Type Questions)
2. Attempt all questions. 4 each
(a) How does an operating system work ? Explain the
main four functions of operating system ?
(CO1, UN)
OR
What are the main differences among the
multiprogramming, multiprocessing and
multitasking ? (CO1, UN)
[3] TCS–302
(b) What do you mean by Context Switching and
PCB ? Also explain the Pure Overhead.
(CO2, UN)
OR
Explain semaphore. Find out the solution for
Dining Philosopher problem using Semaphore.
(CO2, UN)
(c) What do you understand by CPU scheduling ?
Consider the following scenario of five
processes : (CO2, AP)
Execution
Process Arrival Time
Time
A 6 0
B 2 3
C 4 5
D 6 7
E 3 10
If the CPU scheduling policy is Shortest
Remaining Time First, answer the following :
(i) Draw the Gantt chart and calculate the
average waiting time and average
turnaround time.
(ii) Response time of D and E.
P. T. O.
[4] TCS–302
OR
An Operating System uses Banker’s Algorithm
for deadlock avoidance when managing the
allocation of three resources types X,Y and Z to
three processes P0, P1 and P2. The table given
below presents the current system state.
(CO2, AP)
Allocation Max
X Y Z X Y Z
P0 0 0 1 8 4 3
P1 3 2 0 6 2 0
P2 2 1 1 3 3 3
There are 3 units of type X, 2 units of type Y and
2 units of type Z still available.
Answer the following questions using the
Banker’s algorithm :
(i) Determine the system is safe or not.
(ii) Consider the following independent requests
for additional resources in the current state :
Req1 : P0 requests 0 units of X, 0 units of Y
and 2 units of Z.
Req2 : Pl requests 2 units of X, 0 units of Y
and 0 units of Z.
Find out Req 1 and Req 2 Permitted or not ?
[5] TCS–302
(d) What do you understand by a file ? Explain
various types of it and their attributes. (CO4, UN)
OR
How virtual memory works ? Explain demand
paging with suitable example. (CO4, UN)
(e) Write a shell script for swapping of two numbers.
Both the numbers must be entered by the user at
the run time. (CO3, AP)
OR
Assume that there are 3-page frames which are
initially empty. If the page reference string is 1, 2,
3, 4, 2, 1, 5, 3, 2, 4, 6. Calculate the Page fault
and hit using the optimal replacement policy.
(CO3, AP)
(f) Explain the User level Thread and Kernel level
Thread. (CO2, UN)
OR
Explain the difference between preemptive and
non-preemptive scheduling in the context of
process management. Provide examples of
situations where each type of scheduling is
beneficial. (CO2, UN)
P. T. O.
[6] TCS–302
Section—C
(Long Answer Type Questions)
3. Attempt all questions : 8 each
(a) The disk queue in the request for I/O to block on
cylinders are 98, 183, 37, 122, 14, 124, 65, 67. If
the disk head initially at 53, then compute the
total head movement for the following
algorithms : (CO4, AP)
(i) FCFS scheduling
(ii) SSTF scheduling
(iii) SCAN scheduling
(iv) C-SCAN scheduling
OR
Suppose the head of a moving head disk with
200 tracks is currently serving a request for track
143 and has just finished a request for track 125.
If the queue of requests is kept in FIFO order :
86, 147, 91, 177, 94, 150.
What is the total head movement to satisfy these
requests for the following schemes : (CO4, AP)
(i) FCFS scheduling
(ii) SSTF scheduling
(iii) C-SCAN scheduling
[7] TCS–302
(b) What are the common techniques for handling
deadlocks in an operating system ? Provide an
overview of each technique. (CO3, UN)
OR
Discuss the concept of segmentation in memory
management. What are its benefits, and how is it
different from paging ? (CO3, UN)
(c) Explain the concept of file allocation methods in
a file system. Compare and contrast contiguous,
linked, and indexed allocation methods.
(CO5, UN)
OR
Explain the role of the Linux kernel in the
operating system. How does the kernel interact
with shell programs, and what functions does it
perform in managing hardware resources and
system processes ? (CO5, UN)
TCS–302
P. T. O.