PCC CS592 LAB Assignments 2024
PCC CS592 LAB Assignments 2024
2. Write a shell script to find out the Zombie processes then check which
processes are in sleeping state. After 60ms checks which of previous
sleeping process change its states.
6. Simulate Deadlock avoidance with Banker’s Algorithm find out the safe
sequence also report it if deadlock cannot be avoided.
Example:
Total resources in system:-
ABCD
6576
Available system resources are:-
ABCD
3112
Processes (currently allocated resources):-
A B C D
P1 1 2 2 1
P2 1 0 3 3
P3 1 2 1 0
Processes (maximum resources):-
A B C D
P1 3 3 2 2
P2 1 2 3 4
P3 1 3 5 0
7. Write a C/C++ program to implement Memory Management concept
using the following algorithms.
a) Best fit
b) Worst fit
c) First fit
Sample: Consider the requests from processes in given order 300K, 25K,
125K, and 50K. Let there be two blocks of memory available of size
150K followed by a block size 350K.
8. Simulate the following page replacement algorithm: (i) FIFO, (ii) LRU and
(iii) Optimal
Example-1 Consider page reference string 1, 3, 0, 3, 5, 6 and 3, with 3 page
frames. Find number of page faults for above Algorithm.
10. Write a C program to create a child process. The child process execute an
infinite loop so parent first suspend and resume processes using SIGSTOP ,
SIGCONT signals then kill the child process.