Upload
others
View
20
Download
0
Embed Size (px)
Citation preview
CS3410:ComputerSystemOrganizationandProgramming
AnneBracyComputerScienceCornellUniversity
The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer.
TheAnalyticalEngine• DesignedbyCharlesBabbagefrom1834–1871
• Consideredtobethefirstdigitalcomputer
• Builtfrommechanicalgears,whereeachgearrepresentedadiscretevalue(0-9)
• Babbagediedbeforeitwasfinished
2
http://history-computer.comhttp://wikimedia.com
AlanTuringTuringMachine
1936=abstractmodelforCPUthatcansimulateanyalgorithm
3
TheBombeusedbytheAlliestobreaktheGermanEnigmamachineduringWorldWarII
EnigmamachineUsedbytheGermansduringWorldWarIItoencryptandexchangesecretmessages
4
ENIACElectronicNumerical
IntegratorAndComputer
5
1946JohnMauchlyJ.Presper Eckert
Whoareyou?
“Sometimesitisthepeoplethatnooneimaginesanythingofwhodothethingsthatnoonecan
imagine.”– AlanTuring
• TuringAwardWinners?• EckertMauchly AwardWinners?
6
CourseObjective• UnderstandtheHW/SWinterfacesoftware
§ Howaprocessorworks§ Howacomputerisorganized
• Establishafoundationforbuildingapplications§ Howtowriteagoodprogram
• Good=correct,fast,andsecure§ Howtounderstandwheretheworldisgoing
• Understandtechnology(past,present,future)
7
Whatisthis?#include <stdio.h>
int main() {printf("Hello world!\n");return 0;
}
Howdoesitwork?I’mgladyouasked…15weekslaterandyou’llknow!“IknowKungFu.”
8
Compilers&Assemblersint x = 10;x = 2 * x + 15;C
compiler
addi r5, r0, 10muli r5, r5, 2addi r5, r5, 15
MIPSassemblylanguage
001000000000010100000000000010100000000000000101001010000100000000100000101001010000000000001111
MIPSmachinelanguage
assembler
r0=0
r5=r0+10r5=r5*2r5=r5+15
op=addi r0r510
op=addi r5r5 15Everythingisanumber!9
HowtoDesignaSimpleProcessor
10
memory
inst
32
pc
200
new pccalculation
register file
control
5 5 5
alu
00: addi r5, r0, 1004: muli r5, r5, 208: addi r5, r5, 15
r0r5
0
10
1032
InstructionSetArchitecture(ISA)• abstractinterfacebetweenhardwareandthelowestlevelsoftware
• userportionoftheinstructionsetplustheoperatingsysteminterfacesusedbyapplicationprogrammers
11
Overview
I/O systemInstr. Set Proc.
Compiler
OperatingSystem
Application
Digital DesignCircuit Design
Instruction SetArchitecture
Firmware
Memory system
Datapath & Control
12
Compiler Firmware
Coveredinthiscourse
I/O systemCPU
OperatingSystem
Application
Digital DesignCircuit Design
Instruction SetArchitectureMemory
system
Datapath & Control
13
Wherediditbegin?
• ElectricalSwitch§ On/Off§ Binary
• Transistor
ThefirsttransistoronaworkbenchatAT&TBellLabsin1947
Transistors 14
Moore’sLaw• 1965
§ #oftransistorsintegratedonadiedoublesevery18-24months(i.e.,growsexponentiallywithtime)
• Amazinglyvisionary§ 2300transistors,1MHzclock(Intel4004)- 1971§ 16Milliontransistors(UltraSparc III)§ 42Milliontransistors,2GHzclock(IntelXeon)– 2001§ 55Milliontransistors,3GHz,130nmtechnology,250mm2 die(Intel
Pentium4)– 2004§ 290+Milliontransistors,3GHz(IntelCore2Duo)– 2007§ 721Milliontransistors,2GHz(Nehalem)- 2009§ 1.4Billiontransistors,3.4GHzIntelHaswell (Quadcore)– 2013
15
16
ProcessorPerformanceIncrease
SUN-4/260 MIPS M/120MIPS M2000
IBM RS6000
HP 9000/750DEC AXP/500
IBM POWER 100DEC Alpha 4/266
DEC Alpha 5/500DEC Alpha 21264/600DEC Alpha 5/300
DEC Alpha 21264A/667
Intel Xeon/2000
Intel Pentium 4/3000
17
ThenandNow
• Intel Haswell• 1.4 billion transistors• 177 square millimeters• Four processing cores
http://techguru3d.com/4th-gen-intel-haswell-processors-architecture-and-lineup/
• The first transistor• One workbench at AT&T Bell Labs• 1947• Bardeen,Brattain,andShockley
What are we doing with all these transistors? 18
ComputerSystemOrganization
19
ReflectWhytakethiscourse?• Basicknowledgeneededforall otherareasofCS:operatingsystems,compilers,...
• Levelsarenotindependenthardwaredesign↔softwaredesign↔performance
• Crossingboundariesishardbutimportantdevicedrivers
• Gooddesigntechniquesabstraction,layering,pipelining,parallelvs.serial,...
• Understandwheretheworldisgoing
TheMysteriesofComputingwillberevealed!20