CMSC Computer Architecture Lecture 3: ISA and Introduction to Microarchitecture. Prof. Yanjing Li University of Chicago
|
|
- Charlene Grant
- 5 years ago
- Views:
Transcription
1 CMSC Computer Architecture Lecture 3: ISA ad Itroductio to Microarchitecture Prof. Yajig Li Uiversity of Chicago
2 Lecture Outlie ISA uarch (hardware implemetatio of a ISA) Logic desig basics Sigle-cycle uarch Evaluatio of the sigle-cycle uarch 2
3 Recap: Lecture 2 ISA basics Istructios Opcodes, operads, data types, processig styles, classes, formats, istructio legth, uiform vs. o-uiform decode, addressig modes Memory ad registers Address space, addressability, aliged vs. ualiged access Others I/O, privilege modes, exceptio hadlig, etc. ISA tradeoffs RISC vs. CISC, load/store vs. mem/mem, etc. Case study: ARMv8/LEGv8 ISA Mappig C code all the way to machie code Ecode/Decode machie code 3
4 B Format Istructios opcode BR_address 6 bits 26 bits Example: B L1 brach ucoditioally to istructio labeled L1; B opcode: 0A0 16-0BF 16 I ARMv8, it is Effect: PC = PC + BrachAddr **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
5 Do You Always Brach? C code: if (i==j) f = g+h; else f = g-h; **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
6 CB Format Istructios Brach to a labeled istructio if a coditio is true Otherwise, cotiue seuetially Examples opcode CBZ register, L1 COND_BR_address 8 bits 19 bits 5 bits if (register == 0) brach to istructio labeled L1; CBNZ register, L1 if (register!= 0) brach to istructio labeled L1; Effect: if take, PC = PC + CodBrachAddr; else PC=PC+4 Rt 18 **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
7 C to Assembly 301 C code: if (i==j) f = g+h; else f = g-h; f, g,h,i,j i X19, X20, X21, X22, X23, Compiled code: SUB X9,X22,X23 CBNZ X9,Else ADD X19,X20,X21 B Exit Else: SUB X19,X20,x21 Exit: Assembler calculates addresses **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
8 More Coditios? Coditioal Codes (CC) CC: set by a set of arithmetic istructios with the S-suffix (ADDS, ADDIS, ANDS, ANDIS, SUBS, SUBIS) egative (N): result had 1 i MSB zero (Z): result was 0 overflow (V): result overflowed carry (C): result had carryout from MSB Coditioally brach based o CC: B.cod (B format) How to evaluate cod **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
9 B.cod Example if (a > b) a += 1; a i X22, b i X23 SUBS X9,X22,X23 // use subtract to make compariso B.LE Exit // coditioal brach ADDI X22,X22,#1 Exit: **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
10 WI Format Istructios Most costats are small opcode op2 immediate 12-bit immediate is sufficiet For the occasioal large costats MOVZ: move wide with zeros MOVK: move wide with keep Set ay of the 4 16-bit portios i register Rd with the immediate field Rd 9 bits 2 bits 16 bits 5 bits **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
11 WI Format Istructios: Example Opcode: MOVZ two ; MOVK two Op2: 0àbit 0-15 of Rd gets the immediate value 1àbit of Rd gets the immediate 2àbit of Rd gets the immediate 3àbit of Rd gets the immediate (All other bits of Rd set to 0 for MOVZ, or preserve their values for MOVK ) Iitially, X9 == FFFFFFFFFFFFFFFF MOVZ X9,255, op2= MOVK X9,255,op2= **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
12 LEGv8 Ecodig Summary
13 ISA Support for Fuctios Brach ad Lik (call): BL ProcedureAddress (B format) PC PC + BrachAddr retur address = PC + 4 GPR[X30] retur address O a fuctio call, the callee eeds to kow where to go back to afterwards X30 is also called LR or lik register Brach to Register (ret): BR R (R format) target = GPR [R] PC target Allows the same istructio to jump to ay locatio specified by Rd (X30 for retur)
14 Dealig with a Chai of Fuctios Caller... code A... BL _myfx... code C... BL _myfx... code D... Callee _myfx:... code B... BR X30... A call B retur C call B retur D... How do you pass argumet betwee caller ad callee? If A sets X16 to 1, what is the value of X16 whe B returs to C? What registers ca B use? What happes to X30(LR) if B calls aother fuctio
15 Review Callee-saved vs. caller saved Register usage covetio E.g., special geeral-purpose registers (eax, ebp, esp i x86) Callig covetios Fuctio prologue/epilogue
16 Caller ad Callee Saved Registers Callee-Saved Registers Caller says to callee, The values of these registers should ot chage whe you retur to me. Callee says, If I eed to use these registers, I promise to save the old values to memory first ad restore them before I retur to you. Caller-Saved Registers Caller says to callee, If there is aythig I care about i these registers, I already saved it myself. Callee says to caller, Do t cout o them stayig the same values after I am doe.
17 Register Usage Covetio **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
18 Callig Covetio caller saves caller-saved registers 2. caller loads argumets ito X0-X7 3. caller jumps to callee usig BL 4. callee allocates space o the stack (dec. stack poiter) 5. callee saves callee-saved registers to stack (X19-X27, also old X28 or old X29, X30)... body of callee (ca est additioal calls) callee loads results to X0-X7 7. callee restores saved register values 8. BR X30 9. caller cotiues with retur values i X0-X7... prologue epilogue
19 Review: Memory Usage Covetio Text: program code Static data: global variables e.g., static variables i C, costat arrays ad strigs Dyamic data: heap e.g., malloc i C, ew i Java Stack automatic storage stack space free space dyamic data static data text grow dow grow up high address stack poiter GPR[X28] biary executable reserved low address
20 C to Assembly 401 C code: it fact (it ) { if ( < 1) retur 1; else retur * fact( - 1); } Argumet i X0 Result i X1
21 C to Assembly 401 Compiled code: fact: SUBIS XZR,X0,#1 //test for <1 B.GE L1 //if >=1, go to L1 ADDI X1,XZR,#1 //put 1 i result register X1 BR LR //retur L1: SUBI SP,SP,#16 //adjust stack for 2 items STUR LR,[SP,#8]//save retur address STUR X0,[SP,#0] //save argumet (X0: caller saved) SUBI X0,X0,#1 // Argumet X0 gets -1 BL fact //call fact LDUR X0,[SP,#0] //fact returs, restore value to X0 LDUR LR,[SP,#8] //restore retur address to LR(X30) ADDI SP,SP,#16 //pop stack MUL X1,X0,X1 //put *fact(-1) ito result register X1 BR LR //retur C code: it fact (it ) { if ( < 1) retur 1; else retur * fact( - 1); } Argumet i X0 Result i X1
22 Now That We Have a ISA How do we implemet it? i.e., how do we desig a hardware system that obeys the hardware/software iterface? 22
23 Logic Desig Basics 23
24 Termiologies Digital systems, iformatio ecoded i biary Oe wire per bit: Low voltage = 0, High voltage = 1 Combiatioal logic (CL) Calculate the output of a logic fuctio based o iputs State (seuetial) elemets Store iformatio, tightly coupled with CL Memory elemets Less expesive tha seuetial elemets Stores a large amout of iformatio that may ot eed to be accessed as ofte as the iformatio i seuetial elemets
25 Combiatioal Logic Examples AND-gate Y = A & B Adder Y = A + B A B + Y A B I0 I1 M u x S Y Multiplexer Y = S? I1 : I0 Y Arithmetic/Logic Uit Y = F(A, B) A ALU Y B F **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
26 Seuetial Elemets Register: stores data i a circuit Uses a clock sigal to determie whe to update the stored value Edge-triggered: update whe Clk chages from 0 to 1 Called a flip-flop D Clk Q Clk D Q **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
27 Critical Path ad Clock Cycle Time Combiatioal logic (CL) computes ad trasforms data Betwee clock edges Iput from state elemets, output to state elemet Logest delay determies clock cycle time Logest CL is also referred to as the critical path What if CL is loger tha clock cycle time? Add seuetial elemets! **Based o origial figure from [P&H CO&D, COPYRIGHT 2016 Elsevier. ALL RIGHTS RESERVED.]
28 Memory Elemets Iputs: address, read eable (re), write eable (we), write data (ofte comig from seuetial elemets) Output: read data (ofte will be stored i seuetial elemets) Ca have multiple read/write ports Sychroous with clock E.g., issue read/write i cycle i, data is outputted/writte i cycle i+1 address Data i re we Data out Clk
29 Implemetig the ISA: Microarchitecture Basics 29
30 How Does a Machie Process Istructios? What does processig a istructio mea? AS = Architectural (programmer visible) state before a istructio is processed Process istructio AS = Architectural (programmer visible) state after a istructio is processed Processig a istructio: Trasformig AS to AS accordig to the ISA specificatio of the istructio 30
31 Remember: Programmer Visible (Architectural) State M[0] M[1] M[2] M[3] M[4] Registers - give special ames i the ISA (as opposed to addresses) - geeral vs. special purpose M[N-1] Memory array of storage locatios idexed by a address Program Couter memory address of the curret istructio Istructios (ad programs) specify how to trasform the values of programmer visible state 31
32 Istructio Processig ISA specifies abstractly what AS should be, give a istructio ad AS It defies a abstract fiite state machie where Curret State: programmer-visible state Next State: istructio executio specificatio From ISA poit of view, there are o itermediate states betwee AS ad AS durig istructio executio Oe state trasitio per istructio Microarchitecture implemets how AS is trasformed to AS There are may choices i implemetatio We ca have programmer-ivisible state to optimize the speed of istructio executio: multiple state trasitios per istructio Choice 1: AS à AS (trasform AS to AS i a sigle clock cycle) Choice 2: AS à AS+MS1 à AS+MS2 à AS+MS3 à AS (take multiple clock cycles to trasform AS to AS ) 32
33 A Very Basic Istructio Processig Egie Each istructio takes a sigle clock cycle to execute Oly combiatioal logic is used to implemet istructio executio No itermediate, programmer-ivisible state updates AS = Architectural (programmer visible) state at the begiig of a clock cycle Process istructio i oe clock cycle AS = Architectural (programmer visible) state at the ed of a clock cycle 33
34 A Very Basic Istructio Processig Egie Sigle-cycle machie Combiatioal Logic AS Seuetial Logic / memory (State) AS What is the clock cycle time determied by? The slowest istructio determies cycle time à log clock cycle time 34
35 What Is To Come **Based o origial figure from [P&H CO&D, COPYRIGHT 2004 Elsevier. ALL RIGHTS RESERVED.] 35
36 Datapath vs. Cotrol Logic A istructio processig egie cosists of two compoets Datapath: Cosists of hardware elemets that deal with ad trasform data sigals fuctioal uits that operate o data hardware structures (e.g. wires ad muxes) that eable the flow of data ito the fuctioal uits ad registers storage uits that store data (e.g., registers) Cotrol logic: Cosists of hardware elemets that determie cotrol sigals, i.e., sigals that specify what the datapath elemets should do to the data 36
37 A Sigle-Cycle Microarchitecture A Closer Look 37
38 Remember Sigle-cycle machie Combiatioal Logic AS Seuetial Logic (State) AS 38
39 Let s Start with the State Elemets What are the architecture (programmer visible) states for LEGv8? **Based o origial figure from [P&H CO&D, COPYRIGHT 2004 Elsevier. ALL RIGHTS RESERVED.] 39
40 State Elemets Data ad cotrol iputs PC Read register 1 Read register 2 Registers Write register Write data Read data 1 Read data 2 RegWrite MemWrite Istructio address Istructio Address Read data Istructio memory Write data Data memory MemRead **Based o origial figure from [P&H CO&D, COPYRIGHT 2004 Elsevier. ALL RIGHTS RESERVED.] 40
CMSC Computer Architecture Lecture 2: ISA. Prof. Yanjing Li Department of Computer Science University of Chicago
CMSC 22200 Computer Architecture Lecture 2: ISA Prof. Yajig Li Departmet of Computer Sciece Uiversity of Chicago Admiistrative Stuff Lab1 out toight Due Thursday (10/18) Lab1 review sessio Tomorrow, 10/05,
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Part A Datapath Design
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter The Processor Part A path Desig Itroductio CPU performace factors Istructio cout Determied by ISA ad compiler. CPI ad
More informationChapter 4 The Datapath
The Ageda Chapter 4 The Datapath Based o slides McGraw-Hill Additioal material 24/25/26 Lewis/Marti Additioal material 28 Roth Additioal material 2 Taylor Additioal material 2 Farmer Tae the elemets that
More informationCMSC Computer Architecture Lecture 5: Pipelining. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 5: Pipeliig Prof. Yajig Li Uiversity of Chicago Admiistrative Stuff Lab1 Due toight Lab2: out later today; due 2 weeks from ow Review sessio this Friday Turig award
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Single-Cycle Disadvantages & Advantages
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 4 The Processor Pipeliig Sigle-Cycle Disadvatages & Advatages Clk Uses the clock cycle iefficietly the clock cycle must
More informationElementary Educational Computer
Chapter 5 Elemetary Educatioal Computer. Geeral structure of the Elemetary Educatioal Computer (EEC) The EEC coforms to the 5 uits structure defied by vo Neuma's model (.) All uits are preseted i a simplified
More informationCSC 220: Computer Organization Unit 11 Basic Computer Organization and Design
College of Computer ad Iformatio Scieces Departmet of Computer Sciece CSC 220: Computer Orgaizatio Uit 11 Basic Computer Orgaizatio ad Desig 1 For the rest of the semester, we ll focus o computer architecture:
More informationAppendix D. Controller Implementation
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Appedix D Cotroller Implemetatio Cotroller Implemetatios Combiatioal logic (sigle-cycle); Fiite state machie (multi-cycle, pipelied);
More informationChapter 5: Processor Design Advanced Topics. Microprogramming: Basic Idea
5-1 Chapter 5 Processor Desig Advaced Topics Chapter 5: Processor Desig Advaced Topics Topics 5.3 Microprogrammig Cotrol store ad microbrachig Horizotal ad vertical microprogrammig 5- Chapter 5 Processor
More informationEE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 13 Control and Sequencing: Hardwired and Microprogrammed Control
EE 459/500 HDL Based Digital Desig with Programmable Logic Lecture 13 Cotrol ad Sequecig: Hardwired ad Microprogrammed Cotrol Refereces: Chapter s 4,5 from textbook Chapter 7 of M.M. Mao ad C.R. Kime,
More informationCMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 12: Virtual Memory Prof. Yajig Li Uiversity of Chicago A System with Physical Memory Oly Examples: most Cray machies early PCs Memory early all embedded systems
More informationCOMPUTER ORGANIZATION AND DESIGN. ARM Edition. The Hardware/Software Interface. Chapter 2. Instructions: Language of the Computer
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface ARM Editio Chapter 2 Istructios: Laguage of the Computer Istructio Set The repertoire of istructios of a computer Differet computers have
More informationBasic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000.
5-23 The course that gives CM its Zip Memory Maagemet II: Dyamic Storage Allocatio Mar 6, 2000 Topics Segregated lists Buddy system Garbage collectio Mark ad Sweep Copyig eferece coutig Basic allocator
More informationBehavioral Modeling in Verilog
Behavioral Modelig i Verilog COE 202 Digital Logic Desig Dr. Muhamed Mudawar Kig Fahd Uiversity of Petroleum ad Mierals Presetatio Outlie Itroductio to Dataflow ad Behavioral Modelig Verilog Operators
More informationCMSC Computer Architecture Lecture 2: ISA. Prof. Yanjing Li Department of Computer Science University of Chicago
CMSC 22200 Computer Architecture Lecture 2: ISA Prof. Yanjing Li Department of Computer Science University of Chicago Administrative Stuff! Lab1 is out! " Due next Thursday (10/6)! Lab2 " Out next Thursday
More informationCMSC Computer Architecture Lecture 4: Single-Cycle uarch and Pipelining. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 4: Single-Cycle uarch and Pipelining Prof. Yanjing Li University of Chicago Administrative Stuff! Lab1 due at 11:59pm today! Lab2 out " Pipeline ARM simulator "
More informationChapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.
Chapter 11 Frieds, Overloaded Operators, ad Arrays i Classes Copyright 2014 Pearso Addiso-Wesley. All rights reserved. Overview 11.1 Fried Fuctios 11.2 Overloadig Operators 11.3 Arrays ad Classes 11.4
More informationEnd Semester Examination CSE, III Yr. (I Sem), 30002: Computer Organization
Ed Semester Examiatio 2013-14 CSE, III Yr. (I Sem), 30002: Computer Orgaizatio Istructios: GROUP -A 1. Write the questio paper group (A, B, C, D), o frot page top of aswer book, as per what is metioed
More informationDescription of Single Cycle Computer (SCC)
Descriptio of Sigle Cycle Computer (SCC) Refereces: Chapter 9 of M. Morris Mao ad Charles Kime, Logic ad Computer Desig Fudametals, Pearso Pretice Hall, 4 th Editio, 28. Overview Part Datapaths Itroductio
More informationEE260: Digital Design, Spring /16/18. n Example: m 0 (=x 1 x 2 ) is adjacent to m 1 (=x 1 x 2 ) and m 2 (=x 1 x 2 ) but NOT m 3 (=x 1 x 2 )
EE26: Digital Desig, Sprig 28 3/6/8 EE 26: Itroductio to Digital Desig Combiatioal Datapath Yao Zheg Departmet of Electrical Egieerig Uiversity of Hawaiʻi at Māoa Combiatioal Logic Blocks Multiplexer Ecoders/Decoders
More informationCOSC 1P03. Ch 7 Recursion. Introduction to Data Structures 8.1
COSC 1P03 Ch 7 Recursio Itroductio to Data Structures 8.1 COSC 1P03 Recursio Recursio I Mathematics factorial Fiboacci umbers defie ifiite set with fiite defiitio I Computer Sciece sytax rules fiite defiitio,
More informationCMSC Computer Architecture Lecture 15: Multi-Core. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 15: Multi-Core Prof. Yajig Li Uiversity of Chicago Course Evaluatio Very importat Please fill out! 2 Lab3 Brach Predictio Competitio 8 teams etered the competitio,
More informationCMSC22200 Computer Architecture Lecture 9: Out-of-Order, SIMD, VLIW. Prof. Yanjing Li University of Chicago
CMSC22200 Computer Architecture Lecture 9: Out-of-Order, SIMD, VLIW Prof. Yajig Li Uiversity of Chicago Admiistrative Stuff Lab2 due toight Exam I: covers lectures 1-9 Ope book, ope otes, close device
More informationCS 11 C track: lecture 1
CS 11 C track: lecture 1 Prelimiaries Need a CMS cluster accout http://acctreq.cms.caltech.edu/cgi-bi/request.cgi Need to kow UNIX IMSS tutorial liked from track home page Track home page: http://courses.cms.caltech.edu/courses/cs11/material
More informationHow do we evaluate algorithms?
F2 Readig referece: chapter 2 + slides Algorithm complexity Big O ad big Ω To calculate ruig time Aalysis of recursive Algorithms Next time: Litterature: slides mostly The first Algorithm desig methods:
More informationThe Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University
The Processor (1) Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu EEE3050: Theory on Computer Architectures, Spring 2017, Jinkyu Jeong (jinkyu@skku.edu)
More informationCOMPUTER ORGANIZATION AND DESIGN. ARM Edition. The Hardware/Software Interface. Chapter 2. Instructions: Language of the Computer
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface ARM Edition Chapter 2 Instructions: Language of the Computer Instruction Set The repertoire of instructions of a computer Different computers
More informationChapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 9 Poiters ad Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 9.1 Poiters 9.2 Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Slide 9-3
More informationModule Instantiation. Finite State Machines. Two Types of FSMs. Finite State Machines. Given submodule mux32two: Instantiation of mux32two
Give submodule mux32two: 2-to- MUX module mux32two (iput [3:] i,i, iput sel, output [3:] out); Module Istatiatio Fiite Machies esig methodology for sequetial logic -- idetify distict s -- create trasitio
More informationCOMPUTER ORGANIZATION AND DESIGN
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Review Istructio Set Architecture Istructio Set The repertoire of istructios of a computer Differet computers have differet istructio
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Determined by ISA and compiler. Determined by CPU hardware
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface ARM Editio Chapter 4 The Processor Itroductio CPU performace factors Istructio cout Determied by ISA ad compiler CPI ad Cycle time Determied
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor Advanced Issues
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 4 The Processor Advaced Issues Review: Pipelie Hazards Structural hazards Desig pipelie to elimiate structural hazards.
More informationThreads and Concurrency in Java: Part 1
Cocurrecy Threads ad Cocurrecy i Java: Part 1 What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.
More informationCS252 Spring 2017 Graduate Computer Architecture. Lecture 6: Out-of-Order Processors
CS252 Sprig 2017 Graduate Computer Architecture Lecture 6: Out-of-Order Processors Lisa Wu, Krste Asaovic http://ist.eecs.berkeley.edu/~cs252/sp17 WU UCB CS252 SP17 2 WU UCB CS252 SP17 Last Time i Lecture
More informationThreads and Concurrency in Java: Part 1
Threads ad Cocurrecy i Java: Part 1 1 Cocurrecy What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.
More informationCMSC Computer Architecture Lecture 10: Caches. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 10: Caches Prof. Yajig Li Uiversity of Chicago Midterm Recap Overview ad fudametal cocepts ISA Uarch Datapath, cotrol Sigle cycle, multi cycle Pipeliig Basic idea,
More informationΤεχνολογία Λογισμικού
ΕΘΝΙΚΟ ΜΕΤΣΟΒΙΟ ΠΟΛΥΤΕΧΝΕΙΟ Σχολή Ηλεκτρολόγων Μηχανικών και Μηχανικών Υπολογιστών Τεχνολογία Λογισμικού, 7ο/9ο εξάμηνο 2018-2019 Τεχνολογία Λογισμικού Ν.Παπασπύρου, Αν.Καθ. ΣΗΜΜΥ, ickie@softlab.tua,gr
More informationLast class. n Scheme. n Equality testing. n eq? vs. equal? n Higher-order functions. n map, foldr, foldl. n Tail recursion
Aoucemets HW6 due today HW7 is out A team assigmet Submitty page will be up toight Fuctioal correctess: 75%, Commets : 25% Last class Equality testig eq? vs. equal? Higher-order fuctios map, foldr, foldl
More informationProcessor (I) - datapath & control. Hwansoo Han
Processor (I) - datapath & control Hwansoo Han Introduction CPU performance factors Instruction count - Determined by ISA and compiler CPI and Cycle time - Determined by CPU hardware We will examine two
More informationData diverse software fault tolerance techniques
Data diverse software fault tolerace techiques Complemets desig diversity by compesatig for desig diversity s s limitatios Ivolves obtaiig a related set of poits i the program data space, executig the
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 18 Strategies for Query Processig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio DBMS techiques to process a query Scaer idetifies
More informationLecture 3. RTL Design Methodology. Transition from Pseudocode & Interface to a Corresponding Block Diagram
Lecture 3 RTL Desig Methodology Trasitio from Pseudocode & Iterface to a Correspodig Block Diagram Structure of a Typical Digital Data Iputs Datapath (Executio Uit) Data Outputs System Cotrol Sigals Status
More informationOverview. Chapter 18 Vectors and Arrays. Reminder. vector. Bjarne Stroustrup
Chapter 18 Vectors ad Arrays Bjare Stroustrup Vector revisited How are they implemeted? Poiters ad free store Destructors Iitializatio Copy ad move Arrays Array ad poiter problems Chagig size Templates
More informationL6: FSMs and Synchronization
L6: FSMs ad Sychroizatio Ackowledgemets: Materials i this lecture are courtesy of the followig sources ad are used with permissio. Rex Mi J. Rabaey, A. Chadrakasa, B. Nikolic. igital Itegrated Circuits:
More informationChapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 1 Itroductio to Computers ad C++ Programmig Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 1.1 Computer Systems 1.2 Programmig ad Problem Solvig 1.3 Itroductio to C++ 1.4 Testig
More informationComputer Architecture. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff
Computer rchitecture Microcomputer rchitecture ad Iterfacig Colorado School of Mies Professor William Hoff Computer Hardware Orgaizatio Processor Performs all computatios; coordiates data trasfer Iput
More informationFundamentals of. Chapter 1. Microprocessor and Microcontroller. Dr. Farid Farahmand. Updated: Tuesday, January 16, 2018
Fudametals of Chapter 1 Microprocessor ad Microcotroller Dr. Farid Farahmad Updated: Tuesday, Jauary 16, 2018 Evolutio First came trasistors Itegrated circuits SSI (Small-Scale Itegratio) to ULSI Very
More informationThe Magma Database file formats
The Magma Database file formats Adrew Gaylard, Bret Pikey, ad Mart-Mari Breedt Johaesburg, South Africa 15th May 2006 1 Summary Magma is a ope-source object database created by Chris Muller, of Kasas City,
More information. Written in factored form it is easy to see that the roots are 2, 2, i,
CMPS A Itroductio to Programmig Programmig Assigmet 4 I this assigmet you will write a java program that determies the real roots of a polyomial that lie withi a specified rage. Recall that the roots (or
More informationLecture 2. RTL Design Methodology. Transition from Pseudocode & Interface to a Corresponding Block Diagram
Lecture 2 RTL Desig Methodology Trasitio from Pseudocode & Iterface to a Correspodig Block Diagram Structure of a Typical Digital Data Iputs Datapath (Executio Uit) Data Outputs System Cotrol Sigals Status
More informationData Structures Week #5. Trees (Ağaçlar)
Data Structures Week #5 Trees Ağaçlar) Trees Ağaçlar) Toros Gökarı Avrupa Gökarı October 28, 2014 Boraha Tümer, Ph.D. 2 Trees Ağaçlar) October 28, 2014 Boraha Tümer, Ph.D. 3 Outlie Trees Deiitios Implemetatio
More informationWhat are we going to learn? CSC Data Structures Analysis of Algorithms. Overview. Algorithm, and Inputs
What are we goig to lear? CSC316-003 Data Structures Aalysis of Algorithms Computer Sciece North Carolia State Uiversity Need to say that some algorithms are better tha others Criteria for evaluatio Structure
More informationPython Programming: An Introduction to Computer Science
Pytho Programmig: A Itroductio to Computer Sciece Chapter 6 Defiig Fuctios Pytho Programmig, 2/e 1 Objectives To uderstad why programmers divide programs up ito sets of cooperatig fuctios. To be able to
More informationRunning Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments
Ruig Time Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects. The
More informationReversible Realization of Quaternary Decoder, Multiplexer, and Demultiplexer Circuits
Egieerig Letters, :, EL Reversible Realizatio of Quaterary Decoder, Multiplexer, ad Demultiplexer Circuits Mozammel H.. Kha, Member, ENG bstract quaterary reversible circuit is more compact tha the correspodig
More informationCS200: Hash Tables. Prichard Ch CS200 - Hash Tables 1
CS200: Hash Tables Prichard Ch. 13.2 CS200 - Hash Tables 1 Table Implemetatios: average cases Search Add Remove Sorted array-based Usorted array-based Balaced Search Trees O(log ) O() O() O() O(1) O()
More informationAnalysis of Algorithms
Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Ruig Time Most algorithms trasform iput objects ito output objects. The
More informationImprovement of the Orthogonal Code Convolution Capabilities Using FPGA Implementation
Improvemet of the Orthogoal Code Covolutio Capabilities Usig FPGA Implemetatio Naima Kaabouch, Member, IEEE, Apara Dhirde, Member, IEEE, Saleh Faruque, Member, IEEE Departmet of Electrical Egieerig, Uiversity
More informationRunning Time ( 3.1) Analysis of Algorithms. Experimental Studies. Limitations of Experiments
Ruig Time ( 3.1) Aalysis of Algorithms Iput Algorithm Output A algorithm is a step- by- step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects.
More informationFrom last week. Lecture 5. Outline. Principles of programming languages
Priciples of programmig laguages From last week Lecture 5 http://few.vu.l/~silvis/ppl/2007 Natalia Silvis-Cividjia e-mail: silvis@few.vu.l ML has o assigmet. Explai how to access a old bidig? Is & for
More informationWeston Anniversary Fund
Westo Olie Applicatio Guide 2018 1 This guide is desiged to help charities applyig to the Westo to use our olie applicatio form. The Westo is ope to applicatios from 5th Jauary 2018 ad closes o 30th Jue
More informationChapter 4. The Processor
Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified
More informationtop() Applications of Stacks
CS22 Algorithms ad Data Structures MW :00 am - 2: pm, MSEC 0 Istructor: Xiao Qi Lecture 6: Stacks ad Queues Aoucemets Quiz results Homework 2 is available Due o September 29 th, 2004 www.cs.mt.edu~xqicoursescs22
More informationLecture 1: Introduction and Strassen s Algorithm
5-750: Graduate Algorithms Jauary 7, 08 Lecture : Itroductio ad Strasse s Algorithm Lecturer: Gary Miller Scribe: Robert Parker Itroductio Machie models I this class, we will primarily use the Radom Access
More informationComputers and Scientific Thinking
Computers ad Scietific Thikig David Reed, Creighto Uiversity Chapter 15 JavaScript Strigs 1 Strigs as Objects so far, your iteractive Web pages have maipulated strigs i simple ways use text box to iput
More informationCustom single-purpose processors: Hardware. 4.1 Introduction. 4.2 Combinational logic design 4-1
Chapter 4: Custom sigle-purpose processors: Hardware 4- Chapter 4 Custom sigle-purpose processors: Hardware 4. Itroductio As metioed i the previous chapter, a sigle-purpose processor is a digital sstem
More informationCS 351 Exam 2, Section 1 Wed. 11/2/2016
CS 351 Exam 2, Section 1 Wed. 11/2/2016 Name: Rules and Hints You may use one handwritten 8.5 11 cheat sheet (front and back). This is the only additional resource you may consult during this exam. No
More informationMorgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5
Morga Kaufma Publishers 26 February, 28 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 5 Set-Associative Cache Architecture Performace Summary Whe CPU performace icreases:
More informationIntroduction to Computing Systems: From Bits and Gates to C and Beyond 2 nd Edition
Lecture Goals Itroductio to Computig Systems: From Bits ad Gates to C ad Beyod 2 d Editio Yale N. Patt Sajay J. Patel Origial slides from Gregory Byrd, North Carolia State Uiversity Modified slides by
More informationPseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance
Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Pseudocode ( 1.1) High-level descriptio of a algorithm More structured
More informationCOP4020 Programming Languages. Functional Programming Prof. Robert van Engelen
COP4020 Programmig Laguages Fuctioal Programmig Prof. Robert va Egele Overview What is fuctioal programmig? Historical origis of fuctioal programmig Fuctioal programmig today Cocepts of fuctioal programmig
More informationCMPT 125 Assignment 2 Solutions
CMPT 25 Assigmet 2 Solutios Questio (20 marks total) a) Let s cosider a iteger array of size 0. (0 marks, each part is 2 marks) it a[0]; I. How would you assig a poiter, called pa, to store the address
More informationMorgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5.
Morga Kaufma Publishers 26 February, 208 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 5 Virtual Memory Review: The Memory Hierarchy Take advatage of the priciple
More informationBluespec-3: Modules & Interfaces. Bluespec: State and Rules organized into modules
Bluespec-3: Modules & Iterfaces Arvid Computer Sciece & Artificial Itelligece Lab Massachusetts Istitute of Techology Based o material prepared by Bluespec Ic, Jauary 2005 February 28, 2005 L09-1 Bluespec:
More informationRecursion. Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Review: Method Frames
Uit 4, Part 3 Recursio Computer Sciece S-111 Harvard Uiversity David G. Sulliva, Ph.D. Review: Method Frames Whe you make a method call, the Java rutime sets aside a block of memory kow as the frame of
More informationAssembly language Simple, regular instructions building blocks of C, Java & other languages Typically one-to-one mapping to machine language
Assembly Language Readings: 2.1-2.7, 2.9-2.10, 2.14 Green reference card Assembly language Simple, regular instructions building blocks of C, Java & other languages Typically one-to-one mapping to machine
More informationIsn t It Time You Got Faster, Quicker?
Is t It Time You Got Faster, Quicker? AltiVec Techology At-a-Glace OVERVIEW Motorola s advaced AltiVec techology is desiged to eable host processors compatible with the PowerPC istructio-set architecture
More informationChapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 5 Fuctios for All Subtasks Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 5.1 void Fuctios 5.2 Call-By-Referece Parameters 5.3 Usig Procedural Abstractio 5.4 Testig ad Debuggig
More informationData Structures and Algorithms. Analysis of Algorithms
Data Structures ad Algorithms Aalysis of Algorithms Outlie Ruig time Pseudo-code Big-oh otatio Big-theta otatio Big-omega otatio Asymptotic algorithm aalysis Aalysis of Algorithms Iput Algorithm Output
More informationChapter 4. The Processor. Computer Architecture and IC Design Lab
Chapter 4 The Processor Introduction CPU performance factors CPI Clock Cycle Time Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS
More informationLecture 5. Counting Sort / Radix Sort
Lecture 5. Coutig Sort / Radix Sort T. H. Corme, C. E. Leiserso ad R. L. Rivest Itroductio to Algorithms, 3rd Editio, MIT Press, 2009 Sugkyukwa Uiversity Hyuseug Choo choo@skku.edu Copyright 2000-2018
More informationChapter 4. The Processor
Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware 4.1 Introduction We will examine two MIPS implementations
More informationStructuring Redundancy for Fault Tolerance. CSE 598D: Fault Tolerant Software
Structurig Redudacy for Fault Tolerace CSE 598D: Fault Tolerat Software What do we wat to achieve? Versios Damage Assessmet Versio 1 Error Detectio Iputs Versio 2 Voter Outputs State Restoratio Cotiued
More informationChapter 3. Floating Point Arithmetic
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 3 Floatig Poit Arithmetic Review - Multiplicatio 0 1 1 0 = 6 multiplicad 32-bit ALU shift product right multiplier add
More informationInstruction and Data Streams
Advaced Architectures Master Iformatics Eg. 2017/18 A.J.Proeça Data Parallelism 1 (vector & SIMD extesios) (most slides are borrowed) AJProeça, Advaced Architectures, MiEI, UMiho, 2017/18 1 Istructio ad
More informationCOMPUTER ORGANIZATION AND DESIGN
ARM COMPUTER ORGANIZATION AND DESIGN Edition The Hardware/Software Interface Chapter 4 The Processor Modified and extended by R.J. Leduc - 2016 To understand this chapter, you will need to understand some
More informationA New Morphological 3D Shape Decomposition: Grayscale Interframe Interpolation Method
A ew Morphological 3D Shape Decompositio: Grayscale Iterframe Iterpolatio Method D.. Vizireau Politehica Uiversity Bucharest, Romaia ae@comm.pub.ro R. M. Udrea Politehica Uiversity Bucharest, Romaia mihea@comm.pub.ro
More informationIA32 Stack Discipline Aug 30, 2017
15-410 A Experiece Like No Other IA32 Disciplie Aug 30, 2017 Dave Eckhardt Dave O Hallaro Slides origially stole from 15-213 1 15-410, F 17 Sychroizatio Registratio The wait list will probably be doe today
More informationAbstract. Chapter 4 Computation. Overview 8/13/18. Bjarne Stroustrup Note:
Chapter 4 Computatio Bjare Stroustrup www.stroustrup.com/programmig Abstract Today, I ll preset the basics of computatio. I particular, we ll discuss expressios, how to iterate over a series of values
More informationExercise 6 (Week 42) For the foreign students only.
These are the last exercises of the course. Please, remember that to pass exercises, the sum of the poits gathered by solvig the questios ad attedig the exercise groups must be at least 4% ( poits) of
More informationIntroduction CHAPTER Computers
Iside a Computer CHAPTER Itroductio. Computers A computer is a electroic device that accepts iput, stores data, processes data accordig to a set of istructios (called program), ad produces output i desired
More informationUNIVERSITY OF MORATUWA
UNIVERSITY OF MORATUWA FACULTY OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING B.Sc. Egieerig 2014 Itake Semester 2 Examiatio CS2052 COMPUTER ARCHITECTURE Time allowed: 2 Hours Jauary 2016
More informationCS 111: Program Design I Lecture 16: Module Review, Encodings, Lists
CS 111: Program Desig I Lecture 16: Module Review, Ecodigs, Lists Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago October 18, 2016 Last time Dot otatio ad methods Padas: user maual poit
More informationCS 111: Program Design I Lecture # 7: First Loop, Web Crawler, Functions
CS 111: Program Desig I Lecture # 7: First Loop, Web Crawler, Fuctios Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago September 18, 2018 What will this prit? x = 5 if x == 3: prit("hi!")
More informationAssembly language Simple, regular instructions building blocks of C, Java & other languages Typically one-to-one mapping to machine language
Assembly Language Readings: 2.1-2.7, 2.9-2.10, 2.14 Green reference card Assembly language Simple, regular instructions building blocks of C, Java & other languages Typically one-to-one mapping to machine
More informationLecture 2: RISC V Instruction Set Architecture. James C. Hoe Department of ECE Carnegie Mellon University
18 447 Lecture 2: RISC V Instruction Set Architecture James C. Hoe Department of ECE Carnegie Mellon University 18 447 S18 L02 S1, James C. Hoe, CMU/ECE/CALCM, 2018 Your goal today Housekeeping get bootstrapped
More informationΤεχνολογία Λογισμικού
ΕΘΝΙΚΟ ΜΕΤΣΟΒΙΟ ΠΟΛΥΤΕΧΝΕΙΟ Σχολή Ηλεκτρολόγων Μηχανικών και Μηχανικών Υπολογιστών Τεχνολογία Λογισμικού, 7ο/9ο εξάμηνο 2018-2019 Τεχνολογία Λογισμικού Ν.Παπασπύρου, Αν.Καθ. ΣΗΜΜΥ, ickie@softlab.tua,gr
More informationHash Tables. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.
Presetatio for use with the textbook Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 2015 Hash Tables xkcd. http://xkcd.com/221/. Radom Number. Used with permissio uder Creative
More informationCOMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface Chapter 4 The Processor: A Based on P&H Introduction We will examine two MIPS implementations A simplified version A more realistic pipelined
More informationArquitectura de Computadores
Arquitectura de Computadores Capítulo 2. Procesadores segmetados Based o the origial material of the book: D.A. Patterso y J.L. Heessy Computer Orgaizatio ad Desig: The Hardware/Software Iterface 4 th
More information