Example: air traffic controller

CS429: Computer Organization and Architecture - …

CS429: Computer Organization and ArchitectureIntroductionDr. Bill YoungDepartment of Computer ScienceUniversity of Texas at AustinLast updated: January 22, 2020 at 14:37CS429 Slideset 1: 1 Intro to Computer SystemsAcknowledgementThe slides used this semester are derived from slides originallyprepared by the textbook authors, Randall Bryant and DavidO were modified with permission and reformatted for use should consider them as copyright material; do notrepost them Slideset 1: 2 Intro to Computer SystemsTheme of the courseGreat realities of Computer scienceHow this class fits into the CS curriculumCS429 Slideset 1: 3 Intro to Computer SystemsAbstraction is our FriendMost of what we study in Computer Science is really about ahierarchy of abstractions!

CS429: Computer Organization and Architecture - Introduction Author: Dr. Bill Young Department of Computer Sciences University of Texas at Austin Created Date:

Tags:

  Architecture, Computer, Organization, Computer organization and architecture

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of CS429: Computer Organization and Architecture - …

1 CS429: Computer Organization and ArchitectureIntroductionDr. Bill YoungDepartment of Computer ScienceUniversity of Texas at AustinLast updated: January 22, 2020 at 14:37CS429 Slideset 1: 1 Intro to Computer SystemsAcknowledgementThe slides used this semester are derived from slides originallyprepared by the textbook authors, Randall Bryant and DavidO were modified with permission and reformatted for use should consider them as copyright material; do notrepost them Slideset 1: 2 Intro to Computer SystemsTheme of the courseGreat realities of Computer scienceHow this class fits into the CS curriculumCS429 Slideset 1: 3 Intro to Computer SystemsAbstraction is our FriendMost of what we study in Computer Science is really about ahierarchy of abstractions!

2 Without abstraction, we wouldn t beable to accomplish Slideset 1: 4 Intro to Computer SystemsAbstraction vs. RealityAbstraction is good, but don t forget reality!Most of your courses to date have emphasized level programming languagesAbstract data typesAsymptotic analysisThese abstractions have limits!Especially in the presence of bugsNeed to understand underlying implementationsNeed to have a working understanding of architectureCS429 Slideset 1: 5 Intro to Computer SystemsDesired OutcomesUseful outcomes!Know stuff that all Computer scientists should knowBecome more effective programmersAble to find and eliminate bugs efficientlyAble to tune program performancePrepare for later systems classes: Compilers, OperatingSystems, Networks, Computer Architecture , EmbeddedSystems, many :Hang onto your book.

3 You ll be using this same book (3rdedition) in Slideset 1: 6 Intro to Computer SystemsGreat Reality 1 Ints are not Integers; Floats are not 0? For floats, yes. For ints, not 40000 160000000050000 50000 ??CS429 Slideset 1: 7 Intro to Computer SystemsFloats are not RealsIs (x+y) +z=x+ (y+z)? For int s: yes. For floats, maybe not.(1e20 + 1e20) + + ( 1e20 + ) ??CS429 Slideset 1: 8 Intro to Computer SystemsTreat CS as an Experimental ScienceGet into the habit of writing programs to experiment with thearchitecture:voidmain (){p r i n t f ( 40000 40000 = %d\n , 40000 40000) ;p r i n t f ( 50000 50000 = %d\n , 50000 50000) ;p r i n t f ( 1e20 + ( 1e20 + ) = %f\n , 1e20 + ( 1e20+ ) ) ;p r i n t f ( (1 e20 + 1e20 ) + = %f\n , (1 e20 + 1e20 )+ ) ;}>gcc t e s t e r.

4 C>a . out40000 40000 = 160000000050000 50000 = 17949672961e20 + ( 1e20 + ) = (1 e20 + 1e20 ) + = Slideset 1: 9 Intro to Computer SystemsComputer ArithmeticComputer arithmetic does not generate random values. Arithmeticoperations have important mathematical not the usual properties of to finiteness of operations satisfy ring properties: commutativity,associativity, point operations satisfy ordering properties:monotonicity, values of :Need to understand which abstractions apply in issues for compiler writers and serious Slideset 1: 10 Intro to Computer SystemsGreat Reality 2 Computer scientists should understandassembly language!You won t often program in assembly.

5 Compilers are much betterat it and more patient than you assembly is key to understanding whatreallyhappens on the of programs in presence of bugs; high-level languagemodel breaks program performance and understanding sources ofprogram system softwareCompiler has machine code as targetOperating systems must manage process stateCreating / fighting malware: x86 is the language of choice Slideset 1: 11 Intro to Computer SystemsGreat Reality 3 Memory Matters!Memory is not unbounded!It must be allocated and applications are memory referencing bugs are especially pernicious. The effects maybe distant in both time and performance is not and virtual memory effects can greatly affect your programs to characteristics of memory systemcan lead to major speed Slideset 1: 12 Intro to Computer SystemsMemory Referencing Bug Exampledoublefun (i n ti ){i n ta [ 2 ] ;doubled [ 1 ] ={ };a [ i ] = 1073741824;r e t u r nd [ 0 ] ;}Assume x86 (double is 8 bytes; int is 4 bytes).

6 This will be differenton other systems, and may cause segmentation fault on (0) (1) (2) (3) (4) , then segmentation faultWhat can you infer about how the memory is laid out?CS429 Slideset 1: 13 Intro to Computer SystemsMemory Referencing Bug Explanation, Little Endiandoublefun (i n ti ){i n ta [ 2 ] ;doubled [ 1 ] ={ };a [ i ] = 1073741824;r e t u r nd [ 0 ] ;}ModifiedCallResulta[0]fun(0) [1]fun(1) ..d0fun(2) ..d4fun(3) statefun(4) , then seg faultCS429 Slideset 1: 14 Intro to Computer SystemsMemory Referencing ErrorsC and C++ do not provide much memory of bounds array referencesInvalid pointer valuesAbuses of malloc/freeThis can lead to nasty or not bug has any effect depends on system at a distanceCorrupted object logically unrelated to one being of bug may be first observed long after it is can I deal with this?

7 Program in Java, Lisp, or MLUnderstand what possible interactions may occurUse or develop tools to detect referencing errorsCS429 Slideset 1: 15 Intro to Computer SystemsMemory Performance ExampleThe following copies ann nmatrix:/ i j /f o r( i =0; i<n ; i++){f o r( j =0; j<n ; j++){b [ i ] [ j ] = a [ i ] [ j ] ;}}This one computes precisely the same j i /f o r( j =0; j<n ; j++){f o r( i =0; i<n ; i++){b [ i ] [ j ] = a [ i ] [ j ] ;}}But the performance may be much (could be 10X) slower,particularly for large you guess why that may be?CS429 Slideset 1: 16 Intro to Computer SystemsGreat Reality 4 There s more to performance than factors matter too!

8 Even an exact op count does not predict see 10:1 performance range depending on how code optimize at multiple levels: algorithm, datarepresentations, procedures, and understand the system to optimize programs are compiled and to measure program performance and to improve performance without destroying codemodularity and Slideset 1: 17 Intro to Computer SystemsGreat Reality 5 Computers do more than execute need to get data in and out. TheI/O system is critical to programreliability and communicate with each other over issues arise in the presence of operations by autonomous processesCoping with unreliable mediaCross platform compatibilityComplex performance issuesCS429 Slideset 1: 18 Intro to Computer SystemsGreat Reality 6 (I Added this One)Computers do a lot with very Prize winner (inEconomics) Herbert Simonused an ant to explain howsimple actions can explaincomplex results.

9 (Sciencesof the Artificial, 1969)Imagine an ant walking along a beach. You notice that the ant istracing a very intricate be executing a pretty complexalgorithm, right?CS429 Slideset 1: 19 Intro to Computer SystemsSimon s AntActually not!If you look closer, you notice that there are smallpebbles in the ant s path. The ant responds to each by turningeither right or left, possibly :You can generate very complex results using only verysimple Slideset 1: 20 Intro to Computer SystemsChurch-Turing ThesisATuring Machineis a very simple computing device that can lookat a symbol on a tape, write another symbol, and move right or leftone square, under the direction of a simple that can be computed can be computed by aTuring most powerfulcomputer you ll ever use inyour life isno morepowerful than a say that amachine isTuringcompleteif it canemulate a Turing Slideset 1: 21 Intro to Computer SystemsCourse PerspectiveMost systems courses are builder-centric.

10 Computer Architecture :Design pipelined processorin Systems:Implement large portions ofoperating : Write compilerfor simple : Implement andsimulate network Slideset 1: 22 Intro to Computer SystemsCourse PerspectiveThis course is purpose is to show how by knowingmore about the design of the underlyingsystem, one can be more effective as you toWrite programs that are more reliableand efficientIncorporate features that require hooksinto OS: concurrency, signal handlers, just a course for dedicated hackers. We bring out thehidden hacker in material in this course that you won t see Slideset 1: 23 Intro to Computer SystemsOur Subject: Computer OrganizationCS429 Slideset 1: 24 Intro to Computer Systems


Related search queries