OS Practical Slips
OS Practical Slips
Q.2 )Write a simulation program for disk scheduling using FCFS algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
55, 58, 39, 18, 90, 160, 150, 38, 184
Start Head Position: 50 [15]
Q.1 Write a program to simulate Linked file allocation method. Assume disk with n number
of blocks. Give value of n as input. Randomly mark some block as allocated and accordingly
maintain the list of free blocks Write menu driver program with menu options as mentioned
below and implement each option.
Show Bit Vector
Create New File
Show Directory
Exit [15]
Q.2 Write a simulation program for disk scheduling using C-SCAN algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of request in the order in which it is served. Also display the total number of head
moments..
80, 150, 60,135, 40, 35, 170
Starting Head Position: 70
Direction: Right [15]
Q.1 Consider a system with 'm' processes and 'n' resource types. Accept number of instances
for every resource type. For each process accept the allocation and maximum requirement
matrices. Write a program to display the contents of need matrix and to check if the given
request of a process can be granted immediately or not.
Process Allocation Max Available
A B C A B C A B C
P0 2 3 2 9 7 5 3 3 2
P1 4 0 0 5 2 2
P2 5 0 4 1 0 4
P3 4 3 3 4 4 4
P4 2 2 4 6 5 5
[15]
Q.2. Write a simulation program for disk scheduling using SCAN algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
55, 58, 39, 18, 90, 160, 150, 38, 184
Start Head Position: 50
Direction: Right [15]
Q.1 Write a program to simulate Linked file allocation method. Assume disk with n number
of blocks. Give value of n as input. Randomly mark some block as allocated and accordingly
maintain the list of free blocks Write menu driver program with menu options as mentioned
below and implement each option.
Show Bit Vector
Create New File
Show Directory
Exit [15]
Q.2 Write a simulation program for disk scheduling using SSTF algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
80, 150, 60,135, 40, 35, 170
Starting Head Position: 70
[15]
Q.2) Write a simulation program for disk scheduling using FCFS algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
55, 58, 39, 18, 90, 160, 150, 38, 184
Start Head Position: 50 [15]
Q.1) Write a C Program to simulate Banker’s algorithm for the purpose of deadlock avoidance.
The following snapshot of system, A, B, C&D are the resource type.
Q.2) Write a simulation program for disk scheduling using FCFS algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
55, 58, 39, 18, 90, 160, 150, 38, 184
Start Head Position: 50 [15]
Q.1 Write a program to simulate Linked file allocation method. Assume disk with n number
of blocks. Give value of n as input. Randomly mark some block as allocated and accordingly
maintain the list of free blocks Write menu driver program with menu options as mentioned
below and implement each option.
Show Bit Vector
Create New File
Show Directory
Exit [15]
Q.2 Write a simulation program for disk scheduling using C-SCAN algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
80, 150, 60,135, 40, 35, 170
Starting Head Position: 70
Direction: Right [15]
Q.1) Write a C Program to simulate Banker’s algorithm for the purpose of deadlock avoidance.
The following snapshot of system, A, B, C&D are the resource type.
Q.2) Write a program to simulate Linked file allocation method. Assume disk with n number
of blocks. Give value of n as input. Randomly mark some block as allocated and accordingly
maintain the list of free blocks Write menu driver program with menu options as mentioned
below and implement each option.
Show Bit Vector
Create New File
Show Directory
Exit [15]
Q.1)Write a simulation program for disk scheduling using FCFS algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
176,79,34,60,92,11,41,114
Starting Head Position: 65 [15]
Q.2) Write a C Program to simulate Banker’s algorithm for the purpose of deadlock avoidance.
The following snapshot of system, A, B, C are the resource type.
Q.3)Oral/Viva [05]
Progressive Education Society’s
Modern College of Arts, Science & Commerce, Ganeshkhind, Pune -411016
(Autonomous)
T.Y B.Sc. Computer Science Practical Examination
Academic Year 2024-25
Semester VI
Lab Course:24-CS-367 Practical course based on Advanced Operating System
Duration: 2 hours Marks: 35
Q.2) Write a program to simulate Linked file allocation method. Assume disk with n number
of blocks. Give value of n as input. Randomly mark some block as allocated and accordingly
maintain the list of free blocks Write menu driver program with menu options as mentioned
below and implement each option.
Show Bit Vector
Create New File
Show Directory
Exit [15]
Q.3)Oral/Viva [05]
Progressive Education Society’s
Modern College of Arts, Science & Commerce, Ganeshkhind, Pune -411016
(Autonomous)
T.Y B.Sc. Computer Science Practical Examination
Academic Year 2024-25
Semester VI
Lab Course:24-CS-367 Practical course based on Advanced Operating System
Duration: 2 hours Marks: 35
Q.1 Write a program to simulate Linked file allocation method. Assume disk with n number
of blocks. Give value of n as input. Randomly mark some block as allocated and accordingly
maintain the list of free blocks Write menu driver program with menu options as mentioned
below and implement each option.
Show Bit Vector
Create New File
Delete File
Exit [15]
Q.2)Write a simulation program for disk scheduling using C-SCAN algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
23,89,132,42,187,69,36,55
Starting Head Position: 40
Direction: Left [15]
Q.3)Oral/Viva [05]
Progressive Education Society’s
Modern College of Arts, Science & Commerce, Ganeshkhind, Pune -411016
(Autonomous)
T.Y B.Sc. Computer Science Practical Examination
Academic Year 2024-25
Semester VI
Lab Course:24-CS-367 Practical course based on Advanced Operating System
Duration: 2 hours Marks: 35
Q.1 Write a C Program to simulate Banker’s algorithm for the purpose of deadlock avoidance.
The following snapshot of system, A, B, C &D are the resource type.
Q.2 Write a simulation program for disk scheduling using FCFS algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
80, 150, 60,135, 40, 35, 170
Starting Head position : 50 [15]
Q.1 Write a program to simulate Sequential(Contiguous) allocation method. Assume disk with
n number of blocks. Give value of n as input. Randomly mark some block as allocated and
accordingly maintain the list of free blocks Write menu driver program with menu options as
mentioned below and implement each option.
Show Bit Vector
Delete file
Exit [15]
Q.2)Write a simulation program for disk scheduling using C-SCAN algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
23,89,132,42,187,69,36,55
Starting Head Position: 40 [15]
Direction: Left
Q.3)Oral/Viva [05]
Progressive Education Society’s
Modern College of Arts, Science & Commerce, Ganeshkhind, Pune -411016
(Autonomous)
T.Y B.Sc. Computer Science Practical Examination
Academic Year 2024-25
Semester VI
Lab Course:24-CS-367 Practical course based on Advanced Operating System
Duration: 2 hours Marks: 35
Q.1 Write a program to simulate Linked file allocation method. Assume disk with n number
of blocks. Give value of n as input. Randomly mark some block as allocated and accordingly
maintain the list of free blocks Write menu driver program with menu options as mentioned
below and implement each option.
Show Bit Vector
Create New File
Exit [15]
Q.2)Write a simulation program for disk scheduling using FCFS algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
23,89,132,42,187,69,36,55
Starting Head Position: 40 [15]
Q.3)Oral/Viva [05]
Progressive Education Society’s
Modern College of Arts, Science & Commerce, Ganeshkhind, Pune -411016
(Autonomous)
T.Y B.Sc. Computer Science Practical Examination
Academic Year 2024-25
Semester VI
Lab Course:24-CS-367 Practical course based on Advanced Operating System
Duration: 2 hours Marks: 35
Q.1 Consider a system with 'm' processes and 'n' resource types. Accept number of instances
for every resource type. For each process accept the allocation and maximum requirement
matrices. Write a program to display the contents of need matrix and to check if the given
request of a process can be granted immediately or not .
Process Allocation Max Available
A B C A B C A B C
P0 2 3 2 9 7 5 3 3 2
P1 4 0 0 5 2 2
P2 5 0 4 1 0 4
P3 4 3 3 4 4 4
P4 2 2 4 6 5 5
[15]
Q.2. Write a simulation program for disk scheduling using C-SCAN algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user.Display the
list of requests in the order in which it is served. Also display the total number of head
moments.
55, 58, 39, 18, 90, 160, 150, 38, 184
Start Head Position: 50
Direction: Right [15]
Q.2 )Write a simulation program for disk scheduling using SSTF algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
55, 58, 39, 18, 90, 160, 150, 38, 184
Start Head Position: 50 [15]
Q.1 Write a program to simulate Linked file allocation method. Assume disk with n number
of blocks. Give value of n as input. Randomly mark some block as allocated and accordingly
maintain the list of free blocks Write menu driver program with menu options as mentioned
below and implement each option.
Show Bit Vector
Create New File
Exit [15]
Q.2)Write a simulation program for disk scheduling using FCFS algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
23,89,132,42,187,69,36,55
Starting Head Position: 40 [15]
Q.3)Oral/Viva [05]
Progressive Education Society’s
Modern College of Arts, Science & Commerce, Ganeshkhind, Pune -411016
(Autonomous)
T.Y B.Sc. Computer Science Practical Examination
Academic Year 2024-25
Semester VI
Lab Course:24-CS-367 Practical course based on Advanced Operating System
Duration: 2 hours Marks: 35
Q.1 )Write a program to simulate Linked file allocation method. Assume disk with n number
of blocks. Give value of n as input. Randomly mark some block as allocated and accordingly
maintain the list of free blocks Write menu driver program with menu options as mentioned
below and implement each option.
Show Bit Vector
Create New File
Exit [15]
Q.3)Oral/Viva [05]
Progressive Education Society’s
Modern College of Arts, Science & Commerce, Ganeshkhind, Pune -411016
(Autonomous)
T.Y B.Sc. Computer Science Practical Examination
Academic Year 2024-25
Semester VI
Lab Course:24-CS-367 Practical course based on Advanced Operating System
Duration: 2 hours Marks: 35
Q.1 Write a program to simulate Linked file allocation method. Assume disk with n number
of blocks. Give value of n as input. Randomly mark some block as allocated and accordingly
maintain the list of free blocks Write menu driver program with menu options as mentioned
below and implement each option.
Show Bit Vector
Create New File
Show Directory
Exit [15]
Q.2 )Write a simulation program for disk scheduling using SSTF algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
55, 58, 39, 18, 90, 160, 150, 38, 184
Start Head Position: 50 [15]
Q.1)Write a simulation program for disk scheduling using FCFS algorithm. Accept total
number of disk blocks, disk request string, and current head position from the user. Display
the list of requests in the order in which it is served. Also display the total number of head
moments.
23,89,132,42,187,69,36,55
Starting Head Position: 40 [15]
Q.3)Oral/Viva
[05]