Operating system
Operating system
1. Explain race condition with the help of an example in context of process synchronization.
2. What are co-operating processes? Discuss the advantages of co-operating processes.
3. Explain Peterson’s solution for avoiding race condition.
4. What is critical section problem?
5. State the solution to the critical section problem w.r.t satisfying the requirements.
6. What is Bounded Buffer problem? Explain with the solution.
Assignment- 2 (Topic: Process Synchronization)
1. How to implement a solution to the Readers-Writers problem with the use of semaphores.
2. What are semaphore and mutex in context to process synchronization?
3. State producer consumer problem. Give a solution to the producer consumer problem using
semaphore. Justify your solution guarantees mutual exclusion.
4. How does the monitor give the solution for a synchronization problem? What is binary
semaphore?
5. Describe the two basic operations on semaphore. Explain whether any integer variable can act
as semaphore or not.
6. Discuss dining philosopher’s problem and device an algorithm for the solution using
semaphores.
7. What are the problems of busy wait implementation of semaphore.
Assignment- 3 (Topic: Deadlock)
1. “All unsafe states may not lead to deadlock.” – why or why not?
2. i) What is deadlock?
ii) Justify the following statement:
‘Cycle in resource allocation graph does not always imply the occurrence of deadlock.’
3. What are the necessary conditions for deadlock to occur?
4. Differentiate between starvation and deadlock.
5. Describe the deadlock prevention strategies.
6. What are safe and unsafe states?
7. Explain the deadlock detection mechanism in case of single instance of each resource type.
8. What is the optimistic assumption made in the deadlock detection algorithm? How this
assumption can be violated?
9. Explain circular wait for the occurrence of deadlock and how it could be prevented?
10. Consider n system consisting of m resources of the same type being shared by n processes
only one at a time. Show that the system is deadlock free if the following conditions holds:
(a) The maximum need of each process is between 1 and m resources.
(b) The sum of all maximum needs is less than m+n.