OPERATING SYSTEM
INTRODUCTION
(NTA NET EXAM, TNSET)
An Operating System is a system software that manages computer
hardware and software resources.
An Operating System is a Pre-written program.
An Operating System acts as a communication bridge (interface)
between the user and computer hardware.
An operating system is a piece of software that manages the
allocation of computer hardware.
An operating system is a program on which application programs are
executed and acts as a communication bridge (interface) between the
user and the computer hardware.
An Operating System acts as a Resource Allocator.
The main task an operating system carries out is the allocation of
resources and services, such as allocation of : memory, devices,
processors and information. The operating system also includes
programs to manage these resources, such as a traffic controller, a
scheduler, memory management module, I/O programs, and a file
system.
An Operating System acts as a Resource Manager.
• An operating system is the most important software that runs on a
computer. It manages the computer’s memory, processes, and all of its
software and hardware.
• An operating system is software that communicates with the hardware
and allows other program to run.
• An operating system is a powerful, and usually large, program that
controls and manages the hardware and other software on a computer.
• An operating system is a group of computer programs that coordinates
all the activities among computer hardware devices.
Objectives of Operating System : (TN SET EXAM)
Making a computer system convenient to use in an efficient manner.
To hide the details of the hardware resources from the users.
To provide users a convenient interface to use the computer system.
To act as an intermediary between the hardware and its users and
making it easier for the users to access and use other resources.
Manage the resources of a computer system.
Keep track of who is using which resource, granting
resource requests, according for resource using and
mediating conflicting requests from different programs
and users.
The efficient and fair sharing of resources among users
and programs.
Operating System performs three functions, (NTA NET EXAM)
Convenience
Efficiency
Ability to Evolve
History of Operating System :
First Operating System : (NTA NET EXAM, TNSET EXAM)
OS/360 officially known as IBM System/360 Operating System based on
batch processing system developed by IBM for their then-new
System/360 Mainframe computer, announced in 1964, was the first
operating system that was developed.
The first computers did not have operating systems.
CP/M first OS developed in 1974 for Micro computers.
CP/M expands Control Program for Monitor. Later Control Program for
Microcomputer. This OS is written in PL/M.
PL/M expands Programming Language for Microprocessors.
STORAGE STRUCTURE
• Main memory is also called Random Access Memory (RAM).
• RAM – Volatile Memory
• ROM – Non – Volatile Memory
• Floppy Disk - Non – Volatile Memory
Storage Device Hierarchy :
• Cache memory, also called CPU memory, is high-speed Static Random Access Memory
(SRAM) that a computer microprocessor can access more quickly than it can access regular
random access memory (RAM).
• Main memory refers to Physical Memory that is internal to the computer. the computer can
manipulate only data that is in main memory.
Operating System Services :
• Common Services :
• Program Execution
• I/O Operation
• File System Manipulation
• Communications
• Error Detection
Operating System with Multiple users provides the following services :
• Resource Allocation
• Accounting
• Protection
OS PROTECTION
• Protection refers to a mechanism for controlling the access
of programs, processes, or users to the resources defined by
a computer system.
• What is the Difference Between Protection and Security?.
• The main difference between protection and security is that
the Protection focuses on internal threats in a computer
system while Security focuses on external threats to a
computer system.
Three types of Protections :
1) CPU Protection
2) Memory Protection
3) I/O protection
1) CPU Protection
A timer prevents a user program from getting stuck in an infinite
loop, and never returning control to the monitor. For that purpose, a
Timer is introduced to prevent such a situation. A process is given a
certain time for execution after which a signal is sent to the process
which makes the process to leave CPU. Hence process will not hold
the CPU. A variable timer is generally implemented by a fixed rate
Clock and a Counter.
2 ) Memory Protection
There may be multiple processes in the memory so it is possible
that one process may try to access other process memory.
To prevent such situation, use two registers.
• Base Register
• Limit Register
Base register store the starting address of the program and
Limit Register store the size of the process.
3) I/O protection
There are two modes in instruction execute:
1. User mode
The system performs a task on behalf of user application this instruction.
In this mode, the user cannot directly access hardware and reference
memory.
2. Kernel mode
Whenever a direct access to hardware is required a system call is used by
the application program.
Dual-Mode Operation
Two separate modes of operation:
1. User mode and
2. Kernel mode (also called as Monitor Mode, Supervisor mode, System mode,
or Privileged mode).
A bit, called the Mode bit, is added to the hardware of the computer to
indicate the current mode:
Kernel mode (0) or User mode (1).
At system boot time, the hardware starts in Kernel mode.
The operating system is then loaded and starts user applications in User
mode.
When the computer system is executing on behalf of a user
application, the system is in User mode.
However, when a user application requests a service from the
operating system (via a system call), it must transition from User Mode
to Kernel mode to fulfill the request.
Whenever a Trap (Trap is an internally generated interrupt) or
interrupt occurs, the hardware switches from User mode to Kernel
mode (that is, changes the state of the mode bit to 0).
Thus, whenever the operating system gains control of the computer,
it is in Kernel mode.
CPU Protection – Clock, Timer, Counter
Memory Protection - Registers – Base Register, Limit Register
I/O Protection – Dual Mode