Nothing Special   »   [go: up one dir, main page]

KCS401 - OS - Final Question Bank

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

AJAY KUMAR GARG ENGINEERING COLLEGE, GHAZIABAD

DEPARTMENT OF INFORMATION TECHNOLOGY


Operating Systems (KCS401)

Short type Questions:

1. Define Operating system and mention its major functions.


2. Briefly define the term Real Time Operating System.
3. List the objectives of an operating system.
4. What do you mean by multitasking?
5. What do we need Scheduling?
6. Define kernel and names of type of kernel.
7. Describe the differences between multiprogramming and multitasking?
8. Why we need multiprogramming operating system?
9. How loosely coupled system provides reliability and load sharing?
10. Define monolithic kernel and microkernel.
11. An operating system is like a government. Justify this statement.
12. What are the Performance Criteria in CPU Scheduling?
13. What do you mean by the safe state and an unsafe state?
14. What are the various scheduling criteria for CPU scheduling?
15. Define convoy effect. How it affects the performance of the system.
16. Discuss the usage of wait-for graph method.
17. What is process control block?
18. Describe the typical elements of the process control block
19. Define scheduling with example.
20. What is race condition?
21. What do you mean by memory management?
22. Define Paging.
23. Explain in brief about the Multiprogramming with fixed partitions.
24. What are the disadvantages of single contiguous memory allocation?
25. Explain logical address space and physical address space diagrammatically.
26. Define (a) Busy Waiting (b) Spooling
27. Define Belady’s Anomaly.
28. What is the difference between file and directory?
29. Define seek time and latency time.
Long Answer type Questions.
1. Explain in detail about the Process Control Block (PCB) in CPU Scheduling.
2. Explain in detail about the Multiuser Systems and Multithreaded Systems.
3. Explain in detail about the Operating System services.
4. Explain in detail about the Threads and their management.
5. Differentiate between user thread and kernel thread. What is thread cancellation?
6. Explain in detail about the Monolithic and Microkernel Systems.
7. What do you understand by system call? List and explain four system calls used for process
management.
8. Explain in detail about the Deadlock System model and Deadlock characterization.
9. Illustrate the following page-replacement algorithms.
a) FIFO b) Optimal Page Replacement
Use the reference string 7, 0,1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2,1, 2, 0, 1, 7, 0,1 for a memory with three
frames. Find total miss for each algorithm.
10. What are the necessary conditions to hold a deadlock in a system?
11. Discuss the difference between a time-sharing system and real time system.
12. Consider the set of processes given in the table and the following scheduling algorithms:
i) Round Robin (Quantum=2) ii) SJF
Draw the Gantt chart and find the average waiting time and turn-around time for the algorithms.

Process ID Arrival Time Execution Time


A 0 4
B 2 7
C 3 3
D 3.5 3
E 4 5

13. Write and explain Banker’s algorithm for avoidance of deadlock.


14. Differentiate between Deadlock and Starvation in detail.
15. Given memory partition of 100 K, 500 K, 200 K, 300 K, and 600 K (in order) how would each of the
first-fit, best-fit and worst-fit algorithms place processes of 212 K, 417 K, 112 K, and 426 K
(in order)? Which algorithm makes the most efficient use of memory?
16. Define virtual memory concepts and discuss replacement algorithms in brief.
17. Explain briefly Layered Operating system structure with neat sketch. Also explain protection and
security.
18. Consider the following page reference string: 1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6 How many page
faults would occur for the optimal page replacement algorithm, assuming three frames and all
frames are initially empty.
19. Differentiate between (with one suitable example) Interactive and Batch processing System.
20. Consider the following process:
Process Arrival Time Burst Time

P1 0 8
P2 1 4
P3 2 9
P4 3 5
Draw Gantt chart and find the average waiting time and average turnaround time:
a) FCFS Scheduling
b) b. SRTF Scheduling or Pre-emptive SJF Scheduling
Consider the following process:

Process Arrival Time Burst Time Priority

P1 0 6 3
P2 1 4 1
P3 2 5 2
P4 3 8 4
Draw Gantt chart and find the average waiting time and average turnaround time:
c) SRTF Scheduling d. Round robin (time quantum:3)
21. What do you mean by Belady's anomaly? Which algorithm suffers from Belady,s anomaly and
how can it be rectified?
22. What is Thrashing? What is the cause of Thrashing? How does the system detect Thrashing? What
can the system do to eliminate this problem?
23. Explain Paging with example. Differentiate Paging and Segmentation.
24. Explain the difference between External fragmentation and Internal fragmentation. How to solve the
fragmentation problem using paging.
25. List five services provided by an operating system. Explain how each provides convenience to the
users.
26. Explain also in which cases it would be impossible for user-level programs to provide these services.
27. Define the essential properties of the following types of operating systems:
a) Batch b) Interactive c) Time sharing
28. Consider the following process:
Process Arrival Time Burst Time
(in msec.)
A 0 4
B 1 7
C 2 9
D 2 13
E 4 15
Draw the Gantt chart and calculate the average turnaround time and average waiting time for the
following given processes with a) Round Robin (time quantum=2) b) SRTF Scheduling

29. Explain the following:


a) Peterson’s solution for critical section problem.
b) Sleeping barber problem and its solution

30. What is a critical section problem? Explain with an example. Also explain the conditions that a
solution to the critical section problem must satisfy.
31. Consider the following page reference string: A, B, C, D, A, B, E, A, B, C, D, E. How many page
faults would occur for the following replacement algorithms, assuming three frames? Remember all
frames are initially empty, so your first unique pages will all cost one fault each.
i) LRU replacement ii) FIFO replacement iii) Optimal replacement

32. How a page fault is handled in an operating system. What is the role of TLB in paging? Consider a
paging system with the page table stored in memory.
i. If a memory reference takes 50 nanoseconds, how long does a paged memory reference take?
ii. If we add TLBs, and if 75 percent of all page-table references are found in the TLBs, what is the
effective memory access time? (Assume that finding a page-table entry in the TLBs takes 2
nanoseconds, if the entry is present.)
33. On a system using paging and segmentation, the virtual address space consists of upto 16
segments where each segment can be up to 2 16 bytes long. The hardware pages each segment
into 512-byte pages. How many bits in the virtual address specify the Segment Number, Page no,
offset with page and entire virtual address.

34. Given memory partitions of 21K, 5K, 90K, 54K, 10K, 25K and 56K (in order), how would each of the
First-fit, Best-fit, and Worst-fit algorithms place processes of 10K, 7K, 22K and 26K (in order)? Which
algorithm makes the most efficient use of memory? Also calculate internal and external
fragmentation for each algorithm.

35. Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently serving a
request at cylinder 143, and the previous request was at cylinder 125. The queue of pending
requests, in FIFO order, is 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130 Starting from the current
head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the
pending requests, for each of the following disk scheduling algorithms?
i) SSTF ii) SCAN iii) LOOK iv) FCFS
36. Explain RAID structure and its levels.
37. Write short notes on following
a) File system protection and security
b) Linked file allocation methods.
38. What are files and explain the access methods for files.
39. Consider the following snapshot of a system.

Processes Allocation Max Available


A B C D A B C D A B C D
P0 1 0 2 0 3 2 4 2 3 4 0 1
P1 0 3 1 2 3 5 1 2
P2 2 4 5 1 2 7 7 5
P3 3 0 0 6 5 5 0 8
P4 4 2 1 3 6 2 1 4

Answer the following questions using the Banker’s algorithm.


a) What is the content of the matrix need?
b) Is the system in a safe state?
c) If the request from process P1 arrives for (0, 4, 0, 1) can the request be granted immediately?

40. Discuss the following:


a) Deadlock Prevention
b) Deadlock Detection and Recovery
41. Consider the set of 5 processes whose arrival time and burst time are given below-
PID P1 P2 P3 P4 P5
Arrival Time 0 1 2 3 4
Burst Time 8 5 4 1 3
If the CPU scheduling policy is the shortest remaining time first, calculate the average waiting time and
average turnaround time. Also find the efficiency of the CPU.
42. What do you understand by Process? Explain various states of process with suitable diagram.
43. What should be the value of time quantum in Round Robin (RR) scheduling to obtain the best
performance? Consider the set of 6 processes whose arrival time and burst time are given below-
PID P1 P2 P3 P4 P5 P6
Arrival Time 0 1 2 3 4 5
Burst Time 5 6 7 9 2 3
If the CPU scheduling policy is Round Robin with time quantum = 2 unit, calculate the average
waiting time, average turnaround time and average response time.

44.

45.
46

You might also like