26
COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Embed Size (px)

Citation preview

Page 1: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

COT 4600 Operating Systems Spring 2011

Dan C. Marinescu

Office: HEC 304

Office hours: Tu-Th 6:00-7:15 PM

Page 2: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Last time: Discussion of the paper “Architecture of Complexity” by H. A. Simon Modularity, Abstractions, Layering, Hierarchy

Today: Discussion of the paper “Hints for Computer Systems Design” by Butler

Lampson. Layering and Hierarchy for Coping with Complexity Complexity of Computer Systems Bandwidth and Latency Iteration Names and The Basic Abstractions Memory. Critical Properties of Memory Systems.

Read-Write Coherence Before or After Atomicity

Next time Raid Systems

Lecture 5 – Thursday, January 27 2011

Lecture 5

Page 3: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Layering for Coping with Complexity

Layering building a set of successive functional entities with restricted communication patterns, a layer may only communicate with the layer below it and with the one above it.

Examples: networking

Page 4: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Hierarchy for Coping with Complexity

Hierarchical structures construct a large system from a small collection of relatively large subsystems

Examples: Corporations An army A computer is a collection of subsystems

Page 5: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Names

Modularity along with abstraction, layering, and hierarchy allow a designer to cope with complexity;

Names and addresses provide the means to connect modules.

A system a bunch of resources, glued together with names

Naming allows the designer to: Delay the implementation of some modules; use dummy ones Replace an implementation with another one.

Binding choosing an implementation for a module Delayed binding; use a place holder.

Page 6: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Digital computers - a distinct species of complex systems

The complexity of digital computer systems not limited by the laws of physics distant bounds on composition Digital systems are noise-free. The hardware is controlled by software

The rate of change unprecedented The cost of digital hardware has dropped in average 30% per

year for the past 35 years

Lecture 5

Page 7: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Analog, digital, and hybrid systems Analog systems:

the noise from individual components accumulate and the number of components is limited

Digital systems: are noise-free the number of components is not limited regeneration restoration of digital signal levels static discipline the range of the analog values a device

accepts for each input digital value should be wider than the range of analog output values

digital components could fail but big mistakes are easier to detect than small ones!!

Hybrid systems e.g., quantum computers and quantum communication systems

Lecture 5

Page 8: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Computers are controlled by software

Composition of hardware limited by laws of physics. Composition of software is not physically constrained;

software packages of 107 lines of code exist Abstractions hide the implementation beneath module

interfaces and allow the creation of complex software modification of the modules

Abstractions can be leaky. Example, representation of integers, floating point numbers.

Lecture 5

Page 9: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Exponential growth of computers Unprecedented:

when a system is ready to be released it may already be obsolete. when one of the parameters of a system changes by a factor of

2 other components must be drastically altered due to the incommensurate scaling.

10 the systems must be redesigned; E.g.; balance CPU, memory, and I/O bandwidth;

does not give pause to developers to learn lessons from existing systems find and correct all errors

negatively affects “human engineering” ability to build reliable and user-friendly systems

the legal and social frameworks are not ready

Lecture 5

Page 10: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Coping with complexity of computer systems

Modularity, abstraction, layering, and hierarchy are necessary but not sufficient.

An additional technique iteration Iteration

Design increasingly more complex functionality in the system Test the system at each stage of the iteration to convince

yourself that the design is sound Easier to make changes during the design process

Lecture 5

Page 11: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Iteration – design principles

Make it easy to change the simplest version must accommodate all changes required by

successive versions do not deviate from the original design rationale think carefully about modularity it is very hard to change it.

Take small steps; rebuild the system every day, to discover design flaws and errors. Ask others to test it.

Don’t rush to implementation. Think hard before starting to program.

Use feedback judiciously use alpha and beta versions do not be overconfident from an early success

Study failures understand that complex systems fail for complex reasons.

Lecture 5

Page 12: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Curbing complexity

In absence of physical laws curb the complexity by good judgment. Easier said than done because: tempted to add new features than in the previous generation competitors have already incorporated the new features the features seem easy to implement the technology has improved human behavior: arrogance, pride, overconfidence…

Lecture 5

Page 13: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

MICROPROCESSORS (1980s)MULTI-CORE MICROPROCESSORS

(2000s)

WORLD WIDE WEB (1990s)

GOOGLE, YouTube (2000s)

FIBER OPTICS (1990s)

WIRELESS (2000s)

SENSORSDIGITAL CAMERAS

(2000s)

COLLECT

PROCESSDISSEMINATE

COMMUNICATE

OPTICAL STORAGEHIGH DENSITY SOLID-STATE

(1990s)SPINTRONICS (2000s)

MILESTONES IN INFORMATION PROCESSING

BOOLEAN ALGEBRA (1854)DIGITAL COMPUTERS (1940s)INFORMATION THEORY (1948)

- Quantum Computing- Quantum Information Theory

STORE

Critical elements of information revolution!

Lecture 5

Page 14: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Complexity of computing and communication systems

New components

New applications

Interconnectivity + mobility, embedded

devices

Physical constraints

Larger segment of population using

the systems

Optimization of resource

consumption

TimingConstraints

Lecture 5

Page 15: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Names and fundamental abstractions

The fundamental abstractions1. Storage mem, disk, data struct, File Systems, disk arrays

2. Interpreters cpu, programming language e.g. java VM

3. Communication wire, Ethernet

rely on names. Naming:

Flat Hierarchical

Lecture 5

Page 16: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Lecture 5 16

Names and the three basic abstractions

Memory stores named objects write(name, value) value READ(name) file system: /dcm/classes/Fall09/Lectures/Lecture5.ppt

Interpreters manipulates named objects machine instructions ADD R1,R2 modules Variables call sort(table)

Communication Links connect named objects HTTP protocol used by the Web and file systems

Host: boticelli.cs.ucf.edu

put /dcm/classes/Fall09/Lectures/Lecture5.ppt

get /dcm/classes/Fall09/Lectures/Lecture5.ppt

Page 17: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Lecture 5

Latency and Bandwidth

Important concepts for physical characterization. Applies to all three abstractions. Informal

Bandwidth number of operations per second! Latency to get there

The bandwidth of the CPU, Memory, and I/O sbsystems must be balanced.

17

Page 18: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Lecture 5 18

Communication latency- time it takes the first bit sent to reach the receiver

Latency

Bandwidth

Bandwidth- number of bits/bytes transmitted per unit of time

t1

t2

t3

t4

t5

t6

Time Time

Sender Receiver

Program Storagedevice

t2t3

t1

Operation latency- time it takes the command to read the device

Latency

Bandwidth- number of bits/bytes transmitted per unit of time

Bandwidth

t4

t5

t6

Page 19: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Lecture 5 19

Memory Hardware memory:

Devices RAM (Random Access Memory) chip Flash memory non-volatile memory that can be erased and

reprogrammed Magnetic tape Magnetic Disk CD and DVD

Systems RAID File systems DBMS (Data Base management Systems)

Page 20: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Lecture 5 20

Attributes of the storage medium/system

Durability the time it remembers Stability whether or not the data is changed during the

storage Persistence property of data storage system, it keeps

trying to preserve the data

Page 21: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Lecture 5 21

Critical properties of a storage medium/system

Read/Write Coherence the result of a READ of a memory cell should be the same as the most recent WRITE to that cell.

Before-or-after atomicity the result of every READ or WRITE is as if that READ or WRITE occurred either completely before or completely after any other READ or WRITE

Page 22: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Lecture 5 22

time

WRITE item A in cell M

AM

READ from cell M

AM

A A

Read/Write Coherence è the result of a READ of a memory cell should be the same as the most recent WRITE to that cell.

Before-or-after atomicity è the result of every READ or WRITE is as if that READ or WRITE occurred either completely before or completely after any other READ or WRITE

Current READ/WRITE

Previous READ/WRITE

Next READ/WRITE

Page 23: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Lecture 5 23

Why it is hard to guarantee the critical properties?

Concurrency multiple threads could READ/WRITE to the same cell

Remote storage The delay to reach the physical storage may not guarantee FIFO operation

Optimizations data may be buffered to increase I/O efficiency

Cell size may be different than data size data may be written to multiple cells.

Replicated storage difficult to maintain consistency.

Page 24: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Lecture 5 24

Access type; access time

Sequential access Tapes CD/DVD

Random access devices Disk

Seek Search time Read/Write time

RAM

Page 25: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Lecture 5

Physical memory organization

RAM two dimensional array. To select a flip-flop provide the x and y coordinates.

Tapes blocks of a given length and gaps (special combination of bits.

Disk: Multiple platters Cylinders correspond to a particular position of the moving arm Track circular pattern of bits on a given platter and cylinder Record multiple records on a track

25

Page 26: COT 4600 Operating Systems Spring 2011 Dan C. Marinescu Office: HEC 304 Office hours: Tu-Th 6:00-7:15 PM

Lecture 5

Names and physical addresses

Location addressed memory the hardware maps the physical coordinates to consecutive integers, addresses

Associative memory unrestricted mapping; the hardware does not impose any constraints in mapping the physical coordinates

26

Figure 2.2 from textrbook