Skip to content

Commit ecb1b70

Browse files
Update deadlock.cpp for output
1 parent 2273817 commit ecb1b70

File tree

1 file changed

+41
-0
lines changed
  • Second Year/Fourth Semester/Operating System Lab

1 file changed

+41
-0
lines changed

Second Year/Fourth Semester/Operating System Lab/deadlock.cpp

+41
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,44 @@ int main(){
105105
printf("\n");
106106
}
107107
}
108+
109+
110+
111+
112+
/*
113+
114+
OUTPUT
115+
116+
Enter no. of process: 5
117+
Enter no. of resources: 3
118+
119+
Enter details of P0:
120+
Enter allocation: 0 1 0
121+
Enter max: 3 5 3
122+
123+
Enter details of P1:
124+
Enter allocation: 2 0 0
125+
Enter max: 3 0 2
126+
127+
Enter details of P2:
128+
Enter allocation: 3 0 2
129+
Enter max: 9 0 2
130+
131+
Enter details of P3:
132+
Enter allocation: 2 1 1
133+
Enter max: 2 2 2
134+
135+
Enter details of P4:
136+
Enter allocation: 0 0 2
137+
Enter max: 4 3 3
138+
139+
Enter available Resources: 3 3 2
140+
141+
Enter new Request details:
142+
143+
Enter Pid
144+
145+
Enter request for resources: 1 0 2
146+
147+
148+
*/

0 commit comments

Comments
 (0)