office hours: 1:30pm-2:30pm tuesday, thursday at sb229c ...sun/pdfd/cs550-lec2.pdf · • advanced...

32
X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 1 CS550 Advanced Operating Systems (Distributed Operating Systems) Instructor: Xian-He Sun Email: [email protected], Phone: (312) 567-5260 Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C, or by appointment TA: TBA – Email: [email protected] Office: xxx Office hours: TBA Blackboard: – http://blackboard.iit.edu Class Web site – http://www.cs.iit.edu/~sun/cs550.html

Upload: lethu

Post on 30-Apr-2018

219 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 1

CS550

• Advanced Operating Systems (Distributed Operating Systems)

• Instructor: Xian-He Sun– Email: [email protected], Phone: (312) 567-5260

– Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C, or by appointment

• TA: TBA– Email: [email protected]

– Office: xxx

– Office hours: TBA

• Blackboard:– http://blackboard.iit.edu

• Class Web site– http://www.cs.iit.edu/~sun/cs550.html

Page 2: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 2

Future Computing: Human-centered Service

Devices

become smaller

and powerful

A device is an entry of the cyber

world

They are connected to form `smart

space’

Grids link `smart spaces’

to support `global

smartness’

A new IT booming is coming

Page 3: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 3

What Is Computer Science?

Computer science is laying the foundations and

developments the real search paradigms and

scientific methods for the exploration of the world

of information and intellectual processes that are

not directly governed by physical laws.

By Juris Hartimanis, Turing Award Lecture

Such people (computer scientists) are especially

good at dealing with situations where different

rules apply in different cases; they are individuals

who can rapidly change levels of abstraction,

simultaneously seeing things “in the large” and “in the

small”.By Donald Knuth, Turing Award Lecture

Page 4: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 4

What Is an OS?

An OS is a program that manages various

computer resources

• A program that acts as an interface between

users and bare hardware

• Resources: CPU(s), memory, file systems, I/0,

etc.

• OS: software or hardware?

Page 5: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 5

End User

ApplicationPrograms

Utilities

Operating System

Computer Hardware

Programmer

Operating System

Designer

Figure 1 Layers and views of a computer system

Page 6: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 6

Evolution of Operating Systems

Systems with single CPU

• Multitasking, multiprogramming

Systems with many CPUs

• Parallel processing and multiprocessors

• Networking and distributed systems

Page 7: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 7

Technology Impacts

• CPU Technology

– getting faster and less expensive, Moore’s

law

– used to be time-sharing (overhead for

context switching)

– Now space-sharing: systems with multiple

CPUs

– Multi-core, many-core architecture

• Memory Technology (memory wall)

– Unbalanced technology advance

Page 8: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS546 Lecture 2 Page 8

1

10

100

1,000

10,000

100,000

1980 1985 1990 1995 2000 2005 2010

YearP

erf

orm

ance

Memory

Uni-rocessor

Multi-core/many-core processor

Processor-memory performance gap

• Processor performance

increases rapidly

– Uni-processor: ~52% until 2004, ~25% since then

– New trend: multi-core/many-core architecture

• Intel TeraFlops chip, 2007

– Aggregate processor performance much higher

• Memory: ~9% per year

• Processor-memory speed

gap keeps increasing

Source: Intel

Source: OCZ

25%

52%

20%

9%

60%

9%

Page 9: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 9

Memory Hierarchy

• Multiple levels of memory hierarchy

• Level closer to the CPU is faster to access

• Cache memories work well if spatial and temporal locality exists among data accesses

Page 10: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 10

Memory Hierarchy

Deeper levels of cache memory

Large memories are slow, fast memories are small.

RegistersOn chip

Cache

datapath

control

processor

Second

level

cache

(SRAM)

Main

memory

(DRAM)

Secondary

storage

(Disk)

Tertiary

storage

(Disk/Tape)

Speed (ns): 1ns

Size (bytes): 32KB

10ns

1-2MB

100ns

1-8GB

10 ms

20-200GB

10 sec

TB

Page 11: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 11

Registers

Cache

Main Memory

Magnetic Disk

Magnetic Tape

Contemporary memory hierarchy

Disk Cache

Optical Disk

1L

2L

memory remote

disk remote

Page 12: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS546 Lecture 2 Page 12

The Principle of Locality

• The Principle of Locality:– Programs access a relatively small portion of the

address space at any instant of time.

• Two Different Types of Locality:– Temporal Locality (Locality in Time): If an item is

referenced, it will tend to be referenced again soon (e.g., loops, reuse)

– Spatial Locality (Locality in Space): If an item is referenced, items whose addresses are close by tend to be referenced soon (e.g., straight line code, array access)

• Cache Block or Cache Line

• Last 20 years, HW relied on locality for speed

Page 13: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 13

Technology Impacts (cont’d)

• Disk (I/O wall)

– large capacity, slow access time

– was the most expensive item in computers

– file system – file storage

• Storage is one of those technologies that we tend to

take for granted. And yet, if we look at the true status

of things today, storage is king. One can even argue that servers, which have become commodities, are

now becoming peripheral to storage devices.

--Michael Vizard

Page 14: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 14

I/O Bottleneck

Bryant and O’Hallaron, “Computer Systems: A Programmer’s Perspective”, Prentice-Hall 2003

Page 15: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 15

Technology Impacts (cont’d)

• Power Consumption (power wall)

– Moore’s law

– Green computing

• Networking (local area networks)

– Speed increases faster than computing speed

– diskless workstations

– memory/disk sharing rather than CPU sharing

– Remote data access

Page 16: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS546 Lecture 2 Page 16

What Are We Doing with the Total

System Silicon?

Silicon Area Distribution

Memory

86%

Processors

3%

Routers

3%

Random

8%

Power Distribution

Memory

9%

Processors

56%

Routers

33%

Random

2%

Courtesy of Peter K ogge, U N D

Page 17: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 17

Latency Lags Bandwidth (last ~20 years)• Performance Milestones

• Processor: ‘286, ‘386, ‘486, Pentium, Pentium Pro, Pentium

4 (21x,2250x)

• Ethernet: 10Mb, 100Mb,

1000Mb, 10000 Mb/s (16x,1000x)

• Memory Module: 16bit plain DRAM, Page Mode DRAM, 32b, 64b, SDRAM,

DDR SDRAM (4x,120x)

• Disk : 3600, 5400, 7200, 10000, 15000 RPM (8x, 143x)

1

10

100

1000

10000

1 10 100

Relative Latency Improvement

Relative

BW

Improve

ment

Processor

Memory

Network

Disk

(Latency improvement

= Bandwidth improvement)

CPU high,

Memory low

(“Memory Wall”)

Page 18: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 18

Networking (Distributed Systems)

• A distributed system is a collection of processors that

do not share memory or a clock. Each processor has

its own local memory.

• The processors in the system are connected

through a communication network.

• A distributed system provides user access to

various system resources.

• Access to a shared resource allows:

- Computation speed-up

- Increased data availability

- Enhanced reliability

Page 19: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 19

Parallel Processing

• Parallel Processing

– Several working entities work together toward a

common goal

• Parallel Processing

– A kind of information processing that emphasizes the concurrent manipulation of data elements

belonging to one or more processes solving a single

problem

• Parallel Computer

– A computer designed for parallel processing

Page 20: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 20

Multiprocessors: Shared-Memory

Multiprocessors

Uniform Memory Access (UMA) NonUniform Memory Access(NUMA)

Page 21: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 21

Multiprocessors: Distributed-Memory

Multiprocessors

Note: NO HARDWARE SUPPORT FOR REMOTE MEMORY ADDRESSING

Page 22: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 22

Homogeneous Multicomputer Systems

a) 2D-mesh b) Hypercube

1-9

Page 23: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 23

Hardware Concepts

Parallel and

Distributed Systems

Multiprocessors

(fast hw network)

Multicomputers

(slow hw network)

Shared-Memory

Multiprocessors

Distributed-Memory

Multiprocessors

UMA NUMA

tightly coupled loosely coupled

Homogeneous

Multicomputers

Heterogeneous

Multicomputers

Network of

Workstation

PC

Cluster

Workstation

Cluster

Distributed Systems

Page 24: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 24

Software Concepts

• Operating system:– Interface between users and hardware

– Implements a virtual machine that is easier to program than raw hardware

• Primary functions:– Services: file system, virtual memory, networking, CPU scheduling,

– Coordination: concurrency, memory protection, security, networking,…

User applications

Operating system

Hardware

Virtual machine interface

Physical machine interface

Page 25: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 25

Uniprocessor Operating Systems

Microkernel architecture• Small kernel

• user-level servers implement additional functionality

Page 26: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 26

Multiprocessor Operating Systems

• Like a uniprocessor operating system

• Manage multiple CPUs transparently to the

user

• Each processor has its own hardware cache

– Maintain consistency of cached data

– Scalability issues

• Shared variable versus message passing

Page 27: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 27

Multicomputer Operating Systems

1.14

• More complex than multiprocessor OS

– Because communication has to be through explicit message passing

Page 28: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 28

Network Operating System

1-19

Page 29: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 29

Network Operating System

• Employs a client-server model

– Minimal OS kernel

– Additional functionality as user processes

1-20

Page 30: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 30

• Users are aware of multiplicity of machines.

Access to resources of various machines is

done explicitly by

– Remote logging into the appropriate remote

machine.

– Transferring data from remote machines to local

machines, via the File Transfer Protocol (FTP)

mechanism.

Network-Operating Systems

Page 31: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 31

Distributed Operating System

• Users not aware of multiplicity of machines.

• Manages resources in a distributed system

– Seamlessly and transparently to the user

• Looks to the user like a centralized OS

– But operates on multiple independent CPUs

• Provides transparency

– Location, migration, concurrency, replication,…

• Presents users with a virtual uniprocessor

Page 32: Office hours: 1:30pm-2:30pm Tuesday, Thursday at SB229C ...sun/pdfd/cs550-lec2.pdf · • Advanced Operating Systems (Distributed Operating Systems) ... Hardware Concepts Parallel

X.Sun (IIT) CS550: Advanced OS Lecture 2 Page 32

Middleware-based Systems

• General structure of a distributed system as middleware.

1-22