Batch Operating System
Batch Operating System
In above figure the user 5 is active state but user 1, user 2, user 3, and user 4 are in waiting
state whereas user 6 is in ready state.
Active State – The user’s program is under the control of CPU. Only one program is available
in this state.
Ready State – The user program is ready to execute but it is waiting for it’s turn to get the CPU.
More than one user can be in ready state at a time.
Waiting State – The user’s program is waiting for some input/output operation. More than one
user can be in a waiting state at a time.
Requirements of Time Sharing Operating System: An alarm clock mechanism to send an
interrupt signal to the CPU after every time slice. Memory Protection mechanism to prevent
one job’s instructions and data from interfering with other jobs.
Advantages:
Each task gets an equal opportunity.
Less chances of duplication of software.
CPU idle time can be reduced.
Disadvantages :
Reliability problem.
One must have to take of security and integrity of user programs and data.
Data communication problem.
Parallel System:
Parallel operating systems are the interface between parallel computers (or computer systems)
and the applications (parallel or not) that are executed on them. They translate the hardware’s
capabilities into concepts usable by programming languages.
4. Real Time System:
A real-time operating system (RTOS) is an OS that guarantees real-time applications a certain
capability within a specified deadline. RTOSes are designed for critical systems and for devices
like microcontrollers that are timing-specific. RTOS processing time requirements are
measured in milliseconds. Any delays in responding could have disastrous consequences.
Real-time operating systems have similar functions as general-purpose OSes (GPOSes), like
Linux, Microsoft Windows or macOS, but are designed so that a scheduler in the OS can meet
specific deadlines for different tasks.
RTOSes also commonly appear in embedded systems, which are a combination of hardware
and software designed for a specific function and may also operate within a larger system.
Often, embedded systems are used in real-time environments and use a real-time operating
system to communicate with the hardware.
RTOSes are designed to handle multiple processes at one time, ensuring that these processes
respond to events within a predictable time limit. Processing in an RTOS occurs within defined
time constraints and monitors the priority of tasks. An RTOS is also able to make changes to
task priority. Systems that are event-driven often switch between tasks based on priority.
Some real-time operating systems are created for special applications, while others are more
general purpose. Usually, RTOSes provide the following functionality:
multitasking, where tasks are rapidly switched between to give the impression that
multiple programs are executing concurrently;
process thread prioritization; and
a sufficient number of interrupt levels.
RTOSes are included in the following devices:
air traffic control systems;
anti-lock brakes and air bags;
cameras;
medical systems; and
PCs.
Characteristics of a real-time operating system
Real-time operating systems generally have the following characteristics:
Small footprint: Compared to general OSes, real-time operating systems are
lightweight.
High performance: RTOSes are typically fast and responsive.
Determinism. Repeating inputs end in the same output.
Safety and security: Safety-critical and security standards are typically the highest
priority, as RTOSes are frequently used in critical systems.
Priority-based scheduling: Tasks that are assigned a high priority are executed first
followed by lower-priority jobs.
Timing information: RTOSes are responsible for timing and providing application
programming interface
How does an RTOS work?
RTOSes are subdivided into soft and hard real-time systems. A soft RTOS is designed to operate
within a few hundred milliseconds, while a hard RTOS is designed to provide predictable
response times within tens of milliseconds.
Soft real-time systems typically have larger file sizes compared to hard RTOSes. Some
executions act less predictably during peak load but are tolerated, as computations are rolled
back to previously established checkpoints if an error occurs. Soft RTOSes are normally used
in systems where time-based executions are less important, such as in PCs, cameras and
smartphones.
Hard RTOSes typically have small or medium-sized data files. They act predictably during
moments of peak loads, and computation is rolled back if an error occurs. Hard RTOSes are
normally used in systems that require important time-based executions, such as in airplane
sensors, autopilot systems or medical devices.
In hard real-time OSes, if the calculation cannot be performed to make an object available at
the designated time, the OS terminates with a failure. In a soft RTOS, the OS continues to
function, but certain tasks may be unproductive if they fail to execute at a given time.
RTOSes also act as a scheduler, in which tasks can be scheduled as ready to run, running or
blocked.
How a kernel works
A kernel interacts with the rest of the operating system, including the application layer and the
device layer, and with components such as the CPU and memory.
A kernel interacts with the rest of the operating system, including the application layer and the
device layer, and with components such as the CPU and memory.
They typically have a monolithic kernel and microkernel architecture. The OS kernel is the
core of an OS, which provides basic services for all other parts of the OS. Kernels are the main
layer between the OS and hardware.
Monolithic RTOS kernel and operation processes share one space. This architecture operates
quickly when compared to microkernel configurations and typically provides better
performance. Even though monolithic RTOSes run faster, they are harder to perform updates
on, and a programming error in the file system, protocol stack or driver can cause system
crashes.
The microkernel architecture houses the kernel and operations in separate locations. This
architecture is slower than monolithic RTOS, as any action must return to the kernel before it
can move to the component it references. The microkernel also lacks file systems.
Types of Real-Time Operating Systems
The Real-Time Operating System is of three types:
4.1. Hard Real-Time Operating system:
A hard real-time operating system is used when we need to complete tasks by a given deadline.
If the task is not completed on time then the system is considered to be failed.
For example, the pacemaker. A pacemaker has flexible, insulated wires (leads) that are placed
in one or more chambers of the heart. These wires deliver the electrical pulses to adjust the
heart rate. And these wires require a hard real-time operating system.
4.2. Soft Real-Time Operating System
A soft real-time operating system is used where few delays in time duration are acceptable.
That is if the given task is taking a few seconds more than the specified time then also no
critical damage takes place.
For example, telephone switches, the sending or receiving of the call can take some time. It
will not be considered a failure.
4.3. Firm Real-Time Operating System
A firm real-time operating system lies between the hard and soft real-time operating system. A
firm real-time system is one in which a few missed deadlines will not lead to total failure, but
missing more than a few may lead to complete or catastrophic system failure. However, unlike
a hard real-time task, even if a firm real-time task does not complete within its deadline, the
system doesn’t fail but the late results are merely discarded.
For example, in Video Conferencing, when a certain frame is being played, if some preceding
frame arrives at the receiver, then this frame is of no use and is discarded.
Applications of Real-time Operating System (RTOS)
Some real-life applications of RTOS are:
Systems that provide immediate updating.
Used in any system that provides up-to-date and minute information on stock prices.
Defense application systems like RADAR.
Airlines reservation system.
Command Control Systems.
Air traffic control system.
Networked Multimedia Systems.
Internet Telephony.
Heart Pacemaker.
Anti-lock Brake Systems.
Costly: The hardware requirements like device drivers are a bit expensive.
Complex: The algorithms and programs used in real-time systems are complex.
Limited Tasks: The tasks or programs that real-time systems can process at a given
time are limited.