Madhuben & Bhanubhai Patel Institute of Technology AY:2020-21 Term: Even Semester: IV Operating System (3140702) Question Bank

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Madhuben & Bhanubhai Patel Institute of Technology

(Gujarat Technological University)


AY:2020-21 ; Term: Even ; Semester : IV
Operating System (3140702)
Question Bank

1. Explain following terms in brief:


(i) Process (ii) PCB(Process Control Block) (iii) Process State Diagram (iv)
Thread
(v) Inter Process Communication (vi) Scheduler (vii) Dispatcher (viii)
Multiprogramming
(ix) Multi-threading (x) CPU Utilization (xi) Throughput (xii) Response Time
(xiii)Turnaround Time (xiv) CPU-bound process (xv) I/O bound process (xvi) Mutual
Exclusion
(xvii) Critical Region (xviii) Race Condition (xix) busy waiting (xx) spin lock (xxi) context
switch
(xxii) progress(xxiii)Bounded waiting
2. Compare Process and Program.

3. Compare Thread with Process.

4. Compare User Level Thread and Kernel Level Thread.

5. List the advantages and disadvantages of User Level Thread.

6. List the advantages and disadvantages of Kernel Level Thread.

7. Consider the following set of processes, with the length of the CPU-burst given in
milliseconds:

proces Burst time Priority


s
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
The processes are assumed to have arrived in the order p1,p2,p3,p4,p5 all at time=0.
a) Draw four gantt charts illustrating the execution of these processes using FCFS,SJF,
non-preempitve (a small priority number implies a higher priority ),and round
robin (quantum=1)scheduling.
b) What is the average waiting time of all processes for each of the scheduling
algorithms?
c) What is the average turn around time of all processes for each of the scheduling
algorithms?

8. What is Dead lock? When it occurs? How to recover from it.

9. What is operating System? Explain the abstract view of the components of a


computer system.
Madhuben & Bhanubhai Patel Institute of Technology
(Gujarat Technological University)
AY:2020-21 ; Term: Even ; Semester : IV
Operating System (3140702)
Question Bank
10. Suppose that the following processes arrive for the execution at the
times indicated. Each process will run the listed amount of time.
Assume preemptive scheduling.
Process Arrival Time(ms) Burst Time(ms)
P1 0.0 8
P2 0.4 4
P3 1.0 1
What is the turnaround time for these processes with Shortest Job First scheduling
algorithm?
11. What is thread? Explain thread structure.

12. Explain different types of OS and also Explain different types of


tasks done by OS.
13. Explain IPC Problem –Dining Philosopher Problem.

14. What is critical section? What is Mutual exclusion? Explain


Peterson’s solution for mutual exclusion problem.
15. Explain Context Switching. Discuss performance evaluation of
FCFS(First Come First Serve) & RR ( Round Robin) scheduling .
16. What is system call? How it is handled by OS?

17. Explain IPC Problem – Readers & Writers Problem

18. Consider the following set of processes with length of CPU burst time
given in milliseconds.
Process Burst Time Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
Assume arrival order is: P1, P2, P3, P4, P5 all at time 0 and a smaller
priority number implies a higher priority. Draw the Gantt charts
illustrating the execution of these processes using preemptive priority
Scheduling.

19.
What is scheduler? Explain queuing diagram representation of process
scheduler with figure.

20. What is the various operation operations defined on a process?

21. What are the various states a process can be in at a particular time? What factors can
lead to the transition of process states?
22. Justify that multithreading can take the best advantage of multiple processors.
Madhuben & Bhanubhai Patel Institute of Technology
(Gujarat Technological University)
AY:2020-21 ; Term: Even ; Semester : IV
Operating System (3140702)
Question Bank
23. Differentiate between preemptive and non-preemptive scheduling algorithm.

24. Explain the following scheduling algorithm with illustration or suitable example:
First Come First Serve, Shortest Job First, Shortest Remaining Time Job First,
Round Robin, Priority Scheduling, Multi Queue, Multi-Level Feedback Queue,
Lottery, Guaranteed.
25. Compare FCFS, SJF and Round Robin.

26. What is bounded buffer / producer – consumer problem?

27. What requirements should be met by the solution to the problem of critical region?

28. What are monitor? How condition variables differ from semaphore?

29. Compare the semaphore solution to bounded buffer problem to the solution that uses
monitor.
30. What hardware solutions are possible for critical section problem?

31. Describe the software solution to achieve mutual exclusion.

32. Explain with an example, how race condition can be avoided?

33. What do you mean by reader writer problem?

34. What do you mean by the dinning philosophers’ problem?

35. Explain producer-consumer problem with message passing.

36. What is priority inversion problem in inter process communication? How to solve it
with semaphore?
37. What is Process State? Explain different states of a process with various queues
generated at each stage.
38. Explain Client/Server & Virtual Machine Architecture of Operating System.

39. Define: Race Condition, Mutual Exclusion and Throughput.

40. Explain “5 State” Process State Transition Diagram with illustration.

41. Consider the following set of processes with length of CPU burst time given
in milliseconds.
Process Burst Time Priority
P1 10 5
P2 1 1
P3 2 3
P4 1 4
P5 5 2
Assume arrival order is: P1, P2, P3, P4, P5 at time 0,1,2,3,4 respectively and
a smaller priority number implies a higher priority. Draw the Gantt
Madhuben & Bhanubhai Patel Institute of Technology
(Gujarat Technological University)
AY:2020-21 ; Term: Even ; Semester : IV
Operating System (3140702)
Question Bank
charts for preemptive and non-preemptive priority scheduling. Calculate
Average Turnaround Time and Average Waiting Time.
42. List out the names of layers in layered OS.

43. Explain how TSL instruction handles race condition

44. List out the four strategies which are used for dealing with deadlock.

45. What is monolithic kernel?

46. What is interrupt?

47. How barriers are used to achieve Inter Process Communication.

48. List and explain the methods of Process Creation and Termination.

49. You are given two processes P1 and P2. It is required that these processes
perform their actions in a strict order as P1 first, P2 next and P1 first, P2 next and
so on. Write necessary program segments to show how such a strict
synchronization is achieved, using Semaphores.
50. Explain “Disabling Interrupts” and “Lock variables” methods to achieve
IPC.
51. Explain Sleep, Wakeup, Send and Receive System calls.

52. Consider following process, with the CPU burst time given in msec. Draw the
Gantt charts and calculate the average waiting time using (1) FCFS (2) SJF &
(3) Round robin algorithms. Take time quantum of 1 msec for RR. All processes
arrive at time zero.

Process Burst time


P1 9
P2 5
P3 10
P4 6

53. Briefly Explain Process states and Transitions with diagram.

54. Define Deadlock with a suitable example

55. What do you mean by popup threads?


Madhuben & Bhanubhai Patel Institute of Technology
(Gujarat Technological University)
AY:2020-21 ; Term: Even ; Semester : IV
Operating System (3140702)
Question Bank
56. Consider a system with 5 processes whose arrival time and expected run time is given
as under:

ProcessExpected Run Arrival


time (in sec.) Time
P1 8 1
P2 1 4
P3 2 2
P4 1 5
P5 5 6
Find turn around time for each processes and average waiting time using following
scheduling algorithms.
1. Round Robin (quantum = 1 sec.)
2. Shortest job first

57. What is Semaphore? Solve producer consumer problem with use of semaphore.

58.
Differentiate Multi-Programming, Multi-tasking
,Multiprocessing & Distributed Operating System.
59. Five batch jobs A to E arrive at same time. They have estimated running times
10,6,2,4 and 8 minutes. Their priorities are 3,5,2,1 and 4 respectively with 5
being highest priority. For each of the following algorithm determine mean
process turnaround time. Ignore process swapping overhead.
Round Robin, Priority Scheduling, FCFS, SJF.
60. What is priority inversion problem in interprocess communication? How to
solve it with semaphore?
61. Write different operating system services.

62.
Process Time of Priori Execution
1 0 20 10
2 2 10 1
Find 3 4 58 2 average
4 8 40 4 turnaround
time 5 12 30 3 and average
waiting time
for the following algorithm:
1)FCFS 2)SJF 3)SRTN 4)RR(q=2ms) 4)priority (highest number is having highest
priority)
63. Give the difference between hard real-time OS and soft real-time OS.

64. Explain the features of Time Sharing System.


Madhuben & Bhanubhai Patel Institute of Technology
(Gujarat Technological University)
AY:2020-21 ; Term: Even ; Semester : IV
Operating System (3140702)
Question Bank
65. Explain the features of Real Time Operating System.

66. Explain Round Robin, Shortest Job First and Priority Scheduling
Algorithms with illustration.
67. What is monitor? Give the implementation of Bounded Buffer Producer-
Consumer Problem using monitor.
68. What is operating system? Give functions of Operating System.

69. What is monitor? Give the implementation of Bounded Buffer Producer-


Consumer Problem using monitor.
70. What is Semaphore? Give the implementation of Readers-Writers Problem
using Semaphore.

71. What is Deadlock? List the conditions that lead to deadlock. How Deadlock
can be prevented?
72. Explain the use of Banker’s Algorithm for multiple resources for Deadlock
Avoidance with illustration.

73. Explain thread in brief.

74. Explain briefly different types of operating systems.

You might also like