Professional Documents
Culture Documents
227 122 Rtos-Module1
227 122 Rtos-Module1
227 122 Rtos-Module1
OPERATING SYSTEM
MODULE 1
1
PREPARED BY
DIVYA HARIKUMAR
ASST. PROFESSOR
Windows, Mac, Android etc. are examples of Operating systems which are
generally used nowadays.
All modern computing devices including Laptops, Tablet, mobile phones,
etc. comprise an Operating System which helps in the smooth working of
the device.
Personal computer (PC) operating systems support complex games,
business applications. Etc.
5 COMPONENTS OF A COMPUTER SYSTEM
6 COMPONENTS OF A COMPUTER SYSTEM
• It is sometimes costly.
• The other jobs will have to wait for an unknown time if any job fails
11 Real-Time Operating System
12 Real-Time Operating System
These types of OSs serve real-time systems.
It has a data processing system.
The processing time is very small between the user’s command and the output. This time
interval is called response time.
Used in fields where the response needs to be quick and rapid.
Real-time systems are used when there are time requirements that are very
strict like missile systems, air traffic control systems, robots, etc.
Examples of Real-Time Operating Systems are:
Scientific experiments, medical imaging systems, industrial control systems,
weapon systems, robots, air traffic control systems, etc.
Two types of Real-Time Operating Systems are:
Hard Real-Time Systems
Soft Real-Time Systems
13 Real-Time Operating System
Hard RTOS
These OSs are meant for applications where time constraints are very
strict and even the shortest possible delay is not acceptable.
These systems are built for saving life like automatic parachutes or
airbags which are required to be readily available in case of any
accident.
Virtual memory is rarely found in these systems.
Soft RTOS
These OSs are for applications where for time-constraint is less strict.
Advantages of RTOS:
14 Maximum Consumption: Maximum utilization of devices and system, thus
more output from all the resources
Focus on Application: Focus on running applications and less importance to
applications which are in the queue.
Real-time operating system in the embedded system: Since the size of programs
are small, RTOS can also be used in embedded systems like in transport and
others.
Error Free: These types of systems are error-free.
Memory Allocation: Memory allocation is best managed in these types of
systems.
Task Shifting: The time assigned for shifting tasks in these systems are very
less.
For example, in older systems, it takes about 10 microseconds in shifting one task
to another, and in the latest systems, it takes 3 microseconds.
Disadvantages of RTOS:
15 Limited Tasks: Very few tasks run at the same time and their concentration
is limited to few applications to avoid errors.
Use heavy system resources: Sometimes the system resources are not so
good and they are expensive as well.
Complex Algorithms: The algorithms are very complex and difficult for the
designer to write on.
Device driver and interrupt signals: It needs specific device drivers and
interrupts signals to respond earliest to interrupts.
Thread Priority: It is not good to set thread priority as these systems are very
less prone to switching tasks.
16 Time-Sharing Operating Systems
17 Time-Sharing Operating Systems
Multiple people at various terminals can use a program at the same time.
The main motive is to minimize the response time.
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.
These systems are also known as Multitasking Systems.
The task can be from a single user or different users also.
The time that each task gets to execute is called quantum.
After this time interval is over OS switches over to the next task.
Examples of Time-Sharing OSs are: Multics, Unix,
Advantages of Time-Sharing OS:
18
Each task gets an equal opportunity
Fewer chances of duplication of software
CPU idle time can be reduced
When two or more systems are connected to each other and one can open
files which are not present in their system but in other devices connected in
the network. i.e., remote access is enabled within the devices connected in
that network.
Its usage has now increased over the years.
They use multiple central processors to serve real-time applications.
Failure of one system does not affect the other systems connected in the
network.
These system’s processors differ in size and function.
Examples of Distributed Operating System are- LOCUS
21 Distributed Operating System
They have one main server which is connected to other client servers.
All the management of files, processing of data, access to sharing files, etc. are
performed over this small network.
It is also a secure operating system for working with multiple users.
One important aspect of Network Operating Systems is that all the users
are well aware of the underlying configuration, of all other users within the
network, their individual connections, etc.
and that’s why these computers are popularly known as tightly coupled
systems
Examples of Network Operating System are: Microsoft Windows Server 2003,
Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and
BSD, etc.
25 Advantages of Network Operating System:
1. Memory Management
2. Processor Management
3. Device Management
4. File Management
5. Security
6. Control over system performance
7. Job accounting
8. Error detection & Response
9. Booting the computer
10.Coordination between other software and users
29
30
31
32
Monolithic Kernel:
Monolithic kernels are the simplest and most common type of
Kernel.
They include the core functionality of the operating system and
support all devices connected to it.
In this, the user and kernel services are implemented in the same
memory space. Due to this, the size of the kernel increases,
which in turn increases the size of the operating system.
The main benefit is that the process execution is faster as there is
no separate memory space for the user and Kernel.
47 Monolithic Kernel
Example:
Unix, Linux, Open VMS, XTS-400 etc.
Advantage:
It has good performance.
Disadvantage:
It has dependencies between system component and lines of code in millions.
Microkernel:
Microkernels are a newer development and, as such, are not as
common as monolithic kernels.
They include only the essential services and devices required for
the system to function.
This results in a smaller kernel that is faster and uses less memory.
Here, the user and kernel services are implemented in two
different spaces. It has separate User Space and Kernel Space.
This reduces the size of the Kernel and results in reducing the size
of the operating system.
49 Microkernel
Example :
Mach, L4, AmigaOS, Minix, K42 etc.
Advantages:
It is more stable.
Disadvantage :
There are lots of system calls and context switches.
50 Types of Kernel
Hybrid Kernel:
Hybrid kernels combine monolithic and microkernels.
They include more services than microkernels but less than
monolithic kernels.
This allows them to offer some of the benefits of both kernels.
It borrows speed from the monolithic kernels and modularity
from microkernels.
51 Hybrid Kernel:
Example :
Advantage :
It combines both monolithic kernel and microkernel.
Disadvantage :
It is still similar to monolithic kernel.
52 Types of Kernel
Nano Kernel:
Nano kernels are the smallest type of Kernel, consisting of only a
few thousand lines of code.
They are used primarily in embedded systems or devices with
limited resources.
Example :
EROS
Advantage :
It offers hardware abstractions without system services.
Disadvantage :
It is quite same as Micro kernel hence it is less used
53 Types of Kernel
Exo Kernel:
This Kernel has separate resource protection and management.
It is suitable for use when performing application-specific
customization.
Exo kernels are designed for use in mobile devices.
They are a variation of microkernels that include additional features
specifically for mobile devices, such as power management and
support for multiple processors.
54 Exo Kernel
Example :
Advantage :
It has fewest hardware abstractions.
Disadvantage :
There is more work for application developers
Control Block(PCB)
61 PCB
• Since the PCB contains the critical information for the process, it must be
kept in an area of memory protected from normal user access.
• In some operating systems the PCB is placed in the beginning of the kernel
stack of the process since that is a convenient protected location.
• The PCB is maintained for a process throughout its lifetime, and is deleted
once the process terminates.
• PCB has sufficient information so that it is possible to interrupt a running
process and later resume its operation as if the interruption had not
occurred.
62 Process States