Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Assignment-1

1. Discuss the difference between time-sharing systems and multi-programming


systems.
2. Describe the differences between symmetric and asymmetric multiprocessing.
What are three advantages and one disadvantage of multiprocessor systems?

3. In what ways is the modular kernel approach similar to the layered approach?
In what ways does it differ from the layered approach?

4. Including the initial parent process, how many processes are created by the
program shown in figure below?

#include<stdio.h>
#include<unistd.h>
int main()
{ /* fork a child process */
fork();
/* fork another child process */
fork();
/* and fork another */
fork();
return 0;
}
5. Describe the differences among short-term, medium-term, and long-term
scheduling.
6. Explain process control block with a neat diagram.
7. What are Race conditions? Explain the use of semaphores to achieve
synchronization in producer-consumer problems.
8. Write short notes on monitors and semaphores.
9. Consider the following set of processes, with the length of the CPU burst time
given in milliseconds:
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all
at time 0.
i. Draw the Gantt charts that illustrate the execution of these
processes using the following scheduling algorithms: FCFS,
Preemptive-SJF{Arival time P1-1,P2-0,(P3,P5)-2,p4-4}, non-
preemptive priority (a larger priority number implies a higher
priority), and RR (quantum = 2).
ii. What is the turnaround time of each process for each of the
scheduling algorithms in part a?
iii. What is the waiting time of each process for each of these
scheduling algorithms?
iv. Which among the algorithms results in the minimum average
waiting time (over all processes)?
10. Consider the following snapshot of a system.

Process Allocation Max Available


A B C A B C A B C
P0 0 1 0 7 5 3 3 3
P1 2 0 0 3 2 2 2
P2 3 0 2 9 0 2
P3 2 1 1 2 2 2
P4 0 0 2 4 3 3

Answer the following questions using banker’s algorithm.

i) What is the content of the matrix need?


ii) Is the system in a safe state?
iii) If a request from process P1 arrives for (1,0,2) can the request be granted
immediately?

You might also like