0% found this document useful (0 votes)
12 views6 pages

Operating System Lab Syllabus - BOS

Os lab

Uploaded by

varshaamurthy386
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views6 pages

Operating System Lab Syllabus - BOS

Os lab

Uploaded by

varshaamurthy386
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Course Title Operating Systems Lab Course Type HC

Course Code B22CI0506 Credits 1 Class V Semester


Contact Work
TLP Total Number of
Credits Hours Load Assessment in
Classes Per Semester
Theory Weightage
Course
Practice 1 2 2
Structure Theory Practical IA SEE
- - - -

Total 1 2 2 - 28 50% 50%

COURSE OVERVIEW:

Operating system provides a practical case of operating systems for the user to understand and master deeply and
tangibly the theory and algorithms in operating systems. It gives deeper insights into the hierarchical structure,
principles, applications, shells, development, and management of the operation system multi-dimensionally,
systematically and from the elementary to the profound. It makes the user to understand about how operating
system functions.

COURSE OBJECTIVE (S):

The objective of this lab is to:

1. Provide the knowledge and skills required to understand Basics of UNIX Operating Environment
2. Describe process concepts and scheduling techniques.
3. Illustrate the use of different memory management techniques of operating system.
4. Describe the data structures and internal representation of files in operating system.

COURSEOUTCOMES(COs)
On successful completion of this course; the student shall be able to:

CO# Course Outcomes POs PSOs


Understand the scope of UNIX operating environment 1,3 1
CO1
CO2 Implementation of scheduling algorithm using C 1,4,5 1,3
Compare and analyze the performance of different memory management
CO3 1,4,5 2,3
techniques
CO4 Make use of file types, file structure and file system implementation. . 1,2,4, 5 1,3
Learn new tools and technologies in the Designing of algorithms and apply for
CO5 suitable application development. 1,2,4, 5 1,3
Develop solution to the complex problems, either individually or as a part of
CO6 the team and report the results with proper analysis and interpretation. 5,6,10 1,2

Page1
BLOOM’S LEVELOF THECOURSE OUTCOMES

Bloom’sLevel
CO# Remember Understand Apply Analyze Evaluate Create
(L1) (L2) (L3) (L4) (L5) (L6)

CO1
CO2 
CO3 

CO4 

CO5  

CO6 

COURSE ARTICULATIONMATRIX
CO#/
PO10

PO11

PO12

PSO1

PSO2

PSO3
PO1

PO2

PO3

PO4

PO5

PO6

PO7

PO8

PO9

Pos

CO1 2 3 3

CO2 1 2 2 3 1

CO3 2 2 1 3 3

CO4 3 3 1 1 1 3

CO5 3 3 2 2 1 3

CO6 2 2 3 3 3

Note:1-Low,2-Medium,3-High PRACTICE:

PART A:
Tools and Expected Skill
No Title of the Experiment
Techniques /Ability
When the parent process creates a child process, child
process can perform any task assigned to it. During the
execution of child process, the parent process waits and
Process creation Programming with
1 vice versa.
using fork() C
Develop a program in C to create a child process to read
Commands from the standard input and execute them.

Page2
A policy is applied by a Scheduler to select a process for
execution when there is more than one process ready for
execution. The policy may be the process which arrives
first is executed first (First Come First Served-FCFS) or
the process which has shortest execution time
(Shortest Job First-SJF) amongst the set of processes is
executed first.
Develop a program in C to carry out the following tasks:

i) Read a set of processes along with the CPU burst


time, arrival time (may be assumed as 0) for each Programming with
2 Scheduling concept
process C
ii) Allocate the processor to the process which has
arrived first (apply FCFS) and compute the average
waiting time and average turnaround time.
iii) Allocate the processor to the process which has
shortest CPU burst time (apply SJF) and compute
the average waiting time and average turnaround
time.

Compare the performance of both.

The scheduler may apply different policies to select a


process for execution when there is more than one process
ready for execution. The policy may be the process which
has highest priority (Priority based scheduling) amongst
all the processes arrived for execution.

Develop a program for carrying out the following tasks

i) read a set of processes along with the CPU burst Programming with
3 Scheduling concept
C
time, arrival time (may be assumed as 0) and the
priority for each process
ii) allocate the processor to the process which has the
highest priority and

compute the average waiting time and average


turnaround time

Page3
Given the list of processes and their CPU burst time,
arrival time, the Scheduler may apply a different policy
that “each process is given certain amount of execution
time called time slice or quantum time” and after
completion of time slice, another process in queue is taken
for execution. This procedure repeats until all the
processes in the list get executed for fixed amount of time.
Later, the first process in the queue is selected for the
execution once again. This process repeats until the
completion of execution of all the processes. This
technique is called Round Robin Technique.
Develop a program for carrying out the following tasks
4 Scheduling concept Programming with
i) read a set of processes along with the CPU burst time, C
arrival time (may be assumed as 0) and the time slice
or time quantum
ii) allocate the processor to the processes in the order of
their arrival based on arrival time and execute each of
them for fixed amount of time ( Time quantum).
iii) After completion of first round, if execution of
processes is not completed, repeat the step ii)
iv) compute the average waiting time and average
turnaround time

Multithreading is a technique, where each thread is


assigned with a task and they
get executed. Simultaneously, For instance, if there
are two tasks, two threads are created, one for each task. Programming with
When one thread is being executed, the other thread waits Parallel Programming
C
5 and vice versa. So, if there are N tasks, N threads can be
created one for each task. It works on shared memory
technique, where all the threads share the common
memory for storing or retrieving the data.

Build a program in C to carry out the following tasks


i) Create two functions, Generate () and Print () to generate
the Fibonacci series and print them respectively.
ii) Create a separate thread to execute each function.
ii) Ensure the synchronization while executing above
functions

Page4
The Reader-Writer problem is a classic synchronization Programming with
6 problem in operating systems and concurrent Synchronization C
programming. It involves managing access to shared data Problem
among multiple readers and writers, ensuring that:

Write down a C Program where multiple readers can read


the data simultaneously without causing inconsistency.
Writers need exclusive access to the data to write,
meaning no other readers or writers should be allowed
access while a writer is writing.

Consider an example of multi-process synchronization


problem, where producer produces the data and stores at
some location which will be accessed by another process
called Consumer. Since, the producer and consumer share
a common, fixed size buffer, there will be a
synchronization problem.
The solution can be obtained by using semaphores to
establish inter process communication with Process Programming with
7 synchronization C
synchronization.
Develop a program in C to implement Producer-
Consumer Problem by using semaphores to establish
inter process communication with synchronization.
Create two separate threads, one for producer and
another one for consumer. When producer is getting
executed, consumer must be in
waiting state and vice-versa.

Consider a set of processes, where each process holds


some resources with it and requests for some more
resources to complete its execution. But, when process P1
is requesting for resource R1 which is being used by P2
and if P2 is requesting for R2 which is held by P1, dead
Process Programming with
8 lock occurs and execution does not continue. Banker’s
synchronization C
Algorithm is used to avoid such deadlocks.
Develop a program in C to implement Banker’s
Algorithm which finds whether the state is safe or not
after allocating the resources requested by the processes.

The operating system replaces the old page of a process


Whenever a new page of the same process is to be loaded Page replacement Programming with
9 Algorithm C
into memory. To select the page for replacement, OS may
choose a policy that “the page which has not been used
for the longest period of time is to be replaced first”. It is
termed as Least recently used technique.
Develop a C program to implement LRU page
replacement algorithm.

Page5
When a process with different size arrives to main
memory for loading, Find the frame which is larger than
the page arrived and store the page in that frame. This
strategy is termed as First fit memory allocation Memory Programming with
10 technique. management C
Develop a program in C to implement the First fit
memory allocation technique.

The operating system manages storage of information by


creating and storing information in the file. The memory
required for a new file may be allocated using one of the
methods such as Linked list, Indexed or Contiguous Programming with
11 method. File Management C
Develop a C program to implement any one of the file
allocation techniques (Linked, Indexed or Contiguous).

12 The Best Fit and Worst Fit memory management policies


in C, you can create a program that simulates memory
allocation.
Develop a C program with memory block structure, Programming with
Create functions for Best Fit and Worst Fit allocation, Memory Management C
Create functions to simulate memory de-allocation,
Simulate memory allocation and de-allocation

13 The Dining Philosopher's Problem is a classic


synchronization problem that illustrates the challenges of
avoiding deadlock and ensuring proper synchronization in
a concurrent system. Programming with
Write down a C-program that solves the Dining Synchronization C
Philosopher's Problem using semaphores to avoid Problem
deadlock:

Page6

You might also like