You are on page 1of 3

UNIT-1

1. What is a System call? Explain the various types of system calls provided by an operating system.
2. a. Explain operating system services.
b. Explain operating system functions.
3.List and explain different types of operating systems.

NOTE:ASSIGNMENT 1 DUE DATE ON OR BEFORE 25/02/2019 @ 12:30PM

UNIT-2
.1. Consider the following set of processes, with the length of the CPU burst
given in milliseconds:
Process Burst Time Priority
P1 2 2
P2 1 1
P3 8 4
P4 4 2
P5 5 3
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.
a. Draw four Gantt charts that illustrate the execution of these processes using the following
scheduling algorithms: FCFS, SJF, non preemptive priority (a larger priority number implies a
higher priority), and RR (quantum = 2).
b. What is the turnaround time of each process for each of the scheduling algorithms in part a?
c. What is the waiting time of each process for each of these scheduling algorithms?
d. Which of the algorithms results in the minimum average waiting time (over all processes)?

2. The arrival time, priority and durations of the CPU and I/O bursts for each of the three processes P1, P2
and P3 are given in the table below. Each process has a CPU burst followed by an I/O burst followed by
another CPU burst. Assume that each process has its own I/O resource.

Process AT Priority Burst duration


CPU, I/O, CPU
P1 0 2 1, 5, 3
P2 2 3 (lowest) 3, 3, 1
P3 3 1 (highest) 2, 3, 1
A. Draw Gant charts illustrating execution of these processes for preemptive priority

B.Calculate average turnaround time

C.Calculate average waiting time

D.Calculate response time

3.a)What is a process? Explain about various fields of Process Control Block.


b) With a neat sketch, explain the process state diagram.

NOTE:ASSIGNMENT 2 DUE DATE ON OR BEFORE 2702/2019 @ 12:30PM

UNIT-3

1.Explain synchronization hardware with respect to critical section problem.

2. Explain the implementation of Semaphore.

3. Discuss the solution to Dining philosopher’s problem using a Semaphore.

NOTE:ASSIGNMENT 1 DUE DATE ON OR BEFORE 29/02/2019 @ 12:30PM

UNIT-4

1. In a system, there are three types of resources: E, F and G. Four processes P0, P1, P2 and P3
Execute concurrently. At the outset, the processes have declared their maximum resource
Requirements using a matrix named Max as given below. For example, Max [P2,F] is the
Maximum number of instances of F that P2 would require. The number of instances of the
Resources allocated to the various processes at any given state is given by a matrix named
Allocation.
Consider a state of the system with the Allocation matrix as shown below, and in which 3
Instances of E and 3 instances of F are the only resources available.
Allocation Max
EFG EFG
P0 1 0 1 P0 4 3 1
P1 1 1 2 P1 2 1 4
P2 1 0 3 P2 1 3 3
P3 2 0 0 P3 5 4 1
From the perspective of deadlock avoidance, Is the system in safe state, if so give the safe
sequence.

2. Consider the following snapshot of a system:


Allocation Max Available
ABCD ABCD ABCD
P0 2 0 0 1 4212 3321
P1 3 1 2 1 5252
P2 2 1 0 3 2316
P3 1 3 1 2 1424
P4 1 4 3 2 3665
Answer the following questions using the banker’s algorithm:
a. Illustrate that the system is in a safe state by demonstrating an
order in which the processes may complete.
b. If a request from process P1 arrives for (1, 1, 0, 0), can the request be granted immediately?
c. If a request from process P4 arrives for (0, 0, 2, 0), can the request be granted immediately?
3. Consider a system consisting of four resources of the same type that are shared by three
processes, each of which needs at most two resources. Show that the system is deadlock free.

You might also like