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

CS3461 Set 3

Uploaded by

Kaviya S
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)
86 views3 pages

CS3461 Set 3

Uploaded by

Kaviya S
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: create a directory, create a file and view it. (10)
b. Develop a Shell program to generate Fibonacci Series. (40)
c. For the following table find the average waiting time and turnaround time using FCFS CPU
scheduling:
Process Arrival Time Burst Time
P0 0 5
P1 1 3
P2 2 8
P3 3 6

2. a. Illustrate the following UNIX Commands: Word Count in a File, List the Directory (10)
b. Develop a Shell program to find whether given number is even or odd. (40)
c. Implement IPC strategy using C. (50)

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


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

4. a. Illustrate the following UNIX Commands: Remove a directory, Remove a file (10)
b. Develop a Shell program to find whether given number is Prime. (40)
c. Implement Paging using C. (50)

5. a. Illustrate the following UNIX Commands: list the files and directories (10)
b. Develop a Shell program to find area and circumference of a circle. (40)
c. Write a C Program to implement First Fit Allocation Method for the following: (50)
Bloc
Process Size Size
k
P0 90 B1 20
P1 50 B2 100
P2 30 B3 40
P3 40 B4 200
B5 10

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


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

7. a. Illustrate the following UNIX Commands: date, cal, cat. (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 FIFO 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 FCFS 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: (50)
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, 4, 0 for a memory
with three frames and calculate number of page faults by using OPTIMAL Page replacement
algorithms in C. (50)

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

15. a. Write a shell program to find the area of rectangle by getting length and breadth from user.
(50)
b. Consider a disk queue with requests for I/O to blocks on cylinders 4, 34, 10, 7, 19, 73, 2, 15,
6, 20. The SSTF scheduling algorithm is used. The head is initially at cylinder number 50.
The cylinders are numbered from 0 to 100. Find the total head movement (in number of
cylinders) incurred while servicing these requests using C. (50)

16. a. Write a shell program to display first 10 even numbers. (50)


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

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


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

Page 2 of 3
18. a. Write a shell program to find squares of first 10 natural numbers. (50)
b. Develop a C program to implement Paging. (50)

19. a. Develop a Shell program to convert Celsius to Fahrenheit (50)


b. Implement wait() and exit() system calls using C. (50)

20. a. Implement Banker’s Algorithm using C. (100)

Page 3 of 3

You might also like