0% found this document useful (0 votes)
8 views17 pages

File2 Introduction To Os

The document provides a comprehensive overview of operating systems, covering their definitions, functions, types, and components. Key topics include process management, CPU scheduling, memory management, file systems, and user interfaces, as well as the differences between batch, multiprogramming, and multitasking operating systems. It also discusses the objectives and goals of operating systems, emphasizing their role in resource management and user convenience.

Uploaded by

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

File2 Introduction To Os

The document provides a comprehensive overview of operating systems, covering their definitions, functions, types, and components. Key topics include process management, CPU scheduling, memory management, file systems, and user interfaces, as well as the differences between batch, multiprogramming, and multitasking operating systems. It also discusses the objectives and goals of operating systems, emphasizing their role in resource management and user convenience.

Uploaded by

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

OPERATING SYSTEM -SEP

OPERATING SYSTEM
Unit-1
Introduction: Definition, Computer System Components , User View , System View And System
Goals , Batch Systems, Multi Programmed Systems, Time-Sharing Systems, Real-Time Systems,
System Components, Operating System Services.
Process: Process Concept, Process State Diagram Process Control Block, Process Scheduling-
Scheduling Queues, Scheduler, Cooperating Process, Inter-process Communication.
CPU Scheduling: Basic Concepts, Preemptive and Non-Preemeptive Scheduling, Scheduling
Criteria, Scheduling Algorithms-FCFS, Shortest Job First Priority Scheduling, Round Robin
Scheduling.
Unit-2
Process Synchronization: The Critical Section Problem, Solution For Critical Section Problem,
Bakery Algorithm, Semaphores-Meaning, Types of Semaphores, Synchronization Problems-
Bounded Buffer Problem, Readers-Writers Problem.
Deadlocks: Deadlock Characterization, Methods for Handling Deadlocks, Deadlock Prevention,
Deadlock Avoidance, Deadlock Detection, Recovery From Deadlock.
Unit-3
Memory Management: Introduction, Logical Versus Physical Address Space, Dynamic Loading,
Dynamic Linking, Swapping, Contiguous Allocation, Partitioned Memory Allocation, Paging, Virtual
Memory Management-Segmentation, Segmentation With Paging.
File System: File Concepts, File Attributes, File Operations, File Types, File Structure, Access
Methods, Directory structure, File-System Structure, Allocation Methods- Contiguous Allocation,
Linked Allocation and Indexed Allocation, FreeSpace Management.
Unit-4
Introduction to Unix System: The Unix Operating System, The UNIX architecture.
Shell Programming: Vi editor, shell types, shell command line processing, shell script features,
executing a shell script, system and user-defined variables, expr command, shell screen interface,
read and echo statement, command substitution, escape sequence characters, shell script arguments,
positional parameters, test command, file test, string test, numeric test.
Conditional Control Structures: if statement, case statement Looping Control Structure-while,
until, for, statements. Jumping Control Structures – break, continue, exit. Shell Programs covering
the above concepts.

1|Page
OPERATING SYSTEM -SEP

Introduction
An operating system act as an intermediary between the user of a computer and computer hardware.
The purpose of an operating system is to provide an environment in which a user can execute programs
in a convenient and efficient manner. An operating system is software that manages the computer
hardware.
Operating System
Definition of Operating System:
 An Operating system is a program that controls the execution of application programs and acts
as an interface between the user of a computer and the computer hardware.
 A more common definition is that the operating system is the one program running at all times
on the computer (usually called the kernel), with all else being applications programs.
 An Operating system is concerned with the allocation of resources and services, such as
memory, processors, devices and information. The Operating System correspondingly includes
programs to manage these resources, such as a traffic controller, a scheduler, memory
management module, I/O programs, and a file system.
What is an Operating System Used for?
 As a platform for Application programs: It provides a platform, on top of which, other
programs, called application programs can run.
 Managing Input-Output unit: It also allows the computer to manage its own resources such
as memory, monitor, keyboard, printer, etc. Management of these resources is required for
effective and fair utilization.
 Multitasking: It manages memory and allows multiple programs to run in their own space and
even communicate with each other through shared memory.
 Manages memory and Files: It manages the computer’s main memory and second storage.
Additionally, it allows and deallocates memory to all tasks and applications.
 Provides Security: It helps to maintain the system and applications safe through the
authorization process. Thus, the OS provides security to the system.
Functions of the Operating System
 Resource Management: The operating system manages and allocates memory, CPU time, and
other hardware resources among the various programs and processes running on the computer.
 Process Management: The operating system is responsible for starting, stopping, and
managing processes and programs. It also controls the scheduling of processes and allocates
resources to them.
 Memory Management: The operating system manages the computer’s primary memory and
provides mechanisms for optimizing memory usage.
 Security: The operating system provides a secure environment for the user, applications, and
data by implementing security policies and mechanisms such as access controls and encryption.
 Job Accounting: It keeps track of time and resources used by various jobs or users.

2|Page
OPERATING SYSTEM -SEP

 File Management: The operating system is responsible for organizing and managing the file
system, including the creation, deletion, and manipulation of files and directories.
 Device Management: The operating system manages input/output devices such as printers,
keyboards, mice, and displays. It provides the necessary drivers and interfaces to enable
communication between the devices and the computer.
 Networking: The operating system provides networking capabilities such as establishing and
managing network connections, handling network protocols, and sharing resources such as
printers and files over a network.
 User Interface: The operating system provides a user interface that enables users to interact
with the computer system. This can be a Graphical User Interface (GUI), a Command-Line
Interface (CLI), or a combination of both.
 Backup and Recovery: The operating system provides mechanisms for backing up data and
recovering it in case of system failures, errors, or disasters.
 Virtualization: The operating system provides virtualization capabilities that allow multiple
operating systems or applications to run on a single physical machine. This can enable efficient
use of resources and flexibility in managing workloads.
 Performance Monitoring: The operating system provides tools for monitoring and optimizing
system performance, including identifying bottlenecks, optimizing resource usage, and
analyzing system logs and metrics.
 Time-Sharing: The operating system enables multiple users to share a computer system and
its resources simultaneously by providing time-sharing mechanisms that allocate resources
fairly and efficiently.
 System Calls: The operating system provides a set of system calls that enable applications to
interact with the operating system and access its resources. System calls provide a standardized
interface between applications and the operating system, enabling portability and compatibility
across different hardware and software platforms.
 Error-detecting Aids: These contain methods that include the error messages, and other
debugging and error-detecting methods.
Objectives of Operating Systems
Let us now see some of the objectives of the operating system, which are mentioned below.
 Convenient to use: One of the objectives is to make the computer system more convenient to
use in an efficient manner.
 User Friendly: To make the computer system more interactive with a more convenient
interface for the users.
 Easy Access: To provide easy access to users for using resources by acting as an intermediary
between the hardware and its users.
 Management of Resources: For managing the resources of a computer in a better and faster
way.

3|Page
OPERATING SYSTEM -SEP

 Controls and Monitoring: By keeping track of who is using which resource, granting resource
requests, and mediating conflicting requests from different programs and users.
 Fair Sharing of Resources: Providing efficient and fair sharing of resources between the users
and programs.
Computer System Components

1. Hardware – provides basic computing resources (CPU,memory, I/O devices).


2. Operating system – controls and coordinates the use of the hardware among the various application
programs for the various users.
3. Applications programs – define the ways in which the system resources are used to solve the
computing problems of the users (compilers, database systems, video games, business programs).
4. Users (people, machines, other computers).

Views of Operating System


An operating system is a framework that enables user application programs to interact with system
hardware. The operating system does not perform any functions on its own, but it provides an
atmosphere in which various apps and programs can do useful work. The operating system may be
observed from the point of view of the user or the system, and it is known as the user view and the
system view. In this article, you will learn the views of the operating system.
Viewpoints of Operating System
The operating system may be observed from the viewpoint of the user or the system. It is known as the
user view and the system view. There are mainly two types of views of the operating system. These are
as follows:

4|Page
OPERATING SYSTEM -SEP

1. User View
2. System View
 User View
The user view depends on the system interface that is used by the users. Some systems are designed
for a single user to monopolize the resources to maximize the user's task. In these cases, the OS is
designed primarily for ease of use, with little emphasis on quality and none on resource utilization.
The user viewpoint focuses on how the user interacts with the operating system through the usage of
various application programs. In contrast, the system viewpoint focuses on how the hardware interacts
with the operating system to complete various tasks.
1. Single User View Point
Most computer users use a monitor, keyboard, mouse, printer, and other accessories to operate their
computer system. In some cases, the system is designed to maximize the output of a single user. As a
result, more attention is laid on accessibility, and resource allocation is less important. These systems
are much more designed for a single user experience and meet the needs of a single user, where the
performance is not given focus as the multiple user systems.
2. Multiple User View Point
Another example of user views in which the importance of user experience and performance is given
is when there is one mainframe computer and many users on their computers trying to interact with
their kernels over the mainframe to each other. In such circumstances, memory allocation by the CPU
must be done effectively to give a good user experience. The client-server architecture is another good
example where many clients may interact through a remote server, and the same constraints of effective
use of server resources may arise.
3. Handled User View Point
Moreover, the touchscreen era has given you the best handheld technology ever. Smartphones interact
via wireless devices to perform numerous operations, but they're not as efficient as a computer
interface, limiting their usefulness. However, their operating system is a great example of creating a
device focused on the user's point of view.
4. Embedded System User View Point
Some systems, like embedded systems that lack a user point of view. The remote control used to
turn on or off the tv is all part of an embedded system in which the electronic device communicates
with another program where the user viewpoint is limited and allows the user to engage with the
application.

 System View
The OS may also be viewed as just a resource allocator. A computer system comprises various sources,
such as hardware and software, which must be managed effectively. The operating system manages the
resources, decides between competing demands, controls the program execution, etc. According to this
point of view, the operating system's purpose is to maximize performance. The operating system is
responsible for managing hardware resources and allocating them to programs and users to ensure
maximum performance.

5|Page
OPERATING SYSTEM -SEP

From the user point of view, we've discussed the numerous applications that require varying degrees
of user participation. However, we are more concerned with how the hardware interacts with the
operating system than with the user from a system viewpoint. The hardware and the operating system
interact for a variety of reasons, including:
1. Resource Allocation
The hardware contains several resources like registers, caches, RAM, ROM, CPUs, I/O interaction,
etc. These are all resources that the operating system needs when an application program demands
them. Only the operating system can allocate resources, and it has used several tactics and strategies to
maximize its processing and memory space. The operating system uses a variety of strategies to get
the most out of the hardware resources, including paging, virtual memory, caching, and so on. These
are very important in the case of various user viewpoints because inefficient resource allocation may
affect the user viewpoint, causing the user system to lag or hang, reducing the user experience.
2. Control Program
The control program controls how input and output devices (hardware) interact with the operating
system. The user may request an action that can only be done with I/O devices; in this case, the
operating system must also have proper communication, control, detect, and handle such devices.

Goals of Operating System


1. Convenience: An OS makes a computer more convenient to use.
2. Efficiency: An OS al1. Hardware – provides basic computing resources (CPU,memory, I/O devices).
3. Ability to Evolve: An OS should be constructed in such a way as to permit the effective
development, testing and introduction of new system functions without at the same time interfering
with service.

Operating system goals:


 Execute user programs and make solving user problems easier.
 Make the computer system convenient to use.

6|Page
OPERATING SYSTEM -SEP

Types of Operating Systems


1. Batch Operating System
In batch operating system the jobs were performed in batches.
 This means Jobs having similar requirements are grouped and executed as a group to speed
up processing.
 Users using batch operating systems do not interact with the computer directly.
 Each user prepares their job using an offline device for example a punch card and submits it
to the computer operator.
 Once the programmers have left their programs with the operator, they sort the programs
with similar needs into batches.

Advantages of Batch Operating System


 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
 CPU is not used efficiently. When the current process is doing IO, CPU is free and could be
utilized by other processes waiting.
 The other jobs will have to wait for an unknown time if any job fails.
 In batch operating system, average response time increases as all processes are processed one
by one.
Examples of Batch Operating Systems: Payroll Systems, Bank Statements, etc.

2. Multiprogramming in Operating System


Multiprogramming means more than one program can be active at the same time.
Before the operating system concept, only one program was to be loaded at a time and run. These
systems were not efficient as the CPU was not used efficiently.

7|Page
OPERATING SYSTEM -SEP

For example, in a single-tasking system, the CPU is not used if the current program waits for
some input/output to finish.
The idea of multiprogramming is to assign CPUs to other processes while the current process might
not be finished. This has the below advantages.
1) The user gets the feeling that he/she can run multiple applications on a single CPU even if the CPU
is running one process at a time.
2) CPU is utilized better.
All modern operating systems like MS Windows, Linux, etc are multiprogramming operating systems.

Advantages of Multiprogramming
 Increase the resource utilisation of a computer system.
 Support multiple simultaneously interactive users (terminals).
 Keeps multiple runnable jobs loaded in memory .
 Increase the throughput of the system.
 The waiting time for a program is reduced.
 Improve system’s overall responsiveness.
 Improve the reliability and stability of the system.
 Make the system suitable for multitasking environments.

8|Page
OPERATING SYSTEM -SEP

Disadvantages of Multiprogramming
 Prior knowledge of scheduling algorithms (An algorithm that decides which next process will
get hold of the CPU) is required.
 If it has a large number of jobs, then long-term jobs will have to require a long wait.
 Memory management is needed in the operating system because all types of tasks are stored in
the main memory.
 Using multiprogramming up to a larger extent can cause a heat-up issue.

3. Multi-Tasking/Time-sharing Operating systems


 Single tasking Operating system was used before the multitasking operating system. single
tasking operating system allows user to perform a single task at a time.
 So tasks like printing a document or downloading an image from the internet can be done one
after another, leading to wastage of resources which makes the operating system relatively slow
and gives a bad user experience.
 So keeping this in mind Multi-Tasking Operating Systems were introduced that allow users to
run multiple programs simultaneously thus making the computer far more efficient and user
friendly.
 A user can download the image from the internet as well as listen to music or can surf the
internet while downloading the image all at the same time.
Multi tasking operating systems allow multiple users to perform multiple tasks at the same time.
The allocation of system resources such as input/output devices, CPU and memory among processes
can be easily managed by multi-tasking operating system. There are various states through which
a processor passes to complete particular or multiple executions.
Multitasking is the ability of an OS to execute more than one task simultaneously on a CPU machine

9|Page
OPERATING SYSTEM -SEP

Advantages of Multi-Tasking Operating System


 Multi-Tasking Operating System is capable of executing multiple application simultaneously
without slowing down the system.
 Each process is assigned specific length of time(i.e time sharing), hence a process does not have
to wait for longer duration to utilize CPU. Starvation of process is not found in these operating
system.
 A multitasking OS can effectively manage I/O devices, RAM, hard disks, CPUs, and other
computer resources.
 In Multi-Tasking Operating a user is capable of executing multiple programs at the same time,
such as games, browser, MS Word, and other services.
 Memory management is well-defined in multitasking operating systems. Because of this, the
operating system does not grant any permission for unwanted apps to waste RAM.
Disadvantages of Multi-Tasking Operating System
 As a single processor is executing multiple processes at the same time then there will be load
on CPU and CPU may gets heat up.
 Computer system will be lagging if the processor is slow in Multi-Tasking Operating System
while executing multiple programs simultaneously.
 Main memory(RAM) have to store multiple processes during multitasking so there can be
memory boundation if the main memory is overloaded.

4. Real Time Operating System (RTOS)


A real-time operating system (RTOS) is a special kind of operating system designed to handle tasks
that need to be completed quickly and on time. Unlike general-purpose operating systems (GPOS),
which are good at multitasking and user interaction, RTOS focuses on doing things in real time.
The main goal of an RTOS is to perform critical tasks on time. It ensures that certain processes are
finished within strict deadlines, making it perfect for situations where timing is very important. It is
also good at handling multiple tasks at once.
Advantages of Real Time Operating System
The advantages of real-time operating systems are as follows:
 Maximum Consumption: Maximum utilization of devices and systems. Thus more output
from all the resources.
 Task Shifting: Time assigned for shifting tasks in these systems is very less. For example, in
older systems, it takes about 10 microseconds. Shifting one task to another and in the latest
systems, it takes 3 microseconds.
 Focus On Application: Focus on running applications and less importance to applications that
are in the queue.
 Real-Time Operating System In Embedded System: Since the size of programs is small,
RTOS can also be embedded systems like in transport and others.

10 | P a g e
OPERATING SYSTEM -SEP

 Error Free: These types of systems are error-free.


 Memory Allocation: Memory allocation is best managed in these types of systems.
Disadvantages of Real Time Operating System
The disadvantages of real-time operating systems are as follows:
 Limited Tasks: Very few tasks run simultaneously, 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.
 Minimum Switching: RTOS performs minimal task switching.

Components of the Operating System


 Process Management
 File Management
 Command Interpreter
 System Calls
 Signals
 Network Management
 Security Management
 I/O Device Management
 Secondary Storage Management
 Main Memory Management
Process Management
A process is a program in execution. It consists of the followings:
 Executable program
 Program data
 Stack and stack pointer
 Program counter and other CPU registers
 Details of opened files

11 | P a g e
OPERATING SYSTEM -SEP

A process can be suspended temporarily and the execution of another process can be taken up. A
suspended process can be restarted later. Before suspending a process, its details are saved in a table
called the process table so that it can be executed later on. An operating system supports two system
calls to manage processes Create and Kill –
 Create a system call used to create a new process.
 Kill system call used to delete an existing process.

Files Management
Files are used for long-term storage. Files are used for both input and output. Every operating
system provides a file management service. This file management service can also be treated as an
abstraction as it hides the information about the disks from the user. The operating system also
provides a system call for file management. The system call for file management includes:
 File creation
 File deletion
 Read and Write operations
Files are stored in a directory. System calls provide to put a file in a directory or to remove a file
from a directory. Files in the system are protected to maintain the privacy of the user. Below shows
the Hierarchical File Structure directory.

12 | P a g e
OPERATING SYSTEM -SEP

Command Interpreter
There are several ways for users to interface with the operating system. One of the approaches to
user interaction with the operating system is through commands. Command interpreter provides
a command-line interface. It allows the user to enter a command on the command line prompt
(cmd). The command interpreter accepts and executes the commands entered by a user. For
example, a shell is a command interpreter under UNIX. The commands to be executed are
implemented in two ways:
 The command interpreter itself contains code to be executed.
 The command is implemented through a system file. The necessary system file is loaded into
memory and executed.
System Calls
System calls provide an interface to the services made by an operating system. The user interacts
with the operating system programs through System calls. These calls are normally made available
as library functions in high-level languages such as C, Java, Python etc. It provides a level of
abstraction as the user is not aware of the implementation or execution of the call made. Details of
the operating system is hidden from the user. Different hardware and software services can be
availed through system calls.
System calls are available for the following operations:
 Process Management
 Memory Management
 File Operations
 Input / Output Operations
Signals
Signals are used in the operating systems to notify a process that a particular event has occurred.
Signals are the software or hardware interrupts that suspend the current execution of the task.
Signals are also used for inter-process communication. A signal follows the following pattern :
 A signal is generated by the occurrence of a particular event it can be the clicking of the mouse,
the execution of the program successfully or an error notifying, etc.
 A generated signal is delivered to a process for further execution.
 Once delivered, the signal must be handled.
 A signal can be synchronous and asynchronous which is handled by a default handler or by the
user-defined handler.
The signal causes temporarily suspends the current task it was processing, saves its registers on the
stack, and starts running a special signal handling procedure, where the signal is assigned to it.
Network Management
The complexity of networks and services has created modern challenges for IT professionals and
users. Network management is a set of processes and procedures that help organizations to optimize

13 | P a g e
OPERATING SYSTEM -SEP

their computer networks. Mainly, it ensures that users have the best possible experience while using
network applications and services.
Network management is a fundamental concept of computer networks. Network Management
Systems is a software application that provides network administrators with information on
components in their networks. It ensures the quality of service and availability of network
resources. It also examines the operations of a network, reconstructs its network configuration,
modifies it for improving performance of tasks.
Security Management
The security mechanisms in an operating system ensure that authorized programs have access to
resources, and unauthorized programs have no access to restricted resources. Security management
refers to the various processes where the user changes the file, memory, CPU, and other hardware
resources that should have authorization from the operating system.
I/O Device Management
The I/O device management component is an I/O manager that hides the details of hardware devices
and manages the main memory for devices using cache and spooling. This component provides a
buffer cache and general device driver code that allows the system to manage the main memory
and the hardware devices connected to it. It also provides and manages custom drivers for particular
hardware devices.
The purpose of the I/O system is to hide the details of hardware devices from the application
programmer. An I/O device management component allows highly efficient resource utilization
while minimizing errors and making programming easy on the entire range of devices available in
their systems.
Secondary Storage Management
Broadly, the secondary storage area is any space, where data is stored permanently and the user can
retrieve it easily. Your computer’s hard drive is the primary location for your files and programs.
Other spaces, such as CD-ROM/DVD drives, flash memory cards, and networked devices, also
provide secondary storage for data on the computer. The computer’s main memory (RAM) is a
volatile storage device in which all programs reside, it provides only temporary storage space for
performing tasks. Secondary storage refers to the media devices other than RAM (e.g. CDs, DVDs,
or hard disks) that provide additional space for permanent storing of data and software programs
which is also called non-volatile storage.
Main Memory Management
Main memory is a flexible and volatile type of storage device. It is a large sequence of bytes and
addresses used to store volatile data. Main memory is also called Random Access Memory (RAM),
which is the fastest computer storage available on PCs. It is costly and low in terms of storage as
compared to secondary storage devices. Whenever computer programs are executed, it is
temporarily stored in the main memory for execution. Later, the user can permanently store the data
or program in the secondary storage device.

14 | P a g e
OPERATING SYSTEM -SEP

Services of Operating System


 Program execution
 Input Output Operations
 Communication between Process
 File Management
 Memory Management
 Process Management
 Security and Privacy
 Resource Management
 User Interface
 Networking
 Error handling
 Time Management
Program Execution
It is the Operating System that manages how a program is going to be executed. It loads the program
into the memory after which it is executed. The order in which they are executed depends on the CPU
Scheduling Algorithms. A few are FCFS, SJF, etc. When the program is in execution, the Operating
System also handles deadlock i.e. no two processes come for execution at the same time. The Operating
System is responsible for the smooth execution of both user and system programs. The Operating
System utilizes various resources available for the efficient running of all types of functionalities.
Input Output Operations
Operating System manages the input-output operations and establishes communication between the
user and device drivers. Device drivers are software that is associated with hardware that is being
managed by the OS so that the sync between the devices works properly. It also provides access to
input-output devices to a program when needed.
Communication Between Processes
The Operating system manages the communication between processes. Communication between
processes includes data transfer among them. If the processes are not on the same computer but
connected through a computer network, then also their communication is managed by the Operating
System itself.
File Management
The operating system helps in managing files also. If a program needs access to a file, it is the operating
system that grants access. These permissions include read-only, read-write, etc. It also provides a
platform for the user to create, and delete files. 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.

15 | P a g e
OPERATING SYSTEM -SEP

Memory Management
Let’s understand memory management by OS in simple way. Imagine a cricket team with limited
number of player. The team manager (OS) decide whether the upcoming player will be in playing 11
,playing 15 or will not be included in team , based on his performance . In the same way, OS first check
whether the upcoming program fulfil all requirement to get memory space or not, if all things good, it
checks how much memory space will be sufficient for program and then load the program into memory
at certain location. And thus, it prevents program from using unnecessary memory.
Process Management
Let’s understand the process management in unique way. Imagine, our kitchen stove as the (CPU)
where all cooking(execution) is really happen and chef as the (OS) who uses kitchen-stove(CPU) to
cook different dishes(program). The chef(OS) has to cook different dishes(programs) so he ensure that
any particular dish(program) does not take long time (unnecessary time) and all dishes(programs) gets
a chance to cooked(execution). The chef(OS) basically scheduled time for all dishes(programs) to run
kitchen(all the system) smoothly and thus cooked(execute) all the different dishes(programs)
efficiently.
Security and Privacy
 Security: OS keep our computer safe from an unauthorized user by adding security layer to it.
Basically, Security is nothing but just a layer of protection which protect computer from bad
guys like viruses and hackers. OS provide us defenses like firewalls and anti-virus software and
ensure good safety of computer and personal information.
 Privacy: OS give us facility to keep our essential information hidden like having a lock on our
door, where only you can enter and other are not allowed. Basically, it respect our secrets and
provide us facility to keep it safe.
Resource Management
System resources are shared between various processes. It is the Operating system that manages
resource sharing. It also manages the CPU time among processes using CPU Scheduling Algorithms.
It also helps in the memory management of the system. It also controls input-output devices. The OS
also ensures the proper use of all the resources available by deciding which resource to be used by
whom.
User Interface
User interface is essential and all operating systems provide it. Users either interacts with the operating
system through the command-line interface or graphical user interface or GUI. The command
interpreter executes the next user-specified command.
A GUI offers the user a mouse-based window and menu system as an interface.
Networking
This service enables communication between devices on a network, such as connecting to the internet,
sending and receiving data packets, and managing network connections.
Error Handling
The Operating System also handles the error occurring in the CPU, in Input-Output devices, etc. It also
ensures that an error does not occur frequently and fixes the errors. It also prevents the process from

16 | P a g e
OPERATING SYSTEM -SEP

coming to a deadlock. It also looks for any type of error or bugs that can occur while any task. The
well-secured OS sometimes also acts as a countermeasure for preventing any sort of breach of the
Computer System from any external source and probably handling them.
Time Management
Imagine traffic light as (OS), which indicates all the cars(programs) whether it should be
stop(red)=>(simple queue), start(yellow)=>(ready queue), move(green)=>(under execution) and this
light (control) changes after a certain interval of time at each side of the road(computer system) so that
the cars(program) from all side of road move smoothly without traffic.

17 | P a g e

You might also like