0% found this document useful (0 votes)
42 views2 pages

CS2201 Operating System QP

This document outlines the structure and content of the Even Semester Mid Term Examination for the B. Tech - CSE program in March 2024. It includes instructions, sections with compulsory questions on operating systems, and various topics such as caches, threads, semaphores, and process scheduling. The exam consists of multiple-choice questions and programming tasks, with a total duration of 1.5 hours and a maximum score of 30 marks.

Uploaded by

megav369
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views2 pages

CS2201 Operating System QP

This document outlines the structure and content of the Even Semester Mid Term Examination for the B. Tech - CSE program in March 2024. It includes instructions, sections with compulsory questions on operating systems, and various topics such as caches, threads, semaphores, and process scheduling. The exam consists of multiple-choice questions and programming tasks, with a total duration of 1.5 hours and a maximum score of 30 marks.

Uploaded by

megav369
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Name:

Enrolment No:

Even Semester Mid Term Examination, March 2024


Faculty of Engineering, School of Computer Science and Engineering
Department of Computer Science and Engineering
B. Tech - CSE
Course Code: CS2201 Course: Operating Systems Semester: IV
Time: 1.5 hrs. Max. Marks: 30
Instructions: All questions are compulsory.
Missing data, if any, may be assumed suitably.
Calculator is allowed.
SECTION A
S.No. Marks CO
Q A1 Give a reason why caches are useful. What problems do they solve? What problems do 2 CO1
they cause?
Q A2 What resources are used when a thread is created? How do they differ from those used 2 CO2
when a process is created?
Q A3 How does the distinction between kernel mode and user mode function as a 2 CO1
rudimentary form of protection (security) system?

SECTION B
Q B1 Show how semaphore provides the solution to the reader writer problem. 4 CO4
Q B2 How many processes will be spawned after executing the code segment given below? 4 CO2
Also, draw the corresponding process tree. How can you verify that you have drawn
the correct process tree?
main ()
{
if (fork () || fork ())
if (fork () && fork ())
fork ();
}
Q B3 Write a program in ‘C’ (Linux OS) in which the parent process sends an integer value 4 CO2
to the child process and the child process computes whether the value is prime or not
and returns the result to the parent process using a different pipe. The parent process
prints the received result on the terminal. The communication between the parent and
the child is through the pipe.
Q B4 Assume that there are 5 processes, P0 through P4, and 4 types of resources. At T 0 we have 4 CO4
the following system state:
Max Instances of Resource Type A = 3 (2 allocated + 1 Available)
Max Instances of Resource Type B = 17 (12 allocated + 5 Available)
Max Instances of Resource Type C = 16 (14 allocated + 2 Available)
Max Instances of Resource Type D = 12 (12 allocated + 0 Available)

a. Apply Banker’s Algorithm whether the given system is in a safe state or not. If yes
find the safe states sequences.
b. If a request from process P4 arrives for (0 3 2 0), Can the request be granted
immediately?
SECTION-C
Consider the following set of processes, with the length of the CPU-burst time given in 8 CO3
milliseconds:
Process Arrival Time Burst Time
A 0 3
B 1 6
C 4 4

Q C1 D 6 2
E 2 5
F 3 9

Illustrate the execution of these processes with a Gantt chart using Round Robin (RR)
scheduling algorithm with a time quantum of 3ms. Also, find the average waiting time
and turnaround time.

You might also like