OS
OS
Systems
By: Gaurav Aggarwal
Operating System
An interface between Applications and hardware
It manages computer hardware resources and
provides services for computer programs
Application programs require an operating system
to function.
Operating System
A program or a software that governs the
functioning of other programs
Control devices
» Users
o Single User: Mac, Windows
o Multi User: Linux
® Soffsmith Infofech
Types of Operating
System
« Single User, Single Task
o A user can do only one thing ot a time
o MSDOS
® Soffsmith Infofech
Types of Operating
System — Real Time OS
* Aims at executing real-time applications
® Soffsmith Infofech
Types of Operating
System — Distributed
» Adistributed operating system manages a group of
independent computers
® Soffsmith Infofech
FOSS
» Free Open Source Software
Example: Linux
® Soffsmith Infotech 5
How does a Computer
Boot?
OS - Wake up call
* When you turn on the power to a PC, the first
program that runs is a set of instructions kept in the
computer's read-only memory (ROM).
OS - Wake up call
These instructions are
called Power on Self Test
(POST)
Memory Management
MMM
chU IR LQegeeece
e
Cache Memory
A section of a computer's memory which
temporarily retains recently accessed data in order
to speed up repeated access to the same data.
Very Costly
RAM
* Random access memory
(RAM) is the best known
form of computer
memory.
* RAM is considered
"random access" because
you can access any
memory cell directly if you
know the row and column
that intersect at that cell.
RAM
» The more RAM your computer has, the faster
programs can function.
* A swap file is an area of your hard disk that is set aside for
virtual memory. Swap files can be either temporary or
permanent.
Kernel
Core or nucleus of an operating system
* Micro
o OS components are isolated and run in their own
address space
o Device drivers, programs and system services run
outside kernel memory space
o Supports modularity
o Lesserin size
Shell
Program that interacts with kernel
Command interpreter
Shell
Shell Scripting
« Shell scripting is the most useful and powerful
feature in Linux
o Minimizes typing of repetitive command
o Can schedule jobs to run in the system
o Caninitiate back up activities for system administration
o Similar to batch files in DOS, but more powerful than Batch files
Working with shell script
» Open a file with extension .sh using vi editor
« Copyleft statement:
o "“Copying and redistribution are permitted in any medium provided this
notice is preserved."
Linux
Developed in 1991 by Linus Torvalds
Used in most of the computers, ranging from
super computers to embedded system
Multi user
Multi tasking
Time sharing
Monolithic kernel
Free Software Foundation
Founded by Richard Stallman in 1983
* Protected Mode
Everything Else
Least privileged
Most privileged
PROCESSES
A program is passive; a process active.
Attributes held by a process include
*hardware state,
smemory,
*CPU,
*progress (executing)
Running Instructions being executed. This running process holds the CPU.
Ready The process has all needed resources - waiting for CPU only.
Susrendad Another process has explicitly told this process to sleep. It will be
ened when a process explicitly awakens it.
.42
PROCESSES Process State
The act of Scheduling a process means changing the active PCB pointed to by the CPU.
Also called a context switch.
A context switch is essentially the same as a process switch - it means that the memory,
as seen by one process is changed to the memory seen by another process.
See Figure on Next Page
SCHEDULING QUEUES:
®44 o
Scheduling
PROCESSES Components
_———
M
interrupt or system call
reload
state from PCB,
.45 *Proce
sses
Process Scheduling
First Come - First Serve
B
Round Robin
o Lots of time used in switching
Priority Scheduling
.
‘V | | | i || |
=
.
What are Threads Good
For?
To maintain responsiveness of an application during
a long running task.
o Runs applications, or
o Stores Data
Do
you Use the Cloud?
Dmpbox .@
nool g
NETELIX
fll!@
SkyDrlve f||ckr
U |Cloud
. M
— -photobucket é
The Cloud Requires
An Internet connection
An account - Created with a user name and a
password P
o Gt g ey it g
Agree to Terms PR e e et
™M
energics
o ee
cem
Vo
e L S r—
=t
So what is the cloud?
=
Standard Computer Tower Inside the Computer
or Central Processing Unit
(CPU)
External Storage
= Allows your content to become mobile
= Save to the storage device
= Take device to any compatible computer
®= Open and use content
Storage :
application
Document Creation
+ Google Dc £ oropbox 38 @ B QS Oupox
» SkyDrive
L Google SowrchSkybrive
Files
Recent docs
Shared
Groups
Advantages of Cloud Computing
» Lower computer costs:
o You do not need a high-powered and high-priced
computer to run cloud computing's web-based
applications.
o Since applications run in the cloud, not on the desktop
PC., your desktop PC does not need the processing
power or hard disk space demanded by traditional
desktop software.
o When you are using web-based applications, your PC
can be less expensive, with a smaller hard disk, less
memory, more efficient processor...
o In fact, your PC in this scenario does not even need a
CD or DVD drive, as no software programs have to be
loaded and no document files need to be saved.
Advantages of Cloud Computing
* Improved performance:
o With few large programs hogging your computer's
Pméamory, you will see better performance from your