All the
components of an OS must exist in order so as to make the different parts of a
system work together in cooperation. All the hardware needs of a software
application are satisfied only through the operating system, be it as simple as
mouse movement or as complex at Ethernet.
1. Kernel:
- This component of the OS is the medium
through which application software can connect to the computer’s hardware
system.
- This component is aided by many device drivers and firmware.
- With
the help of these, it provides a very basic control level for all the
hardware devices of a system.
- For programs, the memory access in RAM and
ROM is managed by kernel only.
- It is the authority of the kernel to decide
which program should get what access and at what level.
- The operating
state of the CPU is set up the kernel itself all the time.
- It prepares the
data to be stored in long term non–volatile storage like in flash
memory, tapes, and disks and so on.
2. Program execution or process:
- The OS is
actually an interface between the hardware and the application software.
- An
interaction between the two can be established only if the application
abides by the rules and procedures of the operating system as programmed
in to it.
- It is another purpose of the operating system to provide a set
of services for simplifying the execution as well as development of the
programs.
- Whenever a program is to be executed, a process is created by
the kernel of the operating system and then other required resources such
as memory are assigned to it.
- A priority is assigned to this process if it
is a multi–tasking environment.
- The binary code for the program is loaded
in to the memory and the execution is initiated.
3. Interrupts:
- This component is the central
requirement of the operating systems.
- This is so because the interrupts
provide a way of interaction between the OS and its environment which is
not only reliable but also effective.
- The older operating systems worked
with very small stacks and therefore watched for the various input sources
requiring action for initiating some event (called polling).
- This
strategy is not useful in today’s OS that use very large stacks.
- Here, interrupt
- based programming is fruitful.
- The modern CPU have in – built direct
support for these interrupts.
- With the use of interrupts, a computer knows
when to automatically save the contexts of the local registers or run some
specific code in response to the occurring events.
- Hardware interrupts are
supported by very basic of the computers.
- Interrupts let the programmer to
specify what code is to be run when a certain even occurs.
- When hardware
receives an interrupt, it automatically suspends the current program being
executed by it.
- The status of the program is saved and the code associated
with the interrupt is executed.
- In modern operating systems, the kernel is
responsible for handling the interrupts.
- Either of the running program or
the computer’s hardware might raise an interrupt.
- When an interrupt is
triggered by a hardware device, it is left to the OS’s kernel to decide
what to do now through execution of some code.
- The code that has to be run
is decided based up on the interrupt’s priority.
- The device driver is the
software to which all the task of the processing hardware interrupts is
assigned.
- A device driver might be a part of the kernel, or some other
program or both.
Read the next post (What are different components of operating system? – Part 2)
No comments:
Post a Comment