You are on page 1of 19

EC416-Operating Systems

OVER VIEW OF OPERATING SYSTEM


Operating System: Operating system is a program that
acts as an intermediary between a user of a computer
and the computer hardware and also it manages the
entire computer system components (hardware &
software).
Operating system goals:
• Execute user programs and make solving user
problems easier
• Make the computer system convenient to use
• Use the computer hardware in an efficient manner
Dr.B.Hemantha Kumar. RVR&JC CE 2
OVER VIEW OF OPERATING SYSTEM
Computer System Structure : Computer system can be divided into four
components
• Hardware – provides basic computing resources for the system.
– CPU, memory, I/O devices
• 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
• Operating system
– Controls and coordinates use of hardware among various applications and
users
• Users
– People, machines, other computers

Dr.B.Hemantha Kumar. RVR&JC CE 3


Components of computer system

User 1 User 2 User 3 ------- User n

Compiler Assembler Text Editor - - - - - - - Databse


System
System and Application Programs

Operating System

Computer Hardware

Components of computer system


Dr.B.Hemantha Kumar. RVR&JC CE 4
OVER VIEW OF OPERATING SYSTEM
Operating System Definition :
• Operating system is a program that acts as an intermediary
between a user of a computer and the computer hardware
• OS is a resource allocator
• Manages all resources
• Decides between conflicting requests for efficient and fair
resource use
• OS is a control program
• Controls execution of programs to prevent errors and
improper use of the computer
Note: The one program running at all times on the computer is
the kernel(OS).

Dr.B.Hemantha Kumar. RVR&JC CE 5


OVER VIEW OF OPERATING SYSTEM
Computer Startup
• bootstrap program is loaded at power-up or reboot
• It is stored within the computer hardware in read-only
memory (ROM) or electrically erasable programmable read-
only memory (EEPROM), known by the general term
firmware.
• Initializes all aspects of system , from CPU registers to device
controllers to memory contents.
• The bootstrap program must know how to load the operating
system and how to start executing that system.
• That is bootstrap program must locate the operating-system
kernel and load it into memory.
Note: The one program running at all times on the computer is
the kernel(OS).
Dr.B.Hemantha Kumar. RVR&JC CE 6
OVER VIEW OF OPERATING SYSTEM
Functions of Operating System : Today most operating systems perform the
following important functions :
• Processor management : It manages the assignment of processor to different
tasks being performed by the computer system.
• Process management : It manages the execution of process according to their
priorities .
• Memory management : It manages the allocation of main memory and other
storage areas to the system programs as well as user programs and data.
• Input / Output management : It manages the co-ordination and assignment of
different Input and Output devices while one or more programs are executed.
• File management : It allows all files to be easily changed and modified through
the use of text editors or some other file manipulation routines.
• Establishment and enforcement of a priority system : It determines and
maintains the order in which jobs are to be executed in the computer system.
• Interpretation of commands and instructions.
• Facilitates easy communication between the computer system and the
computer operator.
Dr.B.Hemantha Kumar. RVR&JC CE 7
Computer System Organization
• One or more CPUs, device controllers connect through common bus providing
access to shared memory
• Concurrent execution of CPUs and devices competing for memory cycles

A modern computer system.


Dr.B.Hemantha Kumar. RVR&JC CE 8
Computer System Organization
Computer-System Operation
• I/O devices and the CPU can execute concurrently
• Each device controller is in charge of a particular device type
• Each device controller has a local buffer
• CPU moves data from/to main memory to/from local buffers
• I/O is from the device to local buffer of controller
• Device controller informs CPU that it has finished its operation by
causing An interrupt .
• Hardware may trigger an interrupt at any time by sending a signal
to the CPU, usually by way of the system bus.
• Software may trigger an interrupt by executing a special operation
called a system call

Dr.B.Hemantha Kumar. RVR&JC CE 9


Computer System Organization
Common Functions of Interrupts
• Interrupt transfers control to the interrupt service routine
generally, through the interrupt vector, which contains the
addresses of all the service routines
• Interrupt architecture must save the address of the interrupted
instruction
• Incoming interrupts are disabled while another interrupt is being
processed to prevent a lost interrupt.
• A trap is a software-generated interrupt caused either by an error
or a user request
• An operating system is interrupt driven

Dr.B.Hemantha Kumar. RVR&JC CE 10


Types of Operating System

• Batch operating system


• Multiprogramming Batch Systems
• Time-sharing operating systems(Multitasking
Systems)
• Multiprocessor Systems(Parallel Systems)
• Distributed operating System
• Real Time operating System

Dr.B.Hemantha Kumar. RVR&JC CE 11


Types of Operating System
Batch operating system:The users of batch operating system do not
interact with the computer directly.
Each user prepares his job on an offline device like punch cards and
submits it to the computer operator.
To speed up processing, jobs with similar needs are batched together
and run as a group.
Thus, the programmers left their programs with the operator. The
operator then sorts programs into batches with similar requirements.
The problems with Batch Systems are following:
Lack of interaction between the user and job.
CPU is often idle, because the speeds of the mechanical I/O devices is
slower than CPU.
Difficult to provide the desired priority.
Dr.B.Hemantha Kumar. RVR&JC CE 12
Types of Operating System
Multiprogramming Batch Systems:
• In this the operating system picks up and begins to execute one of
the jobs from memory.
• Once this job needs an I/O operation operating system switches to
another job (CPU and OS always busy).
• Jobs in the memory are always less than the number of jobs on
disk(Job Pool).
• If several jobs are ready to run at the same time, then the system
chooses which one to run through the process of CPU Scheduling
• In Non-multiprogrammed system, there are moments when CPU
sits idle and does not do any work.
• In Multiprogramming system, CPU will never be idle and keeps on
processing.
Dr.B.Hemantha Kumar. RVR&JC CE 13
Types of Operating System
Time-sharing operating systems: Time sharing is a technique which
enables many people, located at various terminals, to use a particular
computer system at the same time.
Time-sharing or multitasking is a logical extension of
multiprogramming.
Processor's time which is shared among multiple users
simultaneously is termed as time-sharing.
Multiple jobs are executed by the CPU by switching between them,
but the switches occur so frequently. Thus, the user can receives an
immediate response.
Operating system uses CPU scheduling and multiprogramming to
provide each user with a small portion of a time.
Advantage of Timesharing operating systems is it reduces CPU idle
time.
Dr.B.Hemantha Kumar. RVR&JC CE 14
Types of Operating System
• Multiprocessor Systems(Parallel 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.
• Multiprocessor systems have three main advantages:
– Increased throughput.
– Economy of scale.
– Increased reliability
Dr.B.Hemantha Kumar. RVR&JC CE 15
Types of Operating System
• Multiprocessor Systems: Advantages:
• Increased throughput. By increasing the number of processors, we
expect to get more work done in less time.
• Economy of scale. Multiprocessor systems can cost less than
equivalent multiple single-processor systems, because they can
share peripherals, mass storage, and power supplies.
• Increased reliability. If functions can be distributed properly
among several processors, then the failure of one processor will
not halt the system, only slow it down. If we have ten processors
and one fails, then each of the remaining nine processors can pick
up a share of the work of the failed processor. Thus, the entire
system runs only 10 percent slower, rather than failing altogether.

Dr.B.Hemantha Kumar. RVR&JC CE 16


Types of Operating System
Distributed operating System: Distributed systems use
multiple central processors to serve multiple real time
application and multiple users. Data processing jobs are
distributed among the processors accordingly to which one
can perform each job most efficiently.
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.

Dr.B.Hemantha Kumar. RVR&JC CE 17


Types of Operating System
Distributed operating System:
The advantages of distributed systems are following:
• With resource sharing facility user at one site may be able to use
the resources available at another.
• Speedup the exchange of data with one another via electronic
mail.
• If one site fails in a distributed system, the remaining sites can
potentially continue operating.
• Better service to the customers.
• Reduction of the load on the host computer.
• Reduction of delays in data processing

Dr.B.Hemantha Kumar. RVR&JC CE 18


Types of Operating System
• Real Time operating System: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
imaging 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. Soft real-time systems
• Soft real-time systems are less restrictive. A critical real-time task
gets priority over other tasks and retains the priority until it
completes.
Dr.B.Hemantha Kumar. RVR&JC CE 19

You might also like