Os Cia1
Os Cia1
Os Cia1
Regulation – 2022
COURSE OUTCOMES
C403.1 Identify the basic concepts and operations of operating systems.
C403.2 Illustrate the Process management concepts including scheduling, Inter process
communication, deadlocks and multithreading in real world problems.
C403.3 Apply the concepts of memory management including Virtual Memory and Page
Replacement to the issues that occur in Real time applications.
C403.4 Analyze the concepts related to file system interface and implementation.
C403.5 Describe the disk management, system protection and security mechanisms
PART A
1. Does Context Switching improve CPU utilization? Justify your answer.
2. List out the functions of operating system.
3. Draw the Gantt chart for the following using preemptive priority scheduling.
Process Arrival Time Burst Time Priority
P1 0 4 2
P2 1 2 4
P3 2 3 6
P4 3 5 10
4. List out the process states available.
5. Specify any four services provided by an operating system.
6. Give the benefits of Synchronous and asynchronous communication.
7. Differentiate pre-emptive and non-pre-emptive scheduling algorithms.
8. Define semaphore and summarize its importance in operating system.
9. List out the fields associated with Process Control Blocks.
10. Justify why deadlocks cannot arise in a bounded buffer producer–consumers system.
11. Synchronization tool that provides more sophisticated ways (than Mutex locks) for processes to
synchronize their activities. Elucidate different kinds of operations that are possible on semaphore
12. Suppose that the following processes arrive for execution at the times indicated. Each process will
run for the amount of time listed. In answering the questions, use preemptive scheduling, and base
all decisions on the information you have at the time the decision must be made.
Process Arrival Time Burst Time
P1 0.0 8
P2 0.4 4
P3 1.0 1
a. What is the average turnaround time for these processes with the
SJF scheduling algorithm?
PART B
1. i) Describe about Operating system operations and discuss in detail about User and
Abstract view of OS.
1
1
2. i) Consider the situation while designing the operating system structures, it is
sometimes difficult to achieve a layered approach if two components of the
1 operating system are dependent on each other. Which approach will be suitable for
2 designing operating structures in this situation and justify. Also elaborate the other
operating system structure design approaches with their benefits. Also list out some
of the operating system services.
3. i) An operating system executes a variety of programs that run as a process. Process
is a program in execution; process execution must progress in sequential fashion.
1 Describe the process states with the help of state diagram. Define process control
3 block and its role in the context switching of the process.
4. i) 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
1 is deadlock free.
4 ii) Describe a solution for the dining philosophers problem using semaphores.
5. i) Illustrate the classical problems of synchronization in detail with suitable examples.
5
6. i) Discuss how wait() and signal() semaphore operations could be implemented in
multiprocessor environments using the test and set instruction. The solution should
1 exhibit minimal busy waiting. Develop pseudo code for implementing the operations.
6
7. i) Explain the methods for implementing Inter process Communication.
7
8. i) Consider the following set of processes, with the length of the CPU – burst time
given in Milliseconds:
1 Proces Burst Priority
8 s Time
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
The processes have arrived in the order P1, P2, P3, P4, P5, all at time 0.
a. Visualize Gantt charts illustrating the execution of these processes using
FCFS, SJF, Priority and RR (Time Slice = 1) scheduling
b. Determine the turnaround time for each process
c. Calculate the waiting time for each of the process
9. i) Discuss about Deadlock characteristics and methods for handling deadlock in detail.
10. i) Consider a system consists of 5 processes P1 through P5; and 3 resource types:
The following Snapshot of the system has been taken:
i) Find ‘Available’ resources for each processes.
ii) What is the content of ‘need’ matrix?
iii) Is the system in a safe state?
iv) If a request from P2 arrives for (1,0,2), can the request be granted
immediately?
11. i. Summarize the services and system components of operating systems briefly.
12. I Explain the various threading models and threading issues involved in a process.
ii Discuss the critical section problem. State and discuss the basic requirements of
critical problem solution and methods available to solve it.
13. i Assume that the following processes arrive in the time given, with the length of the
CPU-burst time given in milliseconds.
15. i Assume that there are 5 processes, P0 through P4, and 4 types of resources. At T0
we have the following system state:
Proces Allocation Max Available
s
A, B, C, A, B, C, A, B, C,
D D D
P0 0 1 1 0 2 1 1 5 2
0 0 0
P1 1 2 3 1 6 5
1 2
P2 1 3 6 2 3 6
5 6
P3 0 6 3 0 6 5
2 2
P4 0 0 1 0 6 5
4 6
Using Banker’s algorithm, answer the following questions:-
i) Calculate the number of resources of A, B, C, D
ii) Find the contents of need matrix.
iii) Is the system in a safe state? If so, show the sequence of processes executing in
order. If not, justify which process cannot complete and the reason.
16. i Assume the situation where we have a file share between many people. If one of
the people tries editing the file, no other person should be reading or writing at the
same time. Otherwise, changes will not be visible to him/her. However, if some
person is reading the file, then others may read it at the same time.
i) Identify the application used.
ii) Consider the following problem parameters to solve this situation.
One set of data is shared among a number of processes
Once a writer is ready, it performs its write. Only one writer may write at a
time,
If a process is writing, no other process can read it.
If atleast one reader is reading, no other process can write.
Readers may not write and only read.
ii Construct a Resource Allocation Graph for the following scenario. At time‘t’, process
P1 requests for a resource R1, P2 requests R2. Both the resources are available
and they are allocated to the requesting process. At time t1, where t1>t, both the
processes are still holding the resources, however P1 requests for R2 which is held
by P2, P2 requests R1 held by P1. Will there be a deadlock? Justify your answer
with the conditions.
17. i Elucidate the various methods and mechanisms involved in implementing inter
process communication.
18. i Write short notes on
i) Loosely coupled systems
ii) Scheduling queues
iii) Real time systems
iv) Variation in FCFS Scheduling
19. i. Considering the situation while designing the operating system structures, it is sometimes
difficult to achieve a layered approach if two components of the operating system are
dependent on each other. Which approach will be suitable for designing operating
structures in this situation and justify. Also elaborate the other operating system structure
design approaches with their benefits.
ii. Using simple system calls as examples (e.g. getpid, or fork), describe what is generally
involved in providing the result, from the point of invoking the system call to what it returns.
20. i Discuss the classic problems of synchronization with examples.
21. i) An operating system executes a variety of programs that run as a process. The
process is a program in execution; process execution must progress sequentially.
Describe the process states with the help of a state diagram. Define the process
control block and its role in the context switching of the process.
22. i) Discuss in detail about multithreading models. Cite the necessity for process
synchronization. Illustrate a software-based solution to Producer-Consumer
Problem using Shared Memory and Message Passing
23. i)
24. i) Assume that the following processes arrive in the time given, with the length of the
CPU-burst time given in milliseconds.
P 0 15
Q 3 6
R 2 10
S 4 7
T 1 13
a) Give the Gantt chart illustrating the execution of processes using FIFO,
Preemptive and non-preemptive SJF scheduling, and Round robin algorithm (time
quantum= 4 ms). Note highest priority is 5 and the lowest priority is 1.
b) Calculate the average waiting time and average turn-around time for each of the
above algorithms.
25. i) Briefly explain the hardware solutions used to solve critical – sections.
ii) Discuss the methods and mechanisms used to implement interprocess-
communications
26. i) Assume a multithreaded application uses only reader-writer locks for
synchronization. Applying the four necessary conditions for deadlock, is deadlock
still possible if multiple
reader-writer locks are used? Can a system detect that some of its processes are
starving? If you answer “yes,” explain
how it can. If you answer “no,” explain how the system can deal with the starvation
problem
27. i) Explain readers-writers problem. Give its solution with semaphore.
ii) Summarize the responsibility of operating systems concerning system components.
Write short notes on Tightly coupled systems & Monitors
28. i) Various types of errors are generated when programmers use Semaphores
incorrectly to solve critical-section problems. With a schematic view of a monitor and
its condition variables, discuss the usage of Monitors in dealing with such errors.
Also, illustrate monitor concepts by presenting deadlock-free solutions to Dining –
Philosophers’ problem.
29. i)
30. i) Consider the deadlock situation that occurs in a dining philosopher’s problem, when
the
philosophers obtain the chopsticks one at a time. Analyze the four necessary
conditions for
deadlock for this setting.
• If all five philosophers are hungry simultaneously, and each of them pickup one
chopstick, then a deadlock situation occurs because they will be waiting for another
chopstick forever.
• Mutual exclusion
• Hold and wait
• No preemption
• Circular wait
31. i) Explain about the emerging trends and technologies shaping the future of computing
environments, and how might they impact businesses and individuals.
32. i) Distinguish between blocking and non-blocking system calls. Enumerate the
advantages and disadvantages of each approach
ii) Explain the purpose and importance of System Calls in detail with examples.
33. i) Summarize the activities of an operating system with regard to process, file and memory
management.
34. i) Discuss the concept of virtualization and its role in modern operating system structures.
35. i) Elucidate on multitasking, and how does the operating system achieve it? Provide examples
of how multitasking benefits users.
36. i) Illustrate the concept of boot process of a computer, including the various stages
involved.
ii) Discuss the concept of process states (e.g., running, ready, blocked) in a process control
block (PCB). How does the OS maintain and make transition between these states?
37. i) Consider the set of processes given that arrive at time zero. The length of the CPU burst
time given in millisecond. Calculate the average waiting time, average turnaround time and
throughput using FCFS.
38. i) Consider the set of processes given. Calculate the average waiting time, average
turnaround time and throughput using Priority Scheduling