0% found this document useful (0 votes)
14 views3 pages

CS3461 Set 4

Ngiydfu yyrufch uchcuv jchchv hdhxgf

Uploaded by

maniudhiya
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)
14 views3 pages

CS3461 Set 4

Ngiydfu yyrufch uchcuv jchchv hdhxgf

Uploaded by

maniudhiya
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/ 3

B.E / B.Tech.

PRACTICAL END SEMESTER EXAMINATIONS, APRIL/MAY 2023


Fourth Semester

CS3461 – OPERATING SYSTEMS LABORATORY

(Regulations 2021)

Time : 3 Hours Answer any one Question Max. Marks 100

Aim/Procedure Program Results Viva-Voce Record Total


20 30 30 10 10 100

1. a. Illustrate the following UNIX Commands: Display date in dd/mm/yyyy (10)


b. Develop a Shell program to generate factorial of 5 numbers. (40)
c. For the following table find the average waiting time and turnaround time using Priority CPU
scheduling:
Process Arrival Time Burst Time Priority
P0 0 4 2
P1 1 2 3
P2 2 7 4
P3 3 3 1

2. a. Illustrate the following UNIX Commands: Create and list the content in a file (10)

b. Develop a Shell program to find Area of a Square. (40)


c. Implement Semaphore using C. (50)

3. a. Illustrate the following System Calls: Getpid() (10)


b. Develop a Shell program to find whether given number is perfect square or not (40)
c. Implement Banker’s Algorithm using C. (50)

4. a. Illustrate the following UNIX Commands: calendar of a year (10)


b. Develop a Shell program to find whether given number is even prime. (40)
c. Implement Threading using C. (50)

5. a. Illustrate the following UNIX Commands: cat, date (10)


b. Develop a Shell program to find circumference of a circle. (40)
c. Write a C Program to implement Worst Fit Allocation Method for the following: (50)
Process Size Block Size
P0 40 B1 100
P1 10 B2 50
P2 30 B3 30
P3 60 B4 120
B5 35

6. a. Illustrate the following System Calls: Fork() (10)


b. Develop a Shell program to convert Celsius to Fahrenheit (40)
c. Implement IPC using C. (50)

7. a. Illustrate the following UNIX Commands: ls with attributes (10)


b. Develop a Shell program to find Area of a Triangle. (40)
c. Implement Deadlock Detection algorithm using C. (50)

Page 1 of 3
8. a. Write a shell program to find Factorial of a number. (50)
b. Consider the reference string 6, 1, 1, 2, 0, 3, 4, 6, 0, 2, 1, 2, 1, 2, 0, 3, 2, 1, 2, 0 for a memory
with three frames and calculate number of page faults by using LRU in C. (50)

9. a. Write a shell program to display first 10 natural numbers. (50)


b. Develop a C program to implement two-level directory (50)

10. a. Write a shell program to display date with time. (50)


b. Consider a disk queue with requests for I/O to blocks on cylinders 98, 183, 41, 122, 14, 124,
65, 67. The LOOK scheduling algorithm is used. The head is initially at cylinder number 53.
The cylinders are numbered from 0 to 199. Find the total head movement (in number of
cylinders) incurred while servicing these requests using C. (50)

11. a. Develop a Shell program to generate Fibonacci Series. (50)


b. For the following table find the average waiting time and turnaround time using SJF CPU
scheduling:
Process Arrival Time Burst Time
P0 0 8
P1 1 2
P2 2 3
P3 3 4

12. a. Develop a Shell program to find whether given number is positive or negative. (50)
b. Implement Semaphore using C. (50)

13. a. Develop a Shell program to find whether given number is Armstrong. (50)
b. Consider the reference string 6, 1, 1, 2, 0, 3, 4, 6, 0, 2, 1, 2, 1, 2, 0, 3, 2, 1, 2, 0 for a memory
with three frames and calculate number of page faults by using Least Recently Used (LRU)
Page replacement algorithms in C. (50)

14. a. Write a shell program to find the area of triangle by getting base and height from user. (50)
b. Consider a disk queue with requests for I/O to blocks on cylinders 98, 183, 41, 122, 14, 124,
65, 67. The SCAN scheduling algorithm is used. The head is initially at cylinder number 53
moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered
from 0 to 199. Find the total head movement (in number of cylinders) incurred while servicing
these requests using C. (50)

15. a. Develop a Shell program to find area and circumference of a circle. (50)
b. Given five memory partitions of 100Kb, 500Kb, 200Kb, 300Kb, 600Kb (in order), how would
the first-fit algorithm place processes of 212 Kb, 417 Kb, 112 Kb, and 426 Kb (in order)?
Implement it using C. (50)

16. a. Consider a disk queue with requests for I/O to blocks on cylinders 98, 183, 41, 122, 14, 124,
65, 67. The CLOOK scheduling algorithm is used. The head is initially at cylinder number 53
moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered
from 0 to 199. Find the total head movement (in number of cylinders) incurred while servicing
these requests using C. (100)

17. a. Write a shell program to display factorial of first 5 numbers. (50)


b. Develop a C program to implement Indexed File Allocation Method (50)

Page 2 of 3
18. a. Consider a disk queue with requests for I/O to blocks on cylinders 98, 183, 41, 122, 14, 124,
65, 67. The C-SCAN scheduling algorithm is used. The head is initially at cylinder number 53
moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered
from 0 to 199. Find the total head movement (in number of cylinders) incurred while servicing
these requests using C. (100)

19. a. Develop a C program to implement Banker’s Algorithm (100)

20. a. Write a shell program to find greatest of 2 numbers. (50)


b. Develop a C program to implement Single Level Directory. (50)

Page 3 of 3

You might also like