0% found this document useful (0 votes)
295 views1 page

Cs2411 Operating Systems Cat 2

The document contains exam questions about operating system concepts including: 1) Semaphores are used to avoid busy waiting and allow mutual exclusion through binary semaphores. 2) Critical regions and monitors are used to prevent race conditions during access to shared resources. 3) Gantt charts are drawn to illustrate process scheduling under FCFS, SJF, priority, and RR algorithms and their turnaround and waiting times are calculated. 4) The banker's algorithm is applied to a resource allocation snapshot to determine if the system is in a safe state and if an incoming request can be granted immediately.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
295 views1 page

Cs2411 Operating Systems Cat 2

The document contains exam questions about operating system concepts including: 1) Semaphores are used to avoid busy waiting and allow mutual exclusion through binary semaphores. 2) Critical regions and monitors are used to prevent race conditions during access to shared resources. 3) Gantt charts are drawn to illustrate process scheduling under FCFS, SJF, priority, and RR algorithms and their turnaround and waiting times are calculated. 4) The banker's algorithm is applied to a resource allocation snapshot to determine if the system is in a safe state and if an incoming request can be granted immediately.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

THIRUMALAI ENGINEERING COLLEGE DEPARTMENT OF COMPUTER SCIENCE ENGINEERING CS2411- OPERATING SYSTEMS CAT II Year : IV Max.

. Mark: 50 Branch: EEE Duration : 1:30 hrs PART- A


1)

2) 3) 4) 5) 6)

What is a semaphore? Define deadlock. What are a safe state and an unsafe state? What is a resource-allocation graph? What is bankers algorithm? Difference between Preemptive and Non-Premptive. PART B

1. Explain what semaphores are, their usage, implementation given to avoid busy waiting and binary semaphores. 2. Explain about critical regions and monitors 3. Consider the following set of processes, with the length of the 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 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, i. A non preemptive priority (a smaller priority number implies a higher priority), and RR(quantum = 1) scheduling. b. What is the turnaround time of each process for each of the scheduling algorithms in part a ? c. What is the waiting time of each process for each of the scheduling algorithms in Part a? d. Which of the schedules in part a results in the minimal average waiting time (over all processes)?
4. 2. Consider the following snapshot of a system:

Process Allocation Max Available AB C D ABCD AB C D P0 0012 0012 15 2 0 P1 1000 1750 P2 1354 2356 P3 0632 0652 P4 0014 0656 Answer the following questions using the bankers algorithm: a. What is the content of the matrix Need? Is the system in a safe state? b. If a request from process P1 arrives for (0, 4, 2, 0), can the request be granted immediately?

You might also like