Operating Systems

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

OPERATING SYSTEM

 describe the purpose of an operating system


 show understanding of the need for
interrupts
WHAT IS AN OS?

 An operating system is a program that


manages the computer hardware. It acts as
an intermediate between users of a computer
and the computer hardware.
 It controls and coordinates the use of the
hardware among the various application
programs for the various users.
SOME OS
 Common computer operating systems are
Linux, windows, MAC OS and android, IOS
blackberry OS for mobile phones.
 Nowadays, there are other devices which
have OS’s in them, for example smart TVs and
smart fridges.
Important functions of an operating
System.

 Memory Management
 Processor Management
 Device Management
 File Management
 Security
 Control over system performance
 Job accounting
 Error detecting aids
 Coordination between other software and users
MEMORY MANAGEMENT

 Main memory provides a fast storage that can be accessed


directly by the CPU. For a program to be executed, it must in
the main memory.
 An Operating System does the following activities for
memory management −
 Keeps tracks of primary memory, i.e., what part of it is in
use by whom, what part is not in use.
 In multiprogramming, the OS decides which process will
get memory when and how much.
 Allocates the memory when a process requests it to do so.
 De-allocates the memory when a process no longer needs it
or has been terminated.
PROCESSOR MANAGEMENT

 In multiprogramming environment, the OS decides


which process gets the processor when and for how
much time. This function is called process scheduling.
 An Operating System does the following activities for
processor management −
 Keeps tracks of processor and status of process. The
program responsible for this task is known as traffic
controller.
 Allocates the processor (CPU) to a process.
 De-allocates processor when a process is no longer
required.
Device Management

 An Operating System manages device


communication via their respective drivers. It does
the following activities for device management −
 Keeps tracks of all devices. The program
responsible for this task is known as the I/O
controller.
 Decides which process gets the device when and
for how much time.
 Allocates the device in the efficient way.
 De-allocates devices.
File Management

 A file system is normally organized into directories for


easy navigation and usage. These directories may
contain files and other directions.
 An Operating System does the following activities for
file management −
 Keeps track of information, location, uses, status etc.
The collective facilities are often known as file
system.
 Decides who gets the resources.
 Allocates the resources.
 De-allocates the resources.
 Security − By means of password and similar other techniques, it
prevents unauthorized access to programs and data.
 Control over system performance − Recording delays between
request for a service and response from the system.
 Job accounting − Keeping track of time and resources used by
various jobs and users.
 Error detecting aids − Production of dumps, traces, error
messages, and other debugging and error detecting aids.
 Coordination between other software and users − Coordination
and assignment of compilers, interpreters, assemblers and other
software to the various users of the computer systems.
Interrupts

 A key feature of any operating system is the


ability to handle interrupts.
What is an interrupt?

 An interrupt is a signal which is sent from a device or


from software to the operating system.
 The interrupt signal causes the operating system to
temporarily stop what it is doing and ‘service’ the
interrupt.
 The interrupt handler is the part of the operating
system which is responsible for dealing with
interrupt signals.
 The interrupt handler prioritizes interruptions as
they are received, placing them into a queue as
necessary.
Interrupts can occur when:

 a disk drive is ready to receive more data


 a printer out of paper error or paper jam in
the printer
 there is fault in program when running (e.g.
try to divide by zero)
 user has pressed <CTRL><ALT><BREAK>
keys to interrupt the current process
2 types of interrupts:

 Hardware interrupts, signals from external


devices or hardware such as one that is
generated when the peripheral such as
keyboard produces signals. It can delay the
highest priority interrupts processed in the
processor, it is called a maskable interrupt.
 Software interrupts, such as when application is
closed or open on the system. Interrupts caused
by software instructions are the normal
interrupts.
WHY INTERRUPTS ARE NEEDED ?

 Interrupts are important because they give


the user better control over the computer.
 Without interrupts, a user may have to wait
for a given application to have a higher
priority over the CPU to be run
 This ensures that the CPU will deal with the
process immediately.
BOARD QUESTION

You might also like