Sei sulla pagina 1di 15

Chapter Four Operating

System

CHAPTER FOUR
OPERATING SYSTEM

Overview

The reason for an operation system to exist is to make computers more convenient to use. An OS aims
to wrap the underneath hardware resources and provides services to end users in a systematic way.
These services may be divided into two types: services directly available for end users through all kinds
of I/O devices, such as mouse, keyboard, monitor, printer, and so on; and services for application
programs, which in turn provides services for end users.

The goal of this chapter is to help you become literate on Operating System. In becoming literate on
Operating System, you will need to be aware of the importance of computers and be able to use them to
accomplish tasks everyday.

Learning Objectives:

In this chapter you will learn

 Operating System
 Organization of Operating System

 Types of Operating System

 Types of Operating System

 Difference between different Operating System.

Page- 58
Chapter Four Operating
System

Introduction
An operating system (OS) is software, consisting
of programs and data, that runs on computers,
manages computer hardware resources, and
provides common services for execution of various
application software. The operating system is the
most important type of system software in a
computer system. Without an operating system, a
user cannot run an application program on their
computer, unless the application program is self
booting.
For hardware functions such as input and output
and memory allocation, the operating system acts
as an intermediary between application programs
and the computer hardware,although the
Figure 4.1: Position of Operating System
application code is usually executed directly by the hardware and will frequently call the OS or be
interrupted by it. Operating systems are found on almost any device that contains a computer—from
cellular phones and video game consoles to supercomputers and web servers.
Examples of popular modern operating systems are: BSD, Linux, Mac OS X, Microsoft Windows, and
UNIX.

Common features of Operating System:


 Process management
 Interrupts
 Memory management
 File system
 Device drivers
 Networking (TCP/IP, UDP)
 Security (Process/Memory protection)
 I/O

Functions of Operating System


Operating System is used for the following functions:
1) to interpret the commands executed by the user.
2) to handle disk input/output settings.
3) loaded in the memory at boot up and remain in the memory at all time.
4) to provide the OS with the mechanism in order to see the additional memory.
5) used to access the high memory area.
6) it allows the rest of the OS and its programs to interact directly with the system hardware
and the system BIOS.
7) it sets particular values corresponding to the windows environment.
8) used to run particular programs during startup.

Page- 59
Chapter Four Operating
System

Kernel
A kernel connects the application software to the hardware of a computer.
With the aid of the firmware and device drivers, the operating system provides the most basic level of
control over all of the computer's hardware devices. It manages memory access for programs in the
RAM, it determines which programs get access to which hardware resources, it sets up or resets the
CPU's operating states for optimal operation at all times, and it organizes the data for long-term non-
volatile storage with file systems on such media as disks, tapes, flash memory, etc.

Figure 4.2: Position of Kernel


Organization of Operating System
Operating system consists of two kinds of program:
1. Control Program
2. Service Program
Control Program consists of three kinds of routine program:
a. Supervisor Program
b. Job-Control Program
c. I/O Control Program
Service program consists of three kinds of program:
a. Translator/Processor Program
b. Utility Program
c. System support Program

The below figure shows the organization of Operating System:

Page- 60
Chapter Four Operating
System

Operating System Organization

Control Program Service Program

Supervisor Program System Support


Program

Job Control Program Translator/Processing


Program

I/O Control Program Utility Program

1. Control Program
Control program controls different types of functions such as:
1. I/O Control
2. Resolving Interrupts
3. Error-Handling
4. Sending message to users
5. User Protection and Accounting
6. Time Allocation
7. Resource Control
8. Job Scheduling

a) Supervisory program
A supervisory program or supervisor is a computer program, usually part of an operating system, that
controls the execution of other routines and regulates work scheduling, input/output operations, error
actions, and similar functions and regulates the flow of work in a data processing system.
It can also refer to a program that allocates computer component space and schedules computer events
by task queuing and system interrupts. Control of the system is returned to the supervisory program
frequently enough to ensure that demands on the system are met.

Page- 61
Chapter Four Operating
System

b) Job-Control Program
Job control in computing refers to the control of multiple tasks or Jobs on a computer system, ensuring
that they each have access to adequate resources to perform correctly, that competition for limited
resources does not cause a deadlock where two or more jobs are unable to complete, resolving such
situations where they do occur, and terminating jobs that, for any reason, are not performing as
expected.

I/O Control Program:


A supervisory program or section of the operating system that monitors and controls I/O operations and
data flow

2. Service Program
Different services are provided by operating systems to the convenience of the users. The services are:
a) Translator/Processor Program
Translator is a computer program that performs the task of converting a program written in one
programming language into a program in another programming language. Translators of
programming languages are mainly classified into two groups depending on the nature of the source
language accepted by them.
Example of Translator:
1. Compiler
2. Assembler
3. Interpreter
4. Debugger

b) Utility Program
There are some utility program in mainframe and mini computer operating system. Example of utility
program
1. Sort-Merge program
2. Library Program
3. Linker Program and
4. File Handler

c) System Support Program


Sometimes control programs are considered as Operating System but its other parts are considered as
System Support Program

Types of Operating System

Real-time
A real-time operating system is a multitasking operating system that aims at executing real-
time applications. Real-time operating systems often use specialized scheduling algorithms so
that they can achieve a deterministic nature of behavior. The main objective of real-time
operating systems is their quick and predictable response to events. They have an event-driven
or time-sharing design and often aspects of both. An event-driven system switches between

Page- 62
Chapter Four Operating
System

tasks based on their priorities or external events while time-sharing operating systems switch
tasks based on clock interrupts.
Multi-user vs. Single-user
A multi-user operating system allows multiple users to access a computer system concurrently.
Time-sharing system can be classified as multi-user systems as they enable a multiple user
access to a computer through the sharing of time. Single-user operating systems, as opposed to
a multi-user operating system, are usable by a single user at a time. Being able to have multiple
accounts on a Windows operating system does not make it a multi-user system. Rather, only
the network administrator is the real user. But for a Unix-like operating system, it is possible
for two users to login at a time and this capability of the OS makes it a multi-user operating
system.
Multi-tasking vs. Single-tasking
When a single program is allowed to run at a time, the system is grouped under a single-
tasking system, while in case the operating system allows the execution of multiple tasks at
one time, it is classified as a multi-tasking operating system. Multi-tasking can be of two types
namely, pre-emptive or co-operative. In pre-emptive multitasking, the operating system slices
the CPU time and dedicates one slot to each of the programs. Unix-like operating systems such
as Solaris and Linux support pre-emptive multitasking. Cooperative multitasking is achieved
by relying on each process to give time to the other processes in a defined manner. MS
Windows prior to Windows 95 used to support cooperative multitasking.
Distributed
A distributed operating system manages a group of independent computers and makes them
appear to be a single computer. The development of networked computers that could be linked
and communicate with each other, gave rise to distributed computing. Distributed
computations are carried out on more than one machine. When computers in a group work in
cooperation, they make a distributed system.
Embedded
Embedded operating systems are designed to be used in embedded computer systems. They are
designed to operate on small machines like PDAs with less autonomy. They are able to operate
with a limited number of resources. They are very compact and extremely efficient by design.
Windows CE and Minix 3 are some examples of embedded operating systems.

Microsoft Windows
Microsoft Windows is a family of proprietary
operating systems designed by Microsoft Corporation
and primarily targeted to Intel architecture based
computers, with an estimated 88.9 percent total usage
share on Web connected computers. Currently, the
most widely used version of the Windows family is
Windows XP, released on October 25, 2001. The
newest version is Windows 7 for workstations and
Windows Server 2008 R2 for servers. Microsoft
Windows originated in 1985 as an application
running on top of MS-DOS, which was the standard
operating system shipped on most Intel architecture

Page- 63
Chapter Four Operating
System

personal computers at the time. In 1995, Windows 95 was released, combining MS-DOS 7.0 with
Windows on the same medium, removing the need of getting a separate MS-DOS license. Server
editions of Windows are widely used.
Mac OS X
Mac OS X is a line of partially proprietary graphical operating systems developed, marketed, and sold
by Apple Inc., the latest of which is pre-loaded on all
currently shipping Macintosh computers. Mac OS X
is the successor to the original Mac OS, which had
been Apple's primary operating system since 1984.
Unlike its predecessor, Mac OS X is a UNIX
operating system built on technology that had been
developed at NeXT through the second half of the
1980s and up until Apple purchased the company in
early 1997. Operating system was first released in
1999 as Mac OS X Server 1.0, with a desktop-
oriented version (Mac OS X v10.0) following in
March 2001. Since then, six more distinct "client" and "server" editions of Mac OS X have been
released, the most recent being Mac OS X 10.7, which was first made available on July 20, 2011.
Releases of Mac OS X are named after big cats; the current version of Mac OS X is "Lion".

Unix and Unix-like operating systems


Ken Thompson wrote B, mainly based on BCPL, which he used to write Unix, based on his experience
in the MULTICS project. B was replaced by C, and Unix developed into a large, complex family of
inter-related operating systems which have been influential in every modern operating system (see
History). The Unix-like family is a diverse group of operating systems, with several major sub-
categories including System V, BSD, and GNU/Linux. The name "UNIX" is a trademark of The Open
Group which licenses it for use with any operating system that has been shown to conform to their
definitions. "Unix-like" is commonly used to refer to the large set of operating systems which resemble
the original Unix.
Unix-like systems run on a wide variety of machine architectures. They are used heavily for servers in
business, as well as workstations in academic and engineering environments. Free Unix variants, such
as GNU/Linux and BSD, are popular in these areas.
Linux and GNU
Linux is one of popular version of UNIX operating System. It is open source as its source code is freely
available. It is free to use. Linux was designed considering UNIX compatibility. It's functionality list is
quite similar to that of UNIX.

Components of Linux System


Linux Operating System has primarily three components
 Kernel - Kernel is the core part of Linux. It is responsible for all major activities of this
operating system. It is consists of various modules and it interacts directly with the underlying
hardware. Kernel provides the required abstraction to hide low level hardware details to system
or application programs.

Page- 64
Chapter Four Operating
System

 System Library - System libraries are special functions or programs using which application
programs or system utilities accesses Kernel's features. These libraries implements most of the
functionalities of the operating system and do not requires kernel module's code access rights.
 System Utility - System Utility programs are responsible to do specialized, individual level
tasks.
Basic Features
Following are some of the important features of Linux Operating System.
 Portable - Portability means softwares can works on different types of hardwares in same
way.Linux kernel and application programs supports their installation on any kind of hardware
platform.
 Open Source - Linux source code is freely available and it is community based development
project. Multiple teams works in collaboration to enhance the capability of Linux operating
system and it is continuously evolving.
 Multi-User - Linux is a multiuser system means multiple users can access system resources
like memory/ ram/ application programs at same time.
 Multiprogramming - Linux is a multiprogramming system means multiple applications can
run at same time.
 Hierarchical File System - Linux provides a standard file structure in which system files/ user
files are arranged.
 Shell - Linux provides a special interpreter program which can be used to execute commands
of the operating system. It can be used to do various types of operations, call application
programs etc.
 Security - Linux provides user security using authentication features like password protection/
controlled access to specific files/ encryption of data.

Figure 4.3: Linux Operating System

Real Time Operating System


Real time system is defines as a data – processing system in which the time interval required to process
& respond to inputs is so small that it controls the environment. Real time processing is always on-line
whereas on line system need not be real time. In this method, data relating to each single transaction,
Page- 65
Chapter Four Operating
System

received via the telecommunication line, is treated as batch and the processed results are communicated
back instantaneously, enabling decision to be made on the basis of the last latest information.

The essential requirements of this method are:


1. Large main memory for software & OS requirements.
2. Large disk memory
3. Stand by facilities to take care of such events as system failure.
4. Complex communication system.
5. Maintenance of audit trails as well as security of programs and data.
Examples of real time processing are:
1. Air traffic control system.
2. Reservation systems used by hotels and car rental agencies.
3. Process control systems as in nuclear reactor plants.
4. Systems that provide up- to- the minute information on stock prices.
5. Systems that provide immediate updating of customer accounts in savings.
Advantages of Real Time Operating System
1. Response time is very less
2. Better throughput
3. Large memory
4. 24 hour service provider
5. Provide information up – to –minute.
Disadvantages of Real Time Operating System
1. Very costly.
2. Large main memory and secondary storage required.
3. Complex communication systems.
4. Stand by facilities required to take care of such events as systems failure.
Multi Programming Operating System
The mismatch between the speeds of input / output device and CPU leaves some resources of the
computer system under utilized. However , if the computer system is working in the multiprogramming
mode, better utilization of the available equipment can be realized multi programming refers to keeping
several programs in different parts of the main memory are the same time as shown in figure and
executing them concurrently by the CPU.
The CPU switches from one program to another almost
instantaneously. Since the operating speed of CPU is much faster
than that of I/O operations, the CPU can allocate time to several
programs Instead of remaining idle when one is busy with I/O
operations. Hence, in multiprogramming system, when one program
is waiting for I/O transfer, there is another program ready to use the
CPU. A simple example of multiprogramming is given in the Figure:
At the particular time instance shown in the figure, program A is not
utilizing the CPU since it is busy in writing output data on the disk.
The CPU is being used to execute program B which is also present in

Page- 66
Chapter Four Operating
System

the main memory. Another program C, residing in the main memory, is waiting for the CPU to become
free.
In case of multiprogramming the various programs stored in the main memory, can be in one of the
following three stages:
1. Running: CPU is being used by the program.
2. Ready: Waiting for CPU to be assigned to it.
3. Blocked: Performing I/O operation.

Advantages of multiprogramming:
1. Increased Throughput
Throughput is a measure of the total amount of processing that a computer system can complete over a
fixed period of time. Total through put is significantly increased in multiprogramming because the CPU
is not waiting for I/O for the program it is executing.
2. Shorter Response Time
Turn around time for short jobs can be greatly improved under multiprogramming.
3. Ability to assign priorities of jobs
Most multiprogramming systems have schemes for setting priorities for rotating programs.

Requirements or Disadvantages of Multiprogramming Operating Systems


1. Large Main Memory
Large main memory is required to accommodate many user programs along with operating systems.
2. Proper Job Mix
The main memory should contain some CPU- bound programs and some I/O – bound programs in its
various partitions so that at least one of the programs which do not need I/O is always available to the
CPU for processing.
3. CPU Scheduling
There will be situations which two or more programs will be in the ready state waiting for CPU to be
allocated for execution. In such a case, the operating system just decides to which program CPU should
be allocated.

Timesharing Operating System


This is a technique which enables many people, located at various, to use a particular computer system
at the same time. Each user is actually away from the computer and other uses. Each user has it own set
of programs. Under the scheme of Time Sharing, specific time
slice are allocated to different user in rotation. Time – sharing
system, allocates a very short period of CPU time one –by – one to
each user process, beginning from the first user process and
proceeding through the last one, and then again beginning from the
first one.
The time sharing process is shown in figure:
In case of time-sharing the various program can be in one of the
following three stages:
1. Running: CPU is being used by the program.
2. Ready : waiting for CPU to be assigned to it
3. Blocked: Performing I/O operation.

Page- 67
Chapter Four Operating
System

Requirements of Timesharing system


Requirements of timesharing system are exactly same as we have discussed in multiprogramming
system i.e.
1. Large main memory
2. Memory Protection
3. Proper job Mix
4. Program status preservation
5. CPU Scheduling

Distributed Operating System


A distributed system uses multiple central processors to
serve multiple real-time applications and/or multiple classes
of users. Each central processing Unit specializes in
performing particular functions or serving a particular class
of users. Data processing jobs are distributed among the
processor accordingly to which one can perform each job
most efficiently. The central processors may all be located
at the same site, but more typically are geographically
scattered and connected by data communication lines,
forming a distributed network.
Far distance places may be linked through satellite transmission channels or ground microwave systems
and within same city through telephone lines or special coaxial cables.
Thus, in distributed operating systems, each processor has its own memory and executed its own jobs
and shared jobs. The processors communicate with one another through various communication media.
Such systems are also known as loosely- coupled systems.
A typical application is in banks where all the branches have intelligent terminals linked t a big
computer at the Head Office. Data from the branches is sent to the master where it is processed.

The design of distributed operating system is based on two models;


I.            Client- server model
II.            Peer-to-peer model
1. Client Server Model
In this model, a specific computer is known as server
which a especially dedicated to provide various services
to other computers. In simple words, server can be
defined as a provider of services and client can be as a
requester to services. Client makes a request for any kind
of information from the server band server in turn respond
to the client request as shown in figure:

2. Peer to Peer Model


In peer to peer model, there are no dedicated servers. All
computers are equal and, therefore, are termed as peer.
Normally, each of each of these machines functions both as a
Page- 68
Chapter Four Operating
System

client and server. This arrangement is suitable for environments with a limited number of users. In these
models users need to freely access data and programs that reside on other computers across the network.

The advantages of distributed systems include:


1. Reduction of the load on the host computer.
2. Reduction of delays in data processing.
3. Increased system availability and faster system response time.
4. Better service to the customers.
5. Less risk of system breakdown. Therefore, better reliability.
6. Less complexity of system design and implementation due to decentralization.
7. Level of expertise required is less.

Operating Systems Services


Following are the five services provided by operating systems to the convenience of the users.
1. Program Execution
The purpose of computer systems is to allow the user to execute programs. So the operating systems
provide an environment where the user can conveniently run programs. The user does not have to worry
about the memory allocation or multitasking or anything. These things are taken care of by the
operating systems.
Running a program involves the allocating and de allocating memory, CPU scheduling in case of multi
process. These functions cannot be given to the user-level programs. So user-level programs cannot
help the user to run programs independently without the help from operating systems.

2. I/O Operations
Each program requires an input and produces output. This involves the use of I/O. The operating
systems hides the user the details of underlying hardware for the I/O. All the user sees is that the I/O has
been performed without any details. So the operating systems by providing I/O make it convenient for
the users to run programs.
For efficiently and protection users cannot control I/O so this service cannot be provided by user-level
programs.

3. File System Manipulation


The output of a program may need to be written into new files or input taken from some files. The
operating systems provide this service. The user does not have to worry about secondary storage
management. User gives a command for reading or writing to a file and sees his or her task
accomplished. Thus operating systems make it easier for user programs to accomplish their task.

4. Communications
There are instances where processes need to communicate with each other to exchange information. It
may be between processes running on the same computer or running on the different computers. By
providing this service the operating system relieves the user of the worry of passing messages between

Page- 69
Chapter Four Operating
System

processes. In case where the messages need to be passed to processes on the other computers through a
network it can be done by the user programs. The user program may be customized to the specifics of
the hardware through which the message transits and provides the service interface to the operating
system.

5. Error Detection
An error is one part of the system may cause malfunctioning of the complete system. To avoid such a
situation the operating system constantly monitors the system for detecting the errors. This relieves the
user of the worry of errors propagating to various part of the system and causing malfunctioning.
Some popular operating systems for microcomputers
The following table 4.1 describes some popular operating system:

Operating System Description


Macintosh System Icon-oriented operating system used on Apple Macintosh microcomputer
MS-DOS The most widely used operating system on IBM-compatible microcomputers
NetWare The most widely used operating system on local area network(LAN)
composed for microcomputer
OS/2 An operating system designed for use on higher-end IBM and IBM
compatible microcomputers
PC-DOS The operating systems mostly used widely on IBM microcomputer
UNIX A multiuser, multitasking operating system used on small computers-popular
on RISC-based microcomputers
Windows A multitasking operating environment with a graphical user interface used on
IBM and IBM-compatible microcomputer

Difference between the batch multiprogramming and time sharing operating system

The following table 4.2 gives the difference between the batch multiprogramming and time sharing:

Batch Multiprogramming Time Sharing


Principal objective Maximum processor use Minimum response time
Source of directives to Job control language commands Commands entered at the
operating system terminal

Difference between the Text based and graphical based operating system
The following table 4.3 gives the difference between the Text based and graphical based operating:
Text based Operating System Graphical based Operating System
Instructions are given in Text based Operating Instructions are given in Graphical based
System by using keyboard. Operating System by using keyboard, mouse,
menu, icons etc
Commands in this operating system needs to There is no need to memorize Commands in this
memorize for different functions. operating system for different functions
After starting this operating system the symbols After starting this operating system different icon,
Page- 70
Chapter Four Operating
System

C:\>- appears at the top left corner. pictures come to the desktop for using.
Small amount of memory is needed for this Large amount of memory is needed for this
operating system operating system
Users can perform their operations very Users can not perform their operations very speedy
speedy. compared with Text based Operating System.
Example of Text based Operating Systems are Example of Graphical based Operating System are
MS DOS, PC DOS,UNIX, LINUX etc MS WINDOWS 95/98/2000,XP, VISTA,
WNDOWS 7, MAC OS etc.
Difference between the Time sharing and Real Time operating system

The following table 4.4 gives the difference between the Time sharing and Real Time operating system:

Time Sharing Operating System Real Time Operating System


In this Operating System the same time slice is This Operating system is well defined and works
allocated for each process. in a fixed time constraints, give correct output so
that its users do not suffer from losses.
This operation system works on First come first This operation system works on priority basis.
serve basis (FIFO)
Resource can be shared in this Operating system Resource is dedicated for a specific amount of
time for its users.
Example of Time Sharing Operating System is Example of Real time operating system is Air
on line file sharing. line ticket reservation.

Difference between the Batch Processing and Multiprogramming operating system

The following table 4.5 gives the difference between the Batch Processing and Multiprogramming
operating system:

Batch Processing Operating System Multiprogramming Operating System


In this Operating System each process works in In this Operating system different processes can
a specific amount of time and after that time function it’s intended task at a time.
another process starts its function.
This operation system works serially as a result This operation system works parallel as a result
it is a slow process. it is a speedy process.
In this Operating system CPU is sometimes idle. There is no need of CPU in a idle state, it is all
time in a function able state.
Examples of Batch processing Operating System Examples of Multiprogramming operating
are CP/M, MS DOS, PC DOS system are WINDOWS 95/98/2000/XP/VISTA,
UNIX, LINUX etc.

Page- 71
Chapter Four Operating
System

Exercise
1. What do you mean by Operating System?
2. What are the Common features of Operating System?
3. What are the functions of Operating System?
4. Briefly describe about the Organization of Operating System.
5. Briefly describe about the types of Operating System.
6. What are the differences between the batch multiprogramming and time sharing operating system?
7. What are the differences between the Text based and graphical based operating system?
8. What are the differences between the Time sharing and Real Time operating system?
9. What are the differences between the Batch Processing and Multiprogramming operating system?

Page- 72

Potrebbero piacerti anche