Unit I
Unit I
Revya Naik V
Assistant Professor
Computer science and engineering
RGUKT Basar
Operating system
An operating system is a program that manages the computer hardware. It
also provides a basis for application programs and acts as an intermediary
between the computer user and the computer hardware.
The main goal of the Operating System is to make the computer
environment more convenient to use and Secondary goal is to use the
resources in the most efficient manner.
The main task an operating system carries out is the allocation of resources
and services, such as the allocation of memory, devices, processors, and
information.
The operating system also includes programs to manage these resources,
such as a traffic controller, a scheduler, memory management, I/O programs,
and a file system.
2
Functions of OS
3
The components of computer system
4
The components of computer system
5
Generation of Operating Systems
6
Types of Operating systems
Batch OS: Operator takes similar jobs having the same requirement and group them into batches.
Time sharing OS: Each task is given some time to execute so that all the tasks work smoothly. Each user
gets the time of CPU as they use a single system.
Distributed OS: Interconnected computers communicate with each other using a shared communication
network. The user can access files or software that are not actually present on his system.
Independent systems possess thier own memory unit and CPU . These aare referrre to as loosly coupled
sysrems or DS.
Failure of one will not affect the other network commnucation.
Failure of main network it will affect the communications.
Clustering OS: two or more computers joined together with LAN. High availability
Real time OS :The time interval required to process and repond to inputs is very small. Medical systems,
weapons system, scientific systems, robotic systems etc.
Hard RTOS time constraints are very strict and even the shortest posssible delay is not acceptable. Ex;
In cars airbags os, rocket launching os etc
. Soft RTOS : time constriants is less strict
Embedded OS: used in embedded devices.
7
Services of OS
8
Services of OS
9
System calls
System calls provide an interface to the services made available
by an operating sytem.
If the program is executing in user mode then program may not access directly
resources like memory, cpu. Error occurs in user mode then system not crashes.
When program switches from user mode to kernel mode and vice versa is called
context switching.
Kernel mode is nothing but previlleged mode, kernel mode program can directly
access cpu, memory. If error occurs in kernel mode program then system crashes.
10
System calls
11
System calls
12
System call
13
Types of system calls
Process control
end, abort, load execute, create process, terminate process, get process attributes, set process
attributs, wait for time, allocate and free memory.
File manipulation
create file, delete file,open, close, read, write, file reposition, get file attributes, set file attributes.
Information maintaince
get time or date, set time or date, get process, file or device, set process, file or device, get
system data, set system data.
Divice management
request device, release device, read, write, reposition, logically attach or detach device.
Communications
create, delete communication connections, send, recieve messages, transfer status information,
attach or detach remote devices.
14
Fork() and exec() system calls
Fork() system call use to create separate, duplicate process.
If fork() system call called n times then total 2n process created,
one parent process, remaining 2n-1 are child process.
Exec() system call replace same existing process id.
15
Structures of OS (Simple structure)
16
Simple structure of OS
17
Layered operating system
18
Layered operating system
In which OS is broken into a number of layers.
Bottom layer (layer 0) is the hardware; the highest
(layer N) is the user interface.
The main advantage of the layered approach is
simplicity of construction and debugging.
Layer wise debugging if error is found during
debugging of a particular layer, the error must be
on that layer, because the below layers already
debugged.
The backing storage device at lower layer.
19
Monolithic structure of OS (unix)
20
Monolithic kernel
Everything below the system call interface and
above the physical hardware is the kernel.
The kernel provides the file system, CPU
scheduling, memory management, and other OS
functions through system calls.
It was difficult to implement and maintain. If the
error is occurs in any of the program then entire
system crashes.
21
Microkernels
Unix kernel became large and difficult to manage.
Microkernel provide minimal process and memory management.
The main function of the microkernel is to provide a
communication facility between client program and the various
services that are also running in user space.
If client program wishes to access a file, it must interact with the
file server.
If any services added into user mode then no need to update kernel.
It is more secure because most of services are running in user
mode. If a service fails, rest of the OS untouched.
22
Microkernel operating system
23
Modular kernel
Object oriented programming techniques used to create a
modular kernel. It uses dynamically loadable strategy and is
common in modern implementation of Unix, such as solaris,
linux, and mac OS.
It is more flexible than a layered system in that any module can
call any other module.
The approach is like microkernel approach in that the primary
module has only core functions and knowledge of how to load
and communicate with other modules; but it is more efficient.
24
Modular kernel
25
Virtual machines
26
Virtual machines
27
Virtual machines
●
Divided a mainframe into multiple virtual machines,
each running its own operating system.
●
A major difficultly with the VM virtual machine
approach involved disk systems. For all virtual
machines common HardDisk.
28