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

Operating System Notes1

Uploaded by

EDU SUMMIT
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Operating System Notes1

Uploaded by

EDU SUMMIT
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Computer For LT grade

Operating System Syllabus

Definition, Design Goals, Evolution, Structure & functions of operating System, process management,
memory management, concurrent processes, file & secondary Storage management, Unix & shell
programming, windows programming.

Operating System

Definition

Computer System:- roughly divided into 4 components- the hardware, the operating system, the application
program & the user.

The hardware (the CPU, memory & I/O devices) provides the basic Computing
resources for the system.
The application program defines the way in which these resources are used to
solve user's computing problems.
The OS coordinates hardware use among the various application programs for
the various users & also controls the hardware.
In other words: - we can also view a computer system as consisting of
hardware, software and data.

Operating System (OS): - An Operating system acts as an interface between user & hardware.

An OS is a program that manages the computer hardware. It also provides a basis of application program & acts as
an intermediary between the computer user and the computer hardware.
The Operating System is one program or system software running at all times on the computer - usually called the
Kernel. Along with the Kennel, there are 2 other types of programs:
1. System Program (software), which are associated with the OS but are not part of the Kernel.
2. Application Program (software): - which include all programs not associated with the operation of the system.
Operating system works as an extended machine: - The Job of the operating system is to create good abstractions
& then implement and manage the abstract objects thus created.
Operating System works as a Resource manager.

Design Goals of OS

Operating System is designed to accomplish some tasks & it varies as per the requirements.
Some OS are designed to be convenient, others to be efficient & others some combination of the both.
In user view: - the goal is to maximize the work that the user is performing. In this case OS is designed for ease of
use & high performance, but resource utilization is quite less.
The operating system should be convenient, easy to use, reliable, safe and fast according to the users.
In other cases multiple users access the mainframe for shared resources & exchange information. In such cases
the OS is designed to maximize resource utilization to assure that all available CPU time, memory & I/O are used
efficiently.
In still other cases, user sit at workstations connected to networks of other workstations & servers & share.
Resources such as file compute and print servers. Therefore their OS is designed to compromise between
individual usability & resource utilization.
Some Operating Systems are designed for individual usability as the computer is personal.
Some OS have little or no user view. For example embedded Computers in home devices & automobiles. These
operating System are designed primarily to run without user intervention.
In System view: - Operating System designed to be efficient in resource allocation. Resource allocation is
especially important where many users access the same mainframe or minicomputer.
The operating system should be easy to design, implement and maintain. These are specifications required by
those who create, maintain and operate the operating system.
A Computer system has many resources that may be required to solve a problem: CPU time, memory space,
files storage space, I/O devices etc.
Operating System acts as a controller to control the various I/O devices and user program.

Evolution

1st Generation (1945-55):- It is a vacuum tube era.


In the first generation programming languages were unknown, operating system were unheard of all
machine only understands the machine language (binary).
A mathematician named Ada Lovelace was first recognized that machine had applications beyond pure
calculation. She had published first algorithm intended to be carried out by such a machine. She is often
regarded as the first computer programmer she has created programs for Charles Babbage ( father of
Computer) analytical Engine.
By the early 1950, punch cards were introduced and the routine had improved somewhat with the
introduction of punch cards. It was now possible to write programs on cards & read them in instead of
using plug boards, otherwise the procedure was the same.
The first Operating System was developed in 1950s when computer could only run one program at a time.

2nd Generation (1355-65): - It is Transistors and Batch System era.


In the late 1960s, the first version of the UNIX OS was developed written in c programming language &
available free during its early years.
To run a job (a program or set of programs) a programmer would first write the program on paper
(FORTRAN or assembler) then punch it on cards.
To reduce the wasted time while walking around the machine room & complete one job at a time the
batch system was introduced. The idea behind it was to collect a tray full of jobs in the input room & then
read them onto magnetic tapes using a small inexpensive Computer Such al IBM1401, which was good at
Numerical calculations
2nd generation Computers were used mostly for specific and engineering Calculations such as solving the
partial differential equation that often occur in physics & engineering.
2nd generation operating system were FMS (the FORTRAN Monster System) and IBSYS, IBM’s 1401 and
IBM7094
2nd generation languages are FORTRAN, assembly language.

3rd generation (1965-1980):- It is an ICs & Multiprogramming era.


In the early 1960s most computer manufacturers had 2 distinct, incompatible product lines
On the one hand, there were the word -oriented, large scale scientific Computers such as 7094, which were
used for industrial - strength numerical Calculations in Science & engineering.
On the other hand there were the character-oriented, commercial computer such as 1401, which were
widely used for tape sorting, printing by banks and insurance Companies.
Developing & maintaining 2 Completely different product lines was an expensive proposition for the
manufacturers
IBM attempted to solve these problem at a single stroke by introducing the System/360,
IBM has created more modern computers known as 370, 4300, 3080 & 3090. The Z series is most recent
descendant. The IBM 360 was the first major computer line to use ICs.
In this Generation multiprogramming was introduced on the 7094, when the current job paused to wait for
a tape or other I/O operation to complete, the CPU simply sat idle until the I/O finished.
The solution that evolved was to partition memory into several pieces, with a different job in each
partition. while one job was waiting for I/O to complete, another job could be using the CPU. If enough jobs
could be held in main -memory at once, the CPU could be kept busy nearly 100% of the time.
“Another major feature present in 3rd generation operating System was the ability to read jobs from cards
onto the disks as soon as they were brought to the computer room. Then whenever a running job finished,
the operating system could load new job from the disk into the new empty partition & run it. This
technique is called spooling”.
The time between submitting a job and getting back the output was often several hours so a single
misplaced Command could cause a compilation to fail & the programmer to waste half a day. So the
concept of Time - Sharing, a variant of multiprogramming was introduced in which each user has an
online terminal.
The First general purpose timesharing system, C TSS( compatible time sharing system) was developed at
M.I.T.
Another major development during the 3rd generation was phenomenal growth of minicomputers starting
with DEC PDP-1 in 1961.
UNIX operating system is developed in 3rd generation. IEEF developed a standard for UNIX, Called POSIX.
The most versions of UNIX now support. POSIX defines a minimal system call interface that conformant
UNIX System must support.
A Small clone of UNIX, Called MINIX was - released for educational purpose After MINIX the Linux was -
developed & originally supported various MINIX features.

4th Generation(1980-1990):- It is an era of personal computer(initially called microcomputers).


Personal computers were not all that different from minicomputers of the PDP-11 class.
CPIM & MS-DOS was the operating system for early microcomputer which we all based on users typing in
Commands.
In this generation Apple Computer created an operating system named "Lisa" which was too expensive &
failed commercially but it was based on GUI(graphical user interface).
2nd attempt the Apple Macintosh was a huge success because it was user friendly & cheaper Mac OSX is a
UNIX based operating systems.
After Apple, Microsoft Created windows.
In 1995 window95 released, in 1998 a slightly modified version windows98 was released & It contained a
large amount of 16 bit intel assembly language.
Another Microsoft OS is windows NT (new technology) and It was full 32 bit system VAX VMS operating
system was designed by the David Cutler & also windows NT. So many ideas of VMS are present in NT.
Window NT 4.0 was the last version of NT after that version 5.0 named as windows 2000.
windows 98 Called windows ME (Millennium edition), In 2001 a slightly upgradded version of windows
2000 called windows XP
After windows 2000 Microsoft broke up the windows family into 8 client & a server line. The client line was
based on XP & its successors while the server line included windows server 2003 & windows 2008.
In January 2007 windows vista & then In 2012 window 7 was launched.
Network operating system & distributed operating system are introduced in this generation.

5th Generation (1990- Present):- It is an era of Mobile Computer.


The first real mobile phone appeared 1946 & weighted some 40kg. The first true handheld phone appeared
in the 1970's & it was of 1 Kg.
In mid 1990s when Nokia released N9000 first smart phone which combined 2 separate devices: A phone &
PDA (personal digital assistant).
In 1997 Ericson coined the term Smartphone for its GS88 "Penelope".
In first decade most Smartphone running Symbian OS.
RIM's Blackberry as operating system (introduced in 2002) and Apple's ios (2007).
Nokia switch to windows phone in 2011 from Symbian then Android a Linux based operating system
released by google in 2008 takeover the market.

Computer-System Architecture
Single-Processor Systems:- Most systems use a single processor. The variety of single-
processor systems may be surprising, however, since these systems range from PDAS through
mainframes.
On a single-processor system, there is one main CPU capable of executing a general-purpose
instruction set, including instructions from user processes and also there are some special-
purpose processors as well.
Special purpose processor may come in the form of device-specific processors, such as disk,
keyboard, and graphics controllers.
All of these special-purpose processors run a limited instruction set and do not run user Single processor system
processes. Sometimes they are managed by the operating system,
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. Even if it has such special-purpose processors, a
system with only one core is still a single-processor system.

Multiprocessor Systems:- The term refers to systems that have more


than one CPU core.
Multiprocessor systems (also known as parallel systems or tightly coupled
systems) have two or more processors in close communication, sharing
the computer bus and sometimes the clock, memory, and peripheral
devices.
Multiprocessing adds CPUs to increase computing power.
Multiprocessor systems have three main advantages:
1. Increased throughput:- By increasing the number of processors,
we expect to get more work done in less time.
2. Economy of scale:- Multiprocessor systems can cost less than
Symmetric multiprocessing architecture
equivalent multiple single-processor systems, because they can
share peripherals, mass storage, and power supplies.
3. Increased reliability:- If functions can be distributed properly
among several processors, then the failure of one processor will not
halt the system, only slow it down.
The multiple-processor systems in use today are of two types.
a. Asymmetric multiprocessing :- in asymmetric multiprocessing each
processor is assigned a specific task. A master processor controls the
system; the other processors either look to the master for
instruction or have predefined tasks. This scheme defines a master-
slave relationship. The master processor schedules and allocates
work to the slave processors.
b. Symmetric multiprocessing:- In symmetric multiprocessing (SMP)
each processor performs all tasks within the operating system. SMP
means that all processors are peers; no master-slave A dual-core design with two cores on the same chip
relationship exists between processors.
ultiprocessing can cause a system to change its memory access model from
Multiprocessing
uniform memory access (UMA) to non-uniform
non memory access (NUMA).
In UMA access to any RAM from any CPU takes the same amount of time.
In NUMA, some parts of memory may take t longer to access than other parts,
creating a performance penalty. Operating systems can minimize the NUMA
penalty through resource management
Non-uniform
uniform memory access (NUMA) architectures tend to be easier to scale up
with very large numbers of cores,, and so they are of increasing importance

NUMA multiprocessing architecture

Clustered system:- A clustered system is a loosely-coupled


loosely form of
multiprocessing.
It is a group of individual computers that communicate closely using a
LAN or other high-speed
speed interconnect.
A cluster usually has the job of providing a high-availability
high service.
Typically each of the machines is monitored by one of the others, and
if one machine has a failure, another machine can take over for it.

General structure of a clustered system

Operating System Operation


Terms related to OS operation:-

Trap
p & interrupts are event that disrupt the normal sequence of instructions executed by the CPU.

Trap:- Trap is an abnormal condition detected by the CPU that usually is indicative of an error.
erro
Example:- dividing by zero,, trying to access a memory location
cation that does not exist or for
fo which the
program does not have access, execuecuting instruction with an undefined
ned opcode, or trying to access
nonexistent I/o devices.
Trap is an exception & also called software interrupt.
interrupt

Interrupt:- A hardware interrupt is a signal sent to the CPU by an external device.


Ex:- system failure, reboot requested, I/O devices(Printer, Scanner etc) want to access the CPU,
CPU
multimedia connected, Pendrive Connected & detected by the CPU.
There are 2 types of interrupt:-
1) Maskable interrupt
2) Non maskable interrupt.
1) Maskable interrupt:-
It is a low priority interrupt.
It can bee disabled, ignored by the instruction of CPU
When M. Interrupt occur it can be handled after executing the current instruction
It is used mostly with peripheral devices
Response time of maskable interrupt is high.
It may be vectored & non vectored.
vecto
Ex:- INTR

2) Non maskable interrupt:-

It is high priority interrupt,


interrupt such as watchdog timer.
It cannot be disabledled or ignored by instruction of CPU.
when Non maskable interrupt occur the current instructions and status are stored in stack
for the CPU to handle
It is used for emergency purpose ex: Power failure, Smoke detector.
detector
Its response time is low.
All are vectored
red interrupt.
Example: Trap of 8085 microprocessor, RST5.5, RST6.5,
RST RST7.5.

Interrupt vector is a memory space location of an interrupt handler where the CPU Knows the address of
the interrupt service routine in advance.
Interrupt service routine is a software interrupt handler

OS operation:- An operating system that has nothing to do will sleep or wait until a request for service
arrives (an interrupt). Interrupts can be generated by hardware or software.
software
Modern operating systems are interrupt driven.
For each type of interrupt,
nterrupt, separate segments of code
code in the operating system determine what
w action
should be taken.
An Interrupt Service Routine is provided that is responsible for dealing with the interrupt.
A properly designed operating system must ensure that an incorrect (or malicious) program can c not cause
other programs to execute incorrectly.

Dual-Mode operation:-
In order to ensure the proper
per execution of the operating system,
system, we must be able to distinguish
disting between
the execution of operating system Code & user defined code.
For this we need 2 separate modes of operation.
operation User mode and Kernel mode (also called supervisor
mode, system mode, privileged mode)
A bit called mode
de bit is added to the hardware of Computer to indicate the current mode: Kernel (0 bit) or
User (1 bit).
When the computer
puter system is executing, on behalf
be of a user application, the system is in user mode (0).
However when a user application requests a service from Operating System (via via a System Call) it must
transition from user to kernel mode to fulfil the request.

Transition from user to kernel mode diagram

At system boot time the hardware re starts in Kernel mode. The OS is then loaded & starts user applications in
user mode, whenever a trap orr interrupt occurs; the hardware switches from user mode to Kernel mode.
Thus whenever the OS 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.
We accomplish this protection by designating some of the machinema instructions that harm as privileged
instruction. The hardware allows privileged instruction 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 & traps it to the OS.
OS
Timer:- A timer is a special CPU register. Each time it executes a user process in a CPU, the OS first places a
number N in the timer.
After each clock tick, the hardware automatically decrements the timer.
If the value reaches zero, the hardware immediately generates an interrupt.
This assures that the user process will allow the OS to resume execution in the CPU after no more
than N clock ticks.
The user process cannot disable or change the value in the timer. Such operations are privileged
instructions.

System Calls:- It provide the means for a user program to ask the Operating system to perform tasks
reserved for the OS on the behalf of user program.
It is the method used by a process to request action by the OS.
When a system call is executed, it is treated by the hardware as Software interrupt.
System calls provide an interface to the services made available by an operating system
When a system call is executed, the control passes through the interrupt vector to system call service
routine in OS & the mode bit set to the Kernel mode (0).

Operating System Services

1. User interface: - Almost all operating system have a user interface. This interface can take several forms. A
a) Command line interface (CLI) which uses text commands & a method for entering them.
b) Batch interface: - In which commands & directives to Control those Commands are entered into
files and those files are executed.
c) Graphics user interface: - The Graphics user 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.

2. Communication:- There are many circumstances in which one process needs to exchange information with
another process. These processes can be on same system or on different system connected by a network.
Communication may be implemented via shared memory or through message passing.
3. Error detection: - Operating System needs to be constantly aware of possible errors. Errors may occur in
the CPU, memory and hardware (such as a memory error or a power failure), in I/O devices (such as a
parity error on tape, a connection failure on a network or lack of paper in the printer) and in the user
program (such as an arithmetic overflow, an attempt to access an illegal memory location, or a too-great
use of CPU time).
Some function or services exist not for helping the user but rather for ensuring the efficient operation of
the system itself.
4. Resource management:- when there are multiple users or multiple jobs running at a same time, resources
must be allocated to each of them. There also be routine to may allocate printers, modems, USB storage
drives & other peripheral devices. There are some resources which are managed by Operating system:
a. Process Management:- The System must be able to load a process into memory & to run that
process.
The OS has to create and delete processes, Schedule processes (and threads) on CPUs, suspend and
resume processes, provide mechanisms for process synchronization, and provide mechanisms for
process communication.
b. Memory Management:- The OS has to keep track of which parts of memory are currently being used,
and which processes are using them;
allocate and deallocate memory space as needed; and decide which processes (or parts of processes)
and data to copy into or out of memory.
c. Mass Storage Management:- Regarding mass storage, the OS has to mount and unmount devices,
OS manages free space, allocates storage, schedules disk accesses, performs partitioning, and
provides protection.
d. Input/Output management:- A running program may require I/O, which may involve a file or an I/O
device. For efficiency & protection, user usually cannot control I/O devices directly, therefore OS
control I/O.
e. File - System management:- Programs needs to read and write files & directories.
direc Files also need to
create and delete by name,e, searching, listing the information of file
le all needs the OS management.
Some files & directories need permissions to allow or deny access to files or o directories based on file
ownership. Map files onto mass storage, and back up files on stable (non-volatile)
(non volatile) storage media.

5. Accounting:- we want to keep track of which user use how much and what kinds of computer resources.
This record keeping may be used for accounting or simply for accumulating usage statistics.
6. Protection & Security:- The owners of information stored in a multiuser or networked computer system
may wantnt to Central use of that information. when several processes run
run concurrently
concurrent it should not be
possible for one process to interfere with others or with the OS itself. Protection
ection involves ensuring that all
access to system resources is controlled.
controlled. Security of the system from outsider is also important.

Operating System Structure

Till now we have seen what Operating System looks like on the outside (Programmer's interface). Now we
will see the internal structure of the Operating System.
Operating System structure re can be divided into 5 parts:
parts
1. Simple or Monolithic structure:- In the Monolithic approach the entire OS runs as a single program in
Kernel mode.
The OS is written as a collection off procedures, linked
l together into a single large executable file (binary
program).
Advantages:- each procedure in the system is free to call any other one which makes the system efficient.
Disadvantages:- However having thousand of procedure that can call each other without restriction restricti may
also lead to a system that is unwieldy & difficult to understand.
If any service fails in the monolithic kernel, it leads to the failure of the entire system.
Such freedom leaves Monolithic system vulnerable to errant (or malicious) programs, causing entire
system crushes when user programs fail.
To add any new service, the entire operating system needs to be modified by the user.

To construct the actual object program of monolithic operating system one first compiles all the individual
procedure (or thee file containing the procedure)
procedure & then binds those all together into a single executable file
using the system linker.
There is no hidden information; every procedure is visible to every other procedure.
There are no modules & packages,
ackages, in which much of information is hidden away inside modules & only the
officially designated entry points, can
an be called from outside the module.
In this model, for each system call there is one service procedure that takes care of it & executes it. The
utility procedure does things that are needed by several service procedures, such as fetching the data from
user program.
The core Operating System that is loaded when the computer is booted. Many OS support loadable
extensions such as I/O, device drivers
rivers & file
fil systems.
These components are loaded on demand. In UNIX they are called shared Libraries & In windows they
Called DLL (Dynamic link libraries.)
Example:- MS DOS. It was written to provide more
functionality in less space so it was not divided
into modules carefully.
MS DOS was also limited by the hardware of its
era. Because the Intel 8088 for which it was
written provides no dual mode & no hardware
har
protection, the designer of MS DOS had no choice
but to leave the base hardware accessible.
Traditional UNIX is also example of monolithic
OS.
2. Layered Approach:-
To overcome the drawback of Monolithic & to improve the hardware protection the system must be
modular. So the next structure developed was layered one.
In layered approach the OS is organized as a hierarchy of layers, each one constructed upon the one below
it.
First System constructed in this way was the "THE" System. "by E W Dijkstra (1968)
The "THE" System was a simple batch system for a Dutch Computer, the Electrologica x8, which had 32K of
27 bit words.
The System has 6 layers.
i. Layer 0:- It dealt with allocation of the processor, switching between processes when interrupts
occurred or timers expired. Layer0 is a hardware layer.
ii. Layer 1:- It did the memory management and allocated space.
For processes in main memory & on a 512K word drum used for holding parts of processes (Pages) for
which there was no room in main memory.
Above layer1 process did not have to worry about whether they were in memory or in drum.
iii. Layer 2:- It handled Communication between each process and the Operator (user) Console.
iv. Layer 3:- It took care of managing the I/O devices & buffering the information streams to and from
them.
v. Layer 4:- Layer4 was where the user programs were found. Layer4 did not have to worry about
process, memory, Console or I/O management.
vi. Layer 5:- The system operator process was located in this layer.

Layers Function
Layer5 Users
Layer4 User programs
Layer3 I/O management
Layer2 Operator-process
communication
Layer1 Memory management
Layer0 Hardware

A layer does not need to know how these operations are implemented. It needs to know only what these
operations do.
Hence each layer hides the existence of certain data structures, operations and hardware from higher level
layers.

Advantages of Layered Structure:


Modularity: This design promotes modularity as each layer performs only the tasks it is scheduled to
perform.
Easy debugging: As the layers are discrete so it is very easy to debug. Suppose an error occurs in the
CPU scheduling layer. The developer can only search that particular layer to debug.
Easy update: A modification made in a particular layer will not affect the other layers.
No direct access to hardware: The hardware layer is the innermost layer present in the design. So a
user can use the services of hardware but cannot directly modify or access it, unlike the Simple system
in which the user had direct access to the hardware.
Abstraction: Every layer is concerned with its functions. So the functions and implementations of the
other layers are abstract to it.

Disadvantages of Layered Structure:


The major difficulty with the layered approach involves appropriately defining the various Layers.
For example: the device driver for the backing store (a disk space used by virtual memory algorithm)
must be at a lower level than memory management routines, because memory management requires
the ability to use the backing store.
Other major problem with layer implementation is that they tend to be less efficient than other types.
For example: - when a user program executes an I/O operation, It execute a system call that is trapped
to the I/O layer, which calls the memory management layer, which in turn Calls the CPU scheduling
layer which is then passed to the hardware. At each layer, the parameters may be modified; data may
need to be passed & so on. Each layer adds overhead to the system call, the net result is a system call
that take longer than does one on anon layered system.

3. Mirrokernels:- C. Mellon University developed an OS called "MACH" that modularized the Kernel using
microkernel approach.
This method structures the OS by removing all non essential components from the Kernel & implementing
them as system and user level programs.
The result is a smaller and Separate Kernel.
Microkernel provides minimal process & memory management, in addition to a Communication facility.
The main function of the microkernel is to provide a communication facility between the client program
and various services that are also running in user space. Communication is provided by message passing.
Example:- If the client program wishes to access file, it must interact with the file server. The client
program & service never interact directly. Rather, they communicate indirectly by exchanging messages
with the microkernals.
One benefit of the microkernel approach is ease of extending the OS. All new services are added to user
space of consequently do not require modification of the Kernel. when the Kernel does have to be
modified the changes tends to be fewer, because microkernel is smaller Kernel. The resulting OS is easier
to port from one hardware design to another.
The Microkernel also provides more security & reliability since most services are running as user rather
than Kernel - processes. If a service fails, the rest of the OS remains unchanged.
The drawback of Microkernels is that it can suffer from performance decreases due to increased system
function overhead.

4. Modular Kernel:- It is considered as a best approach for an OS. It involves designing of a modular Kernel.
The Kernel has only set of core components and other services are added as dynamically loadable modules
to the Kernel either during run time or boot time.
Example1- Solaris OS structure is organized around a Core Kernel with seven types of loadable Kernel
modules:
a. Scheduling classes
b. File Systems
c. Loadable System Calls
d. executable file format
e. Streams module
f. device & bus driver
g. Miscellaneous

Example2:- Device & bus drivers for specific hardware can be added to the kernel & support for different
file systems can be added as loadable modules. The overall result resembles a layered system in that each
Kernel section has defined protected interfaces; but it is more flexible than a layered System in that any
module can call any other module.
Furthermore, the approach is like the microkernel approach in that the primary module has only core
functions and knowledge of how to load and communicate with other modules, but it is more efficient
because modules do not need to invoke message passing in order to communicate.
5. Virtual machines:- The logical conclusion of layered
structure in the concept of a virtual machine.
The fundamental hardware behind a virtual machine is
to abstract the hardware of a single computer (the ( CPU,
memory, disk drives, network, interface Cards & so
forth) into several
everal different execution environments,
thereby creating
reating the illusion that each separate
execution environment is running its own private
computer.
By using CPU scheduling
cheduling and virtual-memory
virtual
techniques, an OS host can create ate the illusion that a
process hass its own processor with its own (virtual)
memory.

6. Exokernels:- Rather than cloning the actual machine


ma as is done with virtual machines another strategy is
partitioning it.
In other words giving each user a subset of the resources. This one virtual machine might get disk blocks 0
to 1023;; the next one might get blocks 1024 to 2047 & so on.
At the bottom layer, running in Kernel mode, is a program called the exokernel.
It's job is to allocate resources to virtual machines & then check attempts to use them to make sure no
m/c is trying to use somebody else's resources.
Advantage is that it saves a layer of mapping.
mapping
In other designs, each virtual machine thinks it has its own disk, with blocks running from 0 to some
maximum number; So o the virtual machine
m monitor must maintain table to remap disk addresses (&( all
other resources). But when we use the Exokernel this remapping is not needed.
The Exokernel need only Keep track of which virtual machine
ma has been assigned which resource.

Types of operating System

1. Mainframe OS:- The OS for mainframes heavily are oriented toward processing many jobs at once, most of
which need prodigious amounts of I/O.
They typically offer
fer 3 kinds of services:
a) Batch System
b) Transaction processing
c) Time sharing.
a. Batch system is one that processes routine jobs without any interactive user present. Ex: - claims
processing in an insurance Company or sales reporting for a chain stores
sto is typically done in batch
mode.
b. Transaction processing systems handle large numbers of small requests
Example:- check processing at a bank oro airline reservation.
Each unit of work is small, but the system must handled hundreds or thousands per second.
c. Timesharing System allows multiple remote users to run jobs on Computer at once, such as querying a
big database.

2. Server OS: - They run on servers, which are very large personal computers, workstations or even
mainframes.
They serve multiple users at once over a network & allow the user to share hardware & Software
resources.
Servers can provide print service, file service or web service.
Typical server operating systems are Solaris, FreeBSD,
BSD, Linux & windows server 2000 etc.
etc
3. Multiprocessor OS:- An increasingly Common way to get major-league Computing power is to connect
multiple CPUs into a single system. Depending on precisely, How they are connected & what is shared.
These systems are called parallel computers, multiprocessor Computers, and multicomputer, with special
features for Communication Connectivity & Consistency.

4. Personal Computer OS:- Modern PC OS support multiprogramming and ten dozen of programs started up
at boot time.
Their job is to provide good support to single user used for word processing, internet access, games,
spreadsheet
Example: Linux, FreeBSD, Windows versions, Apple OSX etc

5. Handheld Computer OS:- Tablets, Smartphones & other handheld computers.


A handheld computer, originally Known as a PDA (personal digital assistant), is a small computer that can
be held in your hand during operation.
Example: Google's Android & Apple's iOS.

6. Embedded OS: - Embedded System runs on the computers that control devices that are not generally
thought of as computers and which do not accept user installed software.
Examples are Microwave ovens, TV sets, Cars, DVD recorders, traditional phones & MP3 players.
The main property which distinguishes embedded systems from handhelds is the certainty that no
untrusted software will ever run on it.
We cannot download new app to our microwave oven.
All the software is in ROM.
Systems such as Embedded Linux, QNX & Vxworks are popular in this domain.

7. Sensor - Node operating Systems:- Network of tiny sensor nodes are being deployed for numerous
purposes.
These nodes are tiny computers that communicate with each other and with a base station using wireless
communication.
Sensor network are used to protect the perimeters of buildings, guard national borders, detect fires in
forests, measure temperature & precipitation for weather forecasting, glean information about enemy
movements on battlefields etc.
The sensors are small battery-powered Computers with built-in radios. They have limited power & must
work for long periods of time unattended outdoors frequently in environmentally harsh Conditions.
Each Sensor node is real computer with a CPU, RAM, ROM & one or more environmental sensors.
It runs a small, but real OS, usually one that is event driven, responding to external events or making
measurement periodically based on an internal clock.

8. Real time OS:- There are 2 types of Real time OS.


a. Hard Real time OS:- Industrial process control, avionics military & Similar application area.
These systems must provide absolute guarantees that certain action will occur by a Certain time.
b. Soft real time OS:- Digital audio or multimedia fall in this systems category. Smart phones are also soft
real time systems.
It is one where missing an occasional deadline while not desirable is acceptable & does not cause
any permanent damage.
Example: Missile systems, air traffic Control systems, robot etc.
=
9. Smart Card OS:- The smallest OS run on smart cards, which are credit card sized devices containing a CPU
chip.
They have very severe processing power & memory Constraint.
Some Smart Cards are Java oriented. This means that the ROM on the smart Card holds an interpreter for
the Java virtual machine. (JVM).
Java applets (small programs) are downloaded to the card and are interpreted by the JVM interpreter.
Some of these cards can handled multiple Java applets at the same time, leading to multi programming and
the need to schedule them.
Resource management & protection also become an issue, when 2 or more applets are present at the
same time. These issues must be handled by the (usually extremely primitive) OS present on the Card.

10. Multiprogramming OS:- Multiprogramming OS may run many programs on a single processor computer.
If one program must wait for an I/O transfer in a multiprogramming OS, the other programs are ready to
use the CPU.
As a result various jobs may Share CPU time. However the execution of their jobs is not defined to be at the
same time period.
The primary goal of multiprogramming is to manage the entire system's resources.
The Key Components of a multiprogramming system are the file system, command processor, transient
area & I/O Control system.
Multiprogramming OS are designed to store different programs based on sub segmenting parts of the
transient area. The resource management routines are linked with the OS Core functions.

11. Multitasking OS:- Logical extension of Multiprogramming.


Multiple tasks are also known as processes that share similar processing resources like a CPU. It switches
between processes be with given time (quantum).
A multitasking OS may manage Various Computer resources like I/O devices, RAM, hard disk, CPU & others.
Each task gets equal opportunity in multitasking environment.
CPU responsiveness increases.
Disadvantage:- one must have to take care of the Security & integrity of user programs & data
Example: - Multics, Unix etc.

12. Batch OS:- This type of OS does not interact with Computer directly. There is an operator which takes
similar jobs having the same requirement & groups them into batches.
Easy to manage large work repeatedly in batch systems.
Disadvantage is that the computer operators should be well known with batch system.
It is hard to debug & sometimes Costly. The other jobs will have to wait for an unknown time if any job
fails.
Example:- Payroll System, Bank Statements system, Attendance System etc.

13. Distributed OS:- Various autonomous interconnected Computers Communicate with each other using a
shared Communication network.
Independent unit (System) posses their own memory unit & CPU.
These are referred to as loosely coupled Systems or distributed systems.
Remote access is enabled within the devices Connected in that network.
Advantages:- Failure of one will not affect the other network Communication, as all systems are
independent from each other.
• Since Resources are being shared computation is highly fast & durable.
• Electronic mail increases the data exchange speed.
Disadvantages: Failure of main network will stop the entire communication.
• These types of systems are not readily available as they are very expensive. Not only that the
underlying software is highly complex & not understood well. yet.
Example: Locus.

14. Network OS:- These Systems run on a server & provide the capability to manage data, users, groups,
security, applications & other networking functions.
Over a small private network one more important aspect of Network OS is that all the users are well aware
of the underlying configuration of all other user within the network, their individual connections, etc &
that's why these computers are popularly known as tightly coupled systems..
Advantages: - Highly stable centralized servers.
• Security Concerns are handled through servers.
• New technologies & hardware up-gradation are easily integrated into the system.
• Server access is possible remotely from different locations & types of systems.
Disadvantages: Servers are costly.
• User has to depend on a central location for most operations.
• Maintenance & updates are required regularly.
• Example:- windows server 2003, windows server 2008, UNIX, LINUX, Mac OSX, BSD etc.

Computer Booting Process


For a Computer to start running - for instance, when it is powered up or rebooted - it needs to have an
initial program to run. This initial program or bootstrap program tends to be simple.
Typically it is stored in read only memory (ROM) or (EEPROM) known by the general term firmware, within
the computer hardware. It initializes all aspects of the system, from CPU registers to device controller to
contents.
The bootstrap program must know how to load the OS & how to start executing that system. To
accomplish this goal, the bootstrap program must locate & load into memory the OS Kernel.
The OS then starts executing the first process such as "init", and waits for some event to occur.
BIOS Contains low level I/I/O software, including procedures to read the Keyboard, write to the screen, &
do disk I/O, among other things.
Nowadays it is held in Flash RAM which is non-volatile but which can be updated by OS when bugs are
found in BIOS.
When the system booted the BIOS is started. It first check to see how much RAM installed & other devices
(Keyboard, mouse) installed & responding correctly. It starts out by scanning PCIe buses to detect all the
devices attached to them.
The BIOS then determines the boot device by trying a list of devices stored in CMOS (complementary metal
oxide semiconductor) memory.
An attempt is made to boot from a CD-ROM (USB) drive if one is present, if that fails, the system boots
from the hard disk.

You might also like