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

OS Introduction

Uploaded by

Siva Sankar
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

OS Introduction

Uploaded by

Siva Sankar
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 35

Chapter 1: Introduction

Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013
What is an Operating System?

 A program that acts as an intermediary between a user of a


computer and the computer hardware
 Operating system goals:
 Execute user programs and make solving user problems
easier
 Make the computer system convenient to use
 Use the computer hardware in an efficient manner

Operating System Concepts – 9th Edition 1.2 Silberschatz, Galvin and Gagne ©2013
Computer System Structure
 Computer system can be divided into four components:
 Hardware – provides basic computing resources
 CPU, memory, I/O devices
 Operating system
 Controls and coordinates use of hardware among various
applications and users
 Application programs – define the ways in which the system
resources are used to solve the computing problems of the
users
 Word processors, compilers, web browsers, database
systems, video games
 Users
 People, machines, other computers

Operating System Concepts – 9th Edition 1.3 Silberschatz, Galvin and Gagne ©2013
Four Components of a Computer System

Operating System Concepts – 9th Edition 1.4 Silberschatz, Galvin and Gagne ©2013
Operating System Definition

 OS is a resource allocator
 Manages all resources
 Decides between conflicting requests for efficient and
fair resource use
 OS is a control program
 Controls execution of programs to prevent errors and
improper use of the computer

Operating System Concepts – 9th Edition 1.5 Silberschatz, Galvin and Gagne ©2013
Operating System Definition (Cont.)

 No universally accepted definition


 “Everything a vendor ships when you order an operating
system” is a good approximation
 But varies wildly
 “The one program running at all times on the computer” is the
kernel.
 Everything else is either
 a system program (ships with the operating system) , or
 an application program.

Operating System Concepts – 9th Edition 1.6 Silberschatz, Galvin and Gagne ©2013
First Generation (Serial Processing)
 Time Period: The 1940s and 1950s marked the start of electronic computers. They were the
new trend, replacing old mechanical ones.
 Size and Cost: These early computers were huge! And they came with a big price tag too.
 Basic Functions: Despite their size and cost, they could only do simple tasks.
 No Operating System: Imagine a computer without an operating system! That’s how they
were. They just did tasks one by one.
Serial Processing: This means they finish one task before starting the next. No multitasking here!
Wasted Power: The main computer brain, the CPU, often just sat there doing nothing. It waited a
lot, especially during tasks like reading data, which wasted its power.
One Task at a Time: These systems were like a person who can’t multitask. They could only handle
one job at a time, making things slow.
Long Wait Times: Imagine giving someone a job and waiting ages to see the result. That’s how
these systems were. You’d give them a task, and it took forever to get the outcome.

Operating System Concepts – 9th Edition 1.7 Silberschatz, Galvin and Gagne ©2013
Second Generation (Batch System)
•Due to the inefficiencies of serial processing, the need for a more optimized approach
became evident. This led to the development of a batch-processing system. This era (1950-60)
is called the second generation of operating systems.
•In a batch system, similar tasks (or jobs) are grouped into batches and then processed
sequentially without any user interaction.
•The goal was to automate the processing of jobs and minimize the setup time.
•A scripting language, Job Control Language (JCL), was introduced to manage these batches.
•It allows operators to specify the sequence of jobs to be executed.

Operating System Concepts – 9th Edition 1.8 Silberschatz, Galvin and Gagne ©2013
Advantages
•The system optimizes the processing sequence by grouping similar tasks, reducing
the overhead and setup time between jobs.
•It allows for automated processing of tasks, i.e., reduces the need for manual
intervention.
•The system could better utilize CPU and minimum idle time by processing tasks in
batches.
•Limitations
•It lacks real-time user interaction, i.e., users have to wait for the entire batch to be
processed.
•If the batches contain multiple tasks, giving output takes a longer time.
•Once the batch is processed, corrections can’t be done.

Operating System Concepts – 9th Edition 1.9 Silberschatz, Galvin and Gagne ©2013
Third Generation (Multi-Programmed Batch System)
In the previous two generations, the systems ran jobs one at a time in sequence, which
was efficient because the CPU had to wait for I/O operations to complete. To overcome
this, multiprogramming was introduced in the next generations of operating systems.
Multiprogramming allows multiple jobs to reside in the main memory at once, i.e., the
CPU could switch to another job if one job needs to wait for I/O operation. Due to multi-
programming CPU could process more jobs in a given amount of time.
Since multiple jobs are done at once, there was a need for more advanced memory
management. These memory needs led to the development of concepts such as memory
partitioning, paging, and segmentation.

Operating System Concepts – 9th Edition 1.10 Silberschatz, Galvin and Gagne ©2013
Multiprogramming (1)

A. Frank - P. Weisberg
Operating System Concepts – 9th Edition 1.11 Silberschatz, Galvin and Gagne ©2013
•Since multiple jobs are done at a time, it is important to decide which job to execute

first, second, or last. Algorithms like First-Come-First-Serve, Shortest Job Next (SJN),

and Round Robin are developed.

•The complexity of the OS was increased, and system utilities were developed to help

manage files, devices, and other system resources.

•Operating systems were accompanied by hardware like Integrated Circuit, which

allowed for smaller, faster, and more reliable computers.

Operating System Concepts – 9th Edition 1.12 Silberschatz, Galvin and Gagne ©2013
Fourth Generation (Time-Sharing Operating System)
The fourth-generation operating system was more commonly associated with programming
languages that were close to human language and often used for database-related tasks.
The fourth generation has features like:
•Graphical User Interface that allows users to interact with the system using windows,
icons, and menus.
•Ability to run multiple applications simultaneously.
•Built-in capabilities to connect to and function on networks, including the Internet.
•Automatically recognize and configure hardware devices.
•Advanced security mechanism to protect against malware, unauthorized access.
•Compatibility with a wide range of hardware devices and architecture.
•The OS allocates a small time slice or quantum to each task.

Operating System Concepts – 9th Edition 1.13 Silberschatz, Galvin and Gagne ©2013
Advantages of Operating System
User-friendly: Makes computers easy to use.
Manages resources: Handles CPU, memory, and storage well.
Multitasking: This lets you run many apps at once.
Error handling: Keeps the system running smoothly.
Developer-friendly: Ensures apps work well and consistently.
Disadvantages of the Operating System
Can Perform Slow: Extra software layer might reduce speed.
Needs specific setups: It might not work well on old computers.
Can be costly: Some, like Windows or macOS, aren’t free.
Software limits: Not all apps work on every system.
Learning new systems: Switching can be tough for users.

Operating System Concepts – 9th Edition 1.14 Silberschatz, Galvin and Gagne ©2013
Types of Operating Systems

There are several types of Operating Systems which are mentioned


below.
•Batch Operating System
•Multi-Programming System
•Multi-Processing System
•Multi-Tasking Operating System
•Time-Sharing Operating System
•Distributed Operating System
•Network Operating System
•Real-Time Operating System

Operating System Concepts – 9th Edition 1.15 Silberschatz, Galvin and Gagne ©2013
Batch Operating System
•This type of operating system does not interact with the computer directly. There is an
operator which takes similar jobs having the same requirements and groups them into
batches.
•It is the responsibility of the operator to sort jobs with similar needs. Batch Operating
System is designed to manage and execute a large number of jobs efficiently by
processing them in groups.

Operating System Concepts – 9th Edition 1.16 Silberschatz, Galvin and Gagne ©2013
• Advantages of Batch Operating System
• Multiple users can share the batch systems.
• The idle time for the batch system is very less.
• It is easy to manage large work repeatedly in batch systems.
• Disadvantages of Batch Operating System
• Batch systems are hard to debug.
• It is sometimes costly.
• The other jobs will have to wait for an unknown time if any job fails.
• In batch operating system the processing time for jobs is commonly
difficult to accurately predict while they are in the queue.
• Examples of Batch Operating Systems: Payroll Systems, Bank
Statements

Operating System Concepts – 9th Edition 1.17 Silberschatz, Galvin and Gagne ©2013
Multi-programming OS
•The operating system which can run multiple processes on a single processor is called a
multiprogramming operating system. There are different programs that want to get
executed. So these programs are kept in the ready queue. And are assigned to the CPU one
by one. If one process gets blocked then other processes from the ready queue are assigned
to the CPU.
•The aim of this is optimal resource utilization and more CPU utilization. In the below
figure, different processes are there in RAM(main memory). Some processes are waiting for
the CPU, and process 2(which was previously executing) is now doing I/O operations. So
CPU shifted to execute process 1.

Operating System Concepts – 9th Edition 1.18 Silberschatz, Galvin and Gagne ©2013
Memory Layout for Batch
Multiprogramming

Several jobs are kept in main memory at the same


time, and the CPU is multiplexed among them.

A. Frank - P. Weisberg
Operating System Concepts – 9th Edition 1.19 Silberschatz, Galvin and Gagne ©2013
Multiprogramming (1)

A. Frank - P. Weisberg
Operating System Concepts – 9th Edition 1.20 Silberschatz, Galvin and Gagne ©2013
Multi-Processing Operating System is a type of Operating System in
which more than one CPU is used for the execution of resources. It
betters the throughput of the System.

Advantages of Multi-Processing Operating System


•It increases the throughput of the system.
•As it has several processors, so, if one processor fails, we can
proceed with another processor.
Disadvantages of Multi-Processing Operating System
•Due to the multiple CPU, it can be more complex and somehow
difficult to understand.

Operating System Concepts – 9th Edition 1.21 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture

 Most systems use a single general-purpose processor


 Most systems have special-purpose processors as well
 Multiprocessors systems growing in use and importance
 Also known as parallel systems, tightly-coupled systems
 Advantages include:
1. Increased throughput
2. Economy of scale
3. Increased reliability – graceful degradation or fault tolerance
 Two types:
1. Asymmetric Multiprocessing – each processor is assigned a
specie task.
2. Symmetric Multiprocessing – each processor performs all tasks

Operating System Concepts – 9th Edition 1.22 Silberschatz, Galvin and Gagne ©2013
Symmetric Multiprocessing Architecture

Operating System Concepts – 9th Edition 1.23 Silberschatz, Galvin and Gagne ©2013
Multitasking OS
•Multi-tasking operating systems are designed to enable multiple applications to run
simultaneously. Multi-tasking operating systems allow multiple users to work on the
same document or application simultaneously.
•For example, a user running antivirus software, searching the internet, and playing a
song simultaneously. Then the user is using a multitasking OS.

Operating System Concepts – 9th Edition 1.24 Silberschatz, Galvin and Gagne ©2013
Time-sharing OS
•A time-sharing operating system is an application that provides a shared user
interface with multiple users logged in simultaneously. It allows multiple users to access
the same resources, such as files and applications, as long as they are logged in
simultaneously.
•This operating system type is most commonly used in businesses, especially those that
involve many simultaneous users.
• Time-sharing operating systems enable users to finish their jobs on a system at once.
The time-sharing OS is the latest advancement in the computer science world; it is being
accepted worldwide, also at an increasing rate.

Operating System Concepts – 9th Edition 1.25 Silberschatz, Galvin and Gagne ©2013
Clustered Systems

 Like multiprocessor systems, but multiple systems working together


 Usually sharing storage via a storage-area network (SAN)
 Provides a high-availability service which survives failures
 Asymmetric clustering has one machine in hot-standby mode
 Symmetric clustering has multiple nodes running applications,
monitoring each other
 Some clusters are for high-performance computing (HPC)
 Applications must be written to use parallelization
 Some have distributed lock manager (DLM) to avoid conflicting
operations

Operating System Concepts – 9th Edition 1.26 Silberschatz, Galvin and Gagne ©2013
Clustered Systems

Operating System Concepts – 9th Edition 1.27 Silberschatz, Galvin and Gagne ©2013
Operating System Structure
 Multiprogramming (Batch system) needed for efficiency
 Single user cannot keep CPU and I/O devices busy at all times
 Multiprogramming organizes jobs (code and data) so CPU always has one to
execute
 A subset of total jobs in system is kept in memory
 One job selected and run via job scheduling
 When it has to wait (for I/O for example), OS switches to another job

 Timesharing (multitasking) is logical extension in which CPU switches jobs


so frequently that users can interact with each job while it is running, creating
interactive computing
 Response time should be < 1 second
 Each user has at least one program executing in memory process
 If several jobs ready to run at the same time  CPU scheduling
 If processes don’t fit in memory, swapping moves them in and out to run
 Virtual memory allows execution of processes not completely in memory

Operating System Concepts – 9th Edition 1.28 Silberschatz, Galvin and Gagne ©2013
Memory Layout for Multiprogrammed System

Operating System Concepts – 9th Edition 1.29 Silberschatz, Galvin and Gagne ©2013
Network Operating System
A network operating system is an important category of the
operating system that operates ona server using network devices
like a switch, router, or firewall to handle data, applications and
other network resources.
It provides connectivity among the autonomous operating system,
called as a network operating system. The network operating system
is also useful to share data, files, hardware devices and printer
resources among multiple computers to communicate with each
other.

Operating System Concepts – 9th Edition 1.30 Silberschatz, Galvin and Gagne ©2013
Types of network operating system
•Peer-to-peer network operating system: The type of
network operating system allows users to share files, resources
between two or more computer machines using a LAN.

Operating System Concepts – 9th Edition 1.31 Silberschatz, Galvin and Gagne ©2013
Client-Server network operating system: It is the type of
network operating system that allows the users to access
resources, functions, and applications through a common
server or center hub of the resources.
The client workstation can access all resources that exist in
the central hub of the network. Multiple clients can access
and share different types of the resource over the network
from different locations.

Operating System Concepts – 9th Edition 1.32 Silberschatz, Galvin and Gagne ©2013
• Distributed Operating system
• A distributed operating system provides an environment in which multiple independent
CPU or processor communicates with each other through physically separate
computational nodes.
• Each node contains specific software that communicates with the global aggregate
operating system. With the ease of a distributed system, the programmer or developer can
easily access any operating system and resource to execute the computational tasks and
achieve a common goal.
• It is the extension of a network operating system that facilitates a high degree of
connectivity to communicate with other users over the network.

Operating System Concepts – 9th Edition 1.33 Silberschatz, Galvin and Gagne ©2013
Real-Time Operating Systems

• These types of OSs serve 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 there are time requirements that are very strict like missile
systems, air traffic control systems, robots, etc.
• Types of Real-Time Operating Systems
• Hard Real-Time Systems: Hard Real-Time OSs are meant for 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 airbags which are required
to be readily available in case of an accident. Virtual memory is rarely found in these
systems.
• Soft Real-Time Systems: These OSs are for applications where time-constraint is less
strict.

Operating System Concepts – 9th Edition 1.34 Silberschatz, Galvin and Gagne ©2013
Handheld Operating System:
•Handheld operating systems are available in all handheld devices like
Smartphones and tablets. It is sometimes also known as a Personal
Digital Assistant.
•The popular handheld device in today’s world is Android and iOS. These
operating systems need a high-processing processor and are also
embedded with various types of sensors.

Features of Handheld Operating System:


1.Its work is to provide real-time operations.
2.There is direct usage of interrupts.
3.Input/Output device flexibility.
4.Configurability.
Types of Handheld Operating Systems:
Types of Handheld Operating Systems are as follows:
1.Palm OS
2.Symbian OS
3.Linux OS
4.Windows
5.Android
Operating System Concepts – 9th Edition 1.35 Silberschatz, Galvin and Gagne ©2013

You might also like