Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Unit 1
1. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 1
UNIT -1 COMPUTER SYSTEM AND OPERATING SYSTEM OVERVIEW
OVER VIEW OF OPERATING SYSTEM
What is an Operating System?
A program that acts as an intermediary between a user of a computer and the
computer hardware.
Operating system goals:
1. Execute user programs and make solving user problems easier.
2. Make the computer system convenient to use.
3. Use the computer hardware in an efficient manner.
1.1. COMPUTER SYSTEM OVERVIEW
ELEMENTS AND COMPONENTS
Elements of a Computer System:
A computer system is a set of six elements :
(i) Hardware
(ii) Software
(iii) People
(iv) Procedures
(v) Data and
(vi) Connectivity.
(i) Hardware:
The physical components of a computer constitute its Hardware. These include
keyboard, mouse, monitor and processor. Hardware consists of input devices and output
devices that make a complete computer system.
Examples of input devices are keyboard, optical scanner, mouse and joystick which
are used to feed data into the computer. Output devices such as monitor and printer are
media to get the output from the computer.
(ii) Software:
A set of programs that form an interface between the hardware and the user of a
computer system are referred to as Software.
2. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 2
They are of six types:
(a) System software:
A set of programs to control the internal operations such as reading data from input
devices, giving results to output devices and ensuring proper functioning of components is
called system software.
(b) Application software:
Programs designed by the user to perform a specific function, such as accounting
software, payroll software etc.
(c) Operating system:
A set of tools and programs to manage the overall working of a computer using a
defined set of hardware components is called an operating system. It is the interface
between the user and the computer system.
(d) Utility software:
Certain special purpose programs that are designed to perform a specialized task,
such as functions to copy, cut or paste files in a computer, formatting a disk etc.
(e) Language processors:
Special software to accept data and interpret it in the form of Machine /Assembly
language understandable by a computer. It also ensures the correctness of language syntax
and errors.
(f) Connectivity software:
A set of programs and instructions to connect the computer with the main server to
enable sharing of resources and information with the server and other connected
computers.
(iii) People:
The most important element of a computer system is its users. They are also called
live-ware of the computer system.
3. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 3
The following types of people interact with a computer system:
(a) System Analysts:
People who design the operation and processing of the system.
(b) System Programmers:
People who write codes and programs to implement the working of the system
(c) System Operators:
People who operate the system and use it for different purposes.Also called the end
users.
(iv) Procedures:
Procedure is a step by step series of instructions to perform a specific function and
achieve desired output.
In a computer system, there are three types of procedures:
(a) Hardware oriented procedure:
It defines the working of a hardware component.
(b) Software oriented procedure:
It is a set of detailed instructions for using the software.
(c) Internal procedure:
It maintains the overall internal working of each part of a computer system
by directing the flow of information.
(v) Data:
The facts and figures that are fed into a computer for further processing are called data.
Data is raw until the computer system interprets it using machine language, stores it in
memory, classifies it for processing and produces results in conformance with the
instructions given to it. Processed and useful data is called information which is used for
decision making.
4. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 4
(vi) Connectivity:
When two or more computers are connected to each other, they can share information and
resources such as sharing of files (data/music etc.), sharing of printer, sharing of facilities
like the internet etc. This sharing is possible using wires, cables, satellite, infra-red,
Bluetooth, microwave transmission etc.
Components of a Computer System:
A computer system mainly has three components viz. Input Unit, Central Processing Unit
and Output Unit. These components are the building blocks of a computer and define its
architecture.
The relationship among these components is well established by the following
diagram:
(i) Input Unit:
Input unit is responsible for controlling the various input devices that are used to enter
data into the computer. The commonly used input devices are mouse, keyboard, light pen,
optical scanner etc. While some input devices are designed for special purposes such as
Optical Character Recognition (OCR), Magnetic Ink Character Recognition (MICR) and Bar
Code Reader etc, there are other devices that accept input by responding to physical touch
and voice such as ATMs.
5. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 5
(ii) Central Processing Unit (CPU):
The CPU ensures the flow of data into the system by directing the data to enter the system,
storing it into the memory and retrieving it when needed to produce the output.
It has three parts:
(a) Arithmetic and Logic Unit (ALU):
It performs all the arithmetical calculations and computations like addition, subtraction,
multiplication and division. It is also responsible for logical calculations like comparisons
among data items.
(b) Memory Unit:
The data has to be stored in the memory blocks of the computer before it is retrieved for
actual processing.
(c) Control Unit:
6. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 6
As the name suggests, control unit controls and coordinates the activities of all the
components of the computer system. It reads data from the memory, decodes the
instructions, looks after its execution, and fetches the next instruction and so on.
(iii) Output Unit:
It controls various output devices like printer, graphic plotter, speech synthesizer, monitor
(also known as Visual Display Unit or VDU) to produce the desired output and present it to
the user. It ensures the convertibility of output into human readable form that is
understandable by the user.
COMPUTER ORGANIZATION | VON NEUMANN ARCHITECTURE
1. Introduction
Historically there have been 2 types of Computers:
1. Fixed Program Computers – Their function is very specific and they couldn’t be
programmed, e.g. Calculators.
2. Stored Program Computers – These can be programmed to carry out many different
tasks, applications are stored on them, hence the name.
The modern computers are based on a stored-program concept introduced by John Von
Neumann. In this stored-program concept, programs and data are stored in a separate
7. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 7
storage unit called memories and are treated the same. This novel idea meant that a
computer built with this architecture would be much easier to reprogram.
The basic structure is like,
It is also known as IAS computer and is having three basic units:
1. The Central Processing Unit (CPU)
2. The Main Memory Unit
3. The Input/Output Device
Let’s consider them in details.
Control Unit
A control unit (CU) handles all processor control signals. It directs all input and output
flow, fetches code for instructions and controlling how data moves around the system.
Arithmetic and Logic Unit (ALU)
The arithmetic logic unit is that part of the CPU that handles all the calculations the
CPU may need, e.g. Addition, Subtraction, Comparisons. It performs Logical
Operations, Bit Shifting Operations, and Arithmetic Operation.
8. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 8
Figure – Basic CPU structure, illustrating ALU
Main Memory Unit (Registers)
1. Accumulator: Stores the results of calculations made by ALU.
2. Program Counter (PC): Keeps track of the memory location of the next
instructions to be dealt with. The PC then passes this next address to Memory
Address Register (MAR).
3. Memory Address Register (MAR): It stores the memory locations of
instructions that need to be fetched from memory or stored into memory.
4. Memory Data Register (MDR): It stores instructions fetched from memory or
any data that is to be transferred to, and stored in, memory.
5. Current Instruction Register (CIR): It stores the most recently fetched
instructions while it is waiting to be coded and executed.
6. Instruction Buffer Register (IBR): The instruction that is not to be executed
immediately is placed in the instruction buffer register IBR.
Input/Output Devices – Program or data is read into main memory from the input
device or secondary storage under the control of CPU input instruction. Output
devices are used to output the information from a computer. If some results are
evaluated by computer and it is stored in the computer, then with the help of output
devices, we can present it to the user.
9. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 9
Buses – Data is transmitted from one part of a computer to another, connecting all
major internal components to the CPU and memory, by the means of Buses. Types:
1. Data Bus: It carries data among the memory unit, the I/O devices, and the
processor.
2. Address Bus: It carries the address of data (not the actual data) between
memory and processor.
3. Control Bus: It carries control commands from the CPU (and status signals from
other devices) in order to control and coordinate all the activities within the
computer.
Von Neumann bottleneck
Whatever we do to enhance performance, we cannot get away from the fact that
instructions can only be done one at a time and can only be carried out sequentially. Both
of these factors hold back the competence of the CPU. This is commonly referred to as the
‘Von Neumann bottleneck’. We can provide a Von Neumann processor with more cache,
more RAM, or faster components but if original gains are to be made in CPU performance
then an influential inspection needs to take place of CPU configuration.
This architecture is very important and is used in our PCs and even in Super
Computers.
Interrupts
Interrupts are signals sent to the CPU by external devices, normally I/O devices. They tell
the CPU to stop its current activities and execute the appropriate part of the operating
system.
There are three types of interrupts:
1. Hardware Interrupts are generated by hardware devices to signal that they
need some attention from the OS. They may have just received some data
(e.g., keystrokes on the keyboard or an data on the Ethernet card); or they
have just completed a task which the operating system previous requested,
such as transferring data between the hard drive and memory.
2. Software Interrupts are generated by programs when they want to request
a system call to be performed by the operating system.
10. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 10
3. Traps are generated by the CPU itself to indicate that some error or
condition occurred for which assistance from the operating system is 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.
Cache and Memory Hierarchy
Memory examples
Programmers wish for memory to be
Large
Fast
Random access
Wish not achievable with 1 kind of memory
So A modern memory subsystem combines
Fast small memory
Slower larger memories
11. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 11
Memory Hierarchy
In the CPU, registers allow to store 32 words, which can be accessed
extremely fast. If information is not present in one of the 32 registers, the CPU will
request information from memory, by providing the address of the location where
the required information is stored. First, the cache will verify whether it has the
requested information available, or not. The cache is located close to the CPU and
composed of a relatively small amount of fast and expensive memory (S-RAM). So, if
the requested information is available in the cache, it can retrieved quickly. If not,
main memory, which is significantly larger and composed of slower and cheaper D-
RAM, is accessed. If the requested information is in the main memory, it is provided
to the cache, which then provides it to the CPU. If not, the hard drive, which contains
all information that is stored in the machine, is accessed. The hard drive offers a vast
amount of storage space, at an affordable price, however, accessing it is slow. So,
12. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 12
fundamentally, the closer to the CPU a level in the memory hierarchy is located, the
faster, smaller, and more expensive it is.
By keeping the relatively small amount of data which is most likely to be accessed in
the cache (i.e., small, fast memory, close to the CPU), memory access will occur
rapidly most of the time, i.e., when the requested information is available in the
cache: this is called a hit. If the requested information is not present in the cache,
called a miss, it is copied from the next level down in the hierarchy (in this case, the
main memory), in so-called blocks.
Direct Memory Access
DMA stands for "Direct Memory Access" and is a method of transferring data from
the computer's RAM to another part of the computer without processing it using the CPU.
While most data that is input or output from your computer is processed by the CPU, some
data does not require processing, or can be processed by another device.
In these situations, DMA can save processing time and is a more efficient way to move data
from the computer's memory to other devices. In order for devices to use direct memory
access, they must be assigned to a DMA Controller.
13. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 13
Storage Structure
Main memory – only large storage media that the CPU can access directly
Secondary storage – extension of main memory that provides large nonvolatile storage
capacity
Magnetic disks – rigid metal or glass platters covered with magnetic recording material
Disk surface is logically divided into tracks, which are subdivided into sectors
The disk controller determines the logical interaction between the device and the computer
Storage Hierarchy
Storage systems organized in hierarchy
Speed
Cost
Volatility
Caching– copying information into faster storage system; main memory can be viewed as a last
cache for secondary storage
14. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 14
Caching
Important principle, performed at many levels in a computer (in hardware, operating
system, software)
Information in use copied from slower to faster storage temporarily
Faster storage (cache) checked first to determine if information is there
If it is, information used directly from the cache (fast)
If not, data copied to cache and used there
Cache smaller than storage being cached
Cache management important design problem
Cache size and replacement policy
Computer-System Architecture
Most systems use a single general-purpose processor (PDAs through mainframes)
Most systems have special-purpose processors as well
Multiprocessors systems growing in use and importance
Also known as parallel systems, tightly-coupled systems
Advantages include
1. Increased throughput
2. Economy of scale
3. Increased reliability – graceful degradation or fault tolerance
Two types
1. Asymmetric Multiprocessing
2. Symmetric Multiprocessing
MULTIPROCESSOR AND MULTICORE ORGANIZATION
Multiprocessor Operating System refers to the use of two or more central
processing units (CPU) within a single computer system. These multiple CPUs are in
a close communication sharing the computer bus, memory and other peripheral
devices. These systems are referred as tightly coupled systems.
Multiprocessing system is based on the symmetric multiprocessing model, in which
each processor runs an identical copy of operating system and these copies
communicate with each other. In this system processor is assigned a specific task. A
master processor controls the system. This scheme defines a master-slave
relationship.
These systems can save money in compare to single processor systems because the
processors can share peripherals, power supplies and other devices. The main
advantage of multiprocessor system is to get more work done in a shorter period of
time. Moreover, multiprocessor systems prove more reliable in the situations of
failure of one processor. In this situation, the system with multiprocessor will not
halt the system; it will only slow it down.
15. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 15
In order to employ multiprocessing operating system effectively, the computer
system must have the followings:
1. Motherboard Support:
A motherboard capable of handling multiple processors. This means additional sockets or
slots for the extra chips and a chipset capable of handling the multiprocessing
arrangement.
2. Processor Support:
Processors those are capable of being used in a multiprocessing system.
The whole task of multiprocessing is managed by the operating system, which allocates
different tasks to be performed by the various processors in the system.
Multiprocessor system supports the processes to run in parallel. Parallel processing is
the ability of the CPU to simultaneously process incoming jobs. This becomes most
important in computer system, as the CPU divides and conquers the jobs. Generally the
parallel processing is used in the fields like artificial intelligence and expert system,
image processing, weather forecasting etc.
In a multiprocessor system, the dynamically sharing of resources among the
herefore, a potential bottleneck. There are three main
sources of contention that can be found in a multiprocessor operating system:
2.1 Locking system:
In order to provide safe access to the resources shared among multiple processors,
they need to be protected by locking scheme. The purpose of a locking is to serialize
accesses to the protected resource by multiple processors. Undisciplined use of
locking can severely degrade the performance of system.
16. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 16
This form of contention can be reduced by using locking scheme, avoiding long
critical sections, replacing locks with lock-free algorithms, or, whenever possible,
avoiding sharing altogether.
2.2 Shared data:
The continuous accesses to the shared data items by multiple processors (with one
or more of them with data write) are serialized by the cache coherence protocol.
Even in a moderate-scale system, serialization delays can have significant impact on
the system performance.
In addition, bursts of cache coherence traffic saturate the memory bus or the
interconnection network, which also slows down the entire system. This form of
contention can be eliminated by either avoiding sharing or, when this is not
possible, by using replication techniques to reduce the rate of write accesses to the
shared data.
2.3 False sharing:
This form of contention arises when unrelated data items used by different
processors are located next to each other in the memory and, therefore, share a
single cache line: The effect of false sharing is the same as that of regular sharing
bouncing of the cache line among several processors. Fortunately, once it is
identified, false sharing can be easily eliminated by setting the memory layout of
non-shared data.
Multicore System
A Multi-core processor is a single computing component that has two or more
independent cores or processing units. These cores are the ones that read and
perform the program’s instructions on the CPU. These instructions are basically
ordinary CPU instructions like add, move data, and branch.
Being a multi-core processing unit, it can execute multiple instructions at the same
time. A multi-core processor is intended to increase the speed of processing these
instructions. Instructions can be divided into smaller ones for the multi-core to
execute simultaneously.
These cores are usually integrated into a single IC (integrated circuit) die, or onto
multiple dies but in a single chip package.
Comparison Chart
17. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 17
Multicore Multiprocessor
Single or multiple integrated circuit die/s Single or multiple systems
Cheaper (single CPU that does not require
multiple CPU support system)
Expensive (Multiple separate CPU’s that require a
system that supports multiprocessors)
Will have less traffic (coresintegrated into a
single chip and will require less time)
Will have more traffic (distances between the two
will require a longer time)
Does not need to be configured Needs a little complex configuration
Faster running a single program Faster running multiple programs
Types of Operating Systems
An Operating System performs all the basic tasks like managing files, processes, and
memory. Thus operating system acts as the manager of all the resources, i.e. resource
manager. Thus, the operating system becomes an interface between user and machine.
Types of Operating Systems:
Some widely used operating systems are as follows-
1. Batch Operating System
This type of operating system does not interact with the computer directly. There is an
operator which takes similar jobs having the same requirement and group them into
batches. It is the responsibility of the operator to sort jobs with similar needs.
Advantages of Batch Operating System:
18. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 18
It is very difficult to guess or know the time required for any job to complete.
Processors of the batch systems know how long the job would be when it is in queue
Multiple users can share the batch systems
The idle time for the batch system is very less
It is easy to manage large work repeatedly in batch systems
Disadvantages of Batch Operating System:
The computer operators should be well known with batch systems
Batch systems are hard to debug
It is sometimes costly
The other jobs will have to wait for an unknown time if any job fails
Examples of Batch based Operating System: Payroll System, Bank Statements, etc.
2. Time-Sharing Operating Systems
Each task is given some time to execute so that all the tasks work smoothly. Each user
gets the time of CPU as they use a single system. These systems are also known as
Multitasking Systems. The task can be from a single user or different users also. The time
that each task gets to execute is called quantum. After this time interval is over OS
switches over to the next task.
Advantages of Time-Sharing OS:
Each task gets an equal opportunity
Fewer chances of duplication of software
CPU idle time can be reduced
19. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 19
Disadvantages of Time-Sharing OS:
Reliability problem
One must have to take care of the security and integrity of user programs and data
Data communication problem
Examples of Time-Sharing OSs are: Multics, Unix, etc.
3. Distributed Operating System
These types of the operating system is a recent advancement in the world of computer
technology and are being widely accepted all over the world and, that too, with a great
pace. Various autonomous interconnected computers communicate with each other using
a shared communication network. Independent systems possess their own memory unit
and CPU. These are referred to as loosely coupled systems or distributed systems.
These system’s processors differ in size and function. The major benefit of working with
these types of the operating system is that it is always possible that one user can access
the files or software which are not actually present on his system but some other system
connected within this network i.e., remote access is enabled within the devices connected
in that network.
20. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 20
Advantages of Distributed Operating System:
Failure of one will not affect the other network communication, as all systems are
independent from each other
Electronic mail increases the data exchange speed
Since resources are being shared, computation is highly fast and durable
Load on host computer reduces
These systems are easily scalable as many systems can be easily added to the network
Delay in data processing reduces
Disadvantages of Distributed Operating System:
Failure of the main network will stop the entire communication
To establish distributed systems the language which is used are not well defined yet
These types of systems are not readily available as they are very expensive. Not only
that the underlying software is highly complex and not understood well yet
Examples of Distributed Operating System are- LOCUS, etc.
4. Network Operating System
These systems run on a server and provide the capability to manage data, users, groups,
security, applications, and other networking functions. These types of operating systems
allow shared access of files, printers, security, applications, and other networking
functions over a small private network. One more important aspect of Network Operating
Systems is that all the users are well aware of the underlying configuration, of all other
users within the network, their individual connections, etc. and that’s why these
computers are popularly known as tightly coupled systems.
Advantages of Network Operating System:
Highly stable centralized servers
Security concerns are handled through servers
New technologies and hardware up-gradation are easily integrated into the system
Server access is possible remotely from different locations and types of systems
Disadvantages of Network Operating System:
Servers are costly
User has to depend on a central location for most operations
Maintenance and updates are required regularly
21. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 21
Examples of Network Operating System are: Microsoft Windows Server 2003,
Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD, etc.
5. Real-Time Operating System
These types of OSs serve real-time systems. The time interval required to process and
respond to inputs is very small. This time interval is called response time.
Real-time systems are used when there are time requirements that are very strict like
missile systems, air traffic control systems, robots, etc.
Two types of Real-Time Operating System which are as follows:
Hard Real-Time Systems:
These OSs are meant for applications where time constraints are very strict and even
the shortest possible delay is not acceptable. These systems are built for saving life
like automatic parachutes or airbags which are required to be readily available in case
of any accident. Virtual memory is rarely found in these systems.
Soft Real-Time Systems:
These OSs are for applications where for time-constraint is less strict.
Advantages of RTOS:
Maximum Consumption: Maximum utilization of devices and system, thus more
output from all the resources
Task Shifting: The time assigned for shifting tasks in these systems are very less. For
example, in older systems, it takes about 10 microseconds in shifting one task to
another, and in the latest systems, it takes 3 microseconds.
22. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 22
Focus on Application: Focus on running applications and less importance to
applications which are in the queue.
Real-time operating system in the embedded system: Since the size of programs
are 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 respond earliest to interrupts.
Thread Priority: It is not good to set thread priority as these systems are very less
prone to switching tasks.
23. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 23
Examples of Real-Time Operating Systems are: Scientific experiments, medical
imaging systems, industrial control systems, weapon systems, robots, air traffic control
systems, etc.
Functions of Operating System
An Operating System acts as a communication bridge (interface) between the user and
computer hardware. The purpose of an operating system is to provide a platform on
which a user can execute programs in a convenient and efficient manner.
An operating system is a piece of software that manages the allocation of computer
hardware. The coordination of the hardware must be appropriate to ensure the correct
working of the computer system and to prevent user programs from interfering with the
proper working of the system.
Example: Just like a boss gives order to his employee, in the similar way we request or
pass our orders to the Operating System. The main goal of the Operating System is to thus
make the computer environment more convenient to use and the secondary goal is to use
the resources in the most efficient manner.
What is Operating System?
An operating system is a program on which application programs are executed and acts
as an communication bridge (interface) between the user and the computer hardware.
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.
Important functions of an operating System:
1. Security
The operating system uses password protection to protect user data and similar other
techniques. it also prevents unauthorized access to programs and user data.
2. Control over system performance
Monitors overall system health to help improve performance. records the response
time between service requests and system response to have a complete view of the
system health. This can help improve performance by providing important
information needed to troubleshoot problems.
24. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 24
3. Job accounting
Operating system Keeps track of time and resources used by various tasks and users,
this information can be used to track resource usage for a particular user or group of
user.
4. Error detecting aids
Operating system constantly monitors the system to detect errors and avoid the
malfunctioning of computer system.
5. Coordination between other software and users
Operating systems also coordinate and assign interpreters, compilers, assemblers and
other software to the various users of the computer systems.
6. Memory Management
The operating system manages the Primary Memory or Main Memory.
Main memory is made up of a large array of bytes or words where each byte or
word is assigned a certain address.
Main memory is a fast storage and it can be accessed directly by the CPU. For a
program to be executed, it should be first loaded in the main memory.
An Operating System performs the following activities for memory
management:
It keeps tracks of primary memory, i.e., which bytes of memory are used by
which user program.
The memory addresses that have already been allocated and the memory
addresses of the memory that has not yet been used.
In multi programming, the OS decides the order in which process are granted
access to memory, and for how long.
It Allocates the memory to a process when the process requests it and
deallocates the memory when the process has terminated or is performing an
I/O operation.
7. Processor Management
In a multi programming environment, the OS decides the order in which
processes have access to the processor, and how much processing time each
process has. This function of OS is called process scheduling.
An Operating System performs the following activities for processor
management. Keeps tracks of the status of processes.
The program which perform this task is known as traffic controller.
Allocates the CPU that is processor to a process.
De-allocates processor when a process is no more required.
8. Device Management
An OS manages device communication via their respective drivers.
25. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 25
It performs the following activities for device management.
Keeps tracks of all devices connected to system.
Designates a program responsible for every device known as the
Input/Output controller.
Decides which process gets access to a certain device and for how long.
Allocates devices in an effective and efficient way.
Deallocates devices when they are no longer required.
9. File Management
A file system is organized into directories for efficient or easy navigation and
usage.
These directories may contain other directories and other files.
An Operating System carries out the following file management activities.
It keeps track of where information is stored, user access settings and status of
every file and more…
These facilities are collectively known as the file system.
Moreover, Operating System also provides certain services to the computer system in one
form or the other.
The Operating System provides certain services to the users which can be listed in the
following manner:
1. Program Execution: The Operating System is responsible for execution of all types of
programs whether it be user programs or system programs. The Operating System
utilizes various resources available for the efficient running of all types of
functionalities.
2. Handling Input / Output Operations: The Operating System is responsible for
handling all sorts of inputs, i.e, from keyboard, mouse, desktop, etc. The Operating
System does all interfacing in the most appropriate manner regarding all kind of
Inputs and Outputs.
For example, there is difference in nature of all types of peripheral devices such as
mouse or keyboard, then Operating System is responsible for handling data between
them.
3. Manipulation of File System: The Operating System is responsible for making of
decisions regarding the storage of all types of data or files, i.e, floppy disk/hard
disk/pen drive, etc. The Operating System decides as how the data should be
manipulated and stored.
4. Error Detection and Handling: The Operating System is responsible for detection of
any types of error or bugs that can occur while any task. The well secured OS
sometimes also acts as countermeasure for preventing any sort of breach to the
Computer System from any external source and probably handling them.
5. Resource Allocation: The Operating System ensures the proper use of all the
resources available by deciding which resource to be used by whom for how much
time. All the decisions are taken by the Operating System.
26. UNIT – I CS8493 – OPERATING SYSTEMS JAI SHRIRAM ENGINEERING COLLEGE
N.GOMATHI, AP/CSE Page 26
6. Accounting: The Operating System tracks an account of all the functionalities taking
place in the computer system at a time. All the details such as the types of errors
occurred are recorded by the Operating System.
7. Information and Resource Protection: The Operating System is responsible for
using all the information and resources available on the machine in the most
protected way. The Operating System must foil an attempt from any external resource
to hamper any sort of data or information.
References:
1. http://www.yourarticlelibrary.com/accounting/computerized-
accounting/computer-system-elements-and-components-with-
diagram/63263
2. https://www.geeksforgeeks.org/computer-organization-von-neumann-
architecture/
3. http://faculty.salina.k-state.edu/tim/ossg/Introduction/OSworking.html
4. http://eceweb.ucsd.edu/~gert/ece30/CN5.pdf
5. https://www.brainkart.com/article/Multiprocessor-and-Multicore-
Organization_9825/