0% found this document useful (0 votes)
28 views20 pages

OS Practical Slips

The document outlines the practical examination for T.Y B.Sc. Computer Science at Modern College of Arts, Science & Commerce for the academic year 2024-25. It includes various programming tasks related to advanced operating systems, such as implementing disk scheduling algorithms (FCFS, C-SCAN, SCAN, SSTF), simulating linked file allocation methods, and applying the Banker's algorithm for deadlock avoidance. Each task specifies the requirements, including input data and expected outputs, along with marks allocation.
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)
28 views20 pages

OS Practical Slips

The document outlines the practical examination for T.Y B.Sc. Computer Science at Modern College of Arts, Science & Commerce for the academic year 2024-25. It includes various programming tasks related to advanced operating systems, such as implementing disk scheduling algorithms (FCFS, C-SCAN, SCAN, SSTF), simulating linked file allocation methods, and applying the Banker's algorithm for deadlock avoidance. Each task specifies the requirements, including input data and expected outputs, along with marks allocation.
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/ 20

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 Menu driven Program to implement following functionality


a) Accept Available
b) Display Allocation, Max
c) Display the contents of need matrix
d) Display Available
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 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.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 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.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 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.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.
80, 150, 60,135, 40, 35, 170
Starting Head Position: 70
[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 Menu driven Program to implement following functionality


a) Accept Available
b) Display Allocation, Max
c) Display the contents of need matrix
d) Display Available

Process Allocation Max Available


A B C A B C A B C
P0 0 1 0 0 0 0 0 0 0
P1 2 0 0 2 0 2
P2 3 0 3 0 0 0
P3 2 1 1 1 0 0
P4 0 0 2 0 0 2
[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.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.

Process Allocation Max Available


A B C A B C A B C
P0 0 1 0 0 0 0 0 0 0
P1 2 0 0 2 0 2
P2 3 0 3 0 0 0
P3 2 1 1 1 0 0
P4 0 0 2 0 0 2
a) Calculate and display the content of need array.
b) Is the system in safe state? Display safe sequence [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.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 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.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.

Process Allocation Max Available


A B C A B C A B C
P0 0 1 0 0 0 0 0 0 0
P1 2 0 0 2 0 2
P2 3 0 3 0 0 0
P3 2 1 1 1 0 0
P4 0 0 2 0 0 2
a) Calculate and display the content of need array.
b) Is the system in safe state? Display safe sequence [15]

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 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.

Process Allocation Max Available


A B C A B C A B C
P0 0 1 0 0 0 0 0 0 0
P1 2 0 0 2 0 2
P2 3 0 3 0 0 0
P3 2 1 1 1 0 0
P4 0 0 2 0 0 2
a) Calculate and display the content of need array.
b) Is the system in safe state? Display safe sequence [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 Menu driven Program to implement following functionality


a) Accept Available
b) Display Allocation, Max
c) Display the contents of need matrix
d) Display Available

Process Allocation Max Available


A B C A B C A B C
P0 0 1 0 0 0 0 0 0 0
P1 2 0 0 2 0 2
P2 3 0 3 0 0 0
P3 2 1 1 1 0 0
P4 0 0 2 0 0 2
[15]

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.

Process Allocation Max Available


A B C D A B C D A B C D
P0 0 3 2 4 6 5 4 4 3 4 4 2
P1 1 2 0 1 4 4 4 4
P2 0 0 0 0 0 0 1 2
P3 3 3 2 2 3 9 3 4
P4 1 4 3 2 2 5 3 3
P5 2 4 1 4 4 6 3 4
a) Calculate and display the content of need array.
b) Is the system in safe state? Display safe sequence [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.
80, 150, 60,135, 40, 35, 170
Starting Head position : 50 [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 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.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 Menu driven Program to implement following functionality


a) Accept Available
b) Display Allocation, Max
c) Display the contents of need matrix
d) Display Available

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 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.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 )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 C Menu driven Program to implement following functionality


a) Accept Available
b) Display Allocation, Max
c) Display the contents of need matrix
d) Display Available

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.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.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 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.2) Write a C Menu driven Program to implement following functionality


a) Accept Available
b) Display Allocation, Max
c) Display the contents of need matrix
d) Display Available

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.3)Oral/Viva
[05]

You might also like