0% found this document useful (0 votes)
5 views7 pages

OS LAB Problem Statements

Uploaded by

Vedant Ransing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views7 pages

OS LAB Problem Statements

Uploaded by

Vedant Ransing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

1. Write a shell script program for different string handling functions.

2. Write a shell script program for different arithmetic functions, example-grading


systems.

3. Write a shell script program for a number to check whether it is


1. palindrome
2. prime
3. generate Fibonacci series
4. Armstrong, no.

4. Implement the solutions for following synchronization problems using semaphore:


i. Producer Consumer
ii. Reader Writer

5. Implement the solutions for following synchronization problems using semaphore:


ii. Reader Writer
iii. Dinning Philosopher

6. Implement the solutions for following synchronization problems using semaphore:


i. Producer Consumer
iii. Dinning Philosopher

6. Write a program to implement following CPU scheduling algorithms:


1) FCFS
2) Round Robin – time slice=4ms

7. Write a program to implement following CPU scheduling algorithms:


1) SJF
2) SRTF
8. Write a program to implement following CPU scheduling algorithms:
1) Priority –preemptive
2) Priority –Nonpreemptive

9. Write a program to implement following CPU scheduling algorithms:


1) Priority –preemptive
2) FCFS

10. Write a program to implement following CPU scheduling algorithms:


1) Priority –Non preemptive
2) SJF
11. Write a program to implement following CPU scheduling algorithms:
1) Priority –Non preemptive
2) Round Robin – time slice=4ms

12. Write a program to implement following CPU scheduling algorithms:


1) SRTF
2) FCFS

13. Write a program to implement bankers algorithm


Number of processes: 5 (P0 to P4)
Resources:
Resource A: Number of instances: 10
Resource B: Number of instances: 5
Resource C: Number of instances: 7

14. Write a program for deadlock detection algorithm for following example.

15. Following is the list of available blocks in the main memory and the process size for each
process (P0 to P3).
blockSize[] = {100, 500, 200, 300, 600}
processSize[] = {212, 417, 112, 426}
Find which memory block is allocated to which process using following placement
strategies:
a. First Fit
b. Worst fit c. Best fit
16. Following is the list of available blocks in the main memory and the process size for each
process (P0 to P3).
blockSize[] = {100, 500, 200, 300, 600}
processSize[] = {212, 417, 112, 426}
Find which memory block is allocated to which process using following placement
strategies:
1) First Fit
2) Next fit
3) Worst fit

17. Following is the list of available blocks in the main memory and the process size for each
process (P0 to P3).
blockSize[] = {100, 500, 200, 300, 600}
processSize[] = {212, 417, 112, 426}
Find which memory block is allocated to which process using following placement
strategies:
1) Next fit
2) Worst fit
3) Best fit

18. Consider the page reference string as 7,1,0,2,0,3,0,4,2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 with


3-page frames. Find the total number of page faults using following page replacement
algorithms:
a. First In First Out
b. Optimal

19. Consider the page reference string as 7,1,0,2,0,3,0,4,2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 with


3-page frames. Find the total number of page faults using following page replacement
algorithms:
1) Least recently used
2) Second Chance (Clock)

20. Consider the page reference string as 7,1,0,2,0,3,0,4,2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 with


3-page frames. Find the total number of page faults using following page replacement
algorithms:
1) Least recently used
2) Optimal

21. Consider the page reference string as 7,1,0,2,0,3,0,4,2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 with


3-page frames. Find the total number of page faults using following page replacement
algorithms:
1) Least recently used
2)FIFO
22. Consider the order of request for cylinder access of the disk is - (98, 183, 37, 122, 14,
124, 65, 67) and current position of Read/Write head is: 53. Find the total head
movements to access the data on the cylinder using following disk scheduling
algorithms:
1) FCFS
2) Shortest Seek Time First (SSTF)

23. Consider the order of request for cylinder access of the disk is - (98, 183, 37, 122, 14,
124, 65, 67) and current position of Read/Write head is: 53. Find the total head
movements to access the data on the cylinder using following disk scheduling
algorithms:
1) SCAN
2) C-SCAN
24. Consider the order of request for cylinder access of the disk is - (98, 183, 37, 122, 14,
124, 65, 67) and current position of Read/Write head is: 53. Find the total head
movements to access the data on the cylinder using following disk scheduling
algorithms:
1) SSTF
2) SCAN

25. Consider the order of request for cylinder access of the disk is - (98, 183, 37, 122, 14,
124, 65, 67) and current position of Read/Write head is: 53. Find the total head
movements to access the data on the cylinder using following disk scheduling
algorithms:
1) FCFS
2) SCAN

26. Consider the order of request for cylinder access of the disk is - (98, 183, 37, 122, 14,
124, 65, 67) and current position of Read/Write head is: 53. Find the total head
movements to access the data on the cylinder using following disk scheduling
algorithms:
1) SSTF
2) C SCAN
27. Consider the order of request for cylinder access of the disk is - (98, 183, 37, 122, 14,
124, 65, 67) and current position of Read/Write head is: 53. Find the total head
movements to access the data on the cylinder using following disk scheduling
algorithms:
1) FCFS
2) C SCAN

28. Implement the following algorithms:


1) FCFS- CPU scheduling algo
2) Optimal –page replacement algo –( Consider the page reference string as
7,1,0,2,0,3,0,4,2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 with 3-page frames. Find the total
number of page faults)
29. Implement the following algorithms:
1) SJF- CPU scheduling algo
2) FIFO –page replacement algo –( Consider the page reference string as
7,1,0,2,0,3,0,4,2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 with 3-page frames. Find the total
number of page faults)

30. Implement the following algorithms:


3) Round Robin- CPU scheduling algo(time slice =4ms)
4) FIFO –page replacement algo –( Consider the page reference string as
7,1,0,2,0,3,0,4,2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 with 3-page frames. Find the total
number of page faults)

31. Implement the following algorithms:


1) FCFS- Disk scheduling algo (Consider the order of request for cylinder access of
the disk is - (98, 183, 37, 122, 14, 124, 65, 67) and current position of Read/Write
head is: 53. Find the total head movements to access the data on the cylinder)
2) Best Fit –memory placement algo
(process (P0 to P3).
blockSize[] = {100, 500, 200, 300, 600}
processSize[] = {212, 417, 112, 426} Find which memory block is allocated to which
process

32. Implement the following algorithms:


1) SSTF- Disk scheduling algo (Consider the order of request for cylinder access
of the disk is - (98, 183, 37, 122, 14, 124, 65, 67) and current position of
Read/Write head is: 53. Find the total head movements to access the data on
the cylinder)
2) First Fit –memory placement algo
(process (P0 to P3).
blockSize[] = {100, 500, 200, 300, 600}
processSize[] = {212, 417, 112, 426} Find which memory block is allocated to which
process

33. Implement the following algorithms:


3) SCAN- Disk scheduling algo (Consider the order of request for cylinder access of
the disk is - (98, 183, 37, 122, 14, 124, 65, 67) and current position of Read/Write
head is: 53. Find the total head movements to access the data on the cylinder)
4) Worst Fit –memory placement algo
(process (P0 to P3).
blockSize[] = {100, 500, 200, 300, 600}
processSize[] = {212, 417, 112, 426} Find which memory block is allocated to which
process
34. Write a program to implement bankers algorithm
Number of processes: 5 (P0 to P4)
Resources:
Resource A: Number of instances: 10
Resource B: Number of instances: 5
Resource C: Number of instances: 7

35. Write a program for deadlock detection algorithm for following example.

36. Write a program to implement bankers algorithm


Number of processes: 5 (P0 to P4)
Resources:
Resource A: Number of instances: 10
Resource B: Number of instances: 5
Resource C: Number of instances: 7
37. Write a program for deadlock detection algorithm for following example.

38. Following is the list of available blocks in the main memory and the process size for each
process (P0 to P3).
blockSize[] = {100, 500, 200, 300, 600}
processSize[] = {212, 417, 112, 426}
Find which memory block is allocated to which process using following placement
strategies:
1) Next fit
2) Worst fit
3) Best fit

39. Consider the page reference string as 7,1,0,2,0,3,0,4,2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 with


3-page frames. Find the total number of page faults using following page replacement
algorithms:
1) First In First Out
2) Optimal

40. Write a program to implement following CPU scheduling algorithms:


1) SJF
2) SRTF

You might also like