Unit 2,3 Ct2 Question Bank 4 Marks

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

UNIT 2,3 CT2 QUESTION BANK

4 MARKS

1. What is meant by Critical section Problem. List out its solutions


2. Explain in short about necessary condition for deadlock.
3. Define race condition along with example.
4. What are the hardware solutions to CS problem?
5. List out the circumstances under which CPU scheduling decisions takes place and the
types of scheduling available.
6. Differentiate preemptive and non preemptive scheduling.
7. Define Starvation with example.
8. Consider the following 4 process , with the length of CPU burst time given in
milliseconds
Process P1 P2 P3 P4
Arrival time 0 1 2 3
Burst time 8 4 9 5
Consider the FCFS scheduling algorithm. Using Gantt chart , Find the average waiting
time and average turnaround time
9. Define resource allocation graph along with example.
10. What is the use of swapping?
11. Differentiate Internal and external Fragmentation
12. Illustrate about Internal fragmentation and its solution.
13. Enumerate on Hardware Address Protection and the registers used for it.
14. Name one classic problem of synchronization and how we can arrive at its solution.
15. Suggest the best solution for external fragmentation
16. Provide the 3 strategies for dynamic storage allocation problem
17. Discuss the need for relocation register
18. List the differences between logical and physical address

12 MARKS:

1. State dining philosopher’s problem and give a solution using semaphores. Write structure
of philosopher.
2. Explain in detail solution criteria for critical section problem and the algorithms for
handling two process CS problem
3. What are semaphores? Explain solution to producer-consumer problem using semaphores
4. Consider the following set of processes, with the arrival times and the CPU-burst times
given in milliseconds
Process Arrival Time Burst Time
P1 0 5
P2 1 3
P3 2 3
P4 4 1
5. What is the average turnaround and waiting time for these processes with the preemptive
shortest remaining processing time first (SRPT) algorithm and round robin with quantum
time of 2 ms ? Draw the Gantt Chart
6. Consider the following set of processes, with the arrival times and the CPU-burst times
given in milliseconds
Process Arrival Time Burst Time Priority
P1 0 6 2
P2 1 2 2
P3 1 3 4
P4 2 1 1
P5 2 2 3
Give a Gantt chart illustrating the execution of the five processes using FCFS, RR (quantum
time =3) and Priority. Which algorithm gives minimum average waiting and turnaround time.

7. Consider the following five processes, with the length of CPU burst time given in
milliseconds
Proces Arriva Burs
s l time t
time
A 0 3
B 2 6
C 4 4
D 6 5
E 8 2
Consider the FCFS, round robin(Quantum =1ms)scheduling algorithms.Illustrate using Gantt
chart. Which algorithm will give minimum average waiting time? Discuss.
8. Explain the banker's algorithm for deadlock avoidance.
9. What is Deadlock? Discuss the necessary condition for deadlock Explain Resource
allocation graph.Explain the deadlock prevention methods in detail.
10. Given the following state for the Banker’s Algorithm.
5 processes P0 through P4 , 3 resource types:
A (10 instances); B (5 instances); C (7 instances);
Calculate the Need matrix
How that the current state is safe, that is, show a safe sequence of processes

11. Given the following state for the Banker’s Algorithm.


6 processes P0 through P5 , 4 resource types:
A (15 instances); B (6 instances) C (9 instances); D (10 instances)
i. Calculate the Need matrix
ii. How that the current state is safe, that is, show a safe sequence of processes.

12. Determine whether the given state is safe or not using deadlock avoidance algorithm.
Claim Allocation Resource vector Available vector
ABC | ABC | ABC | A BC
322 10 0 936 011
613 612
314 2l 1
422 002

13. Given memory partition of 20 KB, 100 KB, 40 KB, 200 KB and 10 KB (in order). Show
with neat Sketch how would each of the first-fit, best-fit and worst-fit algorithms place
processes of 90 KB, 50 KB, 30 KB and 40 KB(in order). Which algorithm is most
efficient in memory allocation?
14. Given memory partition of 100 KB, 500 KB, 200 KB and 600 KB (in order). Show with
neat Sketch how would each of the first-fit, best-fit and worst-fit algorithms place
processes of 412 KB,317 KB, 112 KB and 326 KB(in order). Which algorithm is most
efficient in memory allocation?
15. Briefly explain the commonly used techniques for structing page table.
16. Why are translation look aside buffer important? Explain address translation with TLB

You might also like