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

Chapter 1 Introduction

The document is an introduction to operating systems, detailing their functions, structure, and various types of computing environments. It explains the role of operating systems as intermediaries between users and hardware, resource allocators, and control programs. Additionally, it covers concepts such as multiprogramming, time-sharing, and different operating system types including batch, real-time, distributed, and network operating systems.

Uploaded by

Mahmud Abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Chapter 1 Introduction

The document is an introduction to operating systems, detailing their functions, structure, and various types of computing environments. It explains the role of operating systems as intermediaries between users and hardware, resource allocators, and control programs. Additionally, it covers concepts such as multiprogramming, time-sharing, and different operating system types including batch, real-time, distributed, and network operating systems.

Uploaded by

Mahmud Abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Chapter 1: Introduction

•Operating System Concepts – 9th Edit9on • Silberschatz, Galvin and Gagne ©2013
Contents


What Operating Systems Do

Computer-System Organization

Computer-System Architecture

Operating-System Structure

Operating-System Operations

Computing Environments

Open-Source Operating Systems

•Operating System Concepts – 9th Edition • 1.2 • Silberschatz, Galvin and Gagne ©2013
Objectives

To describe the basic organization of computer


systems

To provide a grand tour of the major components


of operating systems

To give an overview of the many types of


computing environments


To explore several open-source operating systems

•Operating System Concepts – 9th Edition • 1.3 • 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.4 • 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,
•Operating System Concepts – 9th Edition machines, other computers•
• 1.5 Silberschatz, Galvin and Gagne ©2013
Four Components of a Computer System

•Operating System Concepts – 9th Edition • 1.6 • Silberschatz, Galvin and Gagne ©2013
What Operating Systems Do


Depends on the point of view

Users want convenience, ease of use
Don’t care about resource utilization


But shared computer such as mainframe or
minicomputer must keep all users happy

Users of dedicate systems such as workstations have
dedicated resources but frequently use shared resources
from servers

Handheld computers are resource poor, optimized for
usability and battery life

Some computers have little or no user interface, such as
embedded computers in devices and automobiles

•Operating System Concepts – 9th Edition • 1.7 • 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.8 • Silberschatz, Galvin and Gagne ©2013
Operating System Definition (Cont.)


No universally accepted definition

“Everything a vendor ships when you order an


operating system” is 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.9 • Silberschatz, Galvin and Gagne ©2013
Computer Startup


bootstrap program is loaded at power-up or reboot
Typically stored in ROM or EPROM, generally known as

firmware
Initializes all aspects of system

Loads operating system kernel and starts execution


•Operating System Concepts – 9th Edition • 1.10 • Silberschatz, Galvin and Gagne ©2013
Computer System Organization


Computer-system operation
One or more CPUs, device controllers connect through

common bus providing access to shared memory


Concurrent execution of CPUs and devices competing for

memory cycles

•Operating System Concepts – 9th Edition • 1.11 • Silberschatz, Galvin and Gagne ©2013
Computer-System Operation


I/O devices and the CPU can execute concurrently

Each device controller is in charge of a particular


device type


Each device controller has a local buffer

CPU moves data from/to main memory to/from local


buffers


I/O is from the device to local buffer of controller

Device controller informs CPU that it has finished its


operation by causing an interrupt


•Operating System Concepts – 9th Edition • 1.12 • Silberschatz, Galvin and Gagne ©2013
Common Functions of Interrupts

Interrupt transfers control to the interrupt service


routine generally, through the interrupt vector, which


contains the addresses of all the service routines


Interrupt architecture must save the address of the
interrupted instruction

A trap or exception is a software-generated interrupt


caused either by an error or a user request


An operating system is interrupt driven

•Operating System Concepts – 9th Edition • 1.13 • Silberschatz, Galvin and Gagne ©2013
Interrupt Handling

The operating system preserves the state of the CPU


by storing registers and the program counter


Determines which type of interrupt has occurred:
polling

vectored interrupt system


Separate segments of code determine what action


should be taken for each type of interrupt

•Operating System Concepts – 9th Edition • 1.14 • Silberschatz, Galvin and Gagne ©2013
Direct Memory Access Structure


Used for high-speed I/O devices able to transmit
information at close to memory speeds


Device controller transfers blocks of data from buffer
storage directly to main memory without CPU
intervention


Only one interrupt is generated per block, rather than
the one interrupt per byte

•Operating System Concepts – 9th Edition • 1.15 • Silberschatz, Galvin and Gagne ©2013
How a Modern Computer Works

•A von Neumann architecture

•Operating System Concepts – 9th Edition • 1.16 • Silberschatz, Galvin and Gagne ©2013
Batch operating system

The users of batch operating system do not interact with the computer directly.
Each user prepares his job on an off-line device like punch cards and submits
it to the computer operator.

To speed up processing, jobs with similar needs are batched together and run
as a group. Thus, the programmers left their programs with the operator.
The operator then sorts programs into batches with similar requirements.

The problems with Batch Systems are following.


 Lack of interaction between the user and job.
 CPU is often idle, because the speeds of the mechanical I/O
devices are slower than CPU.
 Difficult to provide the desired priority.

•Operating System Concepts – 9th Edition • 1.17 • Silberschatz, Galvin and Gagne ©2013
Operating System Structure


Multiprogramming 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
Processor's time which is shared among multiple users simultaneously is
termed as time-sharing.

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.18 • Silberschatz, Galvin and Gagne ©2013
Memory Layout for Multiprogrammed System

•Operating System Concepts – 9th Edition • 1.19 • Silberschatz, Galvin and Gagne ©2013
The main difference between Multiprogrammed Batch
Systems and Time-Sharing Systems is that in case of
multiprogrammed batch systems, objective is to maximize
processor use, whereas in Time-Sharing Systems objective is to
minimize response time.

•Operating System Concepts – 9th Edition • 1.20 • Silberschatz, Galvin and Gagne ©2013
Operating-System Operations
Interrupt driven by hardware

Software error or request creates exception or trap


Division by zero, request for operating system service


Other process problems include infinite loop, processes modifying each


other or the operating system

Dual-mode operation allows OS to protect itself and other system


components
User mode and kernel mode

Mode bit provided by hardware


Provides ability to distinguish when system is running user code


or kernel code
Some instructions designated as privileged, only executable in

kernel mode
System call changes mode to kernel, return from call resets it to

user

•Operating System Concepts – 9th Edition • 1.21 • Silberschatz, Galvin and Gagne ©2013
Transition from User to Kernel Mode


Timer to prevent infinite loop / process hogging resources
Set interrupt after specific period

Operating system decrements counter


When counter zero generate an interrupt


Set up before scheduling process to regain control or terminate


program that exceeds allotted time

•Operating System Concepts – 9th Edition • 1.22 • Silberschatz, Galvin and Gagne ©2013
Computing Environments – Cloud Computing


Delivers computing, storage, even apps as a service across a network

Logical extension of virtualization as based on virtualization

Amazon EC2 has thousands of servers, millions of VMs, PBs of
storage available across the Internet, pay based on usage

Many types

Public cloud – available via Internet to anyone willing to pay

Private cloud – run by a company for the company’s own use

Hybrid cloud – includes both public and private cloud components

Software as a Service (SaaS) – one or more applications available
via the Internet (i.e. word processor)

Platform as a Service (PaaS) – software stack ready for application
use via the Internet (i.e a database server)

Infrastructure as a Service (IaaS) – servers or storage available over
Internet (i.e. storage available for backup use)

•Operating System Concepts – 9th Edition • 1.23 • Silberschatz, Galvin and Gagne ©2013
Computing Environments – Cloud Computing

Cloud compute environments composed of traditional OSes, plus VMMs,


plus cloud management tools



Internet connectivity requires security like firewalls

Load balancers spread traffic across multiple applications

•Operating System Concepts – 9th Edition • 1.24 • Silberschatz, Galvin and Gagne ©2013
Computing Environments – Real-Time Embedded Systems

Real-time embedded systems most prevalent form of computers


Vary considerable, special purpose, limited purpose OS, real-time OS


Use expanding

Many other special computing environments as well


Some have OSes, some perform tasks without an OS


Real-time OS has well-defined fixed time constraints


Processing must be done within constraint


Correct operation only if constraints met


For example Scientific experiments, medical imaging systems,


industrial control systems, weapon systems, robots, and home-appliance


controllers, Air traffic


control system etc.

•Operating System Concepts – 9th Edition • 1.25 • Silberschatz, Galvin and Gagne ©2013
Computing Environments – Real-Time Embedded Systems

There are two types of real-time operating systems.

Hard real-time systems


Hard real-time systems guarantee that critical tasks complete on time. In hard
real-time systems secondary storage is limited or missing with data stored in ROM.
In these systems virtual memory is almost never found.

Soft real-time systems


Soft real time systems are less restrictive. Critical real-time task gets priority over
other tasks and retains the priority until it completes. Soft real-time systems have
limited utility than hard real-time systems. For example,
Multimedia, virtual reality, Advanced Scientific Projects like
undersea exploration and planetary rovers etc.

•Operating System Concepts – 9th Edition • 1.26 • Silberschatz, Galvin and Gagne ©2013
Distributed operating System
Distributed systems use multiple central processors
to serve multiple real time application and
multiple users. Data processing jobs are distributed
among the processors accordingly to which
one can perform each job most efficiently.

•Operating System Concepts – 9th Edition • 1.27 • Silberschatz, Galvin and Gagne ©2013
Distributed operating System

The advantages of distributed systems are following.



With resource sharing facility user at one site may be able to
use the resources available at another.

Speedup the exchange of data with one another via
electronic mail.

If one site fails in a distributed system, the remaining sites can
potentially continue operating.

Better service to the customers.

Reduction of the load on the host computer.

Reduction of delays in data processing.

•Operating System Concepts – 9th Edition • 1.28 • Silberschatz, Galvin and Gagne ©2013
Network operating System

Network Operating System runs on a server and and provides server the capability to
manage data, users, groups, security, applications, and other networking functions.
The primary purpose of the network operating system is to allow shared file
and printer access among multiple

computers in a network, typically a local area network (LAN), a private network or to oth
networks. Examples of network operating systems are Microsoft Windows Server 2003,
Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.

•Operating System Concepts – 9th Edition • 1.29 • Silberschatz, Galvin and Gagne ©2013
Open-Source Operating Systems

Operating systems made available in source-code format rather than just


binary closed-source

Counter to the copy protection and Digital Rights Management (DRM)


movement

Started by Free Software Foundation (FSF), which has “copyleft” GNU


Public License (GPL)

Examples include GNU/Linux and BSD UNIX (including core of Mac OS


X), and many more


Can use VMM like VMware Player (Free on Windows), Virtualbox (open

source and free on many platforms - http://www.virtualbox.com)



Use to run guest operating systems for exploration

•Operating System Concepts – 9th Edition • 1.30 • Silberschatz, Galvin and Gagne ©2013
End of Chapter 1

•Operating System Concepts – 9th Edit9on • Silberschatz, Galvin and Gagne ©2013

You might also like