You are on page 1of 4

Internal Assessment Question Paper – 1

M.S. Ramaiah Institute of Technology


(Autonomous Institute, Affiliated to VTU)
Department of CSE
Programme: B.E Term: Aug to Dec 2016
Course: Operating Systems Course Code: CS1551
CIE: I Sem: V Section: A, B & C
Max Marks: 30 Time: 1Hr Portions for Test: L1-L16
Instructions to Candidates: Mobiles, smart watches or any electronic gadgets are strictly banned.
Question 1 is compulsory. Answer any one question from 2 or 3.
M CO
Bloom’s
Sl# Question ar Map
Level
ks ping
1 a)
i. ____ is one of the most basic techniques used by an OS to share a resource
based on time as a parameter.
Remember
ii. The parent process calls ____function to delay its execution until the child 3 CO1
finishes executing.
iii. Define policy and mechanism with respect to operating systems
iv. List out the design goals of an operating system (Any 4). 2
b) Explain process state transition diagram. Trace process state for both CPU and I/O
5 Understand CO1
bound processes.
c) Calculate the following
i) Average Waiting time ii) Average turnaround time using FCFS and
preemptive SJF scheduling algorithms.
Proces Arrival- Burst-Time
sP1 Time
0 (ms)
7 5 Apply CO2
P2 1 5
P3 2 10
P4 2 3
2 a. Describe limited direct execution protocol with time-line. 5 Understand CO1
b. Explain the solutions for starvation and gaming tolerance issues in MLFQ with
5 Apply CO2
suitable diagrams.
c. Compare FCFS, RR, Priority and SJF scheduling algorithms with respect to policy
5 Understand CO2
used, advantages and disadvantages.
OR
3 a. Illustrate with a program fork ( ) and wait ( ) system calls. 5 Apply CO1
b. Calculate the following
i) Average Waiting time ii) Average turnaround time
using RR( Time slice=3ms) and Non-preemptive priority scheduling algorithms
(Assume that all the processes have arrived at the same time and smaller number
indicates highest priority).
Process Priority Burst-Time 5 Apply CO2
P1 1 6(ms)
P2 1 15
P3 2 9
P4 3 7
c) Describe the steps taken by an Operating System to create a process. 5 Understand CO2

Course Outcomes meant to be assessed by the IA Test-I:


CO1: Explain the advantages of virtualization and process management by operating system.
CO2: Implement different process scheduling algorithms and measure their performance.
Scheme
Sl# Question M Bloom’s CO
ar Map
Level
ks ping
1 a)
i.Time sharing.
ii.Wait function
Remember
iii.Policy: a set of ideas or a plan of what to do. 3 CO1
Mechanism: a process, technique, or system for achieving a result.
iv. Concurrency, Persistence, Abstraction, Protection, Performance, Minimizing
overheads (Any 4). 2
b) Diagram 1.5M Explanation 2M Trace 1.5M

5 Understand CO1

c) Calculate the following


i) Average Waiting time ii) Average turnaround time using FCFS and
preemptive SJF scheduling algorithms.
Proces Arrival- Burst-
s
P1 0Time 7Time
P2 1 5
P3 2 10
P4 2 3
FCFS:
P1 P2 P3 P4 5 Apply CO2
0 7 12 22 25
Avg Waiting Time: (0+6+10+20)/4=9ms
Avg Turnaround Time=(7+11+20+23)/4=15.25ms

SJF:
Gantt Chart
P1 P2 P4 P2 P1 P3
0 2 5 9 15 25
Avg waiting time(8+3+13+0)/4=6ms
Avg Turnaround Time=(15+8+23+3)/4=12.25ms
2 a. 5M 5 Understand CO1
b. Identified problems in MLFQ are 1) Starvation 2) Gaming the scheduler
Priority boosting is the solution for starvation as shown in the fig 2.5M

Gaming the scheduler is solved by using the rule : After some time period S, move all 5 Apply CO2
the jobs in the system to the topmost queue as shown in the fig: 2.5M

c. 5 Understand CO2
OR
3 a. fork ( ) creates new process,

5 Apply CO1

c. Calculate the following


i) Average Waiting time ii) Average turnaround time
using RR( Time slice=3ms) and Non-preemptive priority scheduling algorithms
(Assume that all the processes have arrived at the same time and smaller number
indicates highest priority).
Process Priority Burst-
P1 1 Time
6
P2 1 15
P3 2 9
P4 3 7
RR: 5 Apply CO2
P1 P2 P3 P4 P1 P2 P3 P4 P2 P3 P4
0 3 6 9 12 15 18 21 24 27 30 31
P2 P2
34 37

Avg waiting time=19.5 Avg TAT=28.25


Priority
P1 P2 P3 P4
0 6 21 30 37
Avg Waiting time=14.25 Avg TAT=23.5
The following steps carries 5M
The first thing that the OS must do to run a program is to load its code and any static data
(e.g., initialized variables) into memory, into the address space of the process. Once the
code and static data are loaded into memory, Some memory must be allocated for the
program’s run-time stack for local variables, function parameters, and return addresses;
the OS allocates this memory and gives it to the process. The heap is used for explicitly
requested dynamically-allocated data. 5 Understand CO2
The OS will also do some other initialization tasks, particularly as related to input/output
each process by default has three open file descriptors, for standard input, output, and
error;
It thus has one last task: to start the program running at the entry point, namely main().
By jumping to the main(), the OS transfers control of the CPU to the newly-created
process, and thus the program begins its execution.

You might also like