0% found this document useful (0 votes)
10 views20 pages

Functions of Operating System

operating system quality notes

Uploaded by

Evans Muriira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views20 pages

Functions of Operating System

operating system quality notes

Uploaded by

Evans Muriira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Functions of Operating System



An Operating System acts as a communication interface between


the user and computer hardware. Its purpose is to provide a
platform on which a user can execute programs conveniently and
efficiently. An operating system is software that manages the
allocation of Computer Hardware. The coordination of the hardware
must be appropriate to ensure the computer system’s correct
operation and to prevent user programs from interfering with it. The
main goal of the Operating System is to make the computer
environment more convenient to use and the Secondary goal is to
use the resources most efficiently. In this article we will see
functions of operating system in detail.
Why Operating Systems Used?
Operating System is used as a communication channel between the
Computer hardware and the user. It works as an intermediate
between System Hardware and End-User. Operating System handles
the following responsibilities:
 It controls all the computer resources.
 It provides valuable services to user programs.
 It coordinates the execution of user programs.
 It provides resources for user programs.
 It provides an interface (virtual machine) to the user.
 It hides the complexity of software.
 It supports multiple execution modes.
 It monitors the execution of user programs to prevent errors.
Functions of an Operating System
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 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 manages the allocation and
deallocation of memory to various processes and ensures that the
other process does not consume the memory allocated to one
process. An Operating System performs the following activities for
Memory Management:
 It keeps track 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 multiprogramming, the OS decides the order in which
processes are granted memory access, 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.
Memory Management

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.
An operating system manages the processor’s work by allocating
various jobs to it and ensuring that each process receives enough
time from the processor to function properly.
Keeps track of the status of processes. The program which performs
this task is known as a traffic controller. Allocates the CPU that is a
processor to a process. De-allocates processor when a process is no
longer required.

Process management

Device Management
An OS manages device communication via its respective drivers. It
performs the following activities for device management.
 Keeps track of all devices connected to the system. Designates a
program responsible for every device known as the Input/Output
controller.
 Decide which process gets access to a certain device and for how
long.
 Allocates devices effectively and efficiently. Deallocates devices
when they are no longer required.
 There are various input and output devices. An OS controls the
working of these input-output devices.
 It receives the requests from these devices, performs a specific
task, and communicates back to the requesting process.
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, the status of every file,
and more. These facilities are collectively known as the file
system. An OS keeps track of information regarding the creation,
deletion, transfer, copy, and storage of files in an organized way. It
also maintains the integrity of the data stored in these files,
including the file directory structure, by protecting against
unauthorized access.

File Management

I/O Management
I/O management is the important function of operating system
refers to how the OS handles input and output operations between
the computer and external devices, such as keyboards, mice,
printers, hard drives, and monitors.
User Interface or Command Interpreter
The user interacts with the computer system through the operating
system. Hence OS acts as an interface between the user and the
computer hardware. This user interface is offered through a set of
commands or a graphical user interface (GUI). Through this
interface, the user makes interacts with the applications and the
machine hardware.

Command Interpreter

Booting the Computer


The process of starting or restarting the computer is known as
booting. If the computer is switched off completely and if turned on
then it is called cold booting. Warm booting is a process of using the
operating system to restart the computer.
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. The operating system provides various
techniques which assure the integrity and confidentiality of user
data. The following security measures are used to protect user data:
 Protection against unauthorized access through login.
 Protection against intrusion by keeping the firewall active.
 Protecting the system memory against malicious access.
 Displaying messages related to system vulnerabilities.
Control Over System Performance
Operating systems play a pivotal role in controlling and optimizing
system performance. They act as intermediaries between hardware
and software, ensuring that computing resources are efficiently
utilized. One fundamental aspect is resource allocation, where the
OS allocates CPU time, memory, and I/O devices to different
processes, striving to provide fair and optimal resource utilization.
Process scheduling, a critical function, helps decide which processes
or threads should run when preventing any single task from
monopolizing the CPU and enabling effective multitasking.
Control Over System Performance

Job Accounting
The 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 users. In a
multitasking OS where multiple programs run simultaneously, the
OS determines which applications should run in which order and
how time should be allocated to each application.
Error-Detecting Aids
The operating system constantly monitors the system to detect
errors and avoid malfunctioning computer systems. From time to
time, the operating system checks the system for any external
threat or malicious software activity. It also checks the hardware for
any type of damage. This process displays several alerts to the user
so that the appropriate action can be taken against any damage
caused to the system.
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. In simpler terms, think
of the operating system as the traffic cop of your computer. It
directs and manages how different software programs can share
your computer’s resources without causing chaos. It ensures that
when you want to use a program, it runs smoothly without crashing
or causing problems for others. So, it’s like the friendly officer
ensuring a smooth flow of traffic on a busy road, making sure
everyone gets where they need to go without any accidents or jams.
Performs Basic Computer Tasks
The management of various peripheral devices such as the mouse,
keyboard, and printer is carried out by the operating system. Today
most operating systems are plug-and-play. These operating systems
automatically recognize and configure the devices with no user
interference.
Network Management
 Network Communication: Think of them as traffic cops for your
internet traffic. Operating systems help computers talk to each
other and the internet. They manage how data is packaged and
sent over the network, making sure it arrives safely and in the
right order.
 Settings and Monitoring: Think of them as the settings and
security guard for your internet connection. They also let you set
up your network connections, like Wi-Fi or Ethernet, and keep an
eye on how your network is doing. They make sure your
computer is using the network efficiently and securely, like
adjusting the speed of your internet or protecting your computer
from online threats.
Services Provided by an Operating System
The Operating System provides certain services to the users which
can be listed in the following manner:
 User Interface: Almost all operating systems have a user
interface (UI). This interface can take several forms. One is
a command-line interface(CLI), which uses text commands and a
method for entering them (say, a keyboard for typing in
commands in a specific format with specific options). Another is a
batch interface, in which commands and directives to control
those commands are entered into files, and those files are
executed. Most commonly, a graphical user interface (GUI) is
used. the interface is a window system with a pointing device to
direct I/O, choose from menus, and make selections and a
keyboard to enter text.
 Program Execution: The Operating System is responsible for
the 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.
 Handling Input/Output Operations: The Operating System is
responsible for handling all sorts of inputs, i.e., from the
keyboard, mouse, desktop, etc. The Operating System does all
interfacing most appropriately regarding all kinds of Inputs and
Outputs.
For example, there is a difference between all types of peripheral
devices such as mice or keyboards, the Operating System is
responsible for handling data between them.
 Manipulation of File System: The Operating System is
responsible for making decisions regarding the storage of all
types of data or files, i.e., floppy disk/hard disk/pen drive, etc. The
Operating System decides how the data should be manipulated
and stored.
 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.
 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 that occurred are recorded
by the Operating System.
 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.
 Communication: The operating system implements
communication between one process to another process to
exchange information. Such communication may occur between
processes that are executing on the same computer or between
processes that are executing on different computer systems tied
together by a computer network.
 System Services: The operating system provides various
system services, such as printing, time and date management,
and event logging.
 Error Detection: The operating system needs to be detecting
and correcting errors constantly. Errors may occur in the CPU and
memory hardware ( for eg. a memory error or a power failure), in
I/O devices (such as a parity error on disk, a connection failure on
a network, or a lack of paper in the printer), and in the user
program ( an arithmetic overflow, an attempt to access an illegal
memory location or a too-great use of CPU time). For each type of
error, the operating system should take the appropriate action to
ensure correct and consistent computing.
All these services are ensured by the Operating System for the
convenience of the users to make the programming task easier. All
different kinds of Operating Systems more or less provide the same
services.
Characteristics of Operating System
 Virtualization: Operating systems can provide Virtualization
capabilities, allowing multiple operating systems or instances of
an operating system to run on a single physical machine. This can
improve resource utilization and provide isolation between
different operating systems or applications.
 Networking: Operating systems provide networking capabilities,
allowing the computer system to connect to other systems and
devices over a network. This can include features such
as network protocols, network interfaces, and network security.
 Scheduling: Operating systems provide scheduling algorithms
that determine the order in which tasks are executed on the
system. These algorithms prioritize tasks based on their resource
requirements and other factors to optimize system performance.
 Interprocess Communication: Operating systems provide
mechanisms for applications to communicate with each other,
allowing them to share data and coordinate their activities.
 Performance Monitoring: Operating systems provide tools for
monitoring system performance, including CPU usage, memory
usage, disk usage, and network activity. This can help identify
performance bottlenecks and optimize system performance.
 Backup and Recovery: Operating systems provide backup and
recovery mechanisms to protect data in the event of system
failure or data loss.
 Debugging: Operating systems provide debugging tools that
allow developers to identify and fix software bugs and other
issues in the system.
Conclusion
In conclusion, the functions of an operating system are essential for
making a computer work smoothly. It manages the hardware and
software, allowing different programs to run, handling memory, files,
and devices like printers or keyboards, and ensuring everything is
secure. Without these core functions, we wouldn’t be able to use
computers efficiently. The OS acts like the brain of the computer,
coordinating all activities and making sure everything runs properly
for users and applications.
Frequently Asked Questions on Functions of
Operating System – FAQs

Difference Between 32-bit and 64-bit Operating


Systems


In computing, there are two types of processors existing, i.e., 32-bit


and 64-bit processors. These types of processors tell us how much
memory a processor can access from a CPU register. For instance,
A 32-bit system can access 232 different memory addresses, i.e. 4
GB of RAM or physical memory ideally, it can access more than 4 GB
of RAM also.
A 64-bit system can access 264 different memory addresses, i.e.
actually 18-quintillion bytes of RAM. In short, any amount of memory
greater than 4 GB can be easily handled by it.
Table of Content
 What is a 32-Bit Operating System?
 What is a 64-Bit Operating System?
 Difference Between 32-bit and 64-bit Operating System
 Advantages of 64-bit Over 32-bit
What is a 32-bit Operating System?
Most computers made in the 1990s and early 2000s were 32-bit
machines. The CPU register stores memory addresses, which is how
the processor accesses data from RAM. One bit in the register can
reference an individual byte in memory, so a 32-bit system can
address a maximum of 4 GB (4,294,967,296 bytes) of RAM. The
actual limit is often less than around 3.5 GB since part of the
register is used to store other temporary values besides memory
addresses. Most computers released over the past two decades
were built on a 32-bit architecture, hence most operating systems
were designed to run on a 32-bit processor.
What is a 64-bit Operating System?
A 64-bit register can theoretically reference
18,446,744,073,709,551,616 bytes or 17,179,869,184 GB (16
exabytes) of memory. This is several million times more than an
average workstation would need to access. What’s important is that
a 64-bit computer (which means it has a 64-bit processor) can
access more than 4 GB of RAM. A computer with 8 GB of RAM better
has a 64-bit processor. Otherwise, at least 4 GB of memory will be
inaccessible by the CPU.
Difference Between 32-bit and 64-bit
Operating System
A major difference between 32-bit processors and 64-bit processors
is the number of calculations per second they can perform, which
affects the speed at which they can complete tasks. 64-bit
processors can come in dual-core, quad-core, six-core, and eight-
core versions for home computing. Multiple cores allow for an
increased number of calculations per second that can be performed,
which can increase the processing power and help make a computer
run faster. Software programs that require many calculations to
function smoothly can operate faster and more efficiently on multi-
core 64-bit processors, for the most part.
Feature 32-bit OS 64-bit OS

Maximum of several
Memory Maximum of 4 GB RAM
terabytes of RAM

Can run on both 32-bit and


Processor Requires a 64-bit processor
64-bit processors

Limited by the maximum Can take advantage of more


Performance amount of RAM it can memory, enabling faster
access performance

Can run 32-bit and 16-bit Can run 32-bit and 64-bit
Compatibility
applications applications

Address Space Uses 32-bit address space Uses 64-bit address space

May not support newer Supports newer hardware


Hardware support
hardware with 64-bit drivers

More advanced security


Security Limited security features features, such as hardware-
level protection

Supports newer software


Limited support for new
Application support designed for 64-bit
software
architecture

Less expensive than 64-bit More expensive than 32-bit


Price
OS OS

Can handle multiple tasks


Can handle multiple tasks
Multitasking more efficiently
but with limited efficiency

Gaming Can run high graphical Can run high graphical


games, but may not be as games and handle complex
efficient as with 64-bit OS software more efficiently
Feature 32-bit OS 64-bit OS

Limited support for Better support for


Virtualization
virtualization virtualization

Advantages of 64-bit Over 32-bit


 Using 64-bit one can do a lot of multi-tasking, the user can easily
switch between various applications without any Windows
hanging problems.

 Gamers can easily play High graphical games like Modern


Warfare, and GTA V, or use high-end software like Photoshop
or CAD which takes a lot of memory since it makes multi-tasking
with big software, easy and efficient for users. However,
upgrading the video card instead of getting a 64-bit processor
would be more beneficial.

Note:
 A computer with a 64-bit processor can have a 64-bit or 32-bit
version of an operating system installed. However, with a 32-bit
operating system, the 64-bit processor would not run at its full
capability.
 On a computer with a 64-bit processor, we can’t run a 16-bit
legacy program. Many 32-bit programs will work with a 64-bit
processor and operating system, but some older 32-bit programs
may not function properly, or at all, due to limited or no
compatibility.
What happens when we turn on computer?
Last Updated : 29 Dec, 2024



A computer without a program running is just an inert hunk of


electronics. The first thing a computer has to do when it is turned on
is to start up a special program called an operating system. The
operating system’s job is to help other computer programs work by
handling the messy details of controlling the computer’s hardware.
What happens when we turn on computer?
1. The power supply sends electricity to the components of the
computer, such as the motherboard, hard drive, and fans.
2. The BIOS (basic input/output system) or UEFI initializes and
performs a power-on self-test (POST), which checks the basic
hardware components to ensure they are working properly. If any
issues are detected, error messages may be displayed.
3. The operating system (OS), such as Windows or macOS, is loaded
from the hard drive or another storage device into the computer’s
RAM (random access memory).
4. The OS then initializes its own components and drivers and
presents the login screen or desktop environment to the user.
An overview of the boot process

The boot process is something that happens every time you turn
your computer on. You don’t really see it, because it happens so
fast. You press the power button and come back a few sec (or
minutes if on slow storage like HDD) later and Windows 10, or
Windows 11, or whatever Operating System you use is all loaded.
The BIOS chip tells it to look in a fixed place, usually on the lowest-
numbered hard disk (the boot disk) for a special program called a
boot loader (under Linux the boot loader is called Grub or LILO). The
boot loader is pulled into memory and started. The bootloader’s job
is to start the real operating system.
Functions of BIOS
1. POST (Power On Self Test): The Power On Self Test happens
each time you turn your computer on. It sounds complicated and
that’s because it kind of is. Your computer does so much when it’s
turned on and this is just part of that.
 It initializes the various hardware devices.
 It is an important process to ensure that all the devices operate
smoothly without any conflicts. BIOSes following ACPI create
tables describing the devices in the computer.
 The POST first checks the bios and then tests the CMOS RAM.
 If there is no problem with this then POST continues to check the
CPU, hardware devices such as the Video Card, and the
secondary storage devices such as the Hard Drive, Floppy Drives,
Zip Drive, or CD/DVD Drives.
 If some errors are found then an error message is displayed on
the screen or a number of beeps are heard.
 These beeps are known as POST beep codes.
2. Master Boot Record: The Master Boot Record (MBR) is a special
boot sector at the beginning of the disk. The MBR contains the code
that loads the rest of OS, known as bootloader. This complicated
process (called the Boot Process) starts with the POST (Power On
Self Test) and ends when the Bios searches for the MBR on the Hard
Drive, which is generally located in the first sector, first head, first
cylinder (cylinder 0, head 0, sector 1).
A typical structure looks like this:
The bootstrap loader is stored in the computer’s EPROM, ROM, or
another non-volatile memory. When the computer is turned on or
restarted, it first performs the power-on-self-test, also known as
POST. If the POST is successful and no issues are found, the
bootstrap loader will load the operating system for the computer
into memory. The computer will then be able to quickly access, load,
and run the operating system.
3. init: init is the last step of the kernel boot sequence. It looks for
the file /etc/inittab to see if there is an entry for initdefault. It is used
to determine the initial run level of the system. A run-level is used to
decide the initial state of the operating system.
Some of the run levels are:
 Level 0: System Halt.
 Level 1: Single user mode.
 Level 2: Full multiuser mode without network.
 Level 3: Full multiuser mode with network.
 Level 4: user definable.
 Level 5: Full multiuser mode with network and X display
manager.
 Level 6: Reboot.
The above design of init is called SysV- pronounced as System five.
Several other implementations of init have been written now. Some
of the popular implementations are systemd and upstart. Upstart is
being used by ubuntu since 2006. More details of the upstart can be
found here.
The next step of init is to start up various daemons that support
networking and other services. X server daemon is one of the most
important daemons. It manages the display, keyboard, and mouse.
When X server daemon is started you see a Graphical Interface and
a login screen is displayed.
4. System Configuration:
The BIOS allows the user to configure various system settings, such
as:
1. Boot order: This determines the order in which the computer
checks for bootable devices. For example, if the boot order is set
to “hard drive” first, the computer will try to boot from the hard
drive before checking other devices such as a CD/DVD drive or a
USB drive.
2. Time and date: The BIOS stores the time and date information,
which can be set and adjusted by the user. This information is
used by the operating system and various applications.
3. Hardware settings: The BIOS provides options to configure
various hardware settings such as CPU voltage, clock speed, and
memory timings. These settings can be used to optimize system
performance, but should only be changed by advanced users with
the proper knowledge.
5. Security:
The BIOS can also provide security features such as:
1. Password protection: The BIOS can be set to require a password
to access certain features or to prevent unauthorized booting of
the computer. This can be useful in preventing unauthorized
access to sensitive data.
2. Secure boot: Secure boot is a feature that ensures that only
trusted operating system boot loaders, drivers, and firmware are
loaded during the boot process. This helps to prevent malware
and other unauthorized software from running on the system.
3. TPM (Trusted Platform Module): Some modern motherboards
have a built-in TPM that provides hardware-based security
features such as encryption, digital certificates, and secure key
storage. This can help to protect sensitive data and prevent
unauthorized access to the system.

You might also like