0% found this document useful (0 votes)
233 views34 pages

Operating System Module 1 For 1st Year MCA

The document discusses the overview and introduction to operating systems. It defines what an operating system is and describes its main functions such as managing hardware resources, running programs, handling input/output, and more. It also covers different types of computer system architectures including single-processor and multiprocessor systems.

Uploaded by

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

Operating System Module 1 For 1st Year MCA

The document discusses the overview and introduction to operating systems. It defines what an operating system is and describes its main functions such as managing hardware resources, running programs, handling input/output, and more. It also covers different types of computer system architectures including single-processor and multiprocessor systems.

Uploaded by

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

Operating System_Module-1 23MCA12

Module 1
OVERVIEW: Introduction, System Structures

Introduction to Operating System.

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 in a convenient and efficient
manner.

An operating system is a software that manages the 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.

Operating System — Definition:


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 1s 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 1s 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, IO programs, and a file
system.

Functions of Operating system —


Important functions of an operating System:
1. Security – The operating system uses password protection to protect user data
and similar other techniques. it also prevents unauthorized access to programs
and user data.

Ushasree R,DSATM/1st Semester,Autonomous-2023 1


Operating System_Module-1 23MCA12

2. Control over system performance – Monitors overall system health to


help improve performance. records the response time between service requests
and system response to having a complete view of the system health. This can
help improve performance by providing important information needed to
troubleshoot problems.

3. Job accounting – Operating system Keeps track of time and resources used
by various tasks and users, this information can be used to track resource usage
for a particular user or group of users.
4. Error detecting – The operating system constantly monitors the system to
detect errors and avoid the malfunctioning of a computer system.

5. Coordination between other software and users – Operating systems


also coordinate and assign interpreters, compilers, assemblers, and other
software to the various users of the computer systems.
6. Memory Management – The operating system manages the Primary
Memory or Main Memory. Main memory is made up of a large array of bytes or
words where each byte or word is assigned a certain address. Main memory is
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.
7. Processor Management – In a multi-programming environment, the OS
decides the order in which processes have access to the processor, and how
much processing time each process has. This function of OS is called process
scheduling.
8. Device Management – An OS manages device communication via their
respective drivers. It performs the following activities for device management.
Keeps track of all devices connected to the system.
9. File Management – A file system is organized into directories for efficient or
easy navigation and usage. These directories may contain other directories and
other files.

The Operating System provides certain services to the users which can be listed
in the following manner:
1. Program Execution: The Operating System is responsible for 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.
2. 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 in the most appropriate manner regarding
all kinds of Inputs and Outputs.
3. For example, there is a difference in the nature of all types of peripheral devices
such as mice or keyboards, the Operating System is responsible for handling
data between them.
4. Manipulation of File System: The Operating System is responsible for
making decisions regarding the storage of all types of data or files, i.e, floppy
disk/hard disk/pen drive, etc. The Operating System decides how the data
should be manipulated and stored.
5. Error Detection and Handling: The Operating System is responsible for the
detection of 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

Ushasree R,DSATM/1st Semester,Autonomous-2023 2


Operating System_Module-1 23MCA12

breach to the Computer System from any external source and probably handling
them.
6. 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.
7. 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.
8. 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.

Computer System architecture


Categorized roughly according to the number of general-purpose processors used –
Single-Processor Systems –
Most systems use a single processor. The variety of single-processor systems range
from PDAs through mainframes. On a single-processor system, there is one main
CPU capable of executing instructions from user processes. It contains special-
purpose processors, in the form of device-specific processors, for devices such as
disk, keyboard, and graphics controllers.

All special-purpose processors run limited instructions and do not run user
processes. These are managed by the operating system, the operating system sends
them information about their next task and monitors their status.
For example, a disk-controller processor, implements its own disk queue and
scheduling algorithm, thus reducing the task of main CPU. Special processors in the
keyboard, converts the keystrokes into codes to be sent to the CPU.
The use of special-purpose microprocessors is common and does not turn a single-
processor system into a multiprocessor. If there is only one general-purpose CPU,
then the system is a single-processor system.

Multiprocessor Systems (parallel systems or tightly coupled systems) –


Systems that have two or more processors in close communication, sharing the
computer bus, the clock, memory, and peripheral devices are the multiprocessor
systems.
Multiprocessor systems have three main advantages:
1. Increased throughput - In multiprocessor system, as there are multiple
processors execution of different programs take place simultaneously. Even if the
number of processors is increased the performance cannot be simultaneously
increased. This is due to the overhead incurred in keeping all the parts working
correctly and also due to the competation for the shared resources. The speed-up
ratio with N processors is not N, rather, it is less than N. Thus the speed of the
system is not has expected.

2. Economy of scale - Multiprocessor systems can cost less than equivalent


number of many single-processor systems. As the multiprocessor systems share
peripherals, mass storage, and power supplies, the cost of implementing this system

Ushasree R,DSATM/1st Semester,Autonomous-2023 3


Operating System_Module-1 23MCA12

is economical. If several processes are working on the same data, the data can also be
shared among them.

3. Increased reliability- In multiprocessor systems functions are shared among


several processors. If one processor fails, the system is not halted, it only slows down.
The job of the failed processor is taken up, by other processors.

Two techniques to maintain ‘Increased Reliability’ - graceful degradation


& fault tolerant

Graceful degradation – As there are multiple processors when one processor fails
other process will take up its work and the system goes down slowly.

Fault tolerant – When one processor fails, its operations are stopped, the system
failure is then detected, diagnosed, and corrected.
The HP Nonstop system uses both hardware and software duplication to ensure
continued operation despite faults. The system consists of multiple pairs of CPUs.
Both processors in the pair execute same instruction and compare the results. If the
results differ, then one CPU of the pair is at fault, and both are halted.

The process that was being executed is then moved to another pair of CPUs, and the
instruction that failed is restarted. This solution is expensive, since it involves special
hardware and considerable hardware duplication.
There are two types of multiprocessor systems –
• • Asymmetric multiprocessing
• • Symmetric multiprocessing

1) Asymmetric multiprocessing – (Master/Slave architecture) Here each


processor is assigned a specific task, by the master processor. A master processor
controls the other processors in the system. It schedules and allocates work to the
slave processors.
2) Symmetric multiprocessing (SMP) – All the processors are considered as
peers. There is no master-slave relationship. All the processors have its own registers
and CPU, only memory is shared.

The benefit of this model is that many processes can run simultaneously. N processes
can run if there are N CPUs—without causing a significant deterioration of
performance. Operating systems like Windows, Windows XP, Mac OS X, and Linux—
now provide support for S MP.

Ushasree R,DSATM/1st Semester,Autonomous-2023 4


Operating System_Module-1 23MCA12

A recent trend in CPU design is to include multiple compute cores on a single chip.
The communication between processors within a chip is faster than communication
between two single processors.

Clustered Systems
Clustered systems are two or more individual systems connected together via
network and sharing software resources. Clustering provides high-availability of
resources and services. The service will continue even if one or more systems in the
cluster fail. High availability is generally obtained by storing a copy of files (s/w
resources) in the system.

There are two types of Clustered systems –


asymmetric and symmetric

In asymmetric clustering – one system is in hot-stand by mode while the


others are running the applications. The hot-standby host machine does nothing but
monitor the active server. If that server fails, the hot-standby host becomes the active
server.

In symmetric clustering – two or more systems are running applications, and are
monitoring each other. This mode is more efficient, as it uses all of the available
hardware. If any system fails, its job is taken up by the monitoring system.

Other forms of clusters include parallel clusters and clustering over a wide-area
network (WAN). Parallel clusters allow multiple hosts to access the same data on the
shared storage. Cluster technology is changing rapidly with the help of SAN
(storage-area networks). Using SAN resources can be shared with dozens of
systems in a cluster, that are separated by miles.

Conceptual View of Operating System Structure

Ushasree R,DSATM/1st Semester,Autonomous-2023 5


Operating System_Module-1 23MCA12

Conceptual or Abstract 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.

OS is designed to serve two basic purposes:


1. It controls the allocation and use of the computing System’s resources among
the various user and tasks.
2. It provides an interface between the computer hardware and the programmer
that simplifies and makes it feasible for coding and debugging of application
programs.

The Operating system must support the following tasks. The tasks are:
1. Provides the facilities to create and modify of 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.

I/O System Management – The module that keeps track of the status of devices
is called the I/O traffic controller. Each I/O device has a device handler that resides
in a separate process associated with that device.
The I/O subsystem consists of

 A memory Management component that includes buffering caching and


spooling.

Ushasree R,DSATM/1st Semester,Autonomous-2023 6


Operating System_Module-1 23MCA12

 A general device driver interface. Drivers for specific hardware devices.


Assembler – The input to an assembler is an assembly language program. The
output is an object program plus information that enables the loader to prepare the
object program for execution. At one time, the computer programmer had at his
disposal a basic machine that interpreted, through hardware, certain fundamental
instructions. He would program this computer by writing a series of ones and Zeros
(Machine language), and place them into the memory of the machine.

Compiler and Interpreter – The High-level languages- examples are


FORTRAN, COBOL, ALGOL, and PL/I are processed by compilers and interpreters.
A compiler is a program that accepts a source program in a “high-level language
“and produces a corresponding object program. An interpreter is a program that
appears to execute a source program as if it was machine language. The same name
(FORTRAN, COBOL, etc.) is often used to designate both a compiler and its
associated language.

Loader – A Loader is a routine that loads an object program and prepares it for
execution. There are various loading schemes: absolute, relocating, and direct-
linking. In general, the loader must load, relocate and link the object program. The
loader is a program that places programs into memory and prepares them for
execution. In a simple loading scheme, the assembler outputs the machine language
translation of a program on a secondary device and a loader places it in the core.
The loader places into memory the machine language version of the user’s program
and transfers control to it. Since the loader program is much smaller than the
assembler, those make more core available to the user’s program.

Operating-System Structure
One of the most important aspects of operating systems is the ability to
multiprogram. A single user cannot keep either the CPU or the I/O devices busy at all
times. Multiprogramming increases CPU utilization by organizing jobs, so that
the CPU always has one to execute.

The operating system keeps several jobs in memory


simultaneously as shown in figure. This set of jobs is a subset of
the jobs kept in the job pool. Since the number of jobs that can
be kept simultaneously in memory is usually smaller than the
number of jobs that can be kept in the job pool(in secondary
memory). The operating system picks and begins to execute one
of the jobs in memory. Eventually, the job may have to wait for
some task, such as an I/O operation, to complete. In a non-
multiprogrammed system, the CPU would sit idle. In a
multiprogrammed system, the operating system simply switches
to, and executes, another job. When that job needs to wait, the CPU is switched to
another job, and so on.

Eventually, the first job finishes waiting and gets the CPU back. Thus the CPU is
never idle.

Ushasree R,DSATM/1st Semester,Autonomous-2023 7


Operating System_Module-1 23MCA12

Multiprogrammed systems provide an environment in which the various system


resources (for example, CPU, memory, and peripheral devices) are utilized
effectively, but they do not provide for user interaction with the computer system.

In Time sharing (or multitasking) systems, a single CPU executes multiple jobs
by switching among them, but the switches occur so frequently that the users can
interact with each program while it is running. The user feels that all the programs
are being executed at the same time. Time sharing requires an interactive (or
hands-on) computer system, which provides direct communication between the
user and the system.
The user gives instructions to the operating system or to a program directly, using a
input device such as a keyboard or a mouse, and waits for immediate results on an
output device. Accordingly, the response time should be short—typically less than
one second.
A time-shared operating system allows many users to share the computer
simultaneously. As the system switches rapidly from one user to the next, each user
is given the impression that the entire computer system is dedicated to his use only,
even though it is being shared among many users.

A multiprocessor system is a computer system having two or more CPUs within a


single computer system, each sharing main memory and peripherals. Multiple
programs are executed by multiple processors parallel.

Distributed Systems
Individual systems that are connected and share the resource available in network is
called Distributed system. Access to a shared resource increases computation speed,
functionality, data availability, and reliability.

A network is a communication path between two or more systems. Distributed


systems depend on networking for their functionality. Networks vary by the
protocols used, the distances between nodes, and the transport media. TCP/IP is the
most common network protocol. Most operating systems support TCP/IP.

Ushasree R,DSATM/1st Semester,Autonomous-2023 8


Operating System_Module-1 23MCA12

Networks are characterized based on the distances between their nodes. A local-
area network (LAN) connects computers within a room, a floor, or a building. A
wide-area network (WAN) usually links buildings, cities, or countries. A global
company may have a WAN to connect its offices worldwide. A metropolitan-area
network (MAN) links buildings within a city. A small-area network connects
systems within a several feet using wireless technology. Eg. BlueTooth and 802.11.

The media to carry networks also vary - copper wires, fiber strands, and wireless
transmissions between satellites, microwave dishes, and radios.
A network operating system is an operating system that provides features such
as file sharing across the network and that allows different processes on different
computers to exchange messages. A computer running a network operating system
acts autonomously from all other computers on the network, although it is aware of
the network and is able to communicate with other networked computers.

History of Operating system – The operating system has been evolving through
the years. The following table shows the history of OS.

Generation Year Electronic device used Types of OS Devices


First 1945-55 Vacuum Tubes Plug Boards
Second 1955-65 Transistors Batch Systems
Third 1965-80 Integrated Circuits(IC) Multiprogramming
Fourth Since 1980 Large Scale Integration PC

Types of Operating Systems –


 Batch Operating System- Sequence of jobs in a program on a computer
without manual interventions.
 Time-sharing operating System- allows many users to share computer
resources. (Max utilization of the resources).
 Distributed operating System- Manages a group of different computers and
makes appear to be a single computer.
 Network operating system- computers running in different operating
systems can participate in a common network (It is used for security purposes).
 Real-time operating system – used where any or all the jobs have strict time
constraints.
Examples of Operating Systems are –
 Windows (GUI-based, PC)
 GNU/Linux (Personal, Workstations, ISP, File and print server, Three-tier
client/Server)
 macOS (Macintosh), used for Apple’s personal computers and workstations
(MacBook, iMac).
 Android (Google’s Operating System for smartphones/tablets/smartwatches)
iOS (Apple’s OS for iPhone, iPad, and iPod Touch)

Ushasree R,DSATM/1st Semester,Autonomous-2023 9


Operating System_Module-1 23MCA12

Operating-System Operations
Modern operating systems are interrupt driven. If there are no processes to
execute, no I/O devices to service, and no users to whom to respond, an operating
system will sit quietly, waiting for something to happen.
Events are signaled by the occurrence of an interrupt or a trap. A trap (or an
exception) is a software-generated interrupt. For each type of interrupt, separate
segments of code in the operating system determine what action should be taken.
An interrupt service routine is provided that is responsible for dealing with the
interrupt.

a) Dual-Mode Operation
Since the operating system and the user programs share the hardware and software
resources of the computer system, it has to be made sure that an error in a user
program cannot cause problems to other programs and the Operating System
running in the system.
The approach taken is to use a hardware support that allows us to differentiate
among various modes of execution.
The system can be assumed to work in two separate modes of operation:
• user mode and
• kernel mode (supervisor mode, system mode, or privileged mode).

A hardware bit of the computer, called the mode bit, is used to indicate the current
mode: kernel (0) or user (1). With the mode bit, we are able to distinguish between a
task that is executed by the operating system and one that is executed by the user.

When the computer system is executing a user application, the system is in


user mode. When a user application requests a service from the operating
system (via a system call), the transition from user to kernel mode takes place.

Ushasree R,DSATM/1st Semester,Autonomous-2023 10


Operating System_Module-1 23MCA12

At system boot time, the hardware starts in kernel mode. The operating
system is then loaded and starts user applications in user mode. Whenever a
trap or interrupt occurs, the hardware switches from user mode to kernel
mode (that is, changes the mode bit from 1 to 0). Thus, whenever the
operating system gains control of the computer, it is in kernel mode.
The dual mode of operation provides us with the means for protecting the operating
system from errant users—and errant users from one another.

The hardware allows privileged instructions to be executed only in kernel mode. If an


attempt is made to execute a privileged instruction in user mode, the hardware does
not execute the instruction but rather treats it as illegal and traps it to the operating
system. The instruction to switch to user mode is an example of a privileged
instruction.
Initial control is within the operating system, where instructions are executed in
kernel mode. When control is given to a user application, the mode is set to user
mode. Eventually, control is switched back to the operating system via an interrupt, a
trap, or a system call.

b) Timer

Operating system uses timer to control the CPU. A user program cannot hold CPU
for a long time, this is prevented with the help of timer.
A timer can be set to interrupt the computer after a specified period. The period may
be fixed (for example, 1/60 second) or variable (for example, from 1 millisecond to
1 second).

Fixed timer – After a fixed time, the process under execution is interrupted.
Variable timer – Interrupt occurs after varying interval. This is
implemented using a fixed-rate clock and a counter. The operating system sets
the counter. Every time the clock ticks, the counter is decremented. When the
counter reaches 0, an interrupt occurs.

Before changing to the user mode, the operating system ensures that the timer
is set to interrupt. If the timer interrupts, control transfers automatically to
the operating system, which may treat the interrupt as a fatal error or may
give the program more time.

Distributed Operating System


Distributed Operating System is a type of model where applications are running on
multiple computers linked by communications. It is an extension of the network
operating system which supports higher levels of communication and integration of
the machines on the network.
Distributed OS runs on multiple CPUs but for an end-user, it is just an ordinary
centralized operating system. It can share all resources like CPU, disk, network
interface, nodes, computers, etc. from one site to another site, and it increases the
data available on the entire system.

Ushasree R,DSATM/1st Semester,Autonomous-2023 11


Operating System_Module-1 23MCA12

All processors are connected by valid communication media such as high-speed


buses and telephone lines, and in which every processor contains its own local
memory along with other local processors.
According to this nature, a distributed operating system is known as a loosely
coupled system. This operating system involves multiple computers, nodes, and
sites, and these components are linked to each other with LAN/WAN lines.
Distributed OS is capable of sharing their computational capacity and I/O files while
allowing virtual machine abstraction to users.
Special Purpose Computer Systems

There are various classes of computer systems based on their computational speed,
usage, and hardware. The following are some special-purpose systems according to
specific applications. They use:
1. Real-time embedded systems Multimedia systems
2. Multimedia systems
3. Handheld and portable systems

Real-time embedded systems Multimedia systems: Embedded systems are


small computers having a limited set of hardware like a small processor capable of
processing a limited set of instructions (often called as an Application Specific
Integrated Circuit (ASIC) a small memory (RAM or EPROM) and I/O devices.
These systems usually do specific tasks.
Examples are microwave ovens, robots in a manufacturing unit, latest automotive
engines, etc. A variety of embedded systems exists of which some are computers
with standard operating systems, some have dedicated programs embedded in their
limited memories and often some don’t even have any software, hardware (ASIC) to
do processing.
Nearly all embedded systems use real-time operating system because they are used
as control devices and have rigid time requirements. Sensors are used to input data
such as temperature, air pressure, etc, from the environment to embedded system
where that data is analyzed and several other controls are adjusted by embedded
system itself to control the situation of system.
A few examples are home appliance controllers, weapon controllers, boiler
temperature controllers, fuel injection systems in automobile engines, etc. A real-
time system needs that processing to be done in fixed time constraints.
1. Multimedia systems: Multimedia refers to data of multiple types that
includes audio and video including conventional data like text files, word-
processing documents, spreadsheets, etc. It requires that audio and video data
must be processed based upon certain time restrictions. This is called
streaming. It is usually 30 frames per second for a video file.
Applications such as video conferencing, movies and clips downloaded over the
internet, mp3, DVD, VCD playing, and recording are examples of various
multimedia applications. A multimedia application is usually a combination of

Ushasree R,DSATM/1st Semester,Autonomous-2023 12


Operating System_Module-1 23MCA12

both audio and video. Multimedia is not limited to desktop operating systems or
computers but it is also becoming popular in handheld.

2. Handheld and portable systems: Hand-held systems refers to small


portable devices that can be carried along and are capable of performing normal
operations. They are usually battery-powered. Examples include Personal
Digital Assistants (PDAs), mobile phones, palm-top computers, pocket PCs etc.
As they are handheld devices, their weights and sizes have certain limitations as
a result they are equipped with small memories, slow processors and small
display screens, etc.
The physical memory capacity is very less (512 KB to 128 MB) hence the
operating systems of these devices must manage the memory efficiently. As the
processors are slower due to battery problems, the operating system should not
burden.

Protection and Security in Operating System


Threats to Protection and Security
A threat is a program that is malicious in nature and leads to harmful effects for the
system. Some of the common threats that occur in a system are −
Virus
Viruses are generally small snippets of code embedded in a system. They are very
dangerous and can corrupt files, destroy data, crash systems etc. They can also
spread further by replicating themselves as required.
Trojan Horse
A Trojan horse can secretly access the login details of a system. Then a malicious
user can use these to enter the system as a harmless being and wreak havoc.
Trap Door
A trap door is a security breach that may be present in a system without the
knowledge of the users. It can be exploited to harm the data or files in a system by
malicious people.
Worm
A worm can destroy a system by using its resources to extreme levels. It can generate
multiple copies which claim all the resources and don't allow any other processes to
access them. A worm can shut down a whole network in this way.
Denial of Service
These type of attacks do not allow the legitimate users to access a system. It
overwhelms the system with requests so it is overwhelmed and cannot work properly
for other user.
Protection and Security Methods
The different methods that may provide protect and security for different computer
systems are −
Authentication
This deals with identifying each user in the system and making sure they are who
they claim to be. The operating system makes sure that all the users are

Ushasree R,DSATM/1st Semester,Autonomous-2023 13


Operating System_Module-1 23MCA12

authenticated before they access the system. The different ways to make sure that
the users are authentic are:

 Username/ Password
Each user has a distinct username and password combination and they need to
enter it correctly before they can access the system.
 User Key/ User Card
The users need to punch a card into the card slot or use they individual key on
a keypad to access the system.
 User Attribute Identification
Different user attribute identifications that can be used are fingerprint, eye
retina etc. These are unique for each user and are compared with the existing
samples in the database. The user can only access the system if there is a
match.
One Time Password
These passwords provide a lot of security for authentication purposes. A onetime
password can be generated exclusively for a login every time a user wants to enter
the system. It cannot be used more than once. The various ways a onetime password
can be implemented are −

 Random Numbers
The system can ask for numbers that correspond to alphabets that are pre-
arranged. This combination can be changed each time a login is required.
 Secret Key
A hardware device can create a secret key related to the user id for login. This
key can change each time.

Computing Environments
A computer system uses many devices, arranged in different ways to solve many
problems This constitutes a computing environment where many computers are
used to process and exchange information to handle multiple issues.
Types of Computing Environments: There are the various types of computing
environments. They are:

Ushasree R,DSATM/1st Semester,Autonomous-2023 14


Operating System_Module-1 23MCA12

1. Personal Computing Environment: In personal computing environment


there is a stand-alone machine. Complete program resides on computer and
executed there. Different stand-alone machines that constitute a personal
computing environment are laptops, mobiles, printers, computer systems,
scanners etc. That we use at our homes and offices.

2. Time-Sharing Computing Environment: In Time Sharing Computing


Environment multiple users share system simultaneously. Different users
(different processes) are allotted different time slice and processor switches
rapidly among users according to it. For example, student listening to music
while coding something in an IDE. Windows 95 and later versions, Unix, IOS,
Linux operating systems are the examples of this time sharing computing
environment.

3. Client Server Computing Environment: In client server computing


environment two machines are involved i.e., client machine and server machine,
sometime same machine also serve as client and server. In this computing
environment client requests resource/service and server provides that
respective resource/service. A server can provide service to multiple clients at a
time and here mainly communication happens through computer network.

4. Distributed Computing Environment: In a distributed computing


environment multiple nodes are connected together using network but
physically they are separated. A single task is performed by different functional
units of different nodes of distributed unit. Here different programs of an
application run simultaneously on different nodes, and communication happens
in between different nodes of this system over network to solve task.

5. Grid Computing Environment: In grid computing environment, multiple


computers from different locations works on single problem. In this system set
of computer nodes running in cluster jointly perform a given task by applying

Ushasree R,DSATM/1st Semester,Autonomous-2023 15


Operating System_Module-1 23MCA12

resources of multiple computers/nodes. It is network of computing environment


where several scattered resources provide running environment for single task.

6. Cloud Computing Environment: In cloud computing environment on


demand availability of computer system resources like processing and storage
are availed. Here computing is not done in individual technology or computer
rather it is computed in cloud of computers where all required resources are
provided by cloud vendor. This environment primarily comprised of three
services i.e software-as-a-service (SaaS), infrastructure-as-a-service (IaaS), and
platform-as-a-service (PaaS).

7. Cluster Computing Environment: In cluster computing environment


cluster performs task where cluster is a set of loosely or tightly connected
computers that work together. It is viewed as single system and performs task
parallelly that’s why also it is similar to parallel computing environment. Cluster
aware applications are especially used in cluster computing environment.

CHAPTER 2
Operating System Structure.
Operating System Services
An Operating System provides services to both the users and to the programs.

 It provides programs an environment to execute.


 It provides users the services to execute the programs in a convenient manner.
Following are a few common services provided by an operating system −

 Program execution
 I/O operations
 File System manipulation
 Communication
 Error Detection
 Resource Allocation
 Protection
Program execution
Operating systems handle many kinds of activities from user programs to system
programs like printer spooler, name servers, file server, etc. Each of these activities is
encapsulated as a process.
A process includes the complete execution context (code to execute, data to
manipulate, registers, OS resources in use). Following are the major activities of an
operating system with respect to program management −

Ushasree R,DSATM/1st Semester,Autonomous-2023 16


Operating System_Module-1 23MCA12

 Loads a program into memory.


 Executes the program.
 Handles program's execution.
 Provides a mechanism for process synchronization.
 Provides a mechanism for process communication.
 Provides a mechanism for deadlock handling.
I/O Operation
An I/O subsystem comprises of I/O devices and their corresponding driver software.
Drivers hide the peculiarities of specific hardware devices from the users.
An Operating System manages the communication between user and device drivers.

 I/O operation means read or write operation with any file or any specific I/O
device.
 Operating system provides the access to the required I/O device when
required.
File system manipulation
A file represents a collection of related information. Computers can store files on the
disk (secondary storage), for long-term storage purpose. Examples of storage media
include magnetic tape, magnetic disk and optical disk drives like CD, DVD. Each of
these media has its own properties like speed, capacity, data transfer rate and data
access methods.
A file system is normally organized into directories for easy navigation and usage.
These directories may contain files and other directions. Following are the major
activities of an operating system with respect to file management −

 Program needs to read a file or write a file.


 The operating system gives the permission to the program for operation on
file.
 Permission varies from read-only, read-write, denied and so on.
 Operating System provides an interface to the user to create/delete files.
 Operating System provides an interface to the user to create/delete directories.
Operating System provides an interface to create the backup of file system.

Communication
In case of distributed systems which are a collection of processors that do not share
memory, peripheral devices, or a clock, the operating system manages
communications between all the processes. Multiple processes communicate with
one another through communication lines in the network.
The OS handles routing and connection strategies, and the problems of contention
and security. Following are the major activities of an operating system with respect to
communication −

 Two processes often require data to be transferred between them

Ushasree R,DSATM/1st Semester,Autonomous-2023 17


Operating System_Module-1 23MCA12

 Both the processes can be on one computer or on different computers, but are
connected through a computer network.
 Communication may be implemented by two methods, either by Shared
Memory or by Message Passing.
Error handling
Errors can occur anytime and anywhere. An error may occur in CPU, in I/O devices
or in the memory hardware. Following are the major activities of an operating system
with respect to error handling −

The OS constantly checks for possible errors.


 The OS takes an appropriate action to ensure correct and consistent
computing.
Resource Management
In case of multi-user or multi-tasking environment, resources such as main memory,
CPU cycles and files storage are to be allocated to each user or job. Following are the
major activities of an operating system with respect to resource management −

 The OS manages all kinds of resources using schedulers.


 CPU scheduling algorithms are used for better utilization of CPU.
Protection
Considering a computer system having multiple users and concurrent execution of
multiple processes, the various processes must be protected from each other's
activities.
Protection refers to a mechanism or a way to control the access of programs,
processes, or users to the resources defined by a computer system. Following are the
major activities of an operating system with respect to protection −

 The OS ensures that all access to system resources is controlled.


 The OS ensures that external I/O devices are protected from invalid access
attempts.
 The OS provides authentication features for each user by means of passwords.

Ushasree R,DSATM/1st Semester,Autonomous-2023 18


Operating System_Module-1 23MCA12

User-Operating System Interface


An operating system is software that provides an interface between the user and the
hardware. The computer cannot perform any task without an operating system. The
operating system controls and manages the operation of computer hardware.

Some operating systems are graphical user interfaces (GUI), and some are
command-line interfaces (CLI).

A command user interface (CUI) processes commands to a computer program in the


form of lines of text. The program which handles the interface is called a command-
line interpreter or command-line processor. Operating systems implement a
command-line interface in a shell for interactive access to operating system functions
or services.

The graphical user interface (GUI) allows users to interact with electronic devices
through graphical icons and audio indicators such as primary notation instead of
text-based user interfaces, typed command labels, or text navigation.

Ushasree R,DSATM/1st Semester,Autonomous-2023 19


Operating System_Module-1 23MCA12

Types of GUI based Operating System

1. Microsoft Windows

Microsoft Windows is one of the most common GUI based operating systems. It is
developed and marketed by Microsoft. The current version of Microsoft Windows is
Windows 10. Moreover, it has several earlier versions like Windows XP, Windows 8,
Windows 7, etc. Besides, the most common editions for home computers are
Windows Home (Win Home) and Windows Professional (Win Pro or Windows Pro).

2. Linux

Linux is a popular operating system. It is not a part of any particular firm or


organization. Rather, it was developed by a programmer Linus Torvalds in 1991. It
is an open-source operating system. Today, LINUX is run in many organizations,
private offices, on mobiles, supercomputers, over the internet, etc.

It already contains almost all the features of UNIX OS. Moreover, it also has some
additional features. It contains various user interfaces like GNOME, KDE, Mate,
Cinnamon, etc. And it has several versions of distributions as follows UBUNTU,
DEBIAN, SOLAS, LINUX MINT, etc.

Ushasree R,DSATM/1st Semester,Autonomous-2023 20


Operating System_Module-1 23MCA12

3. Android

It is one of the most common versions of the operating system today. It is used on
mobile phones and tablets. Most versions of it are the open-source operating system.

4. Apple iOS

After android, it is one of the most popular OS. It is designed to run on Apple devices
such as iPhones, iPad tablets, etc.

5. MacOS

It is the operating system used in Apple laptops and Apple desktops. Moreover, Its
most popular features are Siri and FaceTime.

System calls
In computing, a system call is the programmatic way in which a computer
program requests a 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
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.
The interface between a process and an operating system is provided by system calls.
In general, system calls are available as assembly language instructions. They are
also included in the manuals used by the assembly level programmers. System calls
are usually made when a process in user mode requires access to a resource. Then it
requests the kernel to provide the resource via a system call.
There are number of system calls used to finish this task. The first system call is to
write a message on the screen (monitor). Then to accept the input filename. Then
another system call to write message on the screen, then to accept the output
filename. When the program tries to open the input file, it may find that there is no
file of that name or that the file is protected against access.
In these cases, the program should print a message on the console(another system
call) and then terminate abnormally (another system call) and create a new one
(another system call).
Now that both the fileas are opened, we enter a loop that reads from the input
file(another system call) and writes to output file (another system call).

Ushasree R,DSATM/1st Semester,Autonomous-2023 21


Operating System_Module-1 23MCA12

Finally, after the entire file is copied, the program may close both files (another
system call), write a message to the console or window(system call), and finally
terminate normally (final system call).

Types of System Calls


There are mainly five types of system calls. These are explained in detail as follows –

Process Control
These system calls deal with processes such as process creation, process termination
etc.
File Management
These system calls are responsible for file manipulation such as creating a file,
reading a file, writing into a file etc.
Device Management
These system calls are responsible for device manipulation such as reading from
device buffers, writing into device buffers etc.

Ushasree R,DSATM/1st Semester,Autonomous-2023 22


Operating System_Module-1 23MCA12

Information Maintenance
These system calls handle information and its transfer between the operating system
and the user program.
Communication
These system calls are useful for interprocess communication. They also deal with
creating and deleting a communication connection.
Protection
Protection provides mechanisms for controlling which users / processes have access
to which system resources.
System calls allow the access mechanisms to be adjusted as needed, and for non-
privileged users to be granted elevated access permissions under carefully controlled
temporary circumstances.

Some of the examples of all the above types of system calls in Windows and Unix are
given as follows −

Process Windows Unix

Process Control CreateProcess() Fork()


ExitProcess() Exit()
WaitForSingleObject() Wait()

File Manipulation CreateFile() Open()


ReadFile() Read()
WriteFile() Write()
CloseHandle() Close()

Device Management SetConsoleMode() Ioctl()


ReadConsole() Read()
WriteConsole() Write()

Information Maintenance GetCurrentProcessID() Getpid()


SetTimer() Alarm()
Sleep() Sleep()

Communication CreatePipe() Pipe()


CreateFileMapping() Shmget()
MapViewOfFile() Mmap()

Protection SetFileSecurity() Chmod()


InitializeSecurityDescriptor() Umask()
SetSecurityDescriptorgroup() Chown()

Here, you will learn about some methods briefly:

Ushasree R,DSATM/1st Semester,Autonomous-2023 23


Operating System_Module-1 23MCA12

open()

The open() system call allows you to access a file on a file system. It allocates
resources to the file and provides a handle that the process may refer to. Many
processes can open a file at once or by a single process only. It's all based on the file
system and structure.

read()

It is used to obtain data from a file on the file system. It accepts three arguments in
general:

o A file descriptor.
o A buffer to store read data.
o The number of bytes to read from the file.

The file descriptor of the file to be read could be used to identify it and open it
using open() before reading.

wait()

In some systems, a process may have to wait for another process to complete its
execution before proceeding. When a parent process makes a child process, the
parent process execution is suspended until the child process is finished.
The wait() system call is used to suspend the parent process. Once the child process
has completed its execution, control is returned to the parent process.

write()

It is used to write data from a user buffer to a device like a file. This system call is one
way for a program to generate data. It takes three arguments in general:

o A file descriptor.
o A pointer to the buffer in which data is saved.
o The number of bytes to be written from the buffer.

fork()

Processes generate clones of themselves using the fork() system call. It is one of the
most common ways to create processes in operating systems. When a parent process
spawns a child process, execution of the parent process is interrupted until the child
process completes. Once the child process has completed its execution, control is
returned to the parent process.

Ushasree R,DSATM/1st Semester,Autonomous-2023 24


Operating System_Module-1 23MCA12

close()

It is used to end file system access. When this system call is invoked, it signifies that
the program no longer requires the file, and the buffers are flushed, the file
information is altered, and the file resources are de-allocated as a result.

exec()

When an executable file replaces an earlier executable file in an already executing


process, this system function is invoked. As a new process is not built, the old process
identification stays, but the new process replaces data, stack, data, head, etc.

exit()

The exit() is a system call that is used to end program execution. This call indicates
that the thread execution is complete, which is especially useful in multi-threaded
environments. The operating system reclaims resources spent by the process
following the use of the exit() system function.

System Programs

A collection os programs that provide a convenient environment for program


development and execution (other than OS) are called system programs or system
utilities.
System Programs may be divided into six catogories
1. File management - programs to create, delete, copy, rename, print, list, and
generally manipulate files and directories.
2. Status information - Utilities to check on the date, time, number of
users, processes running, data logging, etc. System registries are used to store and
recall configuration information for particular applications.

Ushasree R,DSATM/1st Semester,Autonomous-2023 25


Operating System_Module-1 23MCA12

3. File modification - e.g. text editors and other tools which can change file
contents.
4. Programming-language support - E.g. Compilers, linkers, debuggers,
profilers, assemblers, library archive management, interpreters for common
languages, and support for make.
5. Program loading and execution - loaders, dynamic loaders, overlay
loaders, etc., as well as interactive debuggers.
6. Communications - Programs for providing connectivity between processes and
users, including mail, web.

Operating-System Design and Implementation

1. Design Goals
Any system to be designed must have its own goals and specifications. Similarly the
OS to be built will have its own goals depending on the type of system in which it will
be used, the type of hardware used in the system etc.

Requirements define properties which the finished system must have, and
are a necessary steps in designing any large complex system. The
requirements may be of two basic groups:

 User goals (User requirements)

 System goals (system requirements)

 User requirements are features that users care about and understand like
system should be convenient to use, easy to learn, reliable, safe and fast.
 System requirements are written for the developers, i.e. People who design
the OS. Their requirements are like easy to design, implement and maintain,
flexible, reliable, error free and efficient.

2.Mechanisms and Policies


• Policies determine what is to be done. Mechanisms determine how it is to be
implemented.
• Example: in timer, counter and decrementing counter is the mechanism and
deciding how long the time has to be set is the policies.
• Policies change overtime. In the worst case, each change in policy would require a
change in the underlying mechanism.
• If properly separated and implemented, policy changes can be easily adjusted
without re-writing the code, just by adjusting parameters or possibly loading new
data / configuration files

3.Implementation
• Traditionally OS were written in assembly language.
• In recent years, Os are written in C, or C++. Critical sections of code are still written
in assembly language.

Ushasree R,DSATM/1st Semester,Autonomous-2023 26


Operating System_Module-1 23MCA12

• The first OS that was not written in assembly language was the Master Control
Program (MCP).
• The advantages of using a higher-level language for implementing operating
systems are: The code can be written faster, more compact, easy to port to other
systems and is easier to understand and debug.
• The only disadvantages of implementing an operating system in a higher-level
language are reduced speed and increased storage requirements.

Operating-System Structure
1. Simple Structure

Many operating systems do not have well-defined structures. They started as small,
simple, and limited systems and then grew beyond their original scope. Eg: MS-DOS.

In MS-DOS, the interfaces and levels of functionality are not well separated.
Application programs can access basic I/O routines to write directly to the display
and disk drives. Such freedom leaves MS-DOS in bad state and the entire system can
crash down when user programs fail.

UNIX OS consists of two separable parts: the kernel and the system programs. The
kernel is further separated into a series of interfaces and device drivers. The kernel
provides the file system, CPU scheduling, memory management, and other
operating-system functions through system
calls.

MS-DOS Layer Structure


2. Layered Approach

The OS is broken into number of layers (levels). Each layer rests on the layer below
it, and relies on the services provided by the next lower layer.

Bottom layer(layer 0) is the hardware and the topmost layer is the user interface.
A typical layer, consists of data structure and routines that can be invoked by higher-
level layer.

Ushasree R,DSATM/1st Semester,Autonomous-2023 27


Operating System_Module-1 23MCA12

The layers are selected so that each uses functions and services of only lower-level
layers. So simplifies debugging and system verification. The layers are debugged one
by one from the lowest and if any layer doesn’t work, then error is due to that layer
only, as the lower layers are already debugged. Thus the design and implementation
is simplified.

A layer need not know how its lower level layers are implemented. Thus hides the
operations from higher layers.

Ushasree R,DSATM/1st Semester,Autonomous-2023 28


Operating System_Module-1 23MCA12

3. Microkernels

The basic idea behind micro kernels is to remove all non-essential services from
the kernel, thus making the kernel as small and efficient as possible.
The removed services are implemented as system applications.
Most microkernels provide basic process and memory management, and message
passing between other services.
Benefit of microkernel - System expansion can also be easier, because it only
involves adding more system applications, not rebuilding a new kernel.
Mach was the first and most widely known microkernel, and now forms a major
component of Mac OSX.
Disadvantage of Microkernel is, it suffers from reduction in performance due to
increases system function overhead.

4. Modules
Modern OS development is object-oriented, with a relatively small core kernel and a
set of modules which can be linked in dynamically.
Modules are similar to layers in that each subsystem has clearly defined tasks and
interfaces, but any module is free to contact any other module, eliminating the
problems of going through multiple intermediary layers.
The kernel is relatively small in this architecture, similar to microkernels, but the
kernel does not have to implement message passing since modules are free to contact
each other directly. Eg: Solaris, Linux and MacOSX

Virtual Machines
The fundamental idea behind a virtual machine is to abstract the hardware of a single
computer (the CPU, memory, disk drives, network interface cards, and so forth) into
several different execution environments, thereby creating the illusion that each
separate execution environment is running its own private computer.
Creates an illusion that a process has its own processor with its own memory. Host
OS is the main OS installed in system and the other OS installed in the system are
called guest OS.
Virtual machines first appeared as the VM Operating System for IBM mainframes in
1972.

Ushasree R,DSATM/1st Semester,Autonomous-2023 29


Operating System_Module-1 23MCA12

Benifits
 Able to share the same hardware and run several different execution
environments(OS).
 Host system is protected from the virtual machines and the virtual machines
are protected from one another. A virus in guest OS, will corrupt that OS but
will not affect the other guest systems and host systems.
 Even though the virtual machines are separated from one another, software
resources can be shared among them.
Two ways of sharing s/w resource for communication are:
a) To share a file system volume (part of memory).
b) To develop a virtual communication network to communicate
between the virtual machines.
 The operating system runs on and controls the entire machine. Therefore, the
current system must be stopped and taken out of use while changes are made
and tested.
 This period is commonly called system development time. In virtual machines
such problem is eliminated. User programs are executed in one virtual
machine and system development is done in another environment.
 Multiple OS can be running on the developer’s system concurrently. This
helps in rapid porting and testing of programmer’s code in different
environments.
 System consolidation – two or more systems are made to run in a single
system.

Simulation –
Here the host system has one system architecture and the guest system is compiled
in different architecture. The compiled guest system programs can be run in an
emulator that translates each instructions of guest program into native instructions
set of host system.
Para-Virtualization –
This presents the guest with a system that is similar but not identical to the guest’s
preferred system. The guest must be modified to run on the para-virtualized
hardware.
Examples :
1. VMware
VMware is a popular commercial application that abstracts Intel 80X86 hardware
into isolated virtual machines. The virtualization tool runs in the user-layer on top of
the host OS. The virtual machines running in this tool believe they are running on
bare hardware, but the fact is that it is running inside a user-level application.
VMware runs as an application on a host operating system such as Windows or Linux
and allows this host system to concurrently run several different guest operating
systems as independent virtual machines.
2. The Java Virtual Machine
Java was designed from the beginning to be platform independent, by running Java
only on a Java Virtual Machine, JVM, of which different implementations have been
developed for numerous different underlying HW platforms.
Java source code is compiled into Java byte code in .class files. Java byte code is
binary instructions that will run on the JVM.

Ushasree R,DSATM/1st Semester,Autonomous-2023 30


Operating System_Module-1 23MCA12

The JVM implements memory management and garbage collection.


JVM consists of class loader and Java Interpreter. Class loader loads compiled .class
files from both java program and java API for the execution of java interpreter. Then
it checks the .class file for validity.

Operating-System Generation

 OSes may be designed and built for a specific HW configuration at a specific


site, but more commonly they are designed with a number of variable
parameters and components, which are then configured for a particular
operating environment.
 Systems sometimes need to be re-configured after the initial installation, to
add additional resources, capabilities, or to tune performance, logging, or
security.
 At one extreme the OS source code can be edited, re-compiled, and linked into
a new kernel.
 More commonly configuration tables determine which modules to link into
the new kernel, and what values to set for some key important parameters.
This approach may require the configuration of complicated makefiles, which
can be done either automatically or through interactive configuration
programs; Then make is used to actually generate the new kernel specified by
the new parameters.
 At the other extreme a system configuration may be entirely defined by table
data, in which case the "rebuilding" of the system merely requires editing data
tables.
 Once a system has been regenerated, it is usually required to reboot the
system to activate the new kernel. Because there are possibilities for errors,
most systems provide some mechanism for booting to older or alternate
kernels.

Storage Structure in Operating Systems


Basically we want the programs and data to reside in main memory permanently.
This arrangement is usually not possible for the following two reasons:
1. Main memory is usually too small to store all needed programs and data
permanently.
2. Main memory is a volatile storage device that loses its contents when power is
turned off or otherwise lost.

There are two types of storage devices:-


Volatile Storage Device –
It loses its contents when the power of the device is removed.

Non-Volatile Storage device –


It does not loses its contents when the power is removed. It holds all the data
when the power is removed.

Ushasree R,DSATM/1st Semester,Autonomous-2023 31


Operating System_Module-1 23MCA12

Secondary Storage is used as an extension of main memory. Secondary storage


devices can hold the data permanently.

Storage devices consists of Registers, Cache, Main-Memory, Electronic


Disk, Magnetic-Disk, Optical-Disk, Magnetic-Tapes. Each storage system provides
the basic system of storing a datum and of holding the datum until it is retrieved at a
later time. All the storage devices differ in speed, cost, size and volatility.
The most common Secondary-storage device is a Magnetic-disk, which provides
storage for both programs and data.

In this fig Hierarchy of storage is shown –

System Boot

The general approach when most computers boot up goes something like this:

• When the system powers up, an interrupt is generated which loads a memory
address into the program counter, and the system begins executing instructions

Ushasree R,DSATM/1st Semester,Autonomous-2023 32


Operating System_Module-1 23MCA12

found at that address. This address points to the "bootstrap" program located in
ROM chips ( or EPROM chips ) on the motherboard.
• The ROM bootstrap program first runs hardware checks, determining what
physical resources are present and doing power-on self tests ( POST ) of all HW for
which this is applicable. Some devices, such as controller cards may have their own
on-board diagnostics, which are called by the ROM bootstrap program.
• The user generally has the option of pressing a special key during the POST
process, which will launch the ROM BIOS configuration utility if pressed. This utility
allows the user to specify and configure certain hardware parameters as where to
look for an OS and whether or not to restrict access to the utility with a password.
Some hardware may also provide access to additional configuration setup
programs, such as for a RAID disk controller or some special graphics or networking
cards.

• Assuming the utility has not been invoked, the bootstrap program then
looks for a non-volatile storage device containing an OS. Depending on
configuration, it may look for a floppy drive, CD ROM drive, or primary or secondary
hard drives, in the order specified by the HW configuration utility.
• Assuming it goes to a hard drive, it will find the first sector on the hard drive
and load up the fdisk table, which contains information about how the physical hard
drive is divided up into logical partitions, where each partition starts and ends, and
which partition is the "active" partition used for booting the system.
• There is also a very small amount of system code in the portion of the first
disk block not occupied by the fdisk table. This bootstrap code is the first step that is
not built into the hardware, i.e. the first part which might be in any way OS-specific.
Generally this code knows just enough to access the hard drive, and to load and
execute a ( slightly ) larger boot program.
• For a single-boot system, the boot program loaded off of the hard disk will
then proceed to locate the kernel on the hard drive, load the kernel into memory, and
then transfer control over to the kernel. There may be some opportunity to specify a
particular kernel to be loaded at this stage, which may be useful if a new kernel has
just been generated and doesn't work, or if the system has multiple kernels available
with different configurations for different purposes. (Some systems may boot
different configurations automatically, depending on what hardware has been found
in earlier steps.)
• For dual-boot or multiple-boot systems, the boot program will give the user
an opportunity to specify a particular OS to load, with a default choice if the user
does not pick a particular OS within a given time frame. The boot program then finds
the boot loader for the chosen single-boot OS, and runs that program as described in
the previous bullet point.
• Once the kernel is running, it may give the user the opportunity to enter into
single-user mode, also known as maintenance mode. This mode launches very few if
any system services, and does not enable any logins other than the primary log in on
the console. This mode is used primarily for system maintenance and diagnostics.

Ushasree R,DSATM/1st Semester,Autonomous-2023 33


Operating System_Module-1 23MCA12

********All the Best********

Ushasree R,DSATM/1st Semester,Autonomous-2023 34

You might also like