You are on page 1of 22

Lab Record

of

Operating System
(CSF204)

Submitted to: Submitted by:


Mr. Shashank Singh Student Name: Aditi Bajpai
Associate Prof Roll no: 220102138
School of Computing SAP ID: 1000017964 DIT
University CSE- G(P2)

Session 2023-24

Index

School of Computing
S.No Title of Experiment/Objective Date of Signature of
Conduction Faculty
1

10

11

Practical -1

School of Computing
Objective – Create one VM using VMware and install Ubuntu on it. Test simple Linux
commands to check the OS properly working or not.

Output:

School of Computing
Practical -2
Objective – Study system calls read() and write(). Implement read() and write() System
calls using C to read data from keyboard and write to the monitor.

School of Computing
Code: Read-

Write-

Output-

School of Computing
Practical - 3

School of Computing
Objective – Study system calls open(), file descriptor and file modes. Write a program
using open() system call to read the first 10 characters of an existing file “test.txt” and
print them on screen.

Hint – files modes are – O_CREAT, O_RDONLY, O_WRONLY, O_RDWR

Code –

Output-

School of Computing
School of Computing
Practical – 4
Objective – Study fork() system call. Implement fork () system call to create a child
process.

Code –

School of Computing
Output-

School of Computing
\

Practical – 5
Objective – Study FCFS CPU scheduling. Write a c program to simulate the CPU
scheduling algorithm First Come First Serve (FCFS).

Code –

School of Computing
Output-

School of Computing
Practical – 6
Objective – Study Preemptive process scheduling. Write a program to simulate the
CPU scheduling algorithm ROUND ROBIN.

Code –

School of Computing
School of Computing
Output-

School of Computing
Practical – 7
Objective –Write a c program to simulate the CPU scheduling algorithm Shortest Job
First (SJF), compute the average waiting time and average turn around time.

Code –

School of Computing
School of Computing
Output-

School of Computing
Practical – 8
Objective – Write a program using Linux to simulate Banker’s algorithm Deadlock
Avoidance.

Code –

School of Computing
School of Computing
Output-

School of Computing
School of Computing

You might also like