0% found this document useful (0 votes)
5 views

unit 1 - overview of operating system

The document provides an overview of operating systems, detailing their objectives, functions, and evolution from early systems to modern operating systems. It covers key concepts such as resource management, process scheduling, memory management, and security measures while also discussing the roles of the kernel and user interfaces. Additionally, it highlights the differences between 32-bit and 64-bit operating systems and outlines the advantages and disadvantages of operating systems.
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)
5 views

unit 1 - overview of operating system

The document provides an overview of operating systems, detailing their objectives, functions, and evolution from early systems to modern operating systems. It covers key concepts such as resource management, process scheduling, memory management, and security measures while also discussing the roles of the kernel and user interfaces. Additionally, it highlights the differences between 32-bit and 64-bit operating systems and outlines the advantages and disadvantages of operating systems.
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/ 34

OPERATING SYSTEM

Unit 1: Overview of Operating Systems


Operating-System Objectives and Functions, Evolution of Operating
Systems, Development leading to Modern Operating Systems, Virtual
Machines Introduction to Linux OS, BASH Shell Scripting: Basic
Shell commands.

An Operating System(OS) is software that manages and handles the hardware and software
resources of a computer system. It provides interaction between users of computers and
computer hardware. An operating system is responsible for managing and controlling all the
activities and sharing of computer resources. An operating system is a low-level Software that
includes all the basic functions like processor management, memory management, Error
detection, etc.
This Operating System tutorial will cover all the basic to advance operating system concepts
like System Structure, CPU Scheduling, Deadlock, file and disk management, and many more.
An operating system acts 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 conveniently and efficiently.
An operating system is software that manages computer hardware. The hardware must provide
appropriate mechanisms to ensure the correct operation of the computer system and to prevent
user programs from interfering with the proper operation of the system. 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 application 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, a Memory
Management,module, I/O programs, and a file system.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
History of Operating System
The operating system has been evolving through the years. The following table shows
the history of OS.
Electronic Types of OS
Generation Year device used Devices

First 1945-55 Vacuum Tubes Plug Boards

Second 1955-65 Transistors Batch Systems

Integrated
Third 1965-80 Multiprogramming
Circuits(IC)

Large Scale
Fourth Since 1980 PC
Integration

Characteristics of Operating Systems


Let us now discuss some of the important characteristic features of operating
systems:
• Device Management: The operating system keeps track of all the devices.
So, it is also called the I/O Controller that decides which process gets the
device, when, and for how much time.
• File Management: It allocates and de-allocates the resources and also
decides who gets the resource.
• Job Accounting: It keeps track of time and resources used by various jobs
or users.
• Error-detecting Aids: These contain methods that include the production
of dumps, traces, error messages, and other debugging and error-detecting
methods.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
• Memory Management: It keeps track of the Primary Memory, like what
part of it is in use by whom, or what part is not in use, etc. and It also
allocates the memory when a process or program requests it.
• Processor Management: It allocates the processor to a process and then
de-allocates the processor when it is no longer required or the job is done.
• Control on System Performance: It records the delays between the
request for a service and the system.
• Security: It prevents unauthorized access to programs and data using
passwords or some kind of protection technique.
• Convenience: An OS makes a computer more convenient to use.
• Efficiency: An OS allows the computer system resources to be used
efficiently.
• 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 at the same time without interfering with service.
• Throughput: An OS should be constructed so that It can give maximum
throughput (Number of tasks per unit time).

Functionalities of Operating System


• Resource Management: When parallel accessing happens in the OS means
when multiple users are accessing the system the OS works as Resource
Manager, Its responsibility is to provide hardware to the user. It decreases
the load in the system.
• Process Management: It includes various tasks like scheduling and
termination of the process. It is done with the help of CPU Scheduling
Algorithm.
• Storage Management: The file system mechanism used for the
management of the storage. NIFS, CISF, CFS, NFS, etc. are some file
systems. All the data is stored in various tracks of Hard disks that are all
managed by the storage manager. It included Hard Disk.
• Memory Management: Refers to the management of primary memory.
The operating system has to keep track of how much memory has been
used and by whom. It has to decide which process needs memory space and
how much. OS also has to allocate and deallocate the memory space.
• Security/Privacy Management: Privacy is also provided by the Operating
system using passwords so that unauthorized applications can’t access
programs or data. For example, Windows uses Kerberos authentication to
prevent unauthorized access to data.
The process operating system as User Interface:
1. User
2. System and application programs
3. Operating system

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
4. Hardware
Every general-purpose computer consists of hardware, an operating system(s),
system programs, and application programs. The hardware consists of memory,
CPU, ALU, I/O devices, peripheral devices, and storage devices. The system
program consists of compilers, loaders, editors, OS, etc. The application program
consists of business programs and database programs.

Conceptual View of Computer System

Every computer must have an operating system to run other programs. The
operating system coordinates the use of the hardware among the various system
programs and application programs for various users. It simply provides an
environment within which other programs can do useful work.
The operating system is a set of special programs that run on a computer
system that allows it to work properly. It performs basic tasks such as
recognizing input from the keyboard, keeping track of files and directories on
the disk, sending output to the display screen, and controlling peripheral
devices.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Layered Design of Operating System

The extended machine provides operations like context save, dispatching,


swapping, and I/O initiation. The operating system layer is located on top of
the extended machine layer. This arrangement considerably simplifies the
coding and testing of OS modules by separating the algorithm of a function
from the implementation of its primitive operations. It is now easier to test,
debug, and modify an OS module than in a monolithic OS. We say that the
lower layer provides an abstraction that is the extended machine. We call the
operating system layer the top layer of the OS.
Purposes of an Operating System
• It controls the allocation and use of the computing System’s resources
among the various user and tasks.
• It provides an interface between the computer hardware and the
programmer that simplifies and makes it feasible for coding and debugging
of application programs.
Tasks of an Operating System
1. Provides the facilities to create and modify programs and data files using an
editor.
2. Access to the compiler for translating the user program from high-level
language to machine language.
3. Provide a loader program to move the compiled program code to the
computer’s memory for execution.
4. Provide routines that handle the details of I/O programming.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Kernel
The kernel is one of the components of the Operating System which works as a
core component. The rest of the components depends on Kernel for the supply of
the important services that are provided by the Operating System. The kernel is
the primary interface between the Operating system and Hardware.
Functions of Kernel
The following functions are to be performed by the Kernel.
• It helps in controlling the System Calls.
• It helps in I/O Management.
• It helps in the management of applications, memory, etc.
Types of Kernel
There are four types of Kernel that are mentioned below.
• Monolithic Kernel
• Microkernel
• Hybrid Kernel
• Exokernel

Difference Between 32-Bit and 64-Bit Operating Systems


32-Bit Operating System 64-Bit Operating System

32-Bit OS is required for running of


64-Bit Processors can run on any of
32-Bit Processors, as they are not
the Operating Systems, like 32-Bit
capable of running on 64-bit
OS or 64-Bit OS.
processors.

32-Bit OS gives a low efficient 64-Bit Operating System provides


performance. highly efficient Performance.

Less amount of data is managed in


A large amount of data can be stored
32-Bit Operating System as
in 64-Bit Operating System.
compared to 64-Bit Os.

32-Bit Operating System can 64-Bit Operating System can


address 2^32 bytes of RAM. address 2^64 bytes of RAM.

The fundamental goals of operating system are:


• Efficient use: Ensure efficient use of a computer’s resources.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
• User convenience: Provide convenient methods of using a computer
system.
• Non interference: Prevent interference in the activities of its users.
Advantages of Operating System
• It helps in managing the data present in the device i.e. Memory
Management.
• It helps in making the best use of computer hardware.
• It helps in maintaining the security of the device.
• It helps different applications in running them efficiently.
Disadvantages of Operating System
• Operating Systems can be difficult for someone to use.
• Some OS are expensive and they require heavy maintenance.
• Operating Systems can come under threat if used by hackers.

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.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
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.

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.
Course Name--Operating Systems
Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
• 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.

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.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
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.
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

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
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.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
• Debugging: Operating systems provide debugging tools that allow developers to
identify and fix software bugs and other issues in the system.

Different Approaches or Structures of Operating Systems


The operating system can be implemented with the help of various structures. The structure of
the OS depends mainly on how the various standard components of the operating system
are interconnected and melded into the Kernel.
A design known as an operating system enables user application programs to communicate
with the machine’s hardware. Given its complex design and need to be easy to use and modify,
the operating system should be constructed with the utmost care. A straightforward way to do
this is to supernaturally develop the operating system. These parts must each have unique
inputs, outputs, and functionalities.
This article discusses a variety of operating system implementation structures, including those
listed below, as well as how and why they function. Additionally, the operating system
structure is defined.
Depending on this, we have the following structures in the operating system
1. Simple/Monolithic Structure
2. Micro-Kernel Structure
3. Layered Structure
4. Modular Structure
Simple/Monolithic structure
Such operating systems do not have well-defined structures and are small, simple, and limited.
The interfaces and levels of functionality are not well separated. MS-DOS is an example of
such an operating system. In MS-DOS, application programs are able to access the basic I/O
routines. These types of operating systems cause the entire system to crash if one of the user
programs fails.
A diagram of the structure of MS-DOS is shown below.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Advantages of Simple/Monolithic structure
• It delivers better application performance because of the few interfaces between the
application program and the hardware.
• It is easy for kernel developers to develop such an operating system.
Disadvantages of Simple/Monolithic structure
• The structure is very complicated, as no clear boundaries exist between modules.
• It does not enforce data hiding in the operating system.
Micro-kernel Structure
This structure designs the operating system by removing all non-essential components from
the kernel and implementing them as system and user programs. This results in a smaller
kernel called the micro-kernel. Advantages of this structure are that all new services need to
be added to user space and does not require the kernel to be modified. Thus it is more
secure and reliable as if a service fails, then rest of the operating system remains untouched.
Mac OS is an example of this type of OS.
Advantages of Micro-kernel structure
• It makes the operating system portable to various platforms.
• As microkernels are small so these can be tested effectively.
Disadvantages of Micro-kernel structure
• Increased level of inter module communication degrades system performance.
Layered structure
An OS can be broken into pieces and retain much more control over the system. In this
structure, the OS is broken into a number of layers (levels). The bottom layer (layer 0) is the
hardware, and the topmost layer (layer N) is the user interface. These layers are so designed
that each layer uses the functions of the lower-level layers. This simplifies the debugging
process, if lower-level layers are debugged and an error occurs during debugging, then the error
must be on that layer only, as the lower-level layers have already been debugged.
The main disadvantage of this structure is that at each layer, the data needs to be modified
and passed on which adds overhead to the system. Moreover, careful planning of the layers
is necessary, as a layer can use only lower-level layers. UNIX is an example of this
structure.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Advantages of Layered structure
• Layering makes it easier to enhance the operating system, as the implementation of a
layer can be changed easily without affecting the other layers.
• It is very easy to perform debugging and system verification.
Disadvantages of Layered structure
• In this structure, the application’s performance is degraded as compared to simple
structure.
• It requires careful planning for designing the layers, as the higher layers use the
functionalities of only the lower layers.
Modular structure or approach
It is considered as the best approach for an OS. It involves designing of a modular kernel.
The kernel has only a set of core components and other services are added as dynamically
loadable modules to the kernel either during runtime or boot time. It resembles layered
structure due to the fact that each kernel has defined and protected interfaces, but it is more
flexible than a layered structure as a module can call any other module. For example Solaris
OS is organized as shown in the figure.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Difference between 32-bit and 64-bit operating systems
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.

Feature 32-bit OS 64-bit OS

Maximum of several terabytes


Memory Maximum of 4 GB RAM
of RAM

Can run on both 32-bit and 64-


Processor Requires a 64-bit processor
bit processors

Can take advantage of more


Limited by the maximum
Performance memory, enabling faster
amount of RAM it can 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

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Hardware May not support newer Supports newer hardware with
support hardware 64-bit drivers

More advanced security


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

Application Limited support for new Supports newer software


support software designed for 64-bit architecture

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

Can handle multiple tasks more


Can handle multiple tasks but
Multitasking efficiently
with limited efficiency

Can run high graphical games


Can run high graphical games,
and handle complex software
Gaming but may not be as efficient as
more efficiently
with 64-bit OS

Limited support for


Virtualization Better support for virtualization
virtualization

Advantages of 64-bit over 32-bit


• Using 64-bit one can do a lot in multi-tasking, user can easily switch between various
applications without any windows hanging problems.

• Gamers can easily play High graphical games like Modern Warfare, 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.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Views of the Operating System

The operating system can be observed from the point of view of the user or the system. This is
known as the user view and system view respectively. 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 programs and
apps 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 the Operating System

There are mainly two types of views of the operating system.

• User view
• System view
• User view − The user viewpoint focuses on how the user interacts with the operating system
through the usage of various application programs. Some systems are designed for a single
user to monopolize the resources to maximize the user’s task.Therefore the Operating
system is designed primarily for ease of use with little emphasis on quality and none of
resource utilization.
• Single user view point
• These systems are much more designed for a single user experience and meet the needs
of single user where the performance is not given focus as the multiple user systems.
Most computer users use a monitor,keyboard,printer,mouse 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.
• Multiple user view point
• These systems are designed for multiple user experience and meet the needs of multiple
user. when there is one mainframe computer and many users on their computer trying
to interact with their kernels over the mainframe to each other.
• The client server architecture is a good example where many clients may interact
through a remote server, and the same constraints of effective use of server resources
may arise.
• Handled user view point
• In the handled user viewpoint smartphones interact via wireless devices to perform

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
numerous operations but they are not as efficient as a computer interface, limiting their
usefulness. Smart phones have given you the best handheld technology ever. However
their operating system is a great example of creating a device focused on the user’s
point of view. The Touchscreen era has given you the best handheld technology ever.
• Embedded System user view Point
• The embedded system lacks 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 view point is limited and allows
the user to engage with the application.
• System view − An operating system can also be considered as a program running at all
times in the background of a computer system known as the kernel and handling all the
application programs.The operating system 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 is responsible for managing
hardware resources and allocating them to programs and users to ensure maximum
performance. In the system viewpoint the operating system is more involved with
hardware services -CPU time,memory space, I/O operation , and so on.
• From the system point of view, we are more focused on how the hardware has to interact
with the operating system than the user. The hardware and the operating system interact
with each other for the various purpose some of them are
• Resource Allocation
• There are many resources which present in the hardware such as
register,cache,RAM,ROM, processors,I/O interaction, etc.These resources demanded
by the operating system when it is asked by any application program.This resource
allocation has to be done only by the operating system which has used many techniques
and strategies such that it brings the most out of its processing and memory space.There
are various techniques such as paging,virtual memory,caching,etc.
• The operating system allocates resources when a program needs them. When the
program terminates, the resources are unallocated and allocated to other programs that
need them.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Development leading to Modern Operating Systems--
In the beginning, computers were very large types of machinery that ran from a console
table. In all-purpose, card readers or tape drivers were used for input, and punch cards, tape
drives, and line printers were used for output. Operators had no direct interface with the
system, and job implementation was done in a batch system. These systems are known as
batch operating systems, and users have to prepare a job separately to perform it.
In the early 1950s, General Motors Research Laboratories (GMRL) announced the
first Single-Stream batch processing systems. It only performed one job at a time, and data
was sent in batches or groups. The batch operating system removes the setup time issue.
What is a Batch-Processing Operating System?
The batch-processing operating system was very popular in the 1970s. 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.

The Batch operating system is a real-time operating system intended for batch processing.
It structures a segmental architecture, which permits the addition of new segments without
touching the current codebase.
A batch processing operating system (BPOS) is designed to handle and process large
volumes of data in batches, making it ideal for organizations that require efficient and
rapid data processing. Unlike interactive systems, batch processing systems operate by
executing a series of jobs without manual intervention, which enhances their speed and
efficiency. This makes BPOS particularly suitable for businesses that consistently manage
substantial data sets and need reliable, high-speed processing capabilities.
Features of Batch Processing Operating System
Batch OS is an operating system intended specifically for batch processing. It contains
a command line interface, a library for scheduling tasks, and a user interface for managing

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
tasks. Batch OS is designed to simplify the process of handling and scheduling tasks across
a network of computers.
Batch OS contains a library for scheduling tasks. This library permits tasks to be scheduled
in a ranked manner, which makes it easy to manage and schedule tasks across a network of
computers. The user interface permits users to view and manage tasks in a graphical
manner.
Example of Batch Operating System
Some examples of batch-processing operating systems include:
• IBM’s z/OS
• Unisys MCP
• and Burroughs MCP/BCS
These systems are usually used in large organizations that require high-volume data
processing, such as banks, airlines, and government agencies.
Advantages of Batch Operating System
The benefits of batch-processing operating systems include:
• Resource Efficiency: These systems improve the use of computation resources by
processing jobs in groups and scheduling them during stages of resource accessibility.
• High Throughput: Batch processing systems can handle and complete a large number of
tasks quickly, confirming quick turnaround times and high throughput.
• Error Reduction: Since these systems work without requiring user interference, they
minimize the risk of faults that can occur with manual processing.
• Simplified Management: They restructure job management by automating the
submission, scheduling, and implementation of tasks.
• Cost Efficiency: By producing well-organized use of resources and reducing processing
time and errors, batch processing systems can be a cost-effective option.
• Scalability: These classifications can manage a huge number of tasks, making them
scalable and appropriate for large organizations with significant data processing needs.
Disadvantages of Batch Operating System
There are many disadvantages to using batch operating systems, including:
• Limited functionality: A batch operating system can solve only simple tasks not solve
more complex tasks. this can make them difficult to use for certain tasks, like managing
files or software.
• Security issues: Batch operating systems are not more secure because they are not
typically used for day-to-day tasks, so they are not as secure as more common operating
systems. This can lead to security risks if the system is used by people who should not
have access to it.
• Interruptions Batch systems can be interrupted frequently, which can lead to missed
deadlines or mistakes.
• Inefficiency: Batch systems are often slow and difficult to use, which can lead to
inefficiency in the workplace.
Multiprogramming in Operating System--
As the name suggests, more than one programs can be active at the same time. Before the
concept of Multiprogramming, there were single tasking operating systems like MS DOS
that used to allow only one program to be loaded at a time and run. These systems were not
efficient as CPU was not used efficiently. For example, in a single tasking system if the
current program waits for some input/output to finish, the CPU is not used. The idea of
multiprogramming is to assign CPUs to other processes while the current process might
not be finished. This has the below advantages.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
1) User get 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,

Features of Multiprogramming
1. Need Single CPU for implementation.
2. Context switch between process.
3. Switching happens when current process undergoes waiting state.
4. CPU idle time is reduced.
5. High resource utilization.
6. High Performance.
Disadvantages of Multiprogramming
1. Prior knowledge of scheduling algorithms (An algorithm that decides which next process
will get hold of the CPU) is required.
2. If it has a large number of jobs, then long-term jobs will have to require a long wait.
3. Memory management is needed in the operating system because all types of tasks are
stored in the main memory.
4. Using multiprogramming up to a larger extent can cause a heat-up issue.
Scheduling Algorithms are of two types.
1. Preemptive Scheduling algorithm: In the preemptive scheduling algorithm if more than
one process wants to enter into the critical section then it will be allowed and it can enter
into the critical section without any interruption only if no other progress is in the critical
section.
2. Non-Preemptive scheduling algorithm: If a process gets a critical section then it will
not leave the critical section until or unless it works gets done.
Time Sharing Operating System--
Multiprogrammed, batched systems provide an environment where various system
resources were used effectively, but it did not provide for user interaction with computer
systems. Time-sharing is a logical extension of multiprogramming. The CPU performs
many tasks by switches that are so frequent that the user can interact with each program
while it is running. A time-shared operating system allows multiple users to share
computers simultaneously. With each action or order at a time the shared system becomes

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
smaller, so only a little CPU time is required for each user. As the system rapidly switches
from one user to another, each user is given the impression that the entire computer system
is dedicated to its use, although it is being shared among multiple users.
A time-shared operating system uses CPU scheduling and multi-programming to provide
each user with a small portion of a shared computer at once. Each user has at least one
separate program in memory. A program is loaded into memory and executes, it performs a
short period of time either before completion or to complete I/O. This short period of time
during which the user gets the attention of the CPU is known as time slice, time slot, or
quantum. It is typically of the order of 10 to 100 milliseconds. Time-shared operating
systems are more complex than multiprogrammed operating systems. In both, multiple
jobs must be kept in memory simultaneously, so the system must have memory
management and security. To achieve a good response time, jobs may have to swap in and
out of disk from the main memory which now serves as a backing store for the main
memory. A common method to achieve this goal is virtual memory, a technique that allows
the execution of a job that may not be completely in memory.

In the above figure the user 5 is active state but user 1, user 2, user 3, and user 4 are in
a waiting state whereas user 6 is in a ready state.
1. Active State – The user’s program is under the control of the CPU. Only one program is
available in this state.
2. Ready State – The user program is ready to execute but it is waiting for its turn to get the
CPU. More than one user can be in a ready state at a time.
3. Waiting State – The user’s program is waiting for some input/output operation. More
than one user can be in a waiting state at a time.
Requirements of Time Sharing Operating System: An alarm clock mechanism to send
an interrupt signal to the CPU after every time slice. Memory Protection mechanism to
prevent one job’s instructions and data from interfering with other jobs.
What are some of the key features of a Time-Sharing Operating System?
A Time-Sharing Operating System’s key characteristics include the capacity to support
multiple concurrent users and the capacity to reduce response times for all users.
Additionally, because they permit multiple users to use the system without needing to
purchase individual licenses, time-sharing operating systems may be more cost-effective
for businesses.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
What are some benefits of the Time-sharing operating System?
The ability for multiple users to use the system at various terminals simultaneously is one
advantage of using a time-sharing operating system. All users’ response times can be cut
down, and the system’s resources can be used more effectively.
Additionally, because they permit multiple users to use the system without needing to
purchase individual licenses, time-sharing operating systems may be more cost-effective
for businesses.
Advantages
1. Each task gets an equal opportunity.
2. Fewer chances of duplication of software.
3. CPU idle time can be reduced.
Disadvantages
1. Reliability problem.
2. One must have to take of the security and integrity of user programs and data.
3. Data communication problem.
What is a Network Operating System?
The basic definition of an operating system is that the operating system is the interface
between the computer hardware and the user. In daily life, we use the operating system on
our devices which provides a good GUI, and many more features. Similarly, a network
operating system(NOS) is software that connects multiple devices and computers on the
network and allows them to share resources on the network. Let’s see what are the
functions of the network operating system.
Functions of the NOS (Network Operating System)
The following are the main functions of NOS:
• Creating and managing user accounts on the network.
• Controlling access to resources on the network.
• Provide communication services between the devices on the network.
• Monitor and troubleshoot the network.
• Configuring and Managing the resources on the network.
Now let’s see the type of Network Operating systems.
Types of Network Operating Systems
There are mainly two types of networks, one is peer-to-peer and another is client/server.
Now let’s see each type one by one.
• Peer to Peer: Peer-to-peer network operating systems allow the sharing of resources and
files with small-sized networks and having fewer resources. In general, peer-to-peer
network operating systems are used on LAN.
• Client/server: Client-server network operating systems provide users access to resources
through the central server. This NOS is too expensive to implement and maintain. This
operating system is good for the big networks which provide many services.
Features of Network Operating Systems
Let’s see what are the functions of the network operating system.
• Printers and application sharing on the network.
• File systems and database sharing.
• Provide good security by using functionality like user authentication and access control.
• Create backups of data.
• Inter-networking.
Now let’s see what are the advantages of NOS.
Advantages of Network Operating Systems

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
• Highly stable due to central server.
• Provide good security.
• Upgradation of new technology and hardware can be easily implemented in the network.
• Provide remote access to servers from different locations.
Disadvantages of Network Operating Systems
• Depend on the central location to perform the operations.
• High cost to buying server.
• Regular updating and maintenance are required.
Now let’s see what are the examples of network operating systems.
Examples of Network Operating Systems
Following are the examples of network operating systems.
• Microsoft Windows Server
• UNIX/Linux
• Artisoft’s LANtastic
• Banyan’s VINES
Real Time Operating System (RTOS)
Real-time operating systems (RTOS) are used in environments where a large number of
events, mostly external to the computer system, must be accepted and processed in a short
time or within certain deadlines. such applications are industrial control, telephone
switching equipment, flight control, and real-time simulations.
With an RTOS, the processing time is measured in tenths of seconds. This system is time-
bound and has a fixed deadline. The processing in this type of system must occur within
the specified constraints. Otherwise, This will lead to system failure.
Examples of real-time operating systems are airline traffic control systems, Command
Control Systems, airline reservation systems, Heart pacemakers, Network Multimedia
Systems, robots, etc.
What is a 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 idea of real-time computing has been around for many years. The first RTOS was
created by Cambridge University in the 1960s. This early system allowed multiple
processes to run at the same time, each within strict time limits.
Over the years, RTOS has improved with new technology and the need for reliable real-
time performance. These systems are now more powerful, efficient, and full of features,
and they are used in many industries, including aerospace, defense, medical science,
multimedia, and more.

Virtual Machines in Operating System


A Virtual Machine is an Operating System or application environment that runs on
software that replicates special hardware. The end-user experience when utilizing a virtual
machine is identical to that of special hardware.
What is Virtual Machine?
Virtual Machine abstracts the hardware of our personal computer such as CPU, disk
drives, memory, NIC (Network Interface Card), etc, into many different execution

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
environments as per our requirements.. For example, VirtualBox. When we run different
processes on an operating system, it creates an illusion that each process is running on a
different processor having its own virtual memory, with the help of CPU scheduling and
virtual-memory techniques. There are additional features of a process that cannot be
provided by the hardware alone like system calls and a file system. The virtual machine
approach does not provide these additional functionalities but it only provides an interface
that is the same as basic hardware. Each process is provided with a virtual copy of the
underlying computer system. We can create a virtual machine for several reasons, all of
which are fundamentally related to the ability to share the same basic hardware yet also
support different execution environments, i.e., different operating systems simultaneously.
The main drawback of the virtual-machine approach involves disk systems. Let us suppose
that the physical machine has only three disk drives but wants to support seven virtual
machines. It cannot allocate a disk drive to each virtual machine, because virtual-machine
software itself will need substantial disk space to provide virtual memory and spooling.
The solution is to provide virtual disks. After which they can run any of the operating
systems or software packages that are available on the underlying machine. The virtual-
machine software is concerned with multi-programming multiple virtual machines onto a
physical machine, but it does not need to consider any user-support software. This
arrangement can provide a useful way to divide the problem of designing a multi-user
interactive system, into two smaller pieces.
How Does a Virtual Machine Work?
Virtualization is the method of creating a software-based, or “virtual” version of a
computer with good amounts of CPU, memory, and storage that are “borrowed” from a
physical host computer (such as your personal computer) and/or a remote server. The
working of the virtual machine is very simple just check the published article on
the Working of a Virtual Machine.
Types of Virtual Machine
There are two types of Virtual Machine
• Process Virtual Machine
• System Virtual Machine
Advantages of Virtual Machine
• There are no protection problems because each virtual machine is completely isolated
from all other virtual machines.
• Virtual machine can provide an instruction set architecture that differs from real
computers.
• Easy maintenance, availability and convenient recovery.
• Energy and cost savings.
• Easy backup and clone.
• Virtual Machine provide Flexibility and Customization.
Disadvantages of Virtual Machine
• When multiple virtual machines are simultaneously running on a host computer, one
virtual machine can be affected by other running virtual machines, depending on the
workload.
• Virtual machines are not as efficient as a real one when accessing the hardware.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
What is Linux Operating System
The Linux Operating System is a type of operating system that is similar to Unix, and it
is built upon the Linux Kernel. The Linux Kernel is like the brain of the operating system
because it manages how the computer interacts with its hardware and resources. It makes
sure everything works smoothly and efficiently. But the Linux Kernel alone is not enough
to make a complete operating system. To create a full and functional system, the Linux
Kernel is combined with a collection of software packages and utilities, which are together
called Linux distributions. These distributions make the Linux Operating System ready
for users to run their applications and perform tasks on their computers securely and
effectively. Linux distributions come in different flavors, each tailored to suit the specific
needs and preferences of users.
Linux History--
Linus Torvalds designed the free and open-source Linux operating system kernel in 1991.
Torvalds set out to develop a free and flexible system for personal computers, drawing
ideas from the UNIX operating system and the MINIX operating system. Teamwork in
development was encouraged with the initial release of the Linux kernel, which attracted
developers and enthusiasts globally quickly. Various open-source software packages
integrated with the Linux kernel created fully operational operating systems, occasionally
referred to as Linux distributions. Over the years, Linux has become known as a key
component of modern computing, powering everything from servers and personal
computers to supercomputers and smartphones. Due to its flexibility, durability, and
strong community support, developers, businesses, and educational institutions frequently
opt for it.
What is Linux?
Linux is a free and open-source family of operating systems that is resilient and flexible.
In 1991, an individual by the name as Linus Torvalds constructed it. The system’s source
code is accessible to everyone for anyone to look at and change, making it cool that anyone
can see how the system works. People from all across the world are urged to work together
and keep developing Linux due to its openness. Since the beginning, Linux has grown into
a dependable and safe OS that is used in an array of gadgets, including PCs, cell phones,
and huge supercomputers. It is well-known for being cost-effective, which implies that
employing it doesn’t cost a lot, and efficient, which indicates it can complete a lot of jobs
quickly. A lot of people love Linux.

Why use Linux?


Because it is free, open-source, and extremely flexible, Linux is widely utilized. For servers
and developers, it is the ideal option because it offers strong security, stability, and
performance. Generally interoperable hardware, a broad software library, and a vibrant
community that offers support and regular updates are the many benefits of Linux. Due
to its adaptability, users can customize the operating system according to their own needs,
whether they become for personal or large enterprise use.
Architecture of Linux

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
1. Kernel: Kernel is the core of the Linux based operating system. It virtualizes the
common hardware resources of the computer to provide each process with its virtual
resources. This makes the process seem as if it is the sole process running on the
machine. The kernel is also responsible for preventing and mitigating conflicts
between different processes. Different types of the kernel are:
• Monolithic Kernel
• Hybrid kernels
• Exo kernels
• Micro kernels
2. System Library: Linux uses system libraries, also known as shared libraries, to
implement various functionalities of the operating system. These libraries contain pre-
written code that applications can use to perform specific tasks. By using these
libraries, developers can save time and effort, as they don’t need to write the same
code repeatedly. System libraries act as an interface between applications and the
kernel, providing a standardized and efficient way for applications to interact with
the underlying system.
3. Shell: The shell is the user interface of the Linux Operating System. It allows users to
interact with the system by entering commands, which the shell interprets and
executes. The shell serves as a bridge between the user and the kernel, forwarding the
user’s requests to the kernel for processing. It provides a convenient way for users to
perform various tasks, such as running programs, managing files, and configuring the
system.
4. Hardware Layer: The hardware layer encompasses all the physical components of the
computer, such as RAM (Random Access Memory), HDD (Hard Disk Drive), CPU
(Central Processing Unit), and input/output devices. This layer is responsible for
interacting with the Linux Operating System and providing the necessary resources
for the system and applications to function properly. The Linux kernel and system
libraries enable communication and control over these hardware components,
ensuring that they work harmoniously together.
5. System Utility: System utilities are essential tools and programs provided by the Linux

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Operating System to manage and configure various aspects of the system. These
utilities perform tasks such as installing software, configuring network settings,
monitoring system performance, managing users and permissions, and much more.
System utilities simplify system administration tasks, making it easier for users to
maintain their Linux systems efficiently.

BASH Shell Scripting: Basic Shell commands.

Basic Linux Terminal Commands

Linux
Functions
Commands

1. Is command Displays information about files in


in Linux the current directory.

2. pwd
Displays the current working
command in
directory.
Linux

3. mkdir
command in Creates a directory.
Linux

4. cd
To navigate between different
command in
folders.
Linux

5. rmdir
Removes empty directories from
command in
the directory lists.
Linux

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Basic Linux Terminal Commands

6. cp
Copy files from one directory to
command in
another.
Linux

7. mv
command in Rename and Replace the files
Linux

8. rm
command in Delete files
Linux

9. uname
Command to get basic information
command in
about the OS
Linux

10. locate
command in Find a file in the database.
Linux

11. touch
command in Create empty files
Linux

12. ln
command in Create shortcuts to other files
Linux

13. cat
command in Display file contents on terminal
Linux

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Basic Linux Terminal Commands

14. clear
command in Clear terminal
Linux

15. ps
command in Display the processes in terminal
Linux

16. man
Access manual for all Linux
command in
commands
Linux

17. grep
Search for a specific string in an
command in
output
Linux

18. echo
Display active processes on the
command in
terminal
Linux

19. wget
command in download files from the internet.
Linux

20. whoami
Create or update passwords for
command in
existing users
Linux

21. sort
command in sort the file content
Linux

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
Basic Linux Terminal Commands

22. cal
command in View Calendar in terminal
Linux

23. whereis
View the exact location of any
command in
command typed after this command
Linux

24. df
command in Check the details of the file system
Linux

25. wc Check the lines, word count, and


command in characters in a file using different
Linux options

And So on…

Introduction of System Call


In computing, a system call is a programmatic way in which a computer program requests a

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
service from the kernel of the operating system it is executed on. A system call is a way for
programs to interact with the operating system. A computer program makes a system call
when it makes a request to the operating system’s kernel. System call provides the services of
the operating system to the user programs via Application Program Interface(API). It provides
an interface between a process and an operating system to allow user-level processes to request
services of the operating system. System calls are the only entry points into the kernel
system. All programs needing resources must use system calls.
A user program can interact with the operating system using a system call. A number of services
are requested by the program, and the OS responds by launching a number of systems calls to
fulfill the request. A system call can be written in high-level languages like C or Pascal or in
assembly language. If a high-level language is used, the operating system may directly invoke
system calls, which are predefined functions.
A system call is a mechanism used by programs to request services from the operating system
(OS). In simpler terms, it is a way for a program to interact with the underlying system, such
as accessing hardware resources or performing privileged operations.A system call is initiated
by the program executing a specific instruction, which triggers a switch to kernel mode,
allowing the program to request a service from the OS. The OS then handles the request,
performs the necessary operations, and returns the result back to the program.
System calls are essential for the proper functioning of an operating system, as they
provide a standardized way for programs to access system resources. Without system calls,
each program would need to implement its own methods for accessing hardware and system
services, leading to inconsistent and error-prone behavior.
Services Provided by System Calls
• Process creation and management
• Main memory management
• File Access, Directory, and File system management
• Device handling(I/O)
• Protection
• Networking, etc.
• Process control: end, abort, create, terminate, allocate, and free memory.
• File management: create, open, close, delete, read files,s, etc.
• Device management
• Information maintenance
• Communication
Features of System Calls
• Interface: System calls provide a well-defined interface between user programs and the
operating system. Programs make requests by calling specific functions, and the
operating system responds by executing the requested service and returning a result.
• Protection: System calls are used to access privileged operations that are not available to
normal user programs. The operating system uses this privilege to protect the system from
malicious or unauthorized access.
• Kernel Mode: When a system call is made, the program is temporarily switched from
user mode to kernel mode. In kernel mode, the program has access to all system
resources, including hardware, memory, and other processes.
• Context Switching: A system call requires a context switch, which involves saving the
state of the current process and switching to the kernel mode to execute the requested
service. This can introduce overhead, which can impact system performance.
• Error Handling: System calls can return error codes to indicate problems with the
requested service. Programs must check for these errors and handle them appropriately.

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
• Synchronization: System calls can be used to synchronize access to shared resources,
such as files or network connections. The operating system provides synchronization
mechanisms, such as locks or semaphores, to ensure that multiple programs can access
these resources safely.
System Calls Advantages
• Access to hardware resources: System calls allow programs to access hardware
resources such as disk drives, printers, and network devices.
• Memory management: System calls provide a way for programs to allocate and
deallocate memory, as well as access memory-mapped hardware devices.
• Process management: System calls allow programs to create and terminate processes,
as well as manage inter-process communication.
• Security: System calls provide a way for programs to access privileged resources, such
as the ability to modify system settings or perform operations that require
administrative permissions.
• Standardization: System calls provide a standardized interface for programs to interact
with the operating system, ensuring consistency and compatibility across different
hardware platforms and operating system versions.
How does System Call Work?
Here is the detailed explanation step by step how system call work:
• User need special resources : Sometimes programs need to do some special things
which can’t be done without the permission of OS like reading from a file, writing to a
file , getting any information from the hardware or requesting a space in memory.
• Program makes a system call request : There are special predefined instruction to
make a request to the operating system. These instruction are nothing but just a “system
call”. The program uses these system calls in its code when needed.
• Operating system sees the system call : When the OS sees the system call then it
recongnises that the program need help at this time so it temporarily stop the program
execution and give all the control to special part of itself called ‘Kernel’ . Now ‘Kernel’
solve the need of program.
• Operating system performs the operations :Now the operating system perform the
operation which is requested by program . Example : reading content from a file etc.
• Operating system give control back to the program : After performing the special
operation, OS give control back to the program for further execution of program .
Examples of a System Call in Windows and Unix
System calls for Windows and Unix come in many different forms. These are listed in the
table below as follows:
Process Windows Quiz

CreateProcess() Fork()
Process Control ExitProcess() Exit()
WaitForSingleObject() Wait()

Open()
CreateFile()
Read()
File manipulation ReadFile()
Write()
WriteFile()
Close()

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM
SetConsoleMode() Ioctl()
Device Management ReadConsole() Read()
WriteConsole() Write()

GetCurrentProcessID() Getpid()
Information Maintenance SetTimer() Alarm()
Sleep() Sleep()

CreatePipe() Pipe()
Communication CreateFileMapping() Shmget()
MapViewOfFile() Mmap()

Process Windows Quiz

SetFileSecurity() Chmod()
Protection InitializeSecurityDescriptor() Umask()
SetSecurityDescriptorgroup() Chown()

Course Name--Operating Systems


Unit 1: Introduction to Operating Systems Semester III
Course Code
NPM

You might also like