Operating System PDF
Operating System PDF
CSE3003 Type 4
LTP
Course Objectives:
• To study and apply concepts relating to operating systems, such as concurrency and control
of asynchronous processes, deadlocks, memory management, processor scheduling, File
System, Security and Virtualization.
Course Outcomes:
Demonstrate an understanding of:
Basics of operating system, its structures and services
The differences between processes and threads.
The different process or thread synchronization methods and the tradeoffs between them
The different memory management and Scheduling techniques used in Operating Systems
Deadlock and solving its related issues
Various I/O management techniques used in Operating Systems.
File system and its implementation in storage device
The tradeoffs in design and implementation concepts used in the development of Operating
Systems
Efficient use of hardware through Virtualization
Reference Books:
1. William Stallings, Operating Systems Internal and Design Principles, Pearson, Seventh Edition,
2017
2. Sibsankar haldar,Alex A Aravind, Operating Systems, Pearson, Second Edition, 2016
Indicative List of Experiments
No. Description of Experiment SO
1 Study of Hardware/Software requirement of various operating system. (I. (a) Study i,l
of hardware and software requirements of different operating systems (UNIX,
LINUX, WINDOWS XP, WINDOWS 7/8). (1 Lab session)
(b) Execute various UNIX system calls for (1 Lab session)
1. Process management
2. File management
3. Input / Output System calls
IMPLEMENTATION DETAILS AND ASSUMPTIONS:
(i) The OBJECTIVE of this practical is to obtain general overview of various
popular
OS .
(a) Their development and distribution
(b) Compatibility
(c) Security issues and Thread detection and its solution
(d) The GUI etc..
(ii) Along with the above mentioned activities, execution of various UNIX
commands is
also helpful: cat, cd, cp, chmod, df, less, ls, mkdir, more, mv, pwd, rmdir, rm, man,
uname, who, ps, vi, cal, date, echo, bc, grep
(CPU Scheduling Policies) i,l
2 I. Implement CPU scheduling policies : (2-3 Lab sessions)
(a) SJF
(b) Priority
(c) FCFS
(d) Multi-level queue
IMPLEMENTATION DETAILS AND ASSUMPTIONS:
INPUT/s:
(i) The number of processes/jobs in the system (computed through random functions
in C)
(ii) The CPU Burst (based on past history), priority (initially, compute through
random function), arrival time of process.
STEPS TO PERFORM:
(a) For SJF algorithm,
(i) We randomly generate the number of jobs. There must be a limit on the number
of jobs in a system.
(ii) The execution time of the generated jobs is also not known. Here, we are
generating the CPU burst of each job making use of the past history.
(iii) All the jobs are then arranged in a queue where searching is done to find the one
with the least CPU burst. There may be two jobs in queue with the same execution
time then FCFS approach is to be performed.
Case a) If the algorithm is non preemptive in nature, then the newly arriving job is
to be added to the job queue even though it is of lesser execution time than the one
running on the processor.
Case b) Otherwise preemption is performed.
(b) For Priority scheduling,
(i) We again prefer to compute the CPU burst from past history.
(ii) Priority may be assigned on the basis of their CPU burst (simplest approach)
(iii)Priority may be assigned through some random function (within a specific range
say 1 to 100).
(iv) Priority has to be changed dynamically (to perform aging in order to avoid
starvation).
Priority (preemption) and priority (non preemption) nature of priority scheduling
is performed.
(c) The FCFS scheduling is performed on the basis of arrival time irrespective of
their other parameters.
(d) In multi-level queue scheduling, different queues are to be created.
OUTPUT/s:
The average throughput, waiting time of process/s
3. (File Storage Allocation Techniques) i,l
I. Implement file storage allocation techniques:
(a) Contiguous (using array) (1 Lab session)
(b) Linked –list (using linked list) (1 Lab session)
(c) Indirect allocation (indexing) (2 Lab sessions at max.)
IMPLEMENTATION DETAILS:
INPUT/s :
(i) Free storage blocks to allocate storage to files.
STEPS TO PERFORM:
Before performing storage allocation, we need to perform the following common
steps:
(i) During program execution, we need an illusion that we have a large disk space
for
allocation strategies.
(ii) We take a big array of structure (representing storage space in terms of sectors).
This
space is equal to the disk size available for storage.
(iii) Next step is to see free space list. The free space list is not entirely free. Some
portion
of this list is occupied by some OS or user files/data.
(iv) The free-space is to be maintained in a suitable manner as per allocation
strategy.
(v) Upon the above formed disk space and free space list, we then implement the
above
mentioned techniques.
(vi) Symbolic file name and size will be inputted by the user and accordingly the
assumed
disk space as well as free space list will be updated.
(a) Contiguous allocation strategy is implemented using array data structure.
(b) Linked list allocation technique is implemented using linked list.
(c) Indirect allocation is performed using indexing concept.
OUTPUT/s:
Files/ Programs are allocated storage space through appropriate storage allocation
techniques.
4. Contiguous Allocation Techniques i,l
I. Implementation of Contiguous allocation techniques:
(a) Worst-Fit
(b) Best-Fit
(c) First-Fit
IMPLEMENTATION DETAILS:
INPUT/s:
(i) Free space list of blocks from system (as created in experiment 3)
(ii) List processes and files from the system (as in experiment 3)
STEPS TO PERFORM:
(i) We consider the same free space list and files/processes as created in experiment
3 for our system.
(ii) Implement the above mentioned three contiguous allocation techniques. Also,
the free space list is updated from the free blocks left out after performing allocation.
(a) Worst-fit: In worst fit technique largest available block/partition which will hold
the page is selected. Blocks are sorted according to their size in descending order.
(b) Best-fit: Best-fit is one of the optimal technique in which page is stored in the
block/partition which is large enough to hold it. Blocks are sorted according to their
size in ascending order.
(c) First-fit: In first-fit technique page is stored in the block which is encountered
first that is big enough to hold it.
(iii) Also, the free space list is updated from the free blocks left out after performing
allocation.
OUTPUT/s:
Processes and files allocated to free blocks. List of processes and files which are not
allocated memory. The remaining free space list left out after performing allocation.