0% found this document useful (0 votes)
48 views2 pages

Os Experiments

This document outlines 10 lab assignments for an Operating Systems course. The labs cover topics like basic OS concepts, Linux commands, file systems, editors, processes, scheduling algorithms, synchronization, memory allocation strategies, and page replacement algorithms. Students will write programs in languages like C/C++ to demonstrate scheduling algorithms, solve synchronization problems, simulate memory allocation, and more.

Uploaded by

chahatgoyal2005
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)
48 views2 pages

Os Experiments

This document outlines 10 lab assignments for an Operating Systems course. The labs cover topics like basic OS concepts, Linux commands, file systems, editors, processes, scheduling algorithms, synchronization, memory allocation strategies, and page replacement algorithms. Students will write programs in languages like C/C++ to demonstrate scheduling algorithms, solve synchronization problems, simulate memory allocation, and more.

Uploaded by

chahatgoyal2005
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/ 2

Operating Systems Lab

(CSPC-232)
Lab Assignments
Lab 1. To understand the Basic of Operating Systems.
(a) Define OS.
(b) Different types of OS.
(c) Examples of OS.

Lab 2. To understand the UNIX/LINUX Operating Systems Environments.


(a) In details explanation of the following commands and topics:
1. Introduction to Linux/Unix.
2. Architecture of Linux.
3. System Call execution.
4. Command structure.

(b) In details explanation of the following commands and topics:


1. Concept of Shell.
2. Types of Shell.
3. ls command and its options.
4. > and >> option for directing the output of a command.
5. Introduction and options for Cat command
6. Feeding output of one command to another by pipeline.
7. Ways for signing off from Linux.
8. Locating commands
9. PATH and SHELL variable
10. Combining the commands.
11. echo and echo –e
12. Cal and Date command with its different options.
13. man and help command
14. Using escape sequence.
15. Printf in Linux

Lab 3. (a) In details explanation of the following commands and topics:


1. Internal and External commands
2. Commands - passwd, who, uname, tty, stty
3. Types of files and file system in Linux.
4. Directory structure in Linux
5. HOME variable
6. Commands - pwd, cd, mkdir, rmdir,
7. Absolute and relative pathname
8. Using . and ..
9. Commands - Cat, cp, rm, mv, wc, comm, cmp, diff
10. Compressing and archiving files (zip, tar).

(b) In details explanation of the following commands and topics:


1. Basic file attributes: ls –l, -d option.
2. File permissions and changing the access rights.
3. Relative and absolute permission.
4. Directory permission.
5. Changing file ownership.
6. Changing group of a particular file.
7. Process related commands: ps, pmap, top.

Lab 4. (a) In details explanation of the following system calls in Linux:


1. read, write, open, close
2. pipe, stat, grep,
3. fork(), exec(),getpid, exit, wait, kill

(b) In details explanation of the following commands and topics:


1. vi Editor and its basics.
2. Repeat factor.
3. Input mode and insertion of text.
4. Saving text and quitting.
5. Navigation.
6. Editing text.
7. Undo last editing.
8. Repeating last command.
9. Searching for a pattern.
10. Substitution – search and replace.

Lab 5. Write a program in C/C++ to demonstrate these Process Scheduling Algorithms.


(a) FCFS
(b) SJF (Non-Preemptive)
(c) SJF (Preemptive)

Lab 6. Write a program in C/C++ to demonstrate these Process Scheduling Algorithms.


(a) Priority (Non-Preemptive)
(b) Priority (Preemptive)
(c) Round Robin

Lab 7. To understand about Process Synchronization


(a) Write a C/C++ program to simulate producer-consumer problem using semaphores.
(b) Write a C/C++ program to simulate readers-writers problem using semaphores.
(c) Write a C program to simulate dining philosopher’s problem using semaphores.

Lab 8. Write a program in C/C++/Java to simulate the Banker’s algorithm for deadlock avoidance.
Consider at least 3 processes in the system, with 4 resource classes having at least one resource
instance for each class. Assume the values for Available, Allocation, MAX, and request from
particular process from your side. Program must reflect for two cases, where safe sequence exists
for one and safe sequence does not exist for another.

Lab 9. Write a C program to simulate following Memory Allocation Strategies in both Contiguous
and Non-Contiguous Fashion.
(a) First Fit Allocation
(b) Best Fit Allocation
(c) Worst Fit Allocation

Lab 10. Write a C program to simulate page replacement algorithms


(a) FIFO
(b) LRU
(c) LFU

You might also like