Sei sulla pagina 1di 71

1

ADVANCE OPERATING SYSTEM-


COMPUTER ORGANIZATION

Chap 1a: Overview


Instructor: Aqib Perwaiz
Computing Applications
2

 “Computers” are everywhere today

 Innumerable individual computing applications, e.g.:


 ATMs

 Computers in vehicles (steering/braking/motion


sensors)
 PDAs, Cellphones, Blackberries, IPods…

 Baby toys, kitchen appliances, …


The History & Evolution Of Computer

Basically, the history of


computer development is
divided into 2 parts :
before 1940 & after 1940.

3
• A long time ago, human are using their
fingers, stones etc to do calculation. At the
same time, they are trying to create an
apparatus that could facilitate the calculation
process.

• After a few trial, finally the complex and


advance calculation system has been
produced and it is known as a computer.

4
5

Before

1940
Abakus Counting Device
6

• Created on 3000 B.C. at


Babylonia.

• Was the first mechanical


counting device in the world.

• Able to execute addition and


subtraction operation.
John Napier's Bone
• Created on 1614 by John
Napier.

• Facilitate multiplication and


division processes – faster &
easier.

• The first logarithm table has


been created.

7
Pascaline Machine
• Created on 1642 by Braise Pascal.
• Was the first mechanical machine or
calculator in the world.
• Able to execute addition and subtraction
processes.

8
Babbage Differentiation Machine
• Created by Charles Babbage on 1821.
• Was the first mechanical machine which is used
the steam power.
• Able to do a calculation and printing the output
automatically.

9
Babbage Analytical Engine
• Created on 1842 by Charles Babbage.
• It has five (5) main parts :
• Input unit
• Output unit
• Processing Unit
• Control unit
• Memory unit

10
• His invention has became a
theory model for today's
computer technology.
• Because of that, Charles
Babbage has been known as
The Ancestor of A Modern
Computer.

11
12

After

1940
Starting Point
• This part indicates the starting
point of computer generation.

• The computer which used


electrical power has been
introduced.

13
Mark 1
• Created on 1941 by Dr. Howard Aikern in
conjunction with IBM.
• Was the first electro-mechanical computer.
• Size : 55 feet long, 8 feet height and connected
with 800 km of wire.

14
ENIAC
• Electronic Numerical Integrator And Computer
• Was the first electronic computer.
• Created on 1946 by J. Presper Eckert & John W.
Munchly from the University of Pennsylvania. Was
used until 1955.
• Contained of 18,000 vacuum tubes, 70,000
resistors, 10,000 capacitors and 15,000 sq feet of
space is needed. Needs 150 kW power and the
weight is 30 ton.
• Used decimal number and 20 accumulators of 10
digits. digit.
• Able to execute 5,000 addition process per
second.
• 1,000 times faster than Mark 1.
15
ENIAC

16 Computer Architecture and Organization


Vacuum Tube Transistor Capacitor

Switch
17
Switch
Von Neumann/Turing
18
 Apply the concept of embedded code.
 Main memory keeps the program and data.
 ALU uses binary data.
 CU interpret the instruction from memory during
the execution.
 CU also controls I/O operation.
 Princeton Institute for Advanced Studies
 IAS
 Completed 1952
Structure of Von Nuemann machine

19
Computer Generation
• Vacuum tube : 1946-1957

• Transistor : 1958-1963

• Small scale integration) : 1963 – 1970


Up to 100 components inside one chip.

• Medium scale integration (MSI) : 1971


100-3,000 components inside one chip.

20
Computer Generation
• Large scale integration (LSI) : 1971-1977
3,000 - 100,000 components inside one
chip.

• Very large scale integration (VLSI) ) :


1978 – now
100,000 - 100,000,000 components inside
one chip.

• Ultra large scale integration


Over 100,000,000 components inside one
chip.
21
3 Classes of Computing Applications
22

 Desktop/Personal Computers (best-known)

 Servers (widest range in cost/capability)

 Embedded Computers (widest range use/power)


Classes of Computers
23

 Desktop computers
 Personal computers (best-known)
 General purpose, variety of software
 Subject to cost/performance tradeoff
Classes of Computers-cont.
24

 Server computers
 Network based; Multiple users access via network
 Execute many small tasks at once (web); execute one huge
job (weather forecast supercomputer)
 Highcapacity, performance, reliability
 Range
 Smallfile servers
 Supercomputers
Poor Man’s Super Computer
25

 What is a Cluster?
 “Collection of interconnected
stand-alone computers working
together as a single, integrated
computing resource”
 Cluster consists of
 Nodes
 Network
 OS
 Cluster middleware

 Standard components
 Avoiding expensive proprietary
components
Classes of Computers-cont.
26

 Embedded computers
 Hiddenas components of systems
 Examples
 Computer in your car
 Processor in your cell phone
 Stringent power/performance/cost constraints
Prototypical Computer System
27

 All computing
applications have a few
key components:
 The computer (box) to
do the computing
 Input devices (e.g.
keyboard, mouse)
 Output devices (e.g.
display, printer)
 Input/Output devices
(disks, networks)
Inside the Box: Our Focus
28
Inside the Box: Motherboard
29
Inside the Computer: Motherboard
30

P
R
O
C
E
S
S
O
R
Inside the Computer: Motherboard
31

M
A
I
N

M
E
M
O
R
Y
Inside the Computer: Motherboard
32

I
N
P
U
T
O
U
T
P
U
T
Inside the Computer: Basic Blueprint
33
Inside the Computer: Data Flow
34
Computer

Processor Main Devices


Memory
Control INPUT

Datapath OUTPUT

Data flows from input to memory to processor


Data is processed and flows back to main memory
Data flows to output devices for storage or display
Inside the Computer: Data Processing
35
Computer

Processor Main Devices


Memory
Control INPUT

Datapath OUTPUT

Control gets program instructions from memory


Control tells memory, datapath, I/O what to do with data
Datapath gets data from memory and operates on it
Inside the Computer: Data Storage
36
Computer

Processor Main Devices


Memory
Control INPUT
VOLATILE NONVOLATILE

Datapath OUTPUT

Main memory: small, close, fast, expensive, volatile


2ndary (I/O) memory: big, far, slow, cheap, nonvolatile
Microprocessor Performance

Source: H&P Textbook


50% improvement every year!!
What contributes to this improvement? Power wall, low hanging fruit
37
Power Consumption Trends

• Dyn power a activity x capacitance x voltage2 x frequency

• Voltage and frequency are somewhat constant now,


while capacitance per transistor is decreasing and number
of transistors (activity) is increasing

• Leakage power is also rising (function of #trans and voltage)


100Watt/
mm,
thermal
emergen
cies

38
Source: H&P Textbook
Important Trends

• Running out of ideas to improve single thread performance

• Power wall makes it harder to add complex features

• Power wall makes it harder to increase frequency

39
Important Trends

• Historical contributions to performance:


1. Better processes (faster devices) ~20%
2. Better circuits/pipelines ~15%
3. Better organization/architecture ~15%

In the future, bullet-2 will help little and bullet-1 will


eventually disappear!

Pentium P-Pro P-II P-III P-4 Itanium Montecito


Year 1993 95 97 99 2000 2002 2005
Transistors 3.1M 5.5M 7.5M 9.5M 42M 300M 1720M
Clock Speed 60M 200M 300M 500M 1500M 800M 1800M

Moore’s Law in action At this point, adding transistors


40 to a core yields little benefit
What Does This Mean to a Programmer?

• Today, one can expect only a 20% annual improvement;


the improvement is even lower if the program is not
multi-threaded

 A program needs many threads

 The threads need efficient synchronization and


communication

 Data placement in the memory hierarchy is important

 Accelerators should be used when possible

41
Challenges for Hardware Designers

• Find efficient ways to

 boost single-thread performance

 improve data sharing

 boost programmer productivity

 manage the memory system

 build accelerators for important kernels

 reduce system energy per instruction


42
The HW/SW Interface

Application software a[i] = b[i] + c;

Compiler

lw $15, 0($2)
add $16, $15, $14
Systems software add $17, $15, $13
(OS, compiler) lw $18, 0($12)
lw $19, 0($17)
add $20, $18, $19
sw $20, 0($16)
Assembler

Hardware 000000101100000
110100000100010
43

Computer Components

• Input/output devices

• Secondary storage: non-volatile, slower, cheaper

• Primary storage: volatile, faster, costlier

• CPU/processor (datapath and control)

44
Wafers and Dies

Source: H&P Textbook


45
Manufacturing Process

• Silicon wafers undergo many processing steps so that


different parts of the wafer behave as insulators,
conductors, and transistors (switches)

• Multiple metal layers on the silicon enable connections


between transistors

• The wafer is chopped into many dies – the size of the die
determines yield and cost

46
Processor Technology Trends

• Shrinking of transistor sizes: 250nm (1997) 


130nm (2002)  70nm (2008)  35nm (2014)

• Transistor density increases by 35% per year and die size


increases by 10-20% per year… functionality improvements!

• Transistor speed improves linearly with size (complex


equation involving voltages, resistances, capacitances)

• Wire delays do not scale down at the same rate as


transistor delays

47
Memory and I/O Technology Trends

• DRAM density increases by 40-60% per year, latency has


reduced by 33% in 10 years (the memory wall!), bandwidth
improves twice as fast as latency decreases

• Disk density improves by 100% every year, latency


improvement similar to DRAM

• Networks: primary focus on bandwidth; 10Mb  100Mb


in 10 years; 100Mb  1Gb in 5 years

Latency : The delay before a transfer of


data begins following an instruction for
its transfer
48
49

The Basis for Machine Communication:


Introduction to Binary Numbers
Human Language
50

 Humans communicate via speech, text, image

English alphabet has 26 letters: a-z

Letter sequences form words: tree

Word sequences form discourse units (sentences,


paragraphs):
Some trees have yellow leaves
Machine Language
51

 Machines communicate via electrical signals (conveyed through


wires or wireless EM waves) (power supplied by current, battery)

Machine alphabet has 2 letters: 0, 1


(high/low voltage, on/off, true/false)

Letter sequences form meaningful units:

Data: 0011 3
Instruction: 0001000110011 3+3
Program: 000100011001111 swap two
010101000000001 variable
000010001010101 values
Machine Language  Assembly Language
52

 Machine Language (ML) is easy for computers but


time-consuming for humans

 Assembly Language (AL) was developed as a


“more natural” symbolic code for ML

ADD 3,3  0001000110011

 Assemblers are programs developed to


automatically translate AL to ML
High Level Programming Languages
53

 AL still thinking like a machine


1 AL instruction for every 1 ML instruction
 Why not develop a higher-level code for AL?

 High-level Programming Languages (PL) were


developed as symbolic codes for AL

C, Java, Perl, etc.

 Compilers are programs developed to automatically


translate PL to AL
C Program swap(int v[], int k) {
int tmp;
tmp = v[k];
v[k] = v[k+1];
C compiler v[k+1] = tmp;}

MIPS AL Program swap: muli $2, $5, 4


add $4, $2
lw $15, 0($2)
Million Instructions Per Second
lw $16, 4($2)
MIPS assembler sw $16, 0($2)
sw $15, 4($2)
jr $31

MIPS ML Program 00000000101000010000000000011000


00000000100011100001100000100001
10001100011000100000000000000000 54
011100011100011101001100010001 …
C Program swap(int v[], int k) {
int tmp;
tmp = v[k];
v[k] = v[k+1];
C compiler v[k+1] = tmp;}

MIPS AL Program swap: muli $2, $5, 4


add $4, $2
lw $15, 0($2)
lw $16, 4($2)
sw $16, 0($2)
MIPS assembler sw $15, 4($2)
jr $31

MIPS ML Program 00000000101000010000000000011000


00000000100011100001100000100001
10001100011000100000000000000000 55

011100011100011101001100010001 …
Background: Number Systems

 In grade school: decimal system

 To “interpret” a digit sequence: assign each digit to a column,


multiply each digit by the column, add them all together

Hundreds Tens Ones

2 3 7

2 x 100 + 3 x 10 +7 x 1’s = 237


Number Systems: Decimal System
 Decimal System = Base 10

Hundreds Tens Ones


102 101 100

0-9 0-9 0-9

• Base 10 uses digits 0 – 9

• Largest number represented with 3 columns?

• How do we represent a larger number?


Binary Number System
 Binary system (base 2) uses digits 0 – 1

 Machine Language uses base 2

25 24 23 22 21 20

2 3 7 Invalid
1 0 1 1 0 0 Valid
Conversion from Binary to Decimal
Convert 100111base 2 to ???base 10
 Assign each digit to a column (columns represent base raised
to exponents increasing to left)
 Multiply each digit by the column, then add them all together

25 24 23 22 21 20
1 0 0 1 1 1

1 x 2 5 + 0 x 24 + 0 x 23 + 1 x 2 2 + 1 x 2 1 + 1 x 2 0 =
32 + 0 + 0 + 4 + 2 + 1 =
39base10
Conversion from Decimal to Binary
Convert 237base10 to ??????base 2
 Find the largest power of 2 in the decimal number
(trial and error)
 Record this largest power in its column
 Subtract this largest power: 237 – 128 = 109

28 27 26 25 24 23 22 21 20
256 128 64 32 16 8 4 2 1
1
Conversion from Decimal to Binary
 REPEAT 1-3 with remainder, until 0
 Record 0 for all powers not subtracted
109 45 13 5 1
- 64 = 26 - 32 = 25 - 8 = 23 - 4 = 22 - 1 = 20
45 13 5 1 0

28 27 26 25 24 23 22 21 20
256 128 64 32 16 8 4 2 1
1 1 1 0 1 1 0 1

237base10 = 11101101base 2
Class Example: Convert Binary to Decimal

Convert 1011base 2 to ??base 10


Class Example: Convert Binary to Decimal

Convert 1011base 2 to ??base 10

23 22 21 20

1 0 1 1

1 x 23 + 0 x 22 + 1 x 21 + 1 x 20 =
8 + 0 + 2 + 1 =
11base10
Class Example: Convert Decimal to Binary

Convert 22base10 to ?????base 2


Counting in the Binary Number System

23 22 21 20 Base
10
0 0
1 1
1 0 2
1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 10
Back to Machine Language
66

 Machines communicate via electrical signals, which have


2 values: high/low voltage
 Use Base 2 to represent machine language: 0, 1
 Binary number sequences (multiple signals) create larger
units:

Data: 0011 3

Instruction: 0001000110011 3+3

Program: (sequences of instructions)


Boolean Logic: Action of ML
67

 A Machine Language instruction is a command for an operation to


be performed
 Boolean Logic (BL): represents how operation carried out on inputs
to yield output (Action of Operation)
 Logic Equation: describes action: output produced by combining
inputs and logic operators
 Logic Block: displays action: output produced by combining
inputs and logic gates
 gates encoded on chips with conductive material
 Truth Table: enumerates action: output produced by all possible
input combinations
Atomic Logic Operator: AND
C = A AND B Truth Table
C=A●B A B C
C=A B 0 0 0
C=A&B
0 1 0
(logical product)
1 0 0
iff A is true and B is true then C 1 1 1
is true
(any # inputs) Logic Gate
A
True = 1 ● C
False = 0 B
Atomic Logic Operators: OR
C = A OR B Truth Table
C=A + B A B C
C=A B 0 0 0
C=A|B 0 1 1
(logical sum)
1 0 1
iff A is true or B is true then C 1 1 1
is true
(any # inputs) Logic Gate
A
True = 1 + C
False = 0 B
Atomic Logic Operators: NOT

C = NOT A Truth Table


C = ¬A
A C
C= A
C = A’ 0 1
(inverse/inverter) 1 0

iff A is true
Logic Gate
then C is false

True = 1
A ¬ C
False = 0
What I want you to do
71

 Review Chapter 1 and Class Slides


 Enjoy your new semester

Potrebbero piacerti anche