BIRLA INSTITUTE OF TECHNOLOGY, MESRA, RANCHI
(MID SEMESTER EXAMINATION SP2023)
CLASS: BTECH SEMESTER : IV
BRANCH: CSE/IT SESSION : SP2023
SUBJECT: CS239 OPERATING SYSTEM
TIME: 02 Hours FULL MARKS: 25
INSTRUCTIONS:
1. The question paper contains 5 questions each of 5 marks and total 25 marks.
2. Attempt all questions.
3. The missing data, if any, may be assumed suitably.
4. Tables/Data handbook/Graph paper etc., if applicable, will be supplied to the candidates
-----------------------------------------------------------------------------------------------------------------------------
CO BL
Q.1(a) Explain the basic functions of an operating system. [2] 1 1
Q.1(b) Differentiate multi-programming, multi-tasking and multi-processing. [3] 1 2
Q.2(a) Explain the need for Context Switching. [2] 2 4
Q.2(b) Demonstrate the functionalities of different type of schedulers. [3] 2 1
Q.3(a) Explain the state diagram (life cycle) of threads. [2] 2 2
Q.3(b) Compare user and kernel level threads. Describe how they are mapped. [3] 2 4
Q.4(a) Explain how scheduling works in a multiprocessor system. [2] 2 2
Q.4(b) +----+---------+-------+ [3] 2 5
| | Arrival | Burst |
| | Time | Time |
+----+---------+-------+
| P0 | 0 |3 |
+----+---------+-------+
| P1 | 0 |4 |
+----+---------+-------+
| P2 | 2 |1 |
+----+---------+-------+
| P3 | 2 |2 |
+----+---------+-------+
| P4 | 5 |1 |
+----+---------+-------+
| P5 | 6 |4 |
+----+---------+-------+
Consider the shortest remaining job first (preemptive SJF). Compute the average
waiting time and turnaround time.
Q.5 Consider a two level queue A and B with preemptive priority scheduling among them. [5] 2 5
Queue A has fixed higher priority.
In queue A and B, round robin and preemptive priority scheduling are used,
respectively. If there is any collision, the FCFS is used.
Here low numbers define higher priorities and time Slice is 3. Compute average
turnaround time, and response time for queue A, queue B, and the overall system.
PTO
+-----+---------+-------+----------+-------+
| | Arrival | Burst | Priority |Queue|
| | Time | Time | | |
+-----+---------+-------+----------+-------+
| P0 | 0 | 3 | 4 | B |
+-----+---------+-------+----------+-------+
| P1 | 1 | 2 | 3 | B |
+-----+---------+-------+----------+-------+
| P2 | 2 | 4 | * | A |
+-----+---------+-------+----------+-------+
| P3 | 7 | 12 | * | A |
+-----+---------+-------+----------+-------+
| P4 | 8 | 14 | * | A |
+-----+---------+-------+----------+-------+
| P5 | 9 | 5 | 3 | B |
+-----+---------+-------+----------+-------+
| P6 | 11 | 10 | 4 | B |
+-----+---------+-------+----------+-------+
| P7 | 12 | 6 | * | A |
+-----+---------+-------+----------+-------+
| P8 | 38 | 1 | 5 | B |
+-----+---------+-------+----------+-------+
| P9 | 40 | 2 | 2 | B |
+-----+---------+-------+----------+-------+
| P10 | 41 | 1 | * | A |
+-----+---------+-------+----------+-------+
::::::21/02/2023::::::M