Chap 2 Introduction 01042020
Chap 2 Introduction 01042020
--------------------------------------------------------------------------------------------------------------------------------------
A] Operating system
An operating system (OS) is a type of system software that manages computer’s hardware and
software resources. It provides common services for computer programs. An OS acts a link between
the software and the hardware. It controls and keeps a record of the execution of all other programs
that are present in the computer, including application programs and other system software.
The most important tasks performed by the operating system are
1. Process management: - Process management helps OS to create and delete processes. It also
provides mechanisms for synchronization and communication among processes.
2. Memory management: - Memory management module performs the task of allocation and
de-allocation of memory space to programs in need of these resources.
3. File management: - It manages all the file-related activities such as organization storage,
retrieval, naming, sharing, and protection of files.
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 device from the user.
7. Security: - Security module protects the data and information of a computer system against
malware threat and authorized access.
8. Command interpretation: This module is interpreting commands given by the user and acting
system resources to process that commands.
10. Job accounting: Keeping track of time & resource used by various job and users.
Examples of Batch based Operating System: Payroll System, Bank Statements etc.
Multiple jobs are executed by the CPU by switching between them, but the switches occur so
frequently. Thus, the user can receive an immediate response. For example, in a transaction
processing, the processor executes each user program in a short burst or quantum of computation.
That is, if n users are present, then each user can get a time quantum. When the user submits the
command, the response time is in few seconds at most.
The operating system uses CPU scheduling and multiprogramming to provide each user with a small
portion of a time. Computer systems that were designed primarily as batch systems have been
modified to time-sharing systems.
The processors communicate with one another through various communication lines (such as high-
speed buses or telephone lines). These are referred as loosely coupled systems or distributed systems.
Processors in a distributed system may vary in size and function. These processors are referred as
sites, nodes, computers, and so on.
Real-time systems are used when there are rigid time requirements on the operation of a processor or
the flow of data and real-time systems can be used as a control device in a dedicated application. A
real-time operating system must have well-defined, fixed time constraints, otherwise the system will
fail. For example, scientific experiments, medical image systems, industrial control systems, weapon
systems, robots, air traffic control systems, etc. There are two types of real-time operating systems.
• Hard real-time systems
Hard real-time systems guarantee that critical tasks complete on time. In hard real-time systems,
secondary storage is limited or missing and the data is stored in ROM. In these systems, virtual
memory is almost never found.
Advantages of RTOS:
• Maximum Consumption: Maximum utilization of devices and system, thus more output from all
the resources
• Task Shifting: Time assigned for shifting tasks in these systems are very less. For example in
older systems it takes about 10 micro seconds in shifting one task to another and in latest
systems it takes 3 micro seconds.
• Focus on Application: Focus on running applications and less importance to applications which
are in queue.
• Real time operating system in embedded system: Since 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 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
response 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.
5. Multiprocessor Systems
A Multiprocessor system consists of several processors that share a common physical memory.
Multiprocessor system provides higher computing power and speed. In multiprocessor system all
processors operate under single operating system. Multiplicity of the processors and how they do act
together are transparent to the others.
6. Multiprogramming Systems
Sharing the processor, when two or more programs reside in memory at the same time, is referred
as multiprogramming. Multiprogramming assumes a single shared processor. Multiprogramming
increases CPU utilization by organizing jobs so that the CPU always has one to execute.
The following figure shows the memory layout for a multiprogramming system.
Advantages
• High and efficient CPU utilization.
• User feels that many programs are allotted CPU almost simultaneously.
Disadvantages
• CPU scheduling is required.
• To accommodate many jobs in memory, memory management is required.