SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
Introduction to Operating Systems
An operating system is the interface between the user and the
architecture.
User Applications
Operating System

Operating Systems:
Basic Concepts and History

Virtual Machine Interface
Physical Machine Interface

Hardware
OS as juggler: providing the illusion of a dedicated machine with
infinite memory and CPU.
OS as government: protecting users from each other, allocating
t
t ti
f
h th
ll
ti
resources efficiently and fairly, and providing secure and safe
communication
OS as complex system: keeping OS design and implementation
as simple as possible is the key to getting the OS to work

1

2
What is an Operating System?

What is an Operating System?

Any code that runs with the hardware kernel bit set

For any OS area (CPU scheduling, file systems, memory
management), begin by asking two questions

An abstract virtual machine
A set of abstractions that simplify application design

What’s the hardware interface? (The Physical Reality)
What is the application interface? (The Nicer Interface for
programmer producivity)

Files instead of “bytes on a disk
bytes
disk”

Core OS services, written by “pros”
Processes, process scheduling
Address spaces
Device control
~30% of Linux source code. Basis of stability and security

Key questions:
Why is the application interface defined the way it is?
Should we push more functionality into applications, the OS, or the
hardware?
What are the tradeoffs between programmability, complexity, and
flexibility?

Device drivers written by “whoever”
Software run in kernel to manages a particular vendor’s
vendor s
hardware

E.g. Homer Simpson doll with USB
~70% of Linux source code
OS is extensible
Drivers are the biggest source of OS instability
3

4
Operating System Functions

Why do we need operating systems?

Service provider

Convenience

Provide standard facilities
File system
Standard libraries
Window system
Wi d
t
…

Provide a high-level abstraction of physical resources.
Make hardware usable by getting rid of warts & specifics.
specifics

Enable the construction of more complex software systems
Enable portable code.

Coordinator: three aspects
Protection: prevent jobs from interfering with each other
Communication: enable jobs to interact with each other
Resource management: facilitate sharing of resources across jobs.

MS-DOS version 1 boots on the latest 3+ GHz Pentium.
Would games that ran on MS-DOSv1 work well today?

Operating systems are everywhere

Efficiency
y

Single-function
Single function devices (embedded controllers Nintendo …)
controllers, Nintendo, )
OS provides a collection of standard services
Sometimes OS/middleware distinction is blurry

Share limited or expensive physical resources.
Provide protection.

Multi-function/application devices (workstations and servers)
OS manages application interactions

5

6
Computer Architecture & Processes

Evolution of Operating Systems
Why do operating systems change?
Key functions: hardware abstraction and coordination
Principle: Design tradeoffs change as technology changes.

Comparing computing systems from 1981 and 2007
1981

Factor

1

57,000

57,000

$/SPECInt

$100K

$2

50,000

DRAM size

128KB

2GB

16,000

Disk size

CPU - the processor that performs the actual computation
I/O devices - terminal, disks, video board, printer, etc.
Memory - RAM containing data and programs used by the
CPU
System bus - the communication medium between the CPU,
memory, and peripherals

2007

MIPS

10MB

1TB

100,000

Net BW

9600 bps

100 Mb/s

10,000
10 000

Address bits

16

64

4

Users/machine

100

<1

100

Energy efficiency and parallelism loom on the horizon.
Data centers projected to consume 3% of US energy by next year
No more single-core CPUs
7

8
From Architecture to OS to Application, and
Back

From Architectural to OS to Application, and
Back

Hardware

Example OS Services

User Abstraction

OS Service

Hardware Support

Processor

Process management,
g,
p ,
Scheduling, Traps,
Protections, Billing,
Synchronization

Process

Protection

Kernel / User mode
Protected Instructions
Base and Limit Registers

Memory

Management, Protection,
Virtual memory

Address space

Interrupts

Interrupt Vectors

I/O devices

Concurrency with CPU,
Interrupt handling

Terminal, Mouse,
Printer, (System
Calls)

System calls

Trap instructions and trap vectors

I/O

Interrupts or Memory-Mapping

File system

Management, Persistence

Files

Scheduling,
Scheduling error
recovery, billing

Timer

Distributed
systems

Network security,
Distributed file system

RPC system calls,
Transparent file
sharing

Synchronization

Atomic instructions

Virtual Memory

Translation look-aside buffers
Register pointing to base of page table

9

10
Interrupts - Moving from Kernel to User Mode

History of Operating Systems: Phases

User processes may not:
address I/O directly
use instructions that
manipulate OS memory
p
y
(e.g., page tables)
set the mode bits that
determine user or kernel
mode
disable and enable
interrupts
halt the machine

Phase 1: Hardware is expensive, humans are cheap
User at console: single-user systems
Batching systems
Multi-programming systems
M lti
i
t

Phase 2: Hardware is cheap, humans are expensive
Time sharing: Users use cheap terminals and share servers

Phase 3: Hardware is very cheap, humans are very expensive
Personal computing: One system per user
Distributed computing: lots of systems per user

but in kernel mode, the OS does all these things
a status bit in a protected processor register indicates the mode
Protected instructions can only be executed in kernel mode.
On interrupts (e.g., time slice) or system calls

Phase 4: Ubiquitous computing/Cloud computing
Cell phone, mp3 player, DVD player, TIVO, PDA, iPhone, eReader
Software as a service, Amazon’s elastic compute cloud

11

12
A Brief History of Operating Systems

History of Operating Systems: Phases

Hand programmed machines (‘45­‘55)

Phase 1: Hardware is expensive, humans are cheap

Single user systems

User at console: single-user systems
Batching systems
Multi-programming systems
M lti
i
t

OS = loader + libraries of common subroutines

Phase 2: Hardware is cheap, humans are expensive

Problem: low utilization of expensive components

Time sharing: Users use cheap terminals and share servers

Phase 3: Hardware is very cheap, humans are very expensive
Personal computing: One system per user
Distributed computing: lots of systems per user

Execution time
Execution time +
Card reader time

= % utilization
tili ti

Phase 4: Ubiquitous computing

13

14
Batch/Off­line processing (‘55­‘65)

Batch processing (‘55­‘65)

Batching v. sequential execution of jobs

Card Reader:
CPU:

Read Job 1

Job 2

User Data

Job 3
Job 2

Execute Job 1

Printer:

Operating system = loader + sequencer + output processor

Print Job 1

Job 3
Job 2

User Program
Job 3

Tape

“System Software”

Tape

Ope at g System
Operating Syste
Card Reader:
CPU:
Printer:

Read Batch 1

Batch 2

Batch 3

Execute Batch 1

Batch 2

Print Batch 1

Batch 3
Batch 2

Card
Reader

Batch 3

Input
15

Compute
Tape

Tape

Printer

Output
16
Multiprogramming (‘65­‘80)

Multiprogramming (‘65­‘80)
Keep several jobs in memory and multiplex CPU between
jobs

Keep several jobs in memory and multiplex CPU between
jobs
Simple, “synchronous” input:
Simple synchronous
What to do while we wait
for the I/O device?

Program 1
User Program n

User Program 2
User Program 1
“System Software”
Operating System

k: read()

I/O
Device

read{
startIO()
waitIO()

User Program 2
system call Read()
begin
StartIO(input device)
WaitIO(interrupt)
EndIO(input device)
:
end Read

OS

main{

...

...

User Program n

program P
begin
:
Read(var)
:
end P

User Program 1
endio()

“System Software”

interrupt

k+1:
}

Operating System
}
17

18
History of Operating Systems: Phases

Multiprogramming (‘65­‘80)

Phase 1: Hardware is expensive, humans are cheap

Keep several jobs in memory and multiplex CPU between
jobs

User Program n

k: read()

OS

Program 2

I/O
Device

main{

...

Program 1

User at console: single-user systems
Batching systems
Multi-programming systems
M lti
i
t

Phase 2: Hardware is cheap, humans are expensive

startIO()
schedule()
}

User Program 2
User Program 1

endio{

“System Software”
k+1:

Time sharing: Users use cheap terminals and share servers

read{

Phase 3: Hardware is very cheap, humans are very expensive
Personal computing: One system per user
Distributed computing: lots of systems per user

main{

interrupt

Phase 4: Ubiquitous computing

schedule()
}

Operating System
}

19

20
History of Operating Systems: Phases

Timesharing (‘70­ )

Phase 1: Hardware is expensive, humans are cheap

A timer interrupt is used to multiplex CPU among jobs
Program 1

OS

Program 2

User at console: single-user systems
Batching systems
Multi-programming systems
M lti
i
t

main{

...

User Program n

Phase 2: Hardware is cheap, humans are expensive
k:

timer
interrupt

Time sharing: Users use cheap terminals and share servers
schedule{

User Program 1
schedule{

“System Software”
Operating System

k+1:

Phase 3: Hardware is very cheap, humans are very expensive

main{

}

User Program 2

Personal computing: One system per user
Distributed computing: lots of systems per user

timer
interrupt

Phase 4: Ubiquitous computing

}
timer
interrupt

schedule{
21

22
Operating Systems for PCs

Distributed Operating Systems
Typically support distributed services

Personal computing systems

Sharing of data and coordination across multiple systems

Single user
Utilization is no longer a concern
Emphasis is on user interface and API
Many services & features not present

Possibly employ multiple processors
Loosely coupled v. tightly coupled systems

High availability & reliability requirements
Amazon, CNN

Evolution

User
Program

User
Program

OS

OS

process
management

process management
memory management

f system
file y
name services
mail services

CPU

Initially: OS as a simple service provider
(
(simple libraries)
p
)
Now: Multi-application systems with support
for coordination and communication
Growing security issues (e.g., online
commerce, medical records)

CPU

CPU

OS

LAN/WAN
Network
23

24
History of Operating Systems: Phases

What is cloud computing?

Phase 1: Hardware is expensive, humans are cheap

Cloud computing is where dynamically scalable and
often virtualized resources are provided as a service
(thanks,
over the Internet (thanks wikipedia!)
Infrastructure as a service (IaaS)

User at console: single-user systems
Batching systems
Multi programming
Multi-programming systems

Phase 2: Hardware is cheap, humans are expensive
Time sharing: Users use cheap terminals and share servers

Amazon’s EC2 (elastic compute cloud)

Platform as a service (PaaS)

Phase 3: Hardware is very cheap, humans are very expensive

Google gears
Microsoft azure

Personal computing: One system per user
Distributed computing: lots of systems per user

Software as a service (SaaS)

Phase 4: Ubiquitous computing/Cloud computing

gmail
facebook
flickr

Everything will have computation, from pacemakers to toasters
Computing centralizing
“I think there is a world market for maybe five computers” – Tomas
J. Watson, 1943 (president of IBM)
25

26
Richer Operating Systems
Intellectual property

Copyrighted material is being disseminated in digital form without
payment to copyright owners.
Sue them (DMCA)
Napster (99-7/00)
RIAA lawsuits (9/03)
MPAA lawsuits against bittorrent operators (11/04)

What is the future of file sharing?
Attempts to ban all file sharing at the university level.
Government tapping of IP networks.

Can software stop intellectual property piracy?
Why not? The consumer controls the OS.

What b t ddi hardware?
Wh t about adding h d
?
Intel’s trusted execution technology. Who is trusted? Hint: Its
not the owner of the computer…
A PC is an open-ended system, not an appliance. For how much
longer?
Thanks, James Hamilton, amazon
27

28
Richer Operating Systems

Course Overview

Information organization

Is it better to search for data (google), or organize it
hierarchically (file folders)?

OS Structure, Processes and Process Management
CPU scheduling

Organization along a particular set of ideas (schema) might not
be ideal for a different set of ideas.
Gmail search vs. mail folders

Threads and concurrent programming
Thread coordination, mutual exclusion, monitors

Integration of search in Vista and MacOS.

Deadlocks

Do you use My Documents folder, or do you maintain your own
directories? use both a lot?

Virtual memory & Memory management
Disks & file systems
Distributed file systems

Security

29

30

Contenu connexe

Tendances (20)

operating system
operating systemoperating system
operating system
 
Operating systems
Operating systems Operating systems
Operating systems
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Operating system
Operating systemOperating system
Operating system
 
Operating Systems FYBSC IT UNIT I- Introduction to Operating Systems
Operating Systems FYBSC IT UNIT I- Introduction to Operating SystemsOperating Systems FYBSC IT UNIT I- Introduction to Operating Systems
Operating Systems FYBSC IT UNIT I- Introduction to Operating Systems
 
CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2
 
Operating system
Operating systemOperating system
Operating system
 
Information sheet 1
Information sheet 1Information sheet 1
Information sheet 1
 
Bce notes unit 1 be 205
Bce notes unit 1 be 205Bce notes unit 1 be 205
Bce notes unit 1 be 205
 
HARDWARE
HARDWAREHARDWARE
HARDWARE
 
Bba i-introduction to computer-u-3-functions operating systems
Bba  i-introduction to computer-u-3-functions operating systemsBba  i-introduction to computer-u-3-functions operating systems
Bba i-introduction to computer-u-3-functions operating systems
 
Operating system and services
Operating system and servicesOperating system and services
Operating system and services
 
Operating systems
Operating systemsOperating systems
Operating systems
 
CS6401 Operating Systems
CS6401 Operating SystemsCS6401 Operating Systems
CS6401 Operating Systems
 
Cheap vs High End PC
Cheap vs High End PCCheap vs High End PC
Cheap vs High End PC
 
The system unit
The system unitThe system unit
The system unit
 
Introduction to computers i
Introduction to computers iIntroduction to computers i
Introduction to computers i
 
Basics of Computer for Students
Basics of Computer for StudentsBasics of Computer for Students
Basics of Computer for Students
 
Computer Fundamentals
Computer FundamentalsComputer Fundamentals
Computer Fundamentals
 
Operating system
Operating systemOperating system
Operating system
 

Similaire à 01.osdoc

Similaire à 01.osdoc (20)

Chapter 2(answer)2
Chapter 2(answer)2Chapter 2(answer)2
Chapter 2(answer)2
 
Cs1 3-operating systems
Cs1 3-operating systemsCs1 3-operating systems
Cs1 3-operating systems
 
intro.ppt
intro.pptintro.ppt
intro.ppt
 
intro.ppt
intro.pptintro.ppt
intro.ppt
 
OperatingSystem01..(B.SC Part 2)
OperatingSystem01..(B.SC Part 2)OperatingSystem01..(B.SC Part 2)
OperatingSystem01..(B.SC Part 2)
 
CS403: Operating System : Unit I _merged.pdf
CS403: Operating System :  Unit I _merged.pdfCS403: Operating System :  Unit I _merged.pdf
CS403: Operating System : Unit I _merged.pdf
 
Unit 1 q&amp;a
Unit  1 q&amp;aUnit  1 q&amp;a
Unit 1 q&amp;a
 
Introduction of operating system
Introduction of operating systemIntroduction of operating system
Introduction of operating system
 
Operating System
Operating SystemOperating System
Operating System
 
CSE 370 - Introduction to Operating Systems
CSE 370 - Introduction to Operating SystemsCSE 370 - Introduction to Operating Systems
CSE 370 - Introduction to Operating Systems
 
Silberschatz / OS Concepts
Silberschatz /  OS Concepts Silberschatz /  OS Concepts
Silberschatz / OS Concepts
 
introduce computer .pptx
introduce computer .pptxintroduce computer .pptx
introduce computer .pptx
 
Operating system
Operating systemOperating system
Operating system
 
PT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptx
PT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptxPT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptx
PT101-WEEK-8-9-Importance-functions-of-Input-output-in-OS-1.pptx
 
operating systems
operating systemsoperating systems
operating systems
 
Ch1
Ch1Ch1
Ch1
 
Chapter - 1
Chapter - 1Chapter - 1
Chapter - 1
 
Operating system notes ch1
Operating system notes ch1Operating system notes ch1
Operating system notes ch1
 
Components of Computer system.ppt
Components of Computer system.pptComponents of Computer system.ppt
Components of Computer system.ppt
 
Operatingsystems
Operatingsystems Operatingsystems
Operatingsystems
 

Dernier

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Dernier (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

01.osdoc

  • 1. Introduction to Operating Systems An operating system is the interface between the user and the architecture. User Applications Operating System Operating Systems: Basic Concepts and History Virtual Machine Interface Physical Machine Interface Hardware OS as juggler: providing the illusion of a dedicated machine with infinite memory and CPU. OS as government: protecting users from each other, allocating t t ti f h th ll ti resources efficiently and fairly, and providing secure and safe communication OS as complex system: keeping OS design and implementation as simple as possible is the key to getting the OS to work 1 2
  • 2. What is an Operating System? What is an Operating System? Any code that runs with the hardware kernel bit set For any OS area (CPU scheduling, file systems, memory management), begin by asking two questions An abstract virtual machine A set of abstractions that simplify application design What’s the hardware interface? (The Physical Reality) What is the application interface? (The Nicer Interface for programmer producivity) Files instead of “bytes on a disk bytes disk” Core OS services, written by “pros” Processes, process scheduling Address spaces Device control ~30% of Linux source code. Basis of stability and security Key questions: Why is the application interface defined the way it is? Should we push more functionality into applications, the OS, or the hardware? What are the tradeoffs between programmability, complexity, and flexibility? Device drivers written by “whoever” Software run in kernel to manages a particular vendor’s vendor s hardware E.g. Homer Simpson doll with USB ~70% of Linux source code OS is extensible Drivers are the biggest source of OS instability 3 4
  • 3. Operating System Functions Why do we need operating systems? Service provider Convenience Provide standard facilities File system Standard libraries Window system Wi d t … Provide a high-level abstraction of physical resources. Make hardware usable by getting rid of warts & specifics. specifics Enable the construction of more complex software systems Enable portable code. Coordinator: three aspects Protection: prevent jobs from interfering with each other Communication: enable jobs to interact with each other Resource management: facilitate sharing of resources across jobs. MS-DOS version 1 boots on the latest 3+ GHz Pentium. Would games that ran on MS-DOSv1 work well today? Operating systems are everywhere Efficiency y Single-function Single function devices (embedded controllers Nintendo …) controllers, Nintendo, ) OS provides a collection of standard services Sometimes OS/middleware distinction is blurry Share limited or expensive physical resources. Provide protection. Multi-function/application devices (workstations and servers) OS manages application interactions 5 6
  • 4. Computer Architecture & Processes Evolution of Operating Systems Why do operating systems change? Key functions: hardware abstraction and coordination Principle: Design tradeoffs change as technology changes. Comparing computing systems from 1981 and 2007 1981 Factor 1 57,000 57,000 $/SPECInt $100K $2 50,000 DRAM size 128KB 2GB 16,000 Disk size CPU - the processor that performs the actual computation I/O devices - terminal, disks, video board, printer, etc. Memory - RAM containing data and programs used by the CPU System bus - the communication medium between the CPU, memory, and peripherals 2007 MIPS 10MB 1TB 100,000 Net BW 9600 bps 100 Mb/s 10,000 10 000 Address bits 16 64 4 Users/machine 100 <1 100 Energy efficiency and parallelism loom on the horizon. Data centers projected to consume 3% of US energy by next year No more single-core CPUs 7 8
  • 5. From Architecture to OS to Application, and Back From Architectural to OS to Application, and Back Hardware Example OS Services User Abstraction OS Service Hardware Support Processor Process management, g, p , Scheduling, Traps, Protections, Billing, Synchronization Process Protection Kernel / User mode Protected Instructions Base and Limit Registers Memory Management, Protection, Virtual memory Address space Interrupts Interrupt Vectors I/O devices Concurrency with CPU, Interrupt handling Terminal, Mouse, Printer, (System Calls) System calls Trap instructions and trap vectors I/O Interrupts or Memory-Mapping File system Management, Persistence Files Scheduling, Scheduling error recovery, billing Timer Distributed systems Network security, Distributed file system RPC system calls, Transparent file sharing Synchronization Atomic instructions Virtual Memory Translation look-aside buffers Register pointing to base of page table 9 10
  • 6. Interrupts - Moving from Kernel to User Mode History of Operating Systems: Phases User processes may not: address I/O directly use instructions that manipulate OS memory p y (e.g., page tables) set the mode bits that determine user or kernel mode disable and enable interrupts halt the machine Phase 1: Hardware is expensive, humans are cheap User at console: single-user systems Batching systems Multi-programming systems M lti i t Phase 2: Hardware is cheap, humans are expensive Time sharing: Users use cheap terminals and share servers Phase 3: Hardware is very cheap, humans are very expensive Personal computing: One system per user Distributed computing: lots of systems per user but in kernel mode, the OS does all these things a status bit in a protected processor register indicates the mode Protected instructions can only be executed in kernel mode. On interrupts (e.g., time slice) or system calls Phase 4: Ubiquitous computing/Cloud computing Cell phone, mp3 player, DVD player, TIVO, PDA, iPhone, eReader Software as a service, Amazon’s elastic compute cloud 11 12
  • 7. A Brief History of Operating Systems History of Operating Systems: Phases Hand programmed machines (‘45­‘55) Phase 1: Hardware is expensive, humans are cheap Single user systems User at console: single-user systems Batching systems Multi-programming systems M lti i t OS = loader + libraries of common subroutines Phase 2: Hardware is cheap, humans are expensive Problem: low utilization of expensive components Time sharing: Users use cheap terminals and share servers Phase 3: Hardware is very cheap, humans are very expensive Personal computing: One system per user Distributed computing: lots of systems per user Execution time Execution time + Card reader time = % utilization tili ti Phase 4: Ubiquitous computing 13 14
  • 8. Batch/Off­line processing (‘55­‘65) Batch processing (‘55­‘65) Batching v. sequential execution of jobs Card Reader: CPU: Read Job 1 Job 2 User Data Job 3 Job 2 Execute Job 1 Printer: Operating system = loader + sequencer + output processor Print Job 1 Job 3 Job 2 User Program Job 3 Tape “System Software” Tape Ope at g System Operating Syste Card Reader: CPU: Printer: Read Batch 1 Batch 2 Batch 3 Execute Batch 1 Batch 2 Print Batch 1 Batch 3 Batch 2 Card Reader Batch 3 Input 15 Compute Tape Tape Printer Output 16
  • 9. Multiprogramming (‘65­‘80) Multiprogramming (‘65­‘80) Keep several jobs in memory and multiplex CPU between jobs Keep several jobs in memory and multiplex CPU between jobs Simple, “synchronous” input: Simple synchronous What to do while we wait for the I/O device? Program 1 User Program n User Program 2 User Program 1 “System Software” Operating System k: read() I/O Device read{ startIO() waitIO() User Program 2 system call Read() begin StartIO(input device) WaitIO(interrupt) EndIO(input device) : end Read OS main{ ... ... User Program n program P begin : Read(var) : end P User Program 1 endio() “System Software” interrupt k+1: } Operating System } 17 18
  • 10. History of Operating Systems: Phases Multiprogramming (‘65­‘80) Phase 1: Hardware is expensive, humans are cheap Keep several jobs in memory and multiplex CPU between jobs User Program n k: read() OS Program 2 I/O Device main{ ... Program 1 User at console: single-user systems Batching systems Multi-programming systems M lti i t Phase 2: Hardware is cheap, humans are expensive startIO() schedule() } User Program 2 User Program 1 endio{ “System Software” k+1: Time sharing: Users use cheap terminals and share servers read{ Phase 3: Hardware is very cheap, humans are very expensive Personal computing: One system per user Distributed computing: lots of systems per user main{ interrupt Phase 4: Ubiquitous computing schedule() } Operating System } 19 20
  • 11. History of Operating Systems: Phases Timesharing (‘70­ ) Phase 1: Hardware is expensive, humans are cheap A timer interrupt is used to multiplex CPU among jobs Program 1 OS Program 2 User at console: single-user systems Batching systems Multi-programming systems M lti i t main{ ... User Program n Phase 2: Hardware is cheap, humans are expensive k: timer interrupt Time sharing: Users use cheap terminals and share servers schedule{ User Program 1 schedule{ “System Software” Operating System k+1: Phase 3: Hardware is very cheap, humans are very expensive main{ } User Program 2 Personal computing: One system per user Distributed computing: lots of systems per user timer interrupt Phase 4: Ubiquitous computing } timer interrupt schedule{ 21 22
  • 12. Operating Systems for PCs Distributed Operating Systems Typically support distributed services Personal computing systems Sharing of data and coordination across multiple systems Single user Utilization is no longer a concern Emphasis is on user interface and API Many services & features not present Possibly employ multiple processors Loosely coupled v. tightly coupled systems High availability & reliability requirements Amazon, CNN Evolution User Program User Program OS OS process management process management memory management f system file y name services mail services CPU Initially: OS as a simple service provider ( (simple libraries) p ) Now: Multi-application systems with support for coordination and communication Growing security issues (e.g., online commerce, medical records) CPU CPU OS LAN/WAN Network 23 24
  • 13. History of Operating Systems: Phases What is cloud computing? Phase 1: Hardware is expensive, humans are cheap Cloud computing is where dynamically scalable and often virtualized resources are provided as a service (thanks, over the Internet (thanks wikipedia!) Infrastructure as a service (IaaS) User at console: single-user systems Batching systems Multi programming Multi-programming systems Phase 2: Hardware is cheap, humans are expensive Time sharing: Users use cheap terminals and share servers Amazon’s EC2 (elastic compute cloud) Platform as a service (PaaS) Phase 3: Hardware is very cheap, humans are very expensive Google gears Microsoft azure Personal computing: One system per user Distributed computing: lots of systems per user Software as a service (SaaS) Phase 4: Ubiquitous computing/Cloud computing gmail facebook flickr Everything will have computation, from pacemakers to toasters Computing centralizing “I think there is a world market for maybe five computers” – Tomas J. Watson, 1943 (president of IBM) 25 26
  • 14. Richer Operating Systems Intellectual property Copyrighted material is being disseminated in digital form without payment to copyright owners. Sue them (DMCA) Napster (99-7/00) RIAA lawsuits (9/03) MPAA lawsuits against bittorrent operators (11/04) What is the future of file sharing? Attempts to ban all file sharing at the university level. Government tapping of IP networks. Can software stop intellectual property piracy? Why not? The consumer controls the OS. What b t ddi hardware? Wh t about adding h d ? Intel’s trusted execution technology. Who is trusted? Hint: Its not the owner of the computer… A PC is an open-ended system, not an appliance. For how much longer? Thanks, James Hamilton, amazon 27 28
  • 15. Richer Operating Systems Course Overview Information organization Is it better to search for data (google), or organize it hierarchically (file folders)? OS Structure, Processes and Process Management CPU scheduling Organization along a particular set of ideas (schema) might not be ideal for a different set of ideas. Gmail search vs. mail folders Threads and concurrent programming Thread coordination, mutual exclusion, monitors Integration of search in Vista and MacOS. Deadlocks Do you use My Documents folder, or do you maintain your own directories? use both a lot? Virtual memory & Memory management Disks & file systems Distributed file systems Security 29 30