OS - Wipro - Lab Sheet-04
OS - Wipro - Lab Sheet-04
2. Prerequisite:
Refer to the “Deadlock” video capsule available in eLearn Portal’s Labware page.
3. Important Instructions:
a. Experiments should be conducted on the BITS Nuvepro Cloud Lab only.
Experiments conducted outside this lab platform will not be evaluated.
b. Instructions on how to access and use the Nuvepro Cloud lab platform are
available in the document “Steps to access cloud-based CS/IS virtual lab.pdf”.
c. While using the Nuvepro Cloud, save all your work in the Persistent folder,
which is available on the desktop. (Important Note: Always take backup of
this folder.)
d. The completed worksheet should be uploaded in Taxila (elearn) portal only.
The last date for uploading the document is 5-November-2024.
e. This worksheet/lab activity carries 2.5% of weightage
f. Refrain from copying or sharing documents with others. Any evidence of
such practice will attract severe penalties.
g. Any queries related to LAB Activities should be asked only through eLearn
portal under discussion forum. Use the below mentioned link to access the
same:
Section Discussion Forum Link
SEWIZC364 https://taxila-aws.bits-pilani.ac.in/mod/forum/discuss.php?
d=68446#p145218
SSWTZC364 https://taxila-aws.bits-pilani.ac.in/mod/forum/discuss.php?
d=68447#p145219
CSIWZC364 https://taxila-aws.bits-pilani.ac.in/mod/forum/discuss.php?
d=68448#p145220
4. Lab Exercise:
1
The lab exercise is divided in to three parts. For all the programs that is
used, the program name should begin with your <ID number>. Programs
names without your ID number will fetch zero marks.
PART-A
for n = 1 to 20
next
end
for n = 1 to 20
next
end
for n = 1 to 20
next
end
Perform / Answer the following:
Task 1: Draw the resource allocation graph for the above code.
Task 2: Compile all the above three source codes and load in the main memory at starting
addresses 100, 200, and 300 respectively. Provide the snapshot of PROGRAM SOURCE
[INPUT] and PROGRAM CODE [OUTPUT] for all the three source codes.[paste entire
compiler simulator window, after compiling each code]
2
Task 3: Create 3 processes P1, P2, and P3. Provide the evidence of process creation in the
form of snapshot.
Task 4: Select round robin scheduling algorithm and set time slice to 10 ticks. Provide the
evidence of setting in the form of snapshot.
Task 5: Start the process execution.
Task 6: Open the system resources window by pressing VIEW RESOURCES… button under
views tab. Then press SHOW DEADLOCKED PROCESSES.. button. Observe the resource
allocation graph. Present the snapshot of System resources window and resource allocation graph
at the end of the execution of processes.
PART-B
Consider a resource allocation graph with four processes and four resources.
for n = 1 to 20
next
end
3
for n = 1 to 20
next
end
for n = 1 to 20
next
end
for n = 1 to 20
next
end
Perform / Answer the following:
Task 1: Compile all the above four source codes and load in the main memory at starting
addresses 100, 200, 300 and 400 respectively. Provide the snapshot of PROGRAM SOURCE
[INPUT] and PROGRAM CODE [OUTPUT] for all the four source codes. [paste entire compiler
simulator window, after compiling each code]
Task 2: Create 4 processes P1, P2, P3 and P4. Provide the evidence of process creation in the
form of snapshot.
Task 3: Select round robin scheduling algorithm and set time slice to 10 ticks. Provide the
evidence of setting in the form of snapshot.
Task 4: Start the process execution.
Task 5: Open the system resources window by pressing VIEW RESOURCES… button under
views tab. Then press SHOW DEADLOCKED PROCESSES.. button. Observe the resource
allocation graph. Is there a deadlock? Justify your answer by present the snapshot of “System
Resources Window” and resource allocation graph at the end of the execution of processes.
4
Task 6: In CPU-OS simulator, there are two of recovering from a deadlock condition after it
happens: Release resource method and release process method. Which one is better and why?
PART-C