0% found this document useful (0 votes)
45 views107 pages

Evolution of Operating Systems

This document provides an overview of operating systems, outlining key learning objectives and concepts. It discusses how an operating system acts as an interface between applications and computer hardware, following a layered architecture. The operating system objectives are to provide convenience, efficiency, and ability to evolve. Key functions of the operating system include managing resources like processing, storage, I/O devices, memory, and facilitating program execution and development. Interfaces like the instruction set architecture, application binary interface, and application programming interface are also outlined.

Uploaded by

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

Evolution of Operating Systems

This document provides an overview of operating systems, outlining key learning objectives and concepts. It discusses how an operating system acts as an interface between applications and computer hardware, following a layered architecture. The operating system objectives are to provide convenience, efficiency, and ability to evolve. Key functions of the operating system include managing resources like processing, storage, I/O devices, memory, and facilitating program execution and development. Interfaces like the instruction set architecture, application binary interface, and application programming interface are also outlined.

Uploaded by

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

Operating Systems

Operating System Overview

John A. Sanabria
john.sanabria@correounivalle.edu.co

Cali, Colombia

Operating Systems - Spring 2015

Sanabria (Cali, Colombia) Operating Systems February-June 2015 1 / 63


Outline

1 Learning objectives

2 Operating system objectives and functions

3 Evolution of Operating Systems

4 Major achievements

5 Developments leading to modern operating systems

6 Virtual machines

7 OS Design considerations for multiprocessor and multicore

Sanabria (Cali, Colombia) Operating Systems February-June 2015 2 / 63


Learning objectives

Outline
Learning objectives

After studying this chapter, you should be able to


Summarize OS functions
Discuss the evolution of OS
Give a brief explanation of major achievements in OS
Discuss key areas to boost the development of OS
Define and discuss virtual machines and virtualization
OS design issues by the introduction of multiprocessors and multicores

Sanabria (Cali, Colombia) Operating Systems February-June 2015 3 / 63


Operating system objectives and functions

OS objectives

An OS is...
A program to control the execution of application programs and act as an
interface between applications and computer hardware

Sanabria (Cali, Colombia) Operating Systems February-June 2015 4 / 63


Operating system objectives and functions

OS objectives

An OS is...
A program to control the execution of application programs and act as an
interface between applications and computer hardware

Objectives
Convenience
Efficiency
Ability to evolve

Sanabria (Cali, Colombia) Operating Systems February-June 2015 4 / 63


Operating system objectives and functions

OS objectives

An OS is...
A program to control the execution of application programs and act as an
interface between applications and computer hardware

Objectives
Convenience facilitate the use of a computer
Efficiency bring the expiditious use of computer resources
Ability to evolve provide a clever design that allows development,
testing and introduction of new system functionalities

Sanabria (Cali, Colombia) Operating Systems February-June 2015 4 / 63


Operating system objectives and functions

OS as a User/Computer interface

Follows a layered architecture.

OS masks hardware details


Sanabria (Cali, Colombia) Operating Systems February-June 2015 5 / 63
Operating system objectives and functions

OS as a User/Computer interface

Follows a layered architecture.


What advantages do you
envision when a layered
approach is followed?

OS masks hardware details


Sanabria (Cali, Colombia) Operating Systems February-June 2015 5 / 63
Operating system objectives and functions

OS as a User/Computer interface

Follows a layered architecture.


What advantages do you
envision when a layered
approach is followed?
User/applications are unaware
of hardware details
Applications with little or any
modification at all could take
advantage of new hardware
Low level instructions are
hidden from front-end
applications.

OS masks hardware details


Sanabria (Cali, Colombia) Operating Systems February-June 2015 5 / 63
Operating system objectives and functions

OS as a User/Computer interface

Follows a layered architecture.


What advantages do you
envision when a layered
approach is followed?
User/applications are unaware
of hardware details
Applications with little or any
modification at all could take
advantage of new hardware
Low level instructions are
hidden from front-end
applications. There are
low-level applications known
as system utilitites or
library programs(*)
OS masks hardware details
Sanabria (Cali, Colombia) Operating Systems February-June 2015 5 / 63
Operating system objectives and functions

OS services

Program development editors, debuggers, compilers


Program execution
Access to I/O devices
Controlled access to files
System access isolate users access to a one single system
Error detection and response detection of hardware and software
errors
Accounting statistics of usage, performance parameters

Sanabria (Cali, Colombia) Operating Systems February-June 2015 6 / 63


Operating system objectives and functions

Key interfaces

Instruction set architecture (ISA) defines the machine language


instructions that a computer can follow. There are
User ISA, restricted set of machine language
System ISA, additional set of machine language to manage system
resources

Sanabria (Cali, Colombia) Operating Systems February-June 2015 7 / 63


Operating system objectives and functions

Key interfaces

Instruction set architecture (ISA) defines the machine language


instructions that a computer can follow. There are
User ISA, restricted set of machine language
System ISA, additional set of machine language to manage system
resources
Application Binary Interface (ABI) standard for binary portability.
ABI defines system call interfaces to OS and hardware resources
through the user ISA

Sanabria (Cali, Colombia) Operating Systems February-June 2015 7 / 63


Operating system objectives and functions

Key interfaces

Instruction set architecture (ISA) defines the machine language


instructions that a computer can follow. There are
User ISA, restricted set of machine language
System ISA, additional set of machine language to manage system
resources
Application Binary Interface (ABI) standard for binary portability.
ABI defines system call interfaces to OS and hardware resources
through the user ISA
Application programming interface (API) provides to the
programs access to hardware resources using high-level language
library calls. Ease the software portability between different systems
which support the same API

Sanabria (Cali, Colombia) Operating Systems February-June 2015 7 / 63


Operating system objectives and functions

The OS as resource manager

What resources need to be


managed?

Sanabria (Cali, Colombia) Operating Systems February-June 2015 8 / 63


Operating system objectives and functions

The OS as resource manager

What resources need to be


managed? Processing, storage
and diverse I/O devices
An OS is another program to
compete for the CPU. What
problem you see in this
situation?

Sanabria (Cali, Colombia) Operating Systems February-June 2015 8 / 63


Operating system objectives and functions

The OS as resource manager

What resources need to be


managed? Processing, storage
and diverse I/O devices
An OS is another program to
compete for the CPU. What
problem you see in this
situation?
Part of OS remains in memory
(kernel). OS decides when an
I/O device can be used and how
much processor is assigned to
any process

Sanabria (Cali, Colombia) Operating Systems February-June 2015 8 / 63


Operating system objectives and functions

Ease of evolution of an OS

Why do you think that an OS should be able to evolve?

Sanabria (Cali, Colombia) Operating Systems February-June 2015 9 / 63


Operating system objectives and functions

Ease of evolution of an OS

Why do you think that an OS should be able to evolve?


Hardware upgrades and new types of hardware e.g. graphical
terminals

Sanabria (Cali, Colombia) Operating Systems February-June 2015 9 / 63


Operating system objectives and functions

Ease of evolution of an OS

Why do you think that an OS should be able to evolve?


Hardware upgrades and new types of hardware e.g. graphical
terminals
New services new tools to improve performance

Sanabria (Cali, Colombia) Operating Systems February-June 2015 9 / 63


Operating system objectives and functions

Ease of evolution of an OS

Why do you think that an OS should be able to evolve?


Hardware upgrades and new types of hardware e.g. graphical
terminals
New services new tools to improve performance
Fixes

Sanabria (Cali, Colombia) Operating Systems February-June 2015 9 / 63


Operating system objectives and functions

Ease of evolution of an OS

Why do you think that an OS should be able to evolve?


Hardware upgrades and new types of hardware e.g. graphical
terminals
New services new tools to improve performance
Fixes
Modular design
Well defined interfaces support a “fluently communication” between
modules leverage the extension and adoption of new functionalities in to
an OS

Sanabria (Cali, Colombia) Operating Systems February-June 2015 9 / 63


Evolution of Operating Systems

Outline
Learning objectives

After studying this chapter, you should be able to


Summarize OS functions
Discuss the evolution of OS
Give a brief explanation of major achievements in OS
Discuss key areas to boost the development of OS
Define and discuss virtual machines and virtualization
OS design issues by the introduction of multiprocessors and multicores

Sanabria (Cali, Colombia) Operating Systems February-June 2015 10 / 63


Evolution of Operating Systems

Evolution of Operating Systems

Why is relevant to understand how OSs evolved?

Sanabria (Cali, Colombia) Operating Systems February-June 2015 11 / 63


Evolution of Operating Systems

Evolution of Operating Systems

Why is relevant to understand how OSs evolved?


The evolution of OSs shows the significance of the major features of
contemporaries OSs

Sanabria (Cali, Colombia) Operating Systems February-June 2015 11 / 63


Evolution of Operating Systems

Evolution of Operating Systems

Why is relevant to understand how OSs evolved?


The evolution of OSs shows the significance of the major features of
contemporaries OSs

Milestones in the evolution of OSs


Serial Processing
Simple Batch Systems
Multiprogrammed Batch Systems
Time-Sharing Systems

Sanabria (Cali, Colombia) Operating Systems February-June 2015 11 / 63


Evolution of Operating Systems

Serial Processing

40s-50s computers had no


operating system
Error messages were indicated
with lights
Cards were used to feed
computers
Printers were the output devices
at that time. When a program
run successfully the programmer
got a printout

Sanabria (Cali, Colombia) Operating Systems February-June 2015 12 / 63


Evolution of Operating Systems

Serial Processing

Facts:
Scheduling users sign-up a
hardcopy sheet where the time
to use the machine was specified
Setup time A single job
involved: load compiler → load
source code → compile → save
the compiled code → link the
object program → run. These
steps were done by hand

Sanabria (Cali, Colombia) Operating Systems February-June 2015 12 / 63


Evolution of Operating Systems

Simple batch systems

Early computers cost were about $850,000.oo and maximization


techniques for itheir use were necessary
First batch systems appeared. A batch system consisted of a monitor
which avoid direct interaction between end users and processor
Running procedure changed, load punched cards of a job → job is
batched → monitor reads a job from the batch → “run” the program
→ output is sent to a printer → monitor is loaed and pick a new job
from the batch

Sanabria (Cali, Colombia) Operating Systems February-June 2015 13 / 63


Evolution of Operating Systems

Simple batch systems

This scheme has two point of views, monitor and processor point of view
Monitor point of view

Monitor always reside in


memory, resident monitor
Monitor provides drivers,
language interpreters
Monitor handles interruptions
and manages jobs
Monitor yields the processor to
a job

Sanabria (Cali, Colombia) Operating Systems February-June 2015 14 / 63


Evolution of Operating Systems

Simple batch systems

Processor point of view


Processor reads instructions
from main memory containing
the monitor instructions
When a job has loaded, a
branch instruction goes to the
first instruction of a job, control
is passed to a job
When a job succeeded its
execution or reach an error
condition then the monitor is
executed again, control is
returned to the monitor

Sanabria (Cali, Colombia) Operating Systems February-June 2015 15 / 63


Evolution of Operating Systems

Simple batch systems

Monitor duties
Scheduling queue jobs
Setup load compilers, loads object code

Sanabria (Cali, Colombia) Operating Systems February-June 2015 16 / 63


Evolution of Operating Systems

Simple batch systems

Monitor duties
Scheduling queue jobs
Setup load compilers, loads object code

Hardware desirable features


Memory protection
Timer allows to define time slots for jobs
Privileged instructions A subset of instructions can be run only by
the monitor otherwise an error is raised
Interrupts
Lack of these features gives many troubles to OS developers

Sanabria (Cali, Colombia) Operating Systems February-June 2015 16 / 63


Evolution of Operating Systems

Simple batch systems

Operation modes
User mode
Kernel mode
Back and forth between user programs and monitors causes overhead but
it worthed

Sanabria (Cali, Colombia) Operating Systems February-June 2015 17 / 63


Evolution of Operating Systems

Simple batch systems

Operation modes
User mode
Kernel mode
Back and forth between user programs and monitors causes overhead but
it worthed

Fact
Automatic job sequencing improves the use of CPU but the processor still
remains idle, why?

Sanabria (Cali, Colombia) Operating Systems February-June 2015 17 / 63


Evolution of Operating Systems

Multiprogrammed batch systems

Program is waiting 96% of time


for I/O operations

Sanabria (Cali, Colombia) Operating Systems February-June 2015 18 / 63


Evolution of Operating Systems

Multiprogrammed batch systems

Program is waiting 96% of time


for I/O operations
To wait for an I/O operation
imposes a great delay on
programs executions

Sanabria (Cali, Colombia) Operating Systems February-June 2015 18 / 63


Evolution of Operating Systems

Multiprogrammed batch systems

Program is waiting 96% of time


for I/O operations
To wait for an I/O operation
imposes a great delay on
programs executions
Enough room in memory allows
to insert more programs. When
a program asks for an I/O
operation the other program can
use the processor

Sanabria (Cali, Colombia) Operating Systems February-June 2015 18 / 63


Evolution of Operating Systems

Multiprogrammed batch systems

Program is waiting 96% of time


for I/O operations
To wait for an I/O operation
imposes a great delay on
programs executions
Enough room in memory allows
to insert more programs. When
a program asks for an I/O
operation the other program can
use the processor
Systems having more than two
programs are known as
multitasking or
multiprogramming systems
Sanabria (Cali, Colombia) Operating Systems February-June 2015 18 / 63
Evolution of Operating Systems

A numerical example

Additional considerations
These jobs will run in a system with 250 MB of RAM
There are no contention for I/O devices
All jobs arrive at the same time

Sanabria (Cali, Colombia) Operating Systems February-June 2015 19 / 63


Evolution of Operating Systems

A numerical example

Where these results come from?

Sanabria (Cali, Colombia) Operating Systems February-June 2015 20 / 63


Evolution of Operating Systems

A numerical example

Where these results come from?


Hint: There is not enough information :-D

Sanabria (Cali, Colombia) Operating Systems February-June 2015 20 / 63


Evolution of Operating Systems

A numerical example - Uniprogramming

Sanabria (Cali, Colombia) Operating Systems February-June 2015 21 / 63


Evolution of Operating Systems

A numerical example - Multiprogramming

Sanabria (Cali, Colombia) Operating Systems February-June 2015 22 / 63


Evolution of Operating Systems

A numerical example

How do you get the mean response time?


In this case, the response time can be define as the result to substract the
time when a job finishes its execution from its arrival time.
What is this time for each job in the uniprogramming scenario?
What is this time for each job in the multiprogramming scenario?

Sanabria (Cali, Colombia) Operating Systems February-June 2015 23 / 63


Evolution of Operating Systems

Multiprogrammed batch systems

Final remarks
To achieve such improvement in the performance, multiprogramming
environments need OS and hardware support
DMA functionality
Interrupt management
Memory management

Sanabria (Cali, Colombia) Operating Systems February-June 2015 24 / 63


Evolution of Operating Systems

Time-sharing systems

Fact
All users do not require an efficient processing system for their jobs but a
system that immediately(interactively) responds to their commands

80s brought one computer for one person, interaction was there. 60s
was different
Time sharing was born and it intended to attend the needs of many
and simultaneous users
Each user had a quantum of computation. With n users, every user
had 1/n of the effective computer capacity, OS overhead is ignored

Sanabria (Cali, Colombia) Operating Systems February-June 2015 25 / 63


Evolution of Operating Systems

Time-sharing systems

Fact
All users do not require an efficient processing system for their jobs but a
system that immediately(interactively) responds to their commands

80s brought one computer for one person, interaction was there. 60s
was different
Time sharing was born and it intended to attend the needs of many
and simultaneous users
Each user had a quantum of computation. With n users, every user
had 1/n of the effective computer capacity, OS overhead is ignored

Fact (2)
Both batch processing and time sharing use multiprogramming

Sanabria (Cali, Colombia) Operating Systems February-June 2015 25 / 63


Evolution of Operating Systems

Time-sharing systems - History

Compatible Time-Sharing System (CTSS) was developed during the


dawn of 60s
This computer has 32,000 36-bit words of memory
Monitor consumed 5,000 words
Any user program was loaded at 5,000th word
A clock interrupt was generated each 0,2 seconds. When a clock
interrupt happened the OS regained control and assigned the
processor to another user (time slicing)
Programs in memory were written out to disk for later resuming

Sanabria (Cali, Colombia) Operating Systems February-June 2015 26 / 63


Evolution of Operating Systems

Time-sharing systems

I/O operations are expensive. Earlier time sharing systems did not
written out all user programs but pieces
Let us assume there are four jobs: JOB1(15,000), JOB2(20,000),
JOB3(5,000), JOB4(10,000)
Sanabria (Cali, Colombia) Operating Systems February-June 2015 27 / 63
Evolution of Operating Systems

Time-sharing systems - CTSS

Final remarks
CTSS lacked of many “contemporary” features but it was highly
effective. Monitor size was modest
Jobs were easily located because all started at the very same memory
address
Partial writes minimized disk activity
It supported up to 32 users

New challenges
Memory protection was mandatory (user-user, user-monitor)
File system needed protection too
Resources contention

Sanabria (Cali, Colombia) Operating Systems February-June 2015 28 / 63


Evolution of Operating Systems

Outline
Learning objectives

After studying this chapter, you should be able to


Summarize OS functions
Discuss the evolution of OS
Give a brief explanation of major achievements in OS
Discuss key areas to boost the development of OS
Define and discuss virtual machines and virtualization
OS design issues by the introduction of multiprocessors and multicores

Sanabria (Cali, Colombia) Operating Systems February-June 2015 29 / 63


Major achievements

Major achievements

An operating system(OS) is one of the most complex pieces of


software
An OS tries to meet different objectives such as convenience,
efficiency and ability to evolve
Major advances have been done in fields such as
Processes
Memory management
Information protection and security
Scheduling and resource management

Sanabria (Cali, Colombia) Operating Systems February-June 2015 30 / 63


Major achievements

Processes

Process is a term first coined in the 60s


Different definitions have been given
A program in execution
An instance of a program running on a computer
The entity that can be assigned to and executed on a processor
A unit of activity characterized by a single sequential thread of
execution, a current state, and an associated set of system resources

Sanabria (Cali, Colombia) Operating Systems February-June 2015 31 / 63


Major achievements

Shaping a process as we know it

Multiprogramming, keep process as busy as possible. Signals


indicate when an I/O operation was completed
Time-sharing, responsiveness systems to users demands
Real-time transactions, rapid response to user operations over
dynamic resources, e.g. database access

Time-sharing vs Real-time
Time-sharing is oriented to a higher volume of requests than a real-time
but response time is an important factor to both

Sanabria (Cali, Colombia) Operating Systems February-June 2015 32 / 63


Major achievements

Orchestrating diverse activities

Single processes were “easy” to program because the interrupt service


But handling several concurrent processes exhibiting several behaviors
and accessing diverses resources was a daunting task

Sanabria (Cali, Colombia) Operating Systems February-June 2015 33 / 63


Major achievements

Orchestrating diverse activities

Single processes were “easy” to program because the interrupt service


But handling several concurrent processes exhibiting several behaviors
and accessing diverses resources was a daunting task
Then debug a multiprogramming OS was difficult because
Improper synchronization one single event such reading data from an
I/O device requires many signals, losing one signal would cause a
failure reading
Failed mutual exclusion accessing shared resources is difficult if
proper synchronization mechanisms are not available or are bad
programmed
Nondeterminate program operation errors happenning when many
concurrent processes are running can be difficult to reproduce then
difficult to spot
Deadlocks two or more processes to be hung up waiting for other

Sanabria (Cali, Colombia) Operating Systems February-June 2015 33 / 63


Major achievements

Orchestrating diverse activities

Components of a process
An executable program
Data needed by the program (variables, buffers)
Execution context

Sanabria (Cali, Colombia) Operating Systems February-June 2015 34 / 63


Major achievements

Orchestrating diverse activities

Components of a process
An executable program
Data needed by the program (variables, buffers)
Execution context

Execution context or process state


Information used by OS to supervise the process execution
Information not available for the process itself
E.g. Registers, program counter, process priority

Sanabria (Cali, Colombia) Operating Systems February-June 2015 34 / 63


Major achievements

Typical process implementation

Two processes in memory. Each


process has its own context,
data and code segments
There is a process list. This list
is managed by OS
base and limit registers
delimitate the process
boundaries
Memory addresses are relatives
addresses. None address in the
process can surpass the
base + limit value

Sanabria (Cali, Colombia) Operating Systems February-June 2015 35 / 63


Major achievements

Typical process implementation

Because two or more programs,


context switching was necessary
Process info is internally
represented as a data structure
New process features can be
incorporated in that data
structure

Sanabria (Cali, Colombia) Operating Systems February-June 2015 36 / 63


Major achievements

Typical process implementation

Because two or more programs,


context switching was necessary
Process info is internally
represented as a data structure
New process features can be
incorporated in that data
structure
Fact
Old processes were single threaded

Sanabria (Cali, Colombia) Operating Systems February-June 2015 36 / 63


Major achievements

Memory management - management responsabilities

Process isolation independent processes do not interfere each other


Automatic allocation and management memory allocation is not a
duty of the programmer
Support of modular programming
Protection and access control arbitrarty access to any memory
location is not desirable in a time-sharing system. OS must
coordinate the memory access amongst processes
Long-term storage support for persistent storage, e.g. virtual
memory and file systems

Sanabria (Cali, Colombia) Operating Systems February-June 2015 37 / 63


Major achievements

Memory management - management responsabilities

Process isolation independent processes do not interfere each other


Automatic allocation and management memory allocation is not a
duty of the programmer
Support of modular programming
Protection and access control arbitrarty access to any memory
location is not desirable in a time-sharing system. OS must
coordinate the memory access amongst processes
Long-term storage support for persistent storage, e.g. virtual
memory and file systems

Virtual memory
Facility that allows programs to address memory from a logical point of
view

Sanabria (Cali, Colombia) Operating Systems February-June 2015 37 / 63


Major achievements

Virtual memory

Virtual memory divides memory in pages. Pages are fixed-size blocks


Memory address is accessed through a virtual address which contains
a page number and an offset within the page
A paging system provides dynamic mapping between virtual address
and real address
Dynamic mapping allows that all pages of a process were not in main
memory at the same time

Sanabria (Cali, Colombia) Operating Systems February-June 2015 38 / 63


Major achievements

Virtual memory concepts

Sanabria (Cali, Colombia) Operating Systems February-June 2015 39 / 63


Major achievements

Virtual memory

Processes are isolated because nonoverlapping virtual memory


addresses are assigned to each one
Addressable memory can be either main memory or hard disk.
Address translation hardware fetches the pages where they reside
Swapped out and swapped in are necessary when main memory is full.
A program asking for data in auxiliary memory must wait until the
data is in main memory

Sanabria (Cali, Colombia) Operating Systems February-June 2015 40 / 63


Major achievements

Information protection and security

Shared systems and computer networks have brought big concern for
protection of information
Different approaches are directed to access control of computer
systems and information stored in them
Work in security and protection is directed to
Availability
Confidentiality
Data integrity
Authenticity

Sanabria (Cali, Colombia) Operating Systems February-June 2015 41 / 63


Major achievements

Scheduling and resource management

Responsability of OS
To manage resources and schedule their use by many processes

Sanabria (Cali, Colombia) Operating Systems February-June 2015 42 / 63


Major achievements

Scheduling and resource management

Responsability of OS
To manage resources and schedule their use by many processes

Considerations of a scheduling policy


Fairness similar jobs should have equal access to system resources
Differential responsiveness OS needs to discriminate among
different classes of jobs. OS decisions are dynamic
Efficiency OS should maximize throughput and minimize response
time

Sanabria (Cali, Colombia) Operating Systems February-June 2015 42 / 63


Major achievements

Key elements of an OS for multiprogramming

Short-term queue consists of


those processes ready to use the
processor. How to select a process
to be executed?
Long-term queue consists of new
processes waiting to use a
processor. OS transfers jobs from
long- to short-term queue avoiding
to overload the system

Sanabria (Cali, Colombia) Operating Systems February-June 2015 43 / 63


Major achievements

Key elements of an OS for multiprogramming

I/O queue one for each device.


Different processes willing to use a
particular device are queue in that
device queue
Service call allows to processes
invoke OS privileged services e.g.
hard disk I/O operation.

Sanabria (Cali, Colombia) Operating Systems February-June 2015 43 / 63


Major achievements

Outline
Learning objectives

After studying this chapter, you should be able to


Summarize OS functions
Discuss the evolution of OS
Give a brief explanation of major achievements in OS
Discuss key areas to boost the development of OS
Define and discuss virtual machines and virtualization
OS design issues by the introduction of multiprocessors and multicores

Sanabria (Cali, Colombia) Operating Systems February-June 2015 44 / 63


Developments leading to modern operating systems

Developments leading to modern operating systems

OSs shall respond to new user demands


Hardware multiprocessor, multicore, high speed network interfaces,
storage devices
Applications multimedia, client/server computing, Internet
Security threats viruses, worms, denial of service attacks

Different approaches have been followed to tackle these issues

Sanabria (Cali, Colombia) Operating Systems February-June 2015 45 / 63


Developments leading to modern operating systems

Microkernel architecture

How OS functionality is implemented?


monolithic the OS is just one application where scheduling, file
system, device drivers, memory management are in one just program.
Memory addreses are shared What problem do you envision?
microkernel the kernel implements few functionalities such as
interprocess communication and scheduling. Additional OS services
are implemented as servers in user space

Sanabria (Cali, Colombia) Operating Systems February-June 2015 46 / 63


Developments leading to modern operating systems

Microkernel architecture

How OS functionality is implemented?


monolithic the OS is just one application where scheduling, file
system, device drivers, memory management are in one just program.
Memory addreses are shared What problem do you envision?
microkernel the kernel implements few functionalities such as
interprocess communication and scheduling. Additional OS services
are implemented as servers in user space

Microkernel architecture favours flexibility and development of distributed


systems

Sanabria (Cali, Colombia) Operating Systems February-June 2015 46 / 63


Developments leading to modern operating systems

Multithreading

Multithreading
When a process is divided into threads which are running concurrently

Sanabria (Cali, Colombia) Operating Systems February-June 2015 47 / 63


Developments leading to modern operating systems

Multithreading

Multithreading
When a process is divided into threads which are running concurrently

Thread it is a unit of work consisting of processor context and data


area for stack. It is interrupable
Process a collection of one or more threads. It is a program in
execution

Sanabria (Cali, Colombia) Operating Systems February-June 2015 47 / 63


Developments leading to modern operating systems

Multithreading

Multithreading
When a process is divided into threads which are running concurrently

Thread it is a unit of work consisting of processor context and data


area for stack. It is interrupable
Process a collection of one or more threads. It is a program in
execution

Benefits of threading
Threads are very useful when a single application requires to execute
different but cooperative tasks
Threads context switching produces less overhead than processes
context switching

Sanabria (Cali, Colombia) Operating Systems February-June 2015 47 / 63


Developments leading to modern operating systems

Symmetric multiprocessing - SMP

The OS of an SMP schedules processes or threads across all


processors

Advantages of SMP
Performance
Availability
Incremental growth
Scaling

Multithread vs SMP
Multithreading can be useful even on uniprocessor systems because
helps to structure applications
SMP allows to run simultaneously many single-threaded applications

Sanabria (Cali, Colombia) Operating Systems February-June 2015 48 / 63


Developments leading to modern operating systems

Distributed operating systems

Distributed system
It is a system consisting of several autonomous computational devices
connected through a data network to serve for a “particular” purpose

Sanabria (Cali, Colombia) Operating Systems February-June 2015 49 / 63


Developments leading to modern operating systems

Distributed operating systems

Distributed system
It is a system consisting of several autonomous computational devices
connected through a data network to serve for a “particular” purpose

Challenge of a distributed operating systems


To provide a single unique view of several dispersed computational
resources

But...

Sanabria (Cali, Colombia) Operating Systems February-June 2015 49 / 63


Developments leading to modern operating systems

Distributed operating systems

Distributed system
It is a system consisting of several autonomous computational devices
connected through a data network to serve for a “particular” purpose

Challenge of a distributed operating systems


To provide a single unique view of several dispersed computational
resources

But...
is not an easy task because every component could fail independently

Sanabria (Cali, Colombia) Operating Systems February-June 2015 49 / 63


Developments leading to modern operating systems

Object-oriented design

Features
Modular design
Well defined interfaces

Benefits
Enables the development of upgradable and customizable systems

Sanabria (Cali, Colombia) Operating Systems February-June 2015 50 / 63


Developments leading to modern operating systems

Outline
Learning objectives

After studying this chapter, you should be able to


Summarize OS functions
Discuss the evolution of OS
Give a brief explanation of major achievements in OS
Discuss key areas to boost the development of OS
Define and discuss virtual machines and virtualization
OS design issues by the introduction of multiprocessors and multicores

Sanabria (Cali, Colombia) Operating Systems February-June 2015 51 / 63


Virtual machines

Virtual machines

What is virtualization?
It is a technology that enables the execution of multiple operating system
instances in just one PC or Server.
A running instance is known as virtual machine

Sanabria (Cali, Colombia) Operating Systems February-June 2015 52 / 63


Virtual machines

Virtual machines

What is virtualization?
It is a technology that enables the execution of multiple operating system
instances in just one PC or Server.
A running instance is known as virtual machine

Virtualization is useful for


Running legacy applications
Server consolidation

Sanabria (Cali, Colombia) Operating Systems February-June 2015 52 / 63


Virtual machines

Virtual machines

VMM or hypervisor handles


communication between the VM and
different physical resources such as
storage, communication devices,
processor
VMM handed off the processor to VMs
VMM virtualizes the software and
hardware in a very efficient way

Sanabria (Cali, Colombia) Operating Systems February-June 2015 53 / 63


Virtual machines

Virtual machine architecture

Sanabria (Cali, Colombia) Operating Systems February-June 2015 54 / 63


Virtual machines

Virtual machine architecture

Recall
A process views the system as it exposed by the ABI, e.g. virtual
memory space, process registers
An application perceives the system as it exposed by the API
An operating system perceives the hardware as it exposed by the ISA

Sanabria (Cali, Colombia) Operating Systems February-June 2015 54 / 63


Virtual machines

Virtual machine architecture

What kind of virtualization approaches exist?


Process VMs
System VMs

Sanabria (Cali, Colombia) Operating Systems February-June 2015 54 / 63


Virtual machines

Process virtual machine

Process VM presents an ABI to


an application process
Process VM executes a single
process then a process VM is
living whilst its process is
running

Sanabria (Cali, Colombia) Operating Systems February-June 2015 55 / 63


Virtual machines

Process virtual machine

Process VM presents an ABI to


an application process
Process VM executes a single
process then a process VM is
living whilst its process is
running
The ABI is not tight to any
specific machine. Instead, the
ABI supports a given high level
language which is easily ported
to various ISAs
Java and .NET are examples of
the process VM approach

Sanabria (Cali, Colombia) Operating Systems February-June 2015 55 / 63


Virtual machines

System virtual machine

VMM translates the ISA used by


one platform to another
In the process VM approach,
services in the host OS are used
by the virtual machines
The system VM is able to host a
number of isolated guest
operating systems. Different
OSs can be running at the very
same time

Sanabria (Cali, Colombia) Operating Systems February-June 2015 56 / 63


Virtual machines

System virtual machine

VMM translates the ISA used by


one platform to another
In the process VM approach,
services in the host OS are used
by the virtual machines
The system VM is able to host a
number of isolated guest
operating systems. Different
OSs can be running at the very
same time
Legacy systems can run without
the need to mantain legacy
hardware

Sanabria (Cali, Colombia) Operating Systems February-June 2015 56 / 63


Virtual machines

Outline
Learning objectives

After studying this chapter, you should be able to


Summarize OS functions
Discuss the evolution of OS
Give a brief explanation of major achievements in OS
Discuss key areas to boost the development of OS
Define and discuss virtual machines and virtualization
OS design issues by the introduction of multiprocessors and multicores

Sanabria (Cali, Colombia) Operating Systems February-June 2015 57 / 63


OS Design considerations for multiprocessor and multicore

OS Design considerations for multiprocessor and multicore

In an SMP, kernel can run on any processor and each processor gets a
process from a pool of processes
SMP is complicated because there are many and critical shared
resources
OS data structures
Devices
An SMP OS should provide multiprogramming but uniprocessor view
of the underlying system

Sanabria (Cali, Colombia) Operating Systems February-June 2015 58 / 63


OS Design considerations for multiprocessor and multicore

Key design issues of an SMP OS

Simultaneous concurrent processes or threads kernel routines


need to be reentrant
Scheduling kernel-level multithreading guarantees a proper thread
scheduling amonst available processors
Synchronization on shared-resources scenarios the OS must
guarantee safe access to critical sections
Memory management dealing with memory issues found in
uniprocessor systems but also a new issues such as eviction of memory
pages still needed by other processors and memory page consistency
Reliability and fault tolerance a failed processor should not stop
the system but causing a graceful degradation of it

Sanabria (Cali, Colombia) Operating Systems February-June 2015 59 / 63


OS Design considerations for multiprocessor and multicore

Multicore OS considerations

Multicore OSs should also include the design issues of SMP OSs
Multicore OSs demand a higher and more efficient use of resources
despite the fact that exists more shared resources and data structures

Sanabria (Cali, Colombia) Operating Systems February-June 2015 60 / 63


OS Design considerations for multiprocessor and multicore

Multicore OS considerations

Multicore OSs should also include the design issues of SMP OSs
Multicore OSs demand a higher and more efficient use of resources
despite the fact that exists more shared resources and data structures
Potential parallelism
Instruction level parallelism
Multiprogramming and multithreaded execution per processor
A single application running across multiple cores

Sanabria (Cali, Colombia) Operating Systems February-June 2015 60 / 63


OS Design considerations for multiprocessor and multicore

Multicore OS considerations

Multicore OSs should also include the design issues of SMP OSs
Multicore OSs demand a higher and more efficient use of resources
despite the fact that exists more shared resources and data structures
Potential parallelism
Instruction level parallelism
Multiprogramming and multithreaded execution per processor
A single application running across multiple cores
Two later items require a well programmed support by OS

Sanabria (Cali, Colombia) Operating Systems February-June 2015 60 / 63


OS Design considerations for multiprocessor and multicore

Strategies for next-generation of OSs

Strategy one - Parallelism within applications


Application designer must define how to divide the application using
threads or processes
OS must provide efficient resource allocation amongst parallel tasks

Sanabria (Cali, Colombia) Operating Systems February-June 2015 61 / 63


OS Design considerations for multiprocessor and multicore

Strategies for next-generation of OSs

Strategy one - Parallelism within applications


Application designer must define how to divide the application using
threads or processes
OS must provide efficient resource allocation amongst parallel tasks
E.g. Mac OS X includes a multicore capability known as Gran Central
Dispatch (GCD)
GCD does not divide an application into subtasks
GCD maps application’s subtasks amongst available processing
resources
Application developers can define anonymous methods that can be run
in separate threads
However, it is a developer decision if an application will run in a
parallel way

Sanabria (Cali, Colombia) Operating Systems February-June 2015 61 / 63


OS Design considerations for multiprocessor and multicore

Strategies for next-generation of OSs

Strategy two - Virtual machine approach


Multiprogram one single core is not efficient, why?

Sanabria (Cali, Colombia) Operating Systems February-June 2015 62 / 63


OS Design considerations for multiprocessor and multicore

Strategies for next-generation of OSs

Strategy two - Virtual machine approach


Multiprogram one single core is not efficient, why?
Switching context by core demands to evict sensible data residing in
the processor

Sanabria (Cali, Colombia) Operating Systems February-June 2015 62 / 63


OS Design considerations for multiprocessor and multicore

Strategies for next-generation of OSs

Strategy two - Virtual machine approach


Multiprogram one single core is not efficient, why?
Switching context by core demands to evict sensible data residing in
the processor
Instead one application is assigned to the processor in such a way that
it exploits the power of every core. However an additional
programming effort is handed off to developers
Multicore OS cares of assigning processor and memory to the
program and compiler and libraries of the system take care of
resources management

Sanabria (Cali, Colombia) Operating Systems February-June 2015 62 / 63


OS Design considerations for multiprocessor and multicore

Outline
Learning objectives

After studying this chapter, you should be able to


Summarize OS functions
Discuss the evolution of OS
Give a brief explanation of major achievements in OS
Discuss key areas to boost the development of OS
Define and discuss virtual machines and virtualization
OS design issues by the introduction of multiprocessors and multicores

Sanabria (Cali, Colombia) Operating Systems February-June 2015 63 / 63

You might also like