Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CPPC 10 Lecture Notes 1 Overview of Operating Systems PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

CPPC 10 Operating Systems Lecture Note 1

Lecture Note 1: Overview of the Operating System

What is operating system?


An operating system acts as an intermediary between the user of a computer and computer
hardware. The purpose of an operating system is to provide an environment in which a user
can execute programs in a convenient and efficient manner.
An operating system is software that manages the computer hardware. The hardware must
provide appropriate mechanisms to ensure the correct operation of the computer system and
to prevent user programs from interfering with the proper operation of the system.

Other Definition:
 An operating system is a program that controls the execution of application
programs and acts as an interface between the user of a computer and the
computer hardware.

 A more common definition is that the operating system is the one program
running at all times on the computer (usually called the kernel), with all else being
application programs.

 An operating system is concerned with the allocation of resources and services,


such as memory, processors, devices, and information. The operating system
correspondingly includes programs to manage these resources, such as a traffic
controller, a scheduler, memory management module, I/O programs, and a file

Objectives of Operating Systems

Modern Operating systems generally have following three major goals. Operating systems
generally accomplish these goals by running processes in low privilege and providing service
calls that invoke the operating system kernel in high-privilege state.

1. To hide details of hardware by creating abstraction

An abstraction is software that hides lower level details and provides a set of higher-level
functions. An operating system transforms the physical world of devices, instructions,
memory, and time into virtual world that is the result of abstractions built by the operating
system. There are several reasons for abstraction.

First, the code needed to control peripheral devices is not standardized. Operating systems
provide subroutines called device drivers that perform operations on behalf of programs, for
example, input/output operations.
Second, the operating system introduces new functions as it abstracts the hardware. For
instance, operating system introduces the file abstraction so that programs do not have to
deal with disks.

Third, the operating system transforms the computer hardware into multiple virtual
computers, each belonging to a different program. Each program that is running is called a
process. Each process views the hardware through the lens of abstraction.
Fourth, the operating system can enforce security through abstraction.
CPPC 10 Operating Systems Lecture Note 1

2. To allocate resources to processes (Manage resources)

An operating system controls how processes (the active agents) may access resources
(passive entities).

3. Provide a pleasant and effective user interface

Users interact with the operating systems through the user interface and are usually
interested in the “look and feel” of the operating system. The most important components of
the user interface are the command interpreter, the file system, on-line help, and application
integration. The recent trend has been toward increasingly integrated graphical user
interfaces that encompass the activities of multiple processes on networks of computers.

Facts:

One can view Operating Systems from two points of views: As a Resource Manager
and as an Extended Machine.

From Resource manager point of view Operating Systems manage the different parts
of the system efficiently and from extended machines point of view Operating
Systems provide a virtual machine to users that is more convenient to use. The basic
concepts of Operating Systems are processes, memory management, I/O
management, the file systems, and security.

Functions of Operating system – Operating system performs three functions:

1. Convenience: An OS makes a computer more convenient to use.


2. Efficiency: An OS allows the computer system resources to be used in an efficient
manner.
3. Ability to Evolve: An OS should be constructed in such a way as to permit the effective
development, testing and introduction of new system functions at the same time without
interfering with service.

Operating system as User Interface –

1. User
2. System and application programs
3. Operating system
4. Hardware

Every general-purpose computer consists of the hardware, operating system, system


programs, and application programs. The hardware consists of memory, CPU, ALU, and I/O
devices, peripheral device, and storage device. System program consists of compilers,
loaders, editors, OS, etc. The application program consists of business programs, database
programs.
CPPC 10 Operating Systems Lecture Note 1

Fig1: Conceptual view of a computer system

Every computer must have an operating system to run other programs. The operating system
coordinates the use of the hardware among the various system programs and application
programs for various users. It simply provides an environment within which other programs
can do useful work.
The operating system is a set of special programs that run on a computer system that allows it
to work properly. It performs basic tasks such as recognizing input from the keyboard, keeping
track of files and directories on the disk, sending output to the display screen and controlling
peripheral devices.

OS is designed to serve two basic purposes:


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

The Operating system must support the following tasks. The task is:
1. Provides the facilities to create, modification of programs and data files using an editor.
2. Access to the compiler for translating the user program from high level language to
machine language.
3. Provide a loader program to move the compiled program code to the computer‟s memory
for execution.
4. Provide routines that handle the details of I/O programming.
CPPC 10 Operating Systems Lecture Note 1

Types of Operating System

An Operating System performs all the basic tasks like managing file, process, and memory.
Thus operating system acts as manager of all the resources, i.e. resource manager. Thus
operating system becomes an interface between user and machine.

Types of Operating Systems: Some of the widely used operating systems are as follows-

1. Batch Operating System

This type of operating system does not interact with the computer directly. There is an
operator which takes similar jobs having same requirement and group them into batches. It is
the responsibility of operator to sort the jobs with similar needs.

Advantages of Batch Operating System:


 It is very difficult to guess or know the time required by any job to complete. Processors
of the batch systems know how long the job would be when it is in queue
 Multiple users can share the batch systems
 The idle time for batch system is very less
 It is easy to manage large work repeatedly in batch systems

Disadvantages of Batch Operating System:


 The computer operators should be well known with batch systems
 Batch systems are hard to debug
 It is sometime costly
 The other jobs will have to wait for an unknown time if any job fails

Examples of Batch based Operating System: Payroll System, Bank Statements etc.

2. Time-Sharing Operating Systems

Each task is given some time to execute, so that all the tasks work smoothly. Each user gets
time of CPU as they use single system. These systems are also known as Multitasking
Systems. The task can be from single user or from different users also. The time that each
task gets to execute is called quantum. After this time interval is over OS switches over to next
task.
CPPC 10 Operating Systems Lecture Note 1

Advantages of Time-Sharing OS:


 Each task gets an equal opportunity
 Less chances of duplication of software
 CPU idle time can be reduced

Disadvantages of Time-Sharing OS:


 Reliability problem
 One must have to take care of security and integrity of user programs and data
 Data communication problem

Examples of Time-Sharing OSs are: Multics, Unix etc.

3. Distributed Operating System

These types of operating system is a recent advancement in the world of computer technology
and are being widely accepted all-over the world and, that too, with a great pace. Various
autonomous interconnected computers communicate each other using a shared
communication network. Independent systems possess their own memory unit and CPU.
These are referred as loosely coupled systems or distributed systems. These system‟s
processors differ in size and function. The major benefit of working with these types of
operating system is that it is always possible that one user can access the files or software
which are not actually present on his system but on some other system connected within this
network i.e., remote access is enabled within the devices connected in that network.
CPPC 10 Operating Systems Lecture Note 1

Advantages of Distributed Operating System:


 Failure of one will not affect the other network communication, as all systems are
independent from each other
 Electronic mail increases the data exchange speed
 Since resources are being shared, computation is highly fast and durable
 Load on host computer reduces
 These systems are easily scalable as many systems can be easily added to the network
 Delay in data processing reduces

Disadvantages of Distributed Operating System:


 Failure of the main network will stop the entire communication
 To establish distributed systems the language which are used are not well defined yet
 These types of systems are not readily available as they are very expensive. Not only
that the underlying software is highly complex and not understood well yet

Examples of Distributed Operating System are- LOCUS etc.

4. Network Operating System

These systems run on a server and provide the capability to manage data, users, groups,
security, applications, and other networking functions. These type of operating systems allow
shared access of files, printers, security, applications, and other networking functions over a
small private network. One more important aspect of Network Operating Systems is that all the
users are well aware of the underlying configuration, of all other users within the network, their
individual connections etc. and that‟s why these computers are popularly known as tightly
coupled systems.

Advantages of Network Operating System:


 Highly stable centralized servers
 Security concerns are handled through servers
 New technologies and hardware up-gradation are easily integrated to the system
 Server access are possible remotely from different locations and types of systems
CPPC 10 Operating Systems Lecture Note 1

Disadvantages of Network Operating System:


 Servers are costly
 User has to depend on central location for most operations
 Maintenance and updates are required regularly

Examples of Network Operating System are: Microsoft Windows Server 2003, Microsoft
Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD etc.

5. Real-Time Operating System

These types of OSs serve the real-time systems. The time interval required to process and
respond to inputs is very small. This time interval is called response time.

Real-time systems are used when time requirements are very strict like missile systems, air
traffic control systems, robots etc.

Two types of Real-Time Operating System which are as follows:

 Hard Real-Time Systems:


These OSs are meant for the applications where time constraints are very strict and
even the shortest possible delay is not acceptable. These systems are built for saving
life like automatic parachutes or air bags which are required to be readily available in
case of any accident. Virtual memory is almost never found in these systems.

 Soft Real-Time Systems:


These OSs are for applications where for time-constraint is less strict.
CPPC 10 Operating Systems Lecture Note 1

Advantages of RTOS:
 Maximum Consumption: Maximum utilization of devices and system,thus more output
from all the resources
 Task Shifting: Time assigned for shifting tasks in these systems are very less. For
example in older systems it takes about 10 micro seconds in shifting one task to another
and in latest systems it takes 3 micro seconds.
 Focus on Application: Focus on running applications and less importance to
applications which are in queue.
 Real time operating system in embedded system: Since size of programs are small,
RTOS can also be used in embedded systems like in transport and others.
 Error Free: These types of systems are error free.
 Memory Allocation: Memory allocation is best managed in these type of systems.

Disadvantages of RTOS:
 Limited Tasks: Very few tasks run at the same time and their concentration is very less
on few applications to avoid errors.
 Use heavy system resources: Sometimes the system resources are not so good and
they are expensive as well.
 Complex Algorithms: The algorithms are very complex and difficult for the designer to
write on.
 Device driver and interrupt signals: It needs specific device drivers and interrupt
signals to response earliest to interrupts.
 Thread Priority: It is not good to set thread priority as these systems are very less prone
to switching tasks.

Examples of Real-Time Operating Systems are: Scientific experiments, medical imaging


systems, industrial control systems, weapon systems, robots, air traffic control systems, etc.

History of Operating Systems

Historically operating systems have been tightly related to the computer architecture, so it is a
good idea to study the history of operating systems from the architecture of the computers on
which they run.

Operating systems have evolved through a number of distinct phases or generations which
correspond roughly to the decades.

The 1940's - First Generation

The earliest electronic digital computers had no operating systems. Machines of the time were
so primitive that programs were often entered one bit at a time on rows of mechanical switches
(plug boards). Programming languages were unknown (not even assembly language).
Operating systems were unheard of.

The 1950's - Second Generation

By the early 1950's, the routine had improved somewhat with the introduction of punch cards.
The General Motors Research Laboratories implemented the first operating systems in early
1950's for their IBM 701. The system of the 50's generally ran one job at a time. These were
called single-stream batch processing systems because programs and data were submitted in
groups or batches.
CPPC 10 Operating Systems Lecture Note 1

The 1960's - Third Generation

The systems of the 1960's were also batch processing systems, but they were able to take
better advantage of the computer's resources by running several jobs at once. So operating
systems designers developed the concept of multiprogramming in which several jobs are in
main memory at once; a processor is switched from job to job as needed to keep several jobs
advancing while keeping the peripheral devices in use.

For example, on the system with no multiprogramming, when the current job paused to wait for
other I/O operation to complete, the CPU simply sat idle until the I/O finished. The solution for
this problem 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.

Another major feature in third-generation operating systems was the technique called spooling
(simultaneous peripheral operations on line). In spooling, a high-speed device like a disk
interposed between a running program and a low-speed device involved with the program in
input/output. Instead of writing directly to a printer, for example, outputs are written to the disk.
Programs can run to completion faster, and other programs can be initiated sooner when the
printer becomes available, the outputs may be printed.

Note that spooling technique is much like thread being spun to a spool so that it may later be
unwound as needed.

Another feature present in this generation was time-sharing technique, a variant of


multiprogramming technique, in which each user has an on-line (i.e., directly connected)
terminal. Because the user is present and interacting with the computer, the computer system
must respond quickly to user requests, otherwise user productivity could suffer. Timesharing
systems were developed to multi-program large number of simultaneous interactive users.

The 1970’s - Fourth Generation

With the development of LSI (Large Scale Integration) circuits, chips, operating system
entered in the system entered in the personal computer and the workstation age.
Microprocessor technology evolved to the point that it became possible to build desktop
computers as powerful as the mainframes of the 1970s. Two operating systems have
dominated the personal computer scene: MS-DOS, written by Microsoft, Inc. for the IBM PC
and other machines using the Intel 8088 CPU and its successors, and UNIX, which is
dominant on the large personal computers using the Motorola 6899 CPU family.

1980’s to Present - Fifth Generation

The period of fifth generation is 1980-till date. In the fifth generation, VLSI technology became
ULSI (Ultra Large Scale Integration) technology, resulting in the production of microprocessor
chips having ten million electronic components.

This generation is based on parallel processing hardware and AI (Artificial Intelligence)


software. AI is an emerging branch in computer science, which interprets the means and
method of making computers think like human beings. All the high-level languages like C and
C++, Java, .Net etc., are used in this generation.
CPPC 10 Operating Systems Lecture Note 1

AI includes −

Robotics
Neural Networks
Game Playing
Development of expert systems to make decisions in real-life situations
Natural language understanding and generation

The main features of fifth generation are −


ULSI technology
Development of true artificial intelligence
Development of Natural language processing
Advancement in Parallel Processing
Advancement in Superconductor technology
More user-friendly interfaces with multimedia features
Availability of very powerful and compact computers at cheaper rates

Some computer types of this generation are −

Desktop
Laptop
NoteBook
UltraBook
ChromeBook

Need for an OS

The primary need for the OS arises from the fact that user needs to be provided with services
and OS ought to facilitate the provisioning of these services. The central part of a computer
system is a processing engine called CPU. A system should make it possible for a user‟s
application to use the processing unit. A user application would need to store information. The
OS makes memory available to an application when required. Similarly, user applications need
use of input facility to communicate with the application. This is often in the form of a
keyboard, or a mouse or even a joy stick (if the application is a game for instance).
CPPC 10 Operating Systems Lecture Note 1

The output usually provided by a video monitor or a printer as some times the user may wish
to generate an output in the form of a printed document. Output may be available in some
other forms. For example it may be a video or an audio file.

Let us consider few applications.


 Document Design
 Accounting
 E-mail
 Image processing
 Games

We notice that each of the above application requires resources for


 Processing information
 Storage of Information
 Mechanism to inputting information
 Provision for outputting information
 These service facilities are provided by an operating system regardless of the nature of
application.

The OS offers generic services to support all the above operations. These operations in turn
facilitate the applications mentioned earlier. To that extent an OS operation is application
neutral and service specific.

User and System View

From the user point of view the primary consideration is always the convenience. It should be
easy to use an application. In launching an application, it helps to have an icon which gives a
clue which application it is. We have seen some helpful clues for launching a browser, e-mail
or even a document preparation application. In other words, the human computer interface
which helps to identify an application and its launch is very useful. This hides a lot of details of
the more elementary instructions that help in selecting the application. Similarly, if we examine
the programs that help us in using input devices like a key board – all the complex details of
character reading program are hidden from the user. The same is true when we write a
program. For instance, when we use a programming language like C, a printf command helps
to generate the desired form of output. The following figure essentially depicts the basic
schema of the use of OS from a user stand point. However, when it comes to the view point of
a system, the OS needs to ensure that all the system users and applications get to use the
facilities that they need.
CPPC 10 Operating Systems Lecture Note 1

USER USER …… USER


1 2 n

SYSTEM AND APPLICATION
PROGRAMS
OPERATING
SYSTEM
COMPUTER
HARDWARE
Also, OS needs to ensure that system resources are utilized efficiently. For instance, there
may be many service requests on a Web server. Each user request need to be serviced.
Similarly, there may be many programs residing in the main memory. The system need to
determine which programs are active and which need to await some form of input or output.
Those that need to wait can be suspended temporarily from engaging the processor. This
strategy alone enhances the processor throughput. In other words, it is important for an
operating system to have a control policy and algorithm to allocate the system resources.

Characteristics of Modern OS include:


1. Object-Oriented Design. Object-Oriented Design is the largest trend in designing of the
operating system. In which the OS creates the objects for each facility, each object has a set
of operations.

2. Multi-threading. An application or program divided into several smaller tasks, these tasks
are executed by the processor concurrently. These smaller tasks are called threads. A thread
is a light-weight process or a dispatchable unit of work. A thread has some of the
characteristics of a process. The number of independent threads in an application executed by
the processor at the time is called Multi-threading.

3. Systematic Multi-Processing. If a computer has more than one processor, these processors
can share the memory and Input/Output facilities and these processors share the same job for
execution then the system is called Systematic Multi-Processor System. The operating system
designed for Systematic processing is called „Systematic Multi-Processing Operating System‟.

The advantage of using Systematic Multi-Processing over uni architecture. There are:

i. Throughput: It simply means that the number of jobs executed by the processor in a
time slot.

ii. Reliability: it means that if one processor failed due to hardware problems even can
execute the jobs with other processors.

iii. In the user point of view, jobs are executed very fast.
CPPC 10 Operating Systems Lecture Note 1

4. Distributed Operating System. A Distributed Operating System is an operating system that


runs on a network of computers. The operating system, memory files are shared by the
number of users in the network from the server. In a Distributed Operating System, each user
thinks that running on a single large system with one operating system. The users don‟t need
to know where the files in the network.

5. Micro-Kernel Architecture. A Micro-Kernel Architecture is a minimal operating system that


performs only the essential functions of an operating system. System processes perform all
other operating system functions. Here the system processes mean Servers. A system that
contains the server is called the Client-Server Model.

Summary
In this section, you learned:
1. The definition of Operating System
2. The objectives of Operating System
3. The different functions of Operating system
4. The different types of Operating System
5. The history or evolution of Operating System
6. The need of an Operating System
7. The characteristics of modern operating system

Lecture Notes 1 Exercise:


1. List at least five operating system functions.
2. List the main features of the 1st generation up to the 5th generation of operating systems.
3. List the computer types of the 1st generation up to the 5th generation of operating systems.
4. List at least five examples of Hard Real-Time Systems and Soft Real-Time Systems.
5. List at least five common services provided by an operating system.

You might also like