We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 30
: Sunday, September 16, 2018
Data Structures & Operating
Systems
Basic Components of
Operating Systems
pee EROAWEN
~= “Associate Professor, Department of Computer Sci. and areca
Motilal Nehru National Institute of Technology Allahabad
Allahabad-211004, UP, India-Basic concepts of operating systems
Key Words
Ff 2
* Resource: In the context of a computer system, it means 2)
memory or any input / output device.
Process: It is a program in execution.
* File: It is a data storage unit that holds information.
* System programs: These could be operating system, compilers,
editors, loaders, ut s, etc.
Application programs: These are database systems, business
programs, etc.
* Process management: These are jobs related to the unhindered
execution of programs.
Memory management: An activity or a set of activities associated
with allocating and de-allocating memory space.
\/O device: This refers to a proper activation and de-activation of
input / output device management with appropriate hardware
and software.
Manoj Wariya .| Department of Computer Sci. and Engineering, MNNIT Allahabadconcepts of operating systems
Key Words
* File management: A set of jobs associated with creating, ®
retrieving, deleting, amending data storage units on storage
devices and keeping track of the same.
* Protection: It is the mechanism for controlling the access of
programs, in Operating System processes, or users to the
resources in the computer.
Command interpreter: It a system program, which is an essential
component of the operating system, that accepts, deciphers and
executes the job related to the command statement.
* Kernel: It is the core library of functions that provides the most
basic interface between the computer machine and the rest of
the operating system.
* System calls: It provides the interface between a running program
and the operating system.
Manoj Wariya | Department of Computer Sci. and aria VIN Na] esteconcepts of operating systems
Key Words
Operating system commands : These are commands through @
which the user interacts with the operating system directly.
Batch processing :These are jobs that are executed with
minimum user interaction and as and when the computer system
is available following a schedule.
Multiprogramming: Multi programming refers to the situation in
which a single CPU divides its time between more than one job.
= Multitasking :Multi tasking refers to execution of more than one
application program at any given time.
Time-sharing :In the context of a computer, time-sharing means
sharing of the computer resources among many users by
allocating them for a specified time.
Manoj Wariya | re ASSL AAA teeth MNNIT AllahabadEE etel ites) le Rel mele eo
Key Words
" Multiprocessing :Any simultaneous execution of multiple
processes on different processors. ey
——e
* Real-time: In the context of an operating system, it is an
Operating system that provides quick and time critical
response.
= Networked computing :A collection of physically
interconnected computers.
* Distributed computing :This refers to processing of
computing jobs by automatically sharing the job-processing
load among the constituent computers connected to the
same network.
Ee MLS CURR CAUSE Maia eeeBasic concepts of operating systems
Introduction
= Without software, a computer
basically a useless equipment. With
software, a computer can store, process,
and retrieve information and engage in
many other valuable activities.
= Computer software can be divided roughly
into two parts: system programs, which
manage the operation of the computer
itself, and application programs, w
perform the actual work the user wants.
= The most important system program is the
operating system (OS) that controls all the
computer resources and provides the base
upon which the application program can be
written.
VET rey RW LEN
Department of Computer Sci. and Engineering,
Barking | Aine Web
system! resenvation browser
Command
interpeetr
Complers | Eators
Osarating system
Nechine language
ie Manama |
Micro-programming > Hardvere
MNNIT AllahabadBasic concepts of operating systems
Introduction: Operating System
= An operating system is a collection of programs that acts as an
interface between the user of a computer and the computer
hardware. @
= Without software, a modern-day computer is unusable. Software
comprising operating system, programming language compilers, etc. are
essential to provide an ‘user-friendly’ interface to the user.
"A n operating system is an important part of almost every
computer system that comprises three main components:
= The hardware (memory, CPU, arithmetic-logic unit, various storage devices,
1/O, peripheral devices, etc.)
= Systems programs (operating system, compilers, editors, loaders, ut
etc.)
= Ap
ication programs (database systems, business programs, etc.)
Manoj Wariya | Department of Computer Sci. and Engineering, MNNIT AllahabadBasic concepts of operating systems
Introduction: Operating System
A software that acts as an interface between the user and hardware of the
computer system
= Asoftware that provides a working environment for the users’ applications
= A resource manager that manages the resources needed for all the
applications in the background
= A software in which all common functions required to work on the computer
system have been put together. >
4
Manoj Wariya | Department of Computer Sci. and Sala A ELE SET]Basic concepts of operating systems
Need of OS
How are the files as a logical concept mapped to the physical disk?
Today, we are able to open many windows at a time; who is managing all
these windows despite a single processor? Dy
Who ensures that the CPU is not sitting idle or busy forever? -
Sometimes we see some messages like memory error or power failure,
connection failure in network, paper jam in printer, etc. Who is detecting
these errors and displaying error messages?
Who manages the limited memory despite the large size of user programs?
Our processes can also communicate and cooperate via some synchronization
mechanisms?
= Who schedules tasks to the CPU for execution?
What happens to a task when the CPU is already busy in processing some
other task?
Despite a single processor, it seems that many jobs are being executed in
parallel. How does this happen?
Manoj Wariya
|
Department of Computer Sci. and Engineering,
MNNIT AllahabadBasic concepts of eyelet
Need of OS
= Suppose, some user are working in a LAN (local area network) with a single
printer and more than one user gives a print command. How are the request
of multiple users on a single printer managed?
= Who protects one user's area from unauthorized access by another user’s
tasks?
fe)
Coe
= Why is it that sometimes our system hangs?
Manoj Wariya |
Department of Computer Sci. and ayaa)
MNNIT AllahabadBasic concepts of operating systems
Functions of Operating
Manages the computer’s resources: The OS controls and efficiently utilizes
hardware components such as CPU, memory, and I/O devices. i)
Provides a user interface: The OS enables users to easily interact with the
computer hardware. For Example, the Windows operating system displays
icons, using which the user can interact with the system.
Process management: The OS enables a user to execute more than one job at
the same time to enhance productivity, Multiple process begin executed at
the same time calls for efficient utilization of the system’s resources by the
operating system.
Memory Management: Finding vacant spaces in the primary memory, loading
the appropriate data and programs in the located space, executing them, and
removing them from the memory is all done by the operating system.
File management: The OS allows users to create, copy, delete, and rename
files.
Security management: The OS protects stored information from malicious
les stored cannot be accessed by
users. It ensures that the data and
unauthorized users.
Manoj Wariya | Depart
ee TCS eC UC Raunt AN Ee etErle) lel te Kel ele Tela
Functions of Operating
" Device Management: The operating system manages and controls all |/O
devices such as disks, tape, terminal printer, and keyboard to ensure correct
data transmission to and from divides. It also provides an intuitive interface
so that the users can easily work with them.
Booting Services: Booting means loading an operating system in to the
computer’s main memory. After the operating system is loaded, it becomes
ready for users to run their applications. During the boot process, the
computer performs a self-diagnostic test, also known as a POST (Power On
Self Test) to ensure that all components are operational. It also loads
necessary drives and programs that help the computer and devices
communi
ith each other.
ate
Manoj Wariya |
PEAS CURCUMIN ae IN LEE]Basic concepts of operating systems
Components of an Operating
tem
=\In general there are two main
components of an operating system:
™ command interpreter
= Kernel
= Command interpreter
= Command interpreter is one of the most
important components of an operating system. It
the primary interface between the user and
the rest of the system.
= Kernel
= Kernel is a core part of the operating system and
is loaded on the main memory when it starts up.
It is the core library of functions; the operating
system ‘knows’.
In the kernel, there are the functions and
streams to communicate with the system’s
hardware resources.
Kernel
Hardware
1
Manoj Wariya | Depar'EE letse ieee mel Ceres
Interaction with Operating
" Broadly speaking, there are two ways to interact with an operating
system:
= By means of operating system calls in a program
= Directly by means of operating system commands
= System calls
= System calls provide the interface between a running program and the
operating system.
*® These calls are generally available as assembly language instructions, and
are usually listed in the manuals used by assembly language programmers.
= Some systems may allow system calls to be made directly from a high-level
language program, in which case the calls normally resemble predefined
function or subroutine calls.
= System calls can be roughly grouped into five major categories : process
control, file manipulation, device manipulation, information maintenance
and communications.
Manoj Wariya DiS EUAN OC IL ASSO RCUCR UAV Leal Ts]Erte sel ile tole Kel Rolle tt SA
Interaction with Operating
S)
. (>
= Operating system commands a
= Apart from system calls, users may interact with the operating system
directly by means of commands.
For example, if the user wants to list files or sub-directories in MSDOS, the
DIR command is invoked.
In either case, the operating system acts as an interface between users and
the hardware of a computer system.
The fundamental goal of a computer system is to solve user problems. The
computer hardware is designed towards this goal.
The command function of controlling and allocating resources are then
brought together into one piece of software, the operating system.
janoj Wariya |
Department of Computer Sci. and tanya i)
FAVED Elerle}EEN elle keke act ee
History of Operating Systems
= By tracing that evolution, the common elements of operating
systems can be identified as well as how and why they developed
a
as they are now. CE
= Operating systems and computer architecture have a great deal of
influence on each other. Operating systems were developed to
fa
ate the use of the hardware.
= First Generation (1945-55)
= Second Generation (1956-63)—Transistors and Batch System
= Third Generation (1964-80)—Integrated Chips and Multiprogramming
= Fourth Generation (1980-present)— Personal Computers
Manoj Wariya
ES lana keel cece ent Engineering, MNNIT AllahabadBasic concepts of operating systems
CLM NCTM Tae a Ol TeT tite]
System
User
( and application
—_
\
Fig. 1.4 Computer system
Manoj Wariya | Department of Computer Sci. and Uae EV TS]EER ekeeile lee Me) Ley aot
Computer System with Operating
System
Manoj Wariya EU ee ORCL R can ae NN ele eeePreemie eee Re) sorta ear
Evolution of Operating
tel Pee ual
(ee eg
Vacuum tubes based technology, plug
First 1940s—1950s boards and punched cards, magnetic No operating system
core memories
Foye ticuil-us eu ecal Leds cue ae Vee lel}
Manoj WariyaBasic concepts of opera ESC
Evolution of Le TVET naye
leraneler rela iareys| Problems and development of Operating
aS) : fe systems
Second 1950s—1960s Transistors based Set up delay problem due to loading and
technology, Mainframe — unloading of tapes in earlier computer systems.
computers, line CPU was idle.
ig “magnetic
PURE ea Beene Jobs of users prepared with same programming
Si
ee eecpagler language were batched together.
inkers, loaders,
compilers, FORTRAN, Automated job sequencing
Se sae
COBOL Resident monitor
Batch systems
Mismatch between the speed of CPU and I/O
Offline operation with magnetic tapes
~+y Tapes were sequential access devices
Department of Computer Sci. and Engineer: MNNIT Allahabad
Manoj WariyaBasic concepts of teas ey
Evolution of LO) J-Te-T tae}
Problems and development of Operating
TTL fod a2) Computer architecture
Systems
Third 1960s—-1980s IC based technology, Hard disks came into existence
Minicomputer Spooling>
Magnetic disk
Multipragramming
Multi programmed batch systems
Lack of user/programmer interaction with their
jobs in multi programmed batch systems
Timesharing multiuser systems —
CTss
MULTICS
UNICS
UNIX,
Unix written in C
Manoj Wariya | Departmen of Computer Sci. and Engineering, MNNIT AllahabadBasic concepts of cere Se
Evolution of Operating
Problems and development of Operating
Bid
CTT Tec afetg}
1980s— USI and VLSI based’ CP/M for PCs
Fourth
Present technology, ~~ MS-DOS
Microcomputer Multiuser facilities were not there in DOS
XENIX,
08/2
No user friendliness and convenience due to
command driven and complex file systems
Apple Macintosh
Windows
Multitasking
Multithreading
X-windows
Motif
Network operating systems
Distributed operating systems
eset alae) eo eee LON urate VN Lae ortel
Manoj Wariyare oKi Cases
Goals of an Operating System
= Convenience
Hardware abstraction / Virtual machine.
Convenient programming environment
= Response Time
= Easy to use interface
= Resource utilization / management
= Protection
Manoj Wariya | Department of Computer Sci. and Engineering, MNNIT Allahabadpasic concepts of operating San
BET) ae) i
ace Roles pty eens Applicable to which type of
Urey)
Batch systems = % = = Ee
Y' More than onejob can EMS (FORTRAN Background jobs in which the
be stored in main monitor user interaction is not necessary
memory system),
Batches of same type of (BM's Operating
jobs can be executed system for
quickly 7094
Multiuser systems Jobs of different users CTSS by MIT, When multiple users need to
who are connected toa TSS by IBM, share a single system
main computer are MULTICS, UNIX
executed through the
multiprogramming
Interaction of jobs with
the user is possible
Debugging is easy
| Department of Computer Sci. and Engineeri AN larles-e|
Manoj Wariyaea me cis ACs
Types of Operating Systems
Use) eer
system
Multitasking systems
Network systems
Manoj Wariya
Lard iscty Celta
Multiple tasks of 3 single
user can be opened on:
the system through
The user is able to Novell
connect to another Netware,
machine and perform Windows NT,
many operations Windows 2000,
The user is aware of the Windows XP,
location of the network — Sun Solaris
node where he/she
wants to connect
aye)
ys la ao)
UR ANN Eee et]
application
When a user wants to open and
work simultaneously on many
windows on the system
When a user wants to remote
login on a system, wants to
transfer a file, etc. on a network
systemEases dee) Lei eee
Types of Operating Systems
Type of operating
system
Distributed systems
Real-time systems
Manoj Wariya
Features/benefits
When multiple nodes of a. Amoeba, V
wide network realized as system,
a powerful machine Chorus
sharing the resources on
the network. The users
are not aware where
their processes are being
sent and executed.
Used to handle time- psos,
bound responses to the VxWorks,
ications RTLinux, etc.
| Department of Computer Sci. and Engineering, MNNIT Allahabad
Applicable to which type ros
application
When computational speed and
resource sharing is required
implemented through various
full computer systems in a
network
Applicable to systems which
require time-bound response,
e., for the real-time processin:
systems
oaType of boo alyeg Tod aie
system
ON yield m edi aS aL
Eye telay
Embedded Specialized systems with Used in consumer electronics
systems size, memory and power Toshiba Pocket__items, mobile phones, smart
restrictions PC, Palm Os, aise
ae Symbian 0s, -
iPhone OS, RIM’s
BlackBerry,
Windows Phone,
Linux, Palm
WebOS, Android
and Maemo.
Manoj Wariya | Department of Computer Sci. and Engineering, MNNIT AllahabadBasic concepts of operating eee 1
Types of Operating Systems
oe
Modern computer Operating systems may be classified into three
came according to the nature of interaction that takes place
etween the computer user and user’s program during
processing.
= The three groups are called batch process, time-shared, and real-time
operating systems.
= Batch Process Operating System
In a batch process operating system, environment users submit jobs
to a central place where these jobs are collected in batch, and
subsequently placed in an input queue in the computer where they
are run.
= Two major disadvantages and they are as follows:
= Non-interactive environment
= Offline debugging
Manoj Wariya_| Department Pret cuas ee irc Murti th A AllahabadBasic concepts of operating systems
Types of Operating Systems
* Multiprogramming Operating System
* Amultiprogramming operating system allows more than one active user
program (or part of user program) to be stored in the main memory
simultaneously.
* Compared to batch operating systems, multiprogramming operating
systems are fairly sophisticated.
* Multitasking operating systems
* Multi-user operating system
+ Multiprocessing system
* Time-sharing Operating Systems
+ Another mode for delivering computing services is provided by time-sha’
operating systems.
* In this environment a computer pro’
many users concurrently online.
les computing services to several or
Manoj Wariya -| Department of Computer Sci. and Engineering, MNNIT Allahabadend ge SYN, ey On )
ES
Sila bus —
WO) Mig Lem Sram Sy4kla bug
Cb) oy. fa
Soy _ Seb an
() as
PPT Raho Comboma nh 4
OF OC.
CA) Trea C Creaheny)
Teaver ha? of Risany Te
oe (CY from Og bros.
Briers all?
3|u/23.
Rrisha
un /2