Operating System Unit 1
Operating System Unit 1
OPERATING SYSTEM
Module - I
OPERATING SYSTEMS OVERVIEW: Introduction, Evolution of operating system, operating
system operations, operating system structure, System Calls, Types of System Calls
Modul – II
PROCESS MANAGEMENT: Process concepts, process state, process control block,
scheduling queues, process scheduling, Interposes Communication, Threads and
implementation of threads.
CPU SCHEDULING: Objective and Criteria, CPU scheduling algorithms: FCFS, SJF, Priority
Scheduling, Round robin, multilevel queue scheduling and multilevel feedback queue
scheduling.
Modul- III
CONCURRENCY AND SYNCHRONIZATION: Process synchronization, critical section
problem, and its solutions. Semaphores, classical problems of synchronization:
readers and writers problem, dining philosophers problem, sleeping barber
problem.
Modul- IV
DEADLOCKS: Introduction, deadlock characterization, Resource allocation graph, Methods
for Handling Deadlocks: deadlock prevention, avoidance and deadlock detection, recovery
from deadlock.
Modul V
MEMORY MANAGEMENT: Introduction, memory allocation techniques, paging,
implementation of paging, segmentation and its implementation, segmentation with
paging, virtual memory, demand paging, page-replacement algorithms, thrashing and its
solution.
Modul VI
FILE SYSTEM: Concept of a file, access methods, directory structure, file system mounting,
file sharing, protection. File system implementation: file system structure, directory
implementation, allocation methods, free-space management, efficiency and
performance.
TEXT BOOKS:
Module - I
OPERATING SYSTEMS
The OS helps you to communicate with the computer without knowing how to speak the
computer’s language. It is not possible for the user to use any computer or mobile device
without having an operating system.
History Of OS
• Operating systems were first developed
in the late 1950s to manage tape storage
• The first OS built by Microsoft was DOS. It was built in 1981 by purchasing the 86-
DOS software from a Seattle company
• The present-day popular OS Windows first came to existence in 1985 when a GUI was
created and paired with MS-DOS.
4. Device Management: Device management keeps tracks of all devices. This module
also responsible for this task is known as the I/O controller. It also performs the task
of allocation and de-allocation of the devices.
5. I/O System Management: One of the main objects of any OS is to hide the
peculiarities of that hardware devices from the user.
7. Security: Security module protects the data and information of a computer system
against malware threat and authorized access.
10. Job accounting: Keeping track of time & resource used by various job and users.
• If any issue occurs in OS, you may lose all the contents which have been stored in
your system
An operating system is a construct that allows the user application programs to interact
with the system hardware. Operating system by itself does not provide any function but it
provides an atmosphere in which different applications and programs can do useful work.
The major operations of the operating system are process management, memory
management, device management and file management. These are given in detail as
follows:
Process Management
The operating system is
responsible for managing the
processes i.e assigning the
processor to a process at a time.
This is known as process
scheduling. The different
algorithms used for process
scheduling are FCFS (first come
first served), SJF (shortest job
first), priority scheduling, round
robin scheduling etc.
There are many scheduling
queues that are used to handle
processes in process
management. When the
processes enter the system, they
are put into the job queue. The processes that are ready to execute in the main memory are
kept in the ready queue. The processes that are waiting for the I/O device are kept in the
device queue.
Memory Management
Memory management plays an important part in operating system. It deals with memory
and the moving of processes from disk to primary memory for execution and back again.
The activities performed by the operating system for memory management are −
• The operating system assigns memory to the processes as required. This can be done
using best fit, first fit and worst fit algorithms.
• All the memory is tracked by the operating system i.e. it nodes what memory parts are
in use by the processes and which are empty.
File Management
Files are used to provide a uniform view of data storage by the operating system. All the files
are mapped onto physical devices that are usually non volatile so data is safe in the case of
system failure.
The files can be accessed by the system in two ways i.e. sequential access and direct access
• Sequential Access
The information in a file is processed in order using sequential access. The files
records are accessed on after another. Most of the file systems such as editors,
compilers etc. use sequential access.
• Direct Access
In direct access or relative access, the files can be accessed in random for read and
write operations. The direct access model is based on the disk model of a file, since
it allows random accesses.
Simple Structure
There are many operating systems that have a rather simple structure. These started as
small systems and rapidly expanded much further than their scope. A common example of
this is MS-DOS. It was designed simply for a niche amount for people. There was no
indication that it would become so popular.
An image to illustrate the structure of MS-DOS is as follows −
Layered Structure
One way to achieve modularity in the
operating system is the layered approach.
In this, the bottom layer is the hardware
and the topmost layer is the user
interface.
An image demonstrating the layered approach is as follows −
As seen from the image, each upper
layer is built on the bottom layer. All
the layers hide some structures,
operations etc from their upper layers.
Introduction to Kernel
Features of Kernel
Types of Kernel
There are many types of kernels that exists, but among them, the two most popular kernels
are:
1. Monolithic
A monolithic kernel is a single code or block of the program. It provides all the required
services offered by the operating system. It is a simplistic design which creates a distinct
communication layer between the hardware and software.
2. Microkernels
Microkernel manages all system resources. In this type of kernel, services are implemented
in different address space. The user services are stored in user address space, and kernel
services are stored under kernel address space. So, it helps to reduce the size of both the
kernel and operating system.
• If a file system requires the creation or deletion of files. Reading and writing from
files also require a system call.
• Creation and management of new processes.
• Network connections also require system calls. This includes sending and receiving
packets.
• Access to a hardware devices such as a printer, scanner etc. requires a system call.
There are many different system calls as shown above. Details of some of those system calls
are as follows −