You are on page 1of 26

UNIT 1: Introduction to Operating Systems

What is an Operating System?


An operating system is a system software that acts as an intermediary between a user of a
computer and the computer hardware.
It is a software that manages the computer hardware.
OS allows the user to execute programs in a convenient and efficient manner.
Operating system goals:

• Make the computer system convenient to use. It hides the difficulty in managing the hardware.

• Use the computer hardware in an efficient manner

• Provide and environment in which user can easily interface with computer.

• It is a resource allocator

Computer System Structure (Components of Computer System)

Computer system mainly consists of four components-

• Hardware – provides basic computing resources

✓ CPU, memory, I/O devices

• Operating system

✓ Controls and coordinates use of hardware among various applications and users

• Application programs – define the ways in which the system resources are used to solve the
computing problems of the users

✓ Word processors, compilers, web browsers, database systems, video games

• Users

✓ People, machines, other computers


The basic hardware components comprises of CPU, memory, I/O devices. The application program
uses these components. The OS controls and co-ordinates the use of hardware, among various
application programs (like compiler, word processor etc.) for various users.

The OS allocates the resources among the programs such that the hardware is efficiently used.

The operating system is the program running at all the times on the computer. It is usually called as
the kernel.

Kernel functions are used always in system, so always stored in memory. Non kernel functions are
stored in hard disk, and it is retrieved whenever required.

Views of OS

Operating System can be viewed from two viewpoints–

User views & System views

1. User Views:-

The user’s view of the operating system depends on the type of user.

i. If the user is using standalone system, then OS is designed for ease of use and high performances.
Here resource utilization is not given importance.

ii. If the users are at different terminals connected to a mainframe or minicomputers, by sharing
information and resources, then the OS is designed to maximize resource utilization. OS is designed
such that the CPU time, memory and i/o are used efficiently and no single user takes more than the
resource allotted to them.

iii. If the users are in workstations, connected to networks and servers, then the user have a system
unit of their own and shares resources and files with other systems. Here the OS is designed for both
ease of use and resource availability (files).

iv. Users of hand held systems, expects the OS to be designed for ease of use and performance per
amount of battery life.

v. Other systems like embedded systems used in home devies (like washing m/c) & automobiles do
not have any user interaction. There are some LEDs to show the status of its work.

2. System Views:-

Operating system can be viewed as a resource allocator and control program.

i. Resource allocator - The OS acts as a manager of hardware and software resources. CPU time,
memory space, file-storage space, I/O devices, shared files etc. are the different resources required
during execution of a program. There can be conflicting request for these resources by different
programs running in same system. The OS assigns the resources to the requesting program
depending on the priority.

ii. Control Program – The OS is a control program and manage the execution of user program to
prevent errors and improper use of the computer.

Computer System Organization

Computer-system

One or more CPUs, device controllers connect through common bus providing access to shared
memory. Each device controller is in-charge of a specific type of device. To ensure orderly access to
the shared memory, a memory controller is provided whose function is to synchronize access to the
memory. The CPU and other devices execute concurrently competing for memory cycles. Concurrent
execution of CPUs and devices competing for memory cycles

When system is switched on, ‘Bootstrap’ program is executed. It is the initial program to run in the
system. This program is stored in read-only memory (ROM) or in electrically erasable programmable
read-only memory(EEPROM). It initializes the CPU registers, memory, device controllers and other
initial setups. The program also locates and loads, the OS kernel to the memory. Then the OS starts
with the first process to be executed (ie. ‘init’ process) and then wait for the interrupt from the user.
Interrupt handling –

The occurrence of an event is usually signaled by an interrupt. The interrupt can either be from the
hardware or the software. Hardware may trigger an interrupt at any time by sending a signal to the
CPU. Software triggers an interrupt by executing a special operation called a system call (also called a
monitor call).

When the CPU is interrupted, it stops what it is doing and immediately transfers execution to a fixed
location. The fixed location (Interrupt Vector Table) contains the starting address where the service
routine for the interrupt is located. After the execution of interrupt service routine, the CPU resumes
the interrupted computation.

Interrupts are an important part of computer architecture. Each computer design has its own
interrupt mechanism, but several functions are common. The interrupt must transfer control to the
appropriate interrupt service routine

Storage Structure
Computer programs must be in main memory (RAM) to be executed. Main memory is the large
memory that the processor can access directly. It commonly is implemented in a semiconductor
technology called dynamic random-access memory (DRAM). Computers provide Read Only
Memory(ROM), whose data cannot be changed.
All forms of memory provide an array of memory words. Each word has its own address. Interaction
is achieved through a sequence of load or store instructions to specific memory addresses.

A typical instruction-execution cycle, as executed on a system with a Von Neumann architecture, first
fetches an instruction from memory and stores that instruction in the instruction register. The
instruction is then decoded and may cause operands to be fetched from memory and stored in some
internal register. After the instruction on the operands has been executed, the result may be stored
back in memory.

Ideally, we want the programs and data to reside in main memory permanently. This arrangement
usually is not possible for the following two reasons:

1. Main memory is usually too small to store all needed programs and data permanently.

2. Main memory is a volatile storage device that loses its contents when power is turned off.
Thus, most computer systems provide secondary storage as an extension of main memory. The main
requirement for secondary storage is that it will be able to hold large quantities of data permanently.

The most common secondary-storage device is a magnetic disk, which provides storage for both
programs and data. Most programs are stored on a disk until they are loaded into memory. Many
programs then use the disk as both a source and a destination of the information for their
processing.

The wide variety of storage systems in a computer system can be organized in a hierarchy as shown
in the figure, according to speed, cost and capacity. The higher levels are expensive, but they are fast.
As we move down the hierarchy, the cost per bit generally decreases, whereas the access time and
the capacity of storage generally increases.

In addition to differing in speed and cost, the various storage systems are either volatile or non-
volatile. Volatile storage loses its contents when the power to the device is removed. In the absence
of expensive battery and generator backup systems, data must be written to non-volatile storage for
safekeeping. In the hierarchy shown in figure, the storage systems above the electronic disk are
volatile, whereas those below are non-volatile.

An electronic disk can be designed to be either volatile or nonvolatile. During normal operation, the
electronic disk stores data in a large DRAM array, which is volatile. But many electronic-disk devices
contain a hidden magnetic hard disk and a battery for backup power. If external power is interrupted,
the electronic-disk controller copies the data from RAM to the magnetic disk. Another form of
electronic disk is flash memory.

I/O Structure

A large portion of operating system code is dedicated to managing I/O, both because of its
importance to the reliability and performance of a system and because of the varying nature of the
devices.

Every device have a device controller, maintains some local buffer and a set of special-purpose
registers. The device controller is responsible for moving the data between the peripheral devices.
The operating systems have a device driver for each device controller.
To start an I/O operation, the device driver loads the registers within the device controller. The
device controller, examines the contents of these registers to determine what action to take (such as
"read a character from the keyboard"). The controller starts the transfer of data from the device to
its local buffer. Once the transfer of data is complete, the device controller informs the device
driver(OS) via an interrupt that it has finished its operation. The device driver then returns control to
the operating system, and also returns the data. For other operations, the device driver returns
status information.

This form of interrupt-driven I/O is fine for moving small amounts of data, but very difficult for bulk
data movement. To solve this problem, direct memory access (DMA) is used.

• DMA is used for high-speed I/O devices, able to transmit information at close to memory speeds

• Device controller transfers blocks of data from buffer storage directly to main memory without CPU
intervention

• Only one interrupt is generated per block, rather than the one interrupt per byte
Goals of Operating System
An Operating System (OS) is system software that acts as an interface or bridge between the
hardware of a computer and the end user.

Operating System reduces the communication barrier between the user and the system and helps
the user to communicate easily with the computer.

Every computer system requires an operating system to run its applications and programs.
Applications like Browsers, MS Office, Notepad, Games, and many more require some space or can
be an atmosphere to perform their tasks.

This operating system is an essential need or requirement of a system such as a laptop, computer,
iPad, mobile phone, etc. With OS, the user can communicate and perform any task on the system.

Examples of Operating Systems

There are various types of operating systems which are available in the market:

• Windows

• Android

• iOS

• Mac OS

• Linux

• Chrome OS

• Windows Phone OS

Goals of Operating System


There are mainly 2 goals of the operating system:

• Convenience

• Efficiency

The other 3 goals are:

• Portability and Reliability

• Hardware Abstraction

• Security

1. Convenience

An Operating System's primary and first goal is to provide a friendly and convenient environment to
the user. It is optional to use Operating System. Still, things become harder when the user has to
perform all the process scheduling and convert user commands to machine language so that system
can perform tasks. So, we use an Operating System to act as a bridge between us and the computer
hardware. We only have to give commands to the system, and OS will take the instructions and do
the rest of the work. Because of this operating system should be convenient to use and operate by
the user.

2. Efficiency

The second and important goal of an Operating System is efficiency. An operating system should
utilize all the resources efficiently. The management of resources and programs should be done so
that no resource is kept idle and memory is used for no use.

3. Portability and Reliability

The operating system can work/operate on different machines with different processors and memory
configurations. This makes the operating system more reliable.

Also, the operating system can protect itself and the user from accidental damage from the user
program.

4. Hardware Abstraction

The operating system can conceal or can be said to control all functions and resources of the
computer. The user can give commands and access any function or resource of the computer without
facing any difficulties. In this way, the Operating system communicates between the user and
computer hardware.

5. Security

An operating system provides the safety and security of data between the user and the hardware. OS
enables multiple users to securely share a computer(system), including files, processes, memory, and
device separately.

Functions of the Operating System


To achieve the goals of an Operating system, the Operating System performs several functionalities,
which are:

• Process Management: The CPU executes many instructions for users at a time. Besides,
user's commands, the CPU has some of its activities to perform, called processes. CPU has to
complete all the tasks assigned to it. So, it solves the problem by giving a certain amount of
time to a particular task. The operating system's function is to create and delete both user
and system processes that are being executed or do not need to execute them.

• Memory Management: Various tasks and commands fetched by the CPU are stored in the
memory for execution. The operating system keeps track of which part of the memory is
currently being used. Allocating and de-allocating the memory as per need. And decides
which process should be loaded in the memory when it is available.

• I/O Device Management: Various I/O devices are present in a system. Only OS has access to
these devices. So, the Operating System must allow the use of I/O devices by the various
processes requiring these resources.

• File Management: There are various files, folders, and directory systems in a particular
computer. Computers can store the files in magnetic tape, hard disk, local folder, etc. The
operating system manages all these. The function of the OS is to create and delete files and
folders. Mapping of files and directories to the disk. Backing up data to non-volatile memory.
• Virtual Memory: Operating system loads some of the files, programs, and applications that
are larger than the main memory in a memory which is called virtual memory.

• Job Accounting: Job Accounting is a system available in the operating system that helps track
system resource usage. It keeps track of the time and resources used by various processes
and users.

Operating System Operations

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:
assigning the processor to process at a time
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.
• The operating system deallocated memory from processes as required. This may
happen when a process has been terminated or if it no longer needs the memory.

the os is delloacted memory from the processes as required


Device Management
There are many I/O devices handled by the operating system such as mouse,
keyboard, disk drive etc. There are different device drivers that can be
connected to the operating system to handle a specific device. The device
controller is an interface between the device and the device driver. The user
applications can access all the I/O devices using the device drivers, which are
device specific codes.

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.
Resource Allocation Techniques for Processes

The Operating System allocates resources when a program need them. When the program
terminates, the resources are de-allocated, and allocated to other programs that need them. Now
the question is, what strategy does the operating system use to allocate these resources to user
programs?

There are two Resource allocation techniques:

1. Resource partitioning approach – In this approach, the operating system decides beforehand,
that what resources should be allocated to which user program. It divides the resources in the
system to many resource partitions, where each partition may include various resources – for
example, 1 MB memory, disk blocks, and a printer. Then, it allocates one resource partition to each
user program before the program’s initiation. A resource table records the resource partition and its
current allocation status (Allocated or Free).

Advantages:
• Easy to Implement

• Less Overhead

Disadvantages:

• Lacks flexibility – if a resource partition contains more resources than what a particular
process requires, the additional resources are wasted.

• If a program needs more resources than a single resource partition, it cannot execute
(Though free resources are present in other partitions).

An Example Resource Table may look like this:-

The above Resource Table is of the time of Booting. Resource Table is the core data structure
that is used in the resource allocation techniques. Resource Table contains resource partitions as
entries rather than single resources.

2. Pool based approach – In this approach, there is a common pool of resources. The operating
System checks the allocation status in the resource table whenever a program makes a request for a
resource. If the resource is free, it allocates the resource to the program.

Advantages:

• Allocated resources are not wasted.

• Any resource requirement can be fulfilled if the resource is free (unlike Partitioning
approach)

Disadvantages:

• Overhead of allocating and de-allocating the resources on every request and release

Resource Allocation

When each process request for the resources available in the system, the operating system allocates
the needed resources for its execution purpose. The resources allocated can be either a hard drive,
scanner, any files in memory, or even a printer. Any program that enters into a ready or execution
state is termed a process. This program requires resources from one or other processes to complete
its assigned task.

In a multiprogramming environment, a process may request multiple resources at the same time, so
those processes have to be waiting until it receives all the resources. A resource allocator present in
the operating system is generally responsible for allocating the resources as per user request and
deallocating them on completion between various processes. Resource allocation has to be assigned
in such a way that all processes have enough resources required for working on their task.

Resource allocation

When resources are allocated, to the process based on the request various issues arise in multiuser
processing which would be expensive to provide resources that are non-sharable to equalize with
higher demands. The operating system has to allocate the resources without losing the integrity of
the system.

Consider a practical example of a user working on an Excel file who wants to print some data using a
printer device connected to the system. Then operating system allocates the printer based on its
availability to the Excel process. The process enters into a wait state if the printer is used by another
process in the system.

Allocation mechanisms used by the operating system to allocate the resources to the process are
given below −

Memory allocation − When a program request for resources from the operating system, the process
and the input data needs to be stored in primary memory to perform its execution. Memory
manager has the responsibility to allocate resources according to the available or free spaces
available and after providing memory to the requested process, execution of the program begins.
Memory management has two different approaches to allocating the process into the system. In a
contiguous approach where the processes are assigned to fixed blocks of memory, with larger sizes
and stored in a memory location that has consecutive addresses whereas, in a non-contiguous
approach, the processes are stored in different blocks that are located at different memory portions
not needed to be in a consecutive manner which seems to be an efficient technique as it uses
memory spaces only when needed.

Processors

The operating system has a process descriptor that specifies the process to get resources from the
processors. One central processor is usually present whereas, in a multiprocessor environment, there
can be many processors running at the same time serving the user request. The process control block
contains information about the status of resources when each process is created. This provides states
of each process such as new, running, waiting, ready, blocked, or terminated.

File permissions

Files consist of a collection of user information sometimes called programs. Resources are allocated
to the file along with the access permissions specified by the owner to individual or group of users.
Operations such as read, write, and execute are also allocated along with the file stored in the
memory. If multiple files are requested at the same time, then some process gets into a queue until
reaching its expiration.

Backup of memory
Resources can be allotted by the memory manager as said earlier. Virtual memory can also be used
for storing recently used files. In the backing store, the request from the user cannot be queued, as
free spaces will be assigned for the requesting process.

Allocation methods

Allocation methods When resources are allocated to the process, the operating system has two
policies for allocation methods −

With Deadlock − Deadlock occurs when a process is waiting for the set of resources that is held by
other processes and it waits to receive all the resources requested before it becomes unblocked.
Deadlock may occur in certain conditions like Hold and Wait, Mutual exclusion, no preemption, and
circular wait.

Consider an example when two processes P1 and P2 and need resources X and Y. In this case, P1
waits for resource Y where P2 holds resource Y, and P2, in turn, waits for resource X which has to be
released by P1 holding it. So, the loop is created here when P1 needs resource Y and waits for P2 to
release it, and P2 needs X and waits for P2 to release it. Deadlocks can be resolved by methods like
detection, prevention, avoidance, and ostrich problem.

Without Deadlock − If resources available in memory are abundant and serve multiple processes
simultaneously then deadlock may not occur.

Conclusion

The allocation of resources is managed and controlled by the operating systems based on the
allocation mechanism. It detects the methods of allocating different resource types to memory,
processor, peripherals, and backing store. Resource allocated to each process may or may not enter
into a deadlock state and detection, and prevention mechanisms have to be implemented to recover
from the deadlock that occurred.
An Operating System performs all the basic tasks like managing files, processes, and memory. Thus
operating system acts as the manager of all the resources, i.e. resource manager. Thus, the operating
system becomes an interface between the user and the machine. It is one of the most required
software that is present in the device.

Operating System is a type of software that works as an interface between the system program and
the hardware. There are several types of Operating Systems in which many of which are mentioned
below. Let’s have a look at them.

Types of Operating Systems

There are several types of Operating Systems which are mentioned below.

• Batch Operating System

• Multi-Programming System

• Multi-Processing System

• Multi-Tasking Operating System

• Time-Sharing Operating System

• Distributed Operating System

• Network Operating System

• Real-Time Operating System

1. Batch Operating System

This type of operating system does not interact with the computer directly. There is an operator
which takes similar jobs having the same requirement and groups them into batches. It is the
responsibility of the operator to sort jobs with similar needs.
Batch Operating System

Advantages of Batch Operating System

• It is very difficult to guess or know the time required for any job to complete. Processors of
the batch systems know how long the job would be when it is in the queue.

• Multiple users can share the batch systems.

• The idle time for the batch system is very less.

• It is easy to manage large work repeatedly in batch systems.

Disadvantages of Batch Operating System

• The computer operators should be well known with batch systems.

• Batch systems are hard to debug.

• It is sometimes costly.

• The other jobs will have to wait for an unknown time if any job fails.

Examples of Batch Operating Systems: Payroll Systems, Bank Statements, etc.

2. Multi-Programming Operating System

Multiprogramming Operating Systems can be simply illustrated as more than one program is present
in the main memory and any one of them can be kept in execution. This is basically used for better
execution of resources.
MultiProgramming

Advantages of Multi-Programming Operating System

• Multi Programming increases the Throughput of the System.

• It helps in reducing the response time.

Disadvantages of Multi-Programming Operating System

• There is not any facility for user interaction of system resources with the system.

3. Multi-Processing Operating System

Multi-Processing Operating System is a type of Operating System in which more than one CPU is used
for the execution of resources. It betters the throughput of the System.

Multiprocessing

Advantages of Multi-Processing Operating System


• It increases the throughput of the system.

• As it has several processors, so, if one processor fails, we can proceed with another
processor.

Disadvantages of Multi-Processing Operating System

• Due to the multiple CPU, it can be more complex and somehow difficult to understand.

4. Multi-Tasking Operating System

Multitasking Operating System is simply a multiprogramming Operating System with having facility of
a Round-Robin Scheduling Algorithm. It can run multiple programs simultaneously.

There are two types of Multi-Tasking Systems which are listed below.

• Preemptive Multi-Tasking

• Cooperative Multi-Tasking

Multitasking

Advantages of Multi-Tasking Operating System

• Multiple Programs can be executed simultaneously in Multi-Tasking Operating System.

• It comes with proper memory management.

Disadvantages of Multi-Tasking Operating System

• The system gets heated in case of heavy programs multiple times.

5. Time-Sharing Operating Systems

Each task is given some time to execute so that all the tasks work smoothly. Each user gets the time
of the 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.
Time-Sharing OS

Advantages of Time-Sharing OS

• Each task gets an equal opportunity.

• Fewer chances of duplication of software.

• CPU idle time can be reduced.

• Resource Sharing: Time-sharing systems allow multiple users to share hardware resources
such as the CPU, memory, and peripherals, reducing the cost of hardware and increasing
efficiency.

• Improved Productivity: Time-sharing allows users to work concurrently, thereby reducing the
waiting time for their turn to use the computer. This increased productivity translates to
more work getting done in less time.

• Improved User Experience: Time-sharing provides an interactive environment that allows


users to communicate with the computer in real time, providing a better user experience
than batch processing.

Disadvantages of Time-Sharing OS

• Reliability problem.

• One must have to take care of the security and integrity of user programs and data.

• Data communication problem.

• High Overhead: Time-sharing systems have a higher overhead than other operating systems
due to the need for scheduling, context switching, and other overheads that come with
supporting multiple users.

• Complexity: Time-sharing systems are complex and require advanced software to manage
multiple users simultaneously. This complexity increases the chance of bugs and errors.
• Security Risks: With multiple users sharing resources, the risk of security breaches increases.
Time-sharing systems require careful management of user access, authentication, and
authorization to ensure the security of data and software.

Examples of Time-Sharing OS with explanation

• IBM VM/CMS: IBM VM/CMS is a time-sharing operating system that was first introduced in
1972. It is still in use today, providing a virtual machine environment that allows multiple
users to run their own instances of operating systems and applications.

• TSO (Time Sharing Option): TSO is a time-sharing operating system that was first introduced
in the 1960s by IBM for the IBM System/360 mainframe computer. It allowed multiple users
to access the same computer simultaneously, running their own applications.

• Windows Terminal Services: Windows Terminal Services is a time-sharing operating system


that allows multiple users to access a Windows server remotely. Users can run their own
applications and access shared resources, such as printers and network storage, in real-time.

6. Distributed Operating System

These types of operating system is a recent advancement in the world of computer technology and
are being widely accepted all over the world and, that too, at a great pace. Various autonomous
interconnected computers communicate with each other using a shared communication network.
Independent systems possess their own memory unit and CPU. These are referred to as loosely
coupled systems or distributed systems. These systems’ processors differ in size and function. The
major benefit of working with these types of the operating system is that it is always possible that
one user can access the files or software which are not actually present on his system but some
other system connected within this network i.e., remote access is enabled within the devices
connected in that network.

Distributed OS

Advantages of Distributed Operating System

• Failure of one will not affect the other network communication, as all systems are
independent of each other.

• Electronic mail increases the data exchange speed.

• Since resources are being shared, computation is highly fast and durable.

• Load on host computer reduces.


• These systems are easily scalable as many systems can be easily added to the network.

• Delay in data processing reduces.

Disadvantages of Distributed Operating System

• Failure of the main network will stop the entire communication.

• To establish distributed systems the language is used not well-defined yet.

• These types of systems are not readily available as they are very expensive. Not only that the
underlying software is highly complex and not understood well yet.

Examples of Distributed Operating Systems are LOCUS, etc.

7. Network Operating System

These systems run on a server and provide the capability to manage data, users, groups, security,
applications, and other networking functions. These types of operating systems allow shared access
to files, printers, security, applications, and other networking functions over a small private network.
One more 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.

Network Operating System

Advantages of Network Operating System

• Highly stable centralized servers.

• Security concerns are handled through servers.


• New technologies and hardware up-gradation are easily integrated into the system.

• Server access is possible remotely from different locations and types of systems.

Disadvantages of Network Operating System

• Servers are costly.

• User has to depend on a central location for most operations.

• Maintenance and updates are required regularly.

Examples of Network Operating Systems are Microsoft Windows Server 2003, Microsoft Windows
Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, BSD, etc.

8. Real-Time Operating System

These types of OSs serve real-time systems. The time interval required to process and respond to
inputs is very small. This time interval is called response time.
Real-time systems are used when there are time requirements that are very strict like missile
systems, air traffic control systems, robots, etc.

Types of Real-Time Operating Systems

• Hard Real-Time Systems:


Hard Real-Time 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 an
accident. Virtual memory is rarely found in these systems.

• Soft Real-Time Systems:


These OSs are for applications where time-constraint is less strict.

For more, refer to the Difference Between Hard Real-Time OS and Soft Real-Time OS.

BSP= board support package

Real-Time Operating System


Advantages of RTOS

• Maximum Consumption: Maximum utilization of devices and systems, thus more output
from all the resources.

• Task Shifting: The time assigned for shifting tasks in these systems is very less. For example,
in older systems, it takes about 10 microseconds in shifting from one task to another, and in
the latest systems, it takes 3 microseconds.

• Focus on Application: Focus on running applications and less importance on applications


that are in the queue.

• Real-time operating system in the embedded system: Since the size of programs is 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.

Disadvantages of RTOS

• Limited Tasks: Very few tasks run at the same time and their concentration is very less on a
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 signal 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.

Examples of Real-Time Operating Systems are Scientific experiments, medical imaging systems,
industrial control systems, weapon systems, robots, air traffic control systems, etc.

You might also like