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

Chapter 1: Introduction: Silberschatz, Galvin and Gagne ©2013 Operating System Concepts - 9 Edit9on

The document provides an overview of operating system concepts including what an operating system is, its goals and functions. It describes key operating system components like processes, memory management, storage management and I/O, and how the operating system schedules jobs and handles interrupts.

Uploaded by

Bakary Seydi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Chapter 1: Introduction: Silberschatz, Galvin and Gagne ©2013 Operating System Concepts - 9 Edit9on

The document provides an overview of operating system concepts including what an operating system is, its goals and functions. It describes key operating system components like processes, memory management, storage management and I/O, and how the operating system schedules jobs and handles interrupts.

Uploaded by

Bakary Seydi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

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(in-between) 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

What Operating Systems Do


To understand the OS role, lets explore Users view for OS and Computer
System view:
Users view:

A user of a single computer want convenience, ease of use with


maximized performance and less care about resource utilization.

Computer System View:

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.3

Silberschatz, Galvin and Gagne 2013

Computer System Architecture


A computer system is organized according to the number general-purpose
processors used.
Most systems use a single general-purpose processor (PDAs through

mainframes)

Multiprocessors systems (parallel systems, Tightly

coupledmultiprocessorsystemscontain multiple CPUs) are dominating


now; those has more than one processor:

Advantages include:
1.

Increased throughput more work done

2.

Economy of scale processors share peripherals (less cost)

3.

Increased reliability graceful degradation or fault tolerance

Two types:

Asymmetric Multiprocessing all scheduling decisions, I/O processing, and

other system activities handled by a single processor.

Symmetric Multiprocessing- processors work in parallel and share

resources

Operating System Concepts 9th Edition

1.4

Silberschatz, Galvin and Gagne 2013

Operating System Structure


Multiprogramming is one of OS jobs:

Single user cannot keep CPU and I/O devices busy at all times

Multiprogramming is a basic form of parallel processing in which


several programs are run at the same time on a uniprocessor.

Since there is only one processor , there can be no true simultaneous


execution of different programs.

Instead, the operating system executes part of one program, then part
of another, and so on.

To the user it appears that all programs are executing at the same time.

Jobs in Memory

OS keeps other jobs in memory and on disk in Job pool


OS has to select a job to run one at a time in the CPU first
this is : Job scheduling

When it has to wait (for I/O for example), OS switches to


another job.

Operating System Concepts 9th Edition

1.5

Silberschatz, Galvin and Gagne 2013

Operating System Structure(Cont.)


Another OS job is :Timesharing (multitasking) :

A CPU switches between 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 this executed program
is called process

When several jobs ready to run at the same time, OS has to choose which to run
first this is CPU scheduling

Timesharing requires OS to ensure reasonable response time:

OS moves jobs or processes from memory to disk while waiting for other
processes to execute this is swapping

To ensure reasonable response time , OS use a part of the disk and make it work
as a memory called - Virtual memory- which allows execution of processes not
completely in memory

Operating System Concepts 9th Edition

1.6

Silberschatz, Galvin and Gagne 2013

Operating-System Operations

Interrupt driven by hardware

If there are no processes to execute, no I/O devices to service, and no users to


whom to respond, an operating system will sit quietly, waiting for something to
happen- to interrupt its idle mode; it takes this interrupt as an order or process to
execute.

The OS must maintain control over the CPU. To accomplish this goal, we can
use a timer- which can be set to interrupt the CPU work after a specific time. It
prevent infinite loop / process hogging resources

The computer system has Dual-mode operation that allows OS to protect itself and
other system components:

User mode : When the computer system is executing on behalf of a user


application, the system is in user mode.

Kernel mode: when a user application requests a service from the operating
system, the system must transition from user to kernel mode to fulfill the
request.

Operating System Concepts 9th Edition

1.7

Silberschatz, Galvin and Gagne 2013

Operating-System Operations (Cont.)

Incomputing, asystem callis how a program requests a service from


anoperating system'skernel.

This may include hardware-related services (for example, accessing ahard disk
drive), creation and execution of newprocesses, and communication with
integral kernel services such asprocess scheduling.

System calls provide an essential interface between a process and the operating
system.

Operating System Concepts 9th Edition

1.8

Silberschatz, Galvin and Gagne 2013

Process Management
A process is a program in execution. It is a unit of work within the system.

Program is a passive entity, process is an active entity.


A process is an executing instance of an application. What does that mean?
Well, for example, when you double-click the Microsoft Word icon, you start a
process that runs Word.
A thread is a path of executionwithina process.
A process can contain multiple threads.
Process needs resources to accomplish its task
CPU, memory, I/O, files
Initialization data
Process termination requires reclaim of any reusable resources

Single-threaded process has one program counter specifying location of next

instruction to execute
Process executes instructions sequentially, one at a time, until completion
Multi-threaded process has one program counter per thread.

Operating System Concepts 9th Edition

1.9

Silberschatz, Galvin and Gagne 2013

Process Management Activities


The operating system is responsible for the following activities in
connection with process management:
Creating and deleting both user and system processes
Suspending and resuming processes
Providing mechanisms for process synchronization
Providing mechanisms for process communication
Providing mechanisms for deadlock handling

Operating System Concepts 9th Edition

1.10

Silberschatz, Galvin and Gagne 2013

Memory Management
Memory management is the process of controlling and coordinating

computermemory, assigning portions calledblocksto various


runningprogramsto optimize overall system performance.

Memory management activities

Keeping track of which parts of memory are currently being used


and by whom

Deciding which processes (or parts thereof) and data to move into
and out of memory

Allocating and deallocating memory space as needed

Operating System Concepts 9th Edition

1.11

Silberschatz, Galvin and Gagne 2013

Storage Management

In a more formal usage, storage has been divided into:


Primary storage, which holds data inmemory(sometimes called random access memory
orRAM) and other "built-in" devices such as the processor's L1 cache.
Secondary storage, which holds data onhard disks, tapes, and other devices requiring
input/output operations.

While managing the storage, OS activities includes:

Free-space management

Storage allocation

Disk scheduling
File-System management
Files usually organized into directories
Access control on most systems to determine who can access what
OS activities include
Creating and deleting files and directories
Mapping files onto secondary storage
Backup files onto stable (non-volatile) storage media

Operating System Concepts 9th Edition

1.12

Silberschatz, Galvin and Gagne 2013

Performance of Various Levels of Storage

Primary storage is much faster to access than secondary storage.


Secondary storage can hold much more data than primary storage.
Movement between levels of storage hierarchy can be explicit or

implicit

Operating System Concepts 9th Edition

1.13

Silberschatz, Galvin and Gagne 2013

I/O Subsystem
One purpose of OS is to hide particularities of hardware devices (such

as printer, mouse, keyboard) from the user.

I/O subsystem responsible for

Memory management of I/O including buffering (storing data


temporarily while it is being transferred), caching (storing parts of
data in faster storage for performance), spooling (the overlapping
of output of one job with input of other jobs)

General device-driver interface

Drivers for specific hardware devices

Operating System Concepts 9th Edition

1.14

Silberschatz, Galvin and Gagne 2013

Protection and Security


Protection any mechanism for controlling access of processes or

users to resources defined by the OS

Security defense of the system against internal and external attacks

Huge range, including denial-of-service, worms, viruses, identity


theft, theft of service

Systems generally first distinguish among users, to determine who can

do what
User identities (user IDs, security IDs) include name and
associated number, one per user
User ID then associated with all files, processes of that user to
determine access control
Group identifier (group ID) allows set of users to be defined and
controls managed, then also associated with each process, file
Privilege escalation allows user to change to effective ID with
more rights

Operating System Concepts 9th Edition

1.15

Silberschatz, Galvin and Gagne 2013

Kernel Data Structures


The following are data structures used by Operating system.

a list represents a collection of data values as a sequence. The most common


method for implementing this structure is a linked list, in which items are linked to
one another. Linked lists are of several types:

Singly linked list : each item points to its successor

Doubly linked list : a given item can refer either to its predecessor or to its
successor

Circular linked list : the last element in the list refers to the first element,
rather than to null

Operating System Concepts 9th Edition

1.16

Silberschatz, Galvin and Gagne 2013

Computing Environments
Computing Environments - Traditional
Stand-alone general purpose machines
Portals provide web access to internal systems
Network computers (thin clients) are like Web terminals
Laptops (mobile computers) interconnect via wireless networks

Computing Environments - Mobile


Handheld smartphones, tablets, etc.
Leaders are Apple iOS and Google Android
Extra feature more OS features (GPS, gyroscope)
Use IEEE 802.11 wireless, or cellular data networks for connectivity
Allows new types of apps like augmented reality (in which a view of reality

is modified by a computer such as sports scores on TV during a match).

Operating System Concepts 9th Edition

1.17

Silberschatz, Galvin and Gagne 2013

Computing Environments
Computing Environments Distributed
Collection of separate, possibly heterogeneous, systems networked together
Illusion of a single system
Network Operating System provides features between systems across

network

Computing Environments Client/Server

In clientserver computing environment the servers provide the services to

clients.
Many systems now servers, responding to requests generated by clients
Compute-server system provides an interface to client to request
services (i.e., database)
File-server system provides interface for clients to store and retrieve
files

Operating System Concepts 9th Edition

1.18

Silberschatz, Galvin and Gagne 2013

Computing Environments - Peer-to-Peer


Another model of distributed system
P2P does not distinguish clients and servers

Instead all nodes are considered peers

May each act as client, server or both

Node must join P2P network

Registers its service with central lookup


service on network, or

Broadcast request for service and


respond to requests for service via
discovery protocol

Examples include Napster and Gnutella,


Voice over IP (VoIP) such as Skype

Operating System Concepts 9th Edition

1.19

Silberschatz, Galvin and Gagne 2013

Computing Environments - Virtualization


Virtualization computing environment allows operating systems to run

applications within other OSes

Emulation used when source CPU type different from target type (i.e.

PowerPC to Intel x86)

VMM (Virtual Machine Manager) provides virtualization services

Operating System Concepts 9th Edition

1.20

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 companys 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.21

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.22

Silberschatz, Galvin and Gagne 2013

Computing Environments Real-Time Embedded Systems


A real-time system is used when rigid time requirements have been placed on

the operation of a processor or the flow of data; thus, it is often used as a


control device in a dedicated application such as break system in automobiles.

Embedded systems almost always run real-time operating systems such as

Windows CE.

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

Operating System Concepts 9th Edition

1.23

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.24

Silberschatz, Galvin and Gagne 2013

You might also like