1/%*2.&34.&%56+74.&%*8"(%&,.9%*!"#$%&'()*)+,'-.&.' & /* '012*)314'-5'"16*1+713'

Size: px
Start display at page:

Download "1/%*2.&34.&%56+74.&%*8"(%&,.9%*!"#$%&'()*)+,'-.&.' & /* '012*)314'-5'"16*1+713'"

Transcription

1 1/%*2.&34.&%56+74.&%*8"(%&,.9%*!"#$%&'()*)+,'-.&.' & /* '012*)314'-5'"16*1+713' 8"'(&:9(+&;'' 89:';13<=,/' 1%.9/#"0*<''#'(."(';* A* F$%&$#%4*! =+:&'%*(/%C%';*G#0*."3*H#IH%*! J+:&*#CK+&(."(*&%.H#L%'*! 2+4*(/%*9+:&'%*M('*#"(+*(/%*=6>*9:&&#9:H:C*! N+0#'L9'* D*

2 1/%*O#0*1/%C%*! 12>*2<PQ-<P>56FJ1-<P>*8R1>PJ<=>*! 2+4*3+%'*(/%*/.&34.&%*SE'*."3*A'T*K&+9%''+&*%U%9:L"0* #"'(&:9L+"'V*&%H.(%*(+*(/%*'+74.&%*SW.$.*K&+0&.C'VX*! =+CK:L"0*#'*.G+:(*.G'(&.9L+"'*SG:(*3+"Y(*,+&0%(*&%.H#()V*! -/.(*.&%*(/%*.G'(&.9L+"'*(/.(*4%*:'%X*! -/.(*3+*ZF!*"%%3*(+*["+4*.G+:(*(/%CX*! O%9+C%*.*G%I%&*K&+0&.CC%&*."3*G%0#"*(+*:"3%&'(."3*(/%* (/+:0/(*K&+9%''%'*(/.(*0+*#"(+*G:#H3#"0*9+CK:(%&*')'(%C'*?* N#IH%*1/%C%*A;*P%K&%'%"(.L+"*! <HH*3#0#(.H*')'(%C'*&%K&%'%"(*%$%&)(/#"0*.'*E'*."3*A'*! >$%&)(/#"0*#"9H:3%';*! ;F=,*13/'P'9EE31//1/'FM'E9*9'F7S12*/'=,'+1+F3C'! 1/%'%*%"9+3#"0'*.&%*'(+&%3*#"*&%0#'(%&'T*9.9/%'T*C%C+&#%'T* 3#'['T*%(9\*! 1/%)*.HH*"%%3*.33&%''%'*! >=,E'9',1G'6:921'*F'6)*'9',1G'=*1+''! ]*

3 N#IH%*1/%C%*D;*1&."'H.L+"*! 1/%&%*#'*.*G#0*0.K*G%(4%%"*/+4*4%*(/#"[*.G+:(*K&+0&.C'*."3* 3.(.*."3*(/%*E'*."3*A'*+,*9+CK:(%&'*! R%%3*H."0:.0%'*(+*3%'9&#G%*4/.(*4%*C%."*! N."0:.0%'*"%%3*(+*G%*(&."'H.(%3*+"%*'(%K*.(*.*LC%*! DF3EU7CUGF3E'! V39++93'! -%*["+4*W.$.*.'*.*K&+0&.CC#"0*H."0:.0%*! N#IH%*1/%C%*?;*=+"(&+H*JH+4*! 2+4*3+*9+CK:(%&'*+&9/%'(&.(%*(/%*C.")*(/#"0'*(/%)*.&%* 3+#"0*^*'%%C#"0H)*#"*K.&.HH%H*! -/.(*3+*4%*/.$%*(+*[%%K*(&.9[*+,*4/%"*4%*9.HH*.*C%(/+3T*."3*(/%"*."+(/%&T*."3*(/%"*."+(/%&T*."3*'+*+"*! 2+4*3+*4%*["+4*4/.(*(+*3+*:K+"*_&%(:&"`*!!'%&*K&+0&.C'*."3*+K%&.L"0*')'(%C'*! `):J6:1')/13'63FK39+/'! df:),*93c'f3'7c'mf321i' a*

4 =+:&'%*F:(9+C%'*! J+:"3.L+";*G.'#9'*+,*/#0/BH%$%H*K&+0&.CC#"0*SW.$.V*!!"3%&'(."3#"0*+,*'+C%*+,*(/%*.G'(&.9L+"'*(/.(*%U#'(* G%(4%%"*K&+0&.C'*."3*(/%*/.&34.&%*(/%)*&:"*+"T*4/)*(/%)* %U#'(T*."3*/+4*(/%)*G:#H3*:K+"*%.9/*+(/%&*! b"+4h%30%*+,*'+c%*+,*(/%*3%(.#h'*+,*:"3%&h)#"0* #CKH%C%"(.L+"'*! O%9+C%*C+&%*%c%9L$%*K&+0&.CC%&'*! `F31'1e2=1,*'9*'N,E=,K'9,E'1:=+=,9J,K'7)K/'! 63FK39+/'9,E'E9*9'! d&%k.&%*,+&*h.(%&*9h.''%'*#"*=6>* e* P%.H#()*A;*8"('*f*8"(%0%&'*g*JH+.('*f*P%.H'*! P%K&%'%"(.L+"'*.&%*M"#(%*! >U.CKH%*A;*8'*U D *h*ex*! >:F9*/f'c1/X'!?,*/f'! 'g...'h'g...''uui'&^...'! '%...'h'%...''uui'ii'! >U.CKH%*D;*8'*SU*i*)V*i*j**k**U*i*S)*i*jVX*! R,/=K,1E'j'"=K,1E'?,*/f'c1/X'! >:F9*/f ''! '[&1-.'k'U&1-._'k'$l&g'UUi'$l&g'! '&1-.'k'[U&1-.'k'$l&g_'UUi'II' l*

5 =+3%*6%9:&#()*>U.CKH%* /* Kernel memory region holding user-accessible data */ #define KSIZE 1024 char kbuf[ksize]; int len = KSIZE; /* Copy at most maxlen bytes from kernel region to user buffer */ int copy_from_kernel(void *user_dest, int maxlen) { /* Byte count len is minimum of buffer size and maxlen */ if (KSIZE > maxlen) len = maxlen; memcpy(user_dest, kbuf, len); return len;! 6#C#H.&*(+*9+3%*,+:"3*#"*J&%%O6QY'*#CKH%C%"(.L+"*+,* 0%(K%%&".C%*! 1/%&%*.&%*H%0#+"'*+,*'C.&(*K%+KH%*(&)#"0*(+*M"3*$:H"%&.G#H#L%'* #"*K&+0&.C'* m* 1)K#9.H*!'.0%* /* Kernel memory region holding user-accessible data */ #define KSIZE 1024 char kbuf[ksize]; int len = KSIZE; /* Copy at most maxlen bytes from kernel region to user buffer */ int copy_from_kernel(void *user_dest, int maxlen) { /* Byte count len is minimum of buffer size and maxlen */ if (KSIZE > maxlen) len = maxlen; memcpy(user_dest, kbuf, len); return len; #define MSIZE 528 void getstuff() { char mybuf[msize]; copy_from_kernel(mybuf, MSIZE); printf( %s\n, mybuf); AE*

6 n.h#9#+:'*!'.0%* /* Kernel memory region holding user-accessible data */ #define KSIZE 1024 char kbuf[ksize]; int len = KSIZE; /* Copy at most maxlen bytes from kernel region to user buffer */ int copy_from_kernel(void *user_dest, int maxlen) { /* Byte count len is minimum of buffer size and maxlen */ if (KSIZE > maxlen) len = maxlen; memcpy(user_dest, kbuf, len); return len; #define MSIZE 528 void getstuff() { char mybuf[msize]; copy_from_kernel(mybuf, -MSIZE);... AA* P%.H#()*oD;*Z+:Y$%*p+(*(+*b"+4*<''%CGH)*! =/."9%'*.&%T*)+:YHH*"%$%&*4&#(%*.*K&+0&.C*#"*.''%CGH)*9+3%*!!F+6=:13/'931'+)2@'71B13'9,E'+F31'69J1,*'*@9,'CF)'931'! O:(;*!"3%&'(."3#"0*.''%CGH)*#'*(/%*[%)*(+*(/%*C.9/#"%BH%$%H* %U%9:L+"*C+3%H*! A1@9H=F3'FM'63FK39+/'=,'631/1,21'FM'7)K/'! 8=K@U:1H1:':9,K)9K1'+FE1:'7319</'EFG,'! W),=,K'63FK39+'613MF3+9,21'! R,E13/*9,E'F6J+=m9JF,/'EF,1b,F*'EF,1'7C'*@1'2F+6=:13'! R,E13/*9,E=,K'/F)321/'FM'63FK39+'=,1e2=1,2C'!?+6:1+1,J,K'/C/*1+'/FnG931'! a6139j,k'/c/*1+/'+)/*'+9,9k1'63f21//'/*9*1'!!319j,k'b'nk@j,k'+9:g931'! L]^'9//1+7:C'=/'*@1':9,K)9K1'FM'2@F=21' AD*

7 <''%CGH)*=+3%*>U.CKH%*! 1#C%*6(.CK*=+:"(%&*! <KKH#9.L+"*! `19/)31'J+1'[=,'2:F2<'2C2:1/_'31o)=31E'7C'63F21E)31' double t; start_counter(); P(); t = get_counter(); printf("p required %f clock cycles\n", t); A?* =+3%*(+*P%.3*=+:"(%&*! -&#(%*'C.HH*.C+:"(*+,*.''%CGH)*9+3%*:'#"0*p==Y'*.'C*,.9#H#()*! 8"'%&('*.''%CGH)*9+3%*#"(+*C.9/#"%*9+3%*0%"%&.(%3*G)* 9+CK#H%&* /* Set *hi and *lo to the high and low order bits of the cycle counter. */ void access_counter(unsigned *hi, unsigned *lo) { asm("rdtsc; movl %%edx,%0; movl %%eax,%1" : "=r" (*hi), "=r" (*lo) /* output */ : /* input */ : "%edx", "%eax"); /* clobbered */ A]*

8 P%.H#()*o?;*n%C+&)*n.I%&'*! n%c+&)*#'*"+(*:"g+:"3%3*!?*'+)/*'71'9::f29*1e'9,e'+9,9k1e'! `9,C'966:=29JF,/'931'+1+F3CUEF+=,9*1E'! n%c+&)*&%,%&%"9#"0*g:0'*.&%*%'k%9#.hh)*k%&"#9#+:'*! 613MF3+9,21'! +9SF3'/611E'=+63FH1+1,*/' n%c+&)*p%,%&%"9#"0*o:0*>u.ckh%* double fun(int i) { volatile double d[1] = {3.14; volatile long int a[2]; a[i] = ; /* Possibly out of bounds */ return d[0]; fun(0) > 3.14 fun(1) > 3.14 fun(2) > fun(3) > fun(4) > 3.14, then segmentation fault Aa*

9 n%c+&)*p%,%&%"9#"0*o:0*>u.ckh%* double fun(int i) { volatile double d[1] = {3.14; volatile long int a[2]; a[i] = ; /* Possibly out of bounds */ return d[0]; fun(0) > 3.14 fun(1) > 3.14 fun(2) > fun(3) > fun(4) > 3.14, then segmentation fault >UKH.".L+";* Saved State 4 d7 d4 3 d3 d0 2 a[1] 1 a[0] 0 N+9.L+"*.99%''%3*G)* fun(i) Ae* n%c+&)*p%,%&%"9#"0*>&&+&'*! =*S."3*=iiV*3+*"+(*K&+$#3%*.")*C%C+&)*K&+(%9L+"*! a)*'fm'7f),e/'9339c'31m131,21/'!?,h9:=e'6f=,*13'h9:)1/'! (7)/1/'FM'+9::F2bM311'! =."*H%.3*(+*".'()*G:0'*! D@1*@13'F3',F*'7)K'@9/'9,C'1p12*'E161,E/'F,'/C/*1+'9,E'2F+6=:13'! (2JF,'9*'9'E=/*9,21'!!F33)6*1E'F7S12*':FK=29::C'),31:9*1E'*F'F,1'71=,K'9221//1E'! #p12*'fm'7)k'+9c'71'n3/*'f7/13h1e':f,k'9n13'=*'=/'k1,139*1e'! 2+4*9."*8*3%.H*4#(/*(/#'X*! ;3FK39+'=,'Z9H9'[F3'!q4'F3'`04'F3'r_'! R,E13/*9,E'G@9*'6F//=7:1'=,*1392JF,/'+9C'F22)3'! R/1'F3'E1H1:F6'*FF:/'*F'E1*12*'31M131,2=,K'133F3/' Al*

10 n%c+&)*6)'(%c*d%&,+&c."9%*>u.ckh%!! 2#%&.&9/#9.H*C%C+&)*+&0."#j.L+"*! void copyij(int src[2048][2048], int dst[2048][2048]) { int i,j; for (i = 0; i < 2048; i++) for (j = 0; j < 2048; j++) dst[i][j] = src[i][j]; void copyji(int src[2048][2048], int dst[2048][2048]) { int i,j; for (j = 0; j < 2048; j++) for (i = 0; i < 2048; i++) dst[i][j] = src[i][j]; DA*LC%'*'H+4%&* Sd%"L:C*]V* Am* 1/%*n%C+&)*n+:"(.#"* P%.3*(/&+:0/K:(*SnO5'V* L1 ;1,J)+'???'\1F,* %%.'`8m* &^'sa'f,u2@=6'0&'eu292@1* &^'sa'f,u2@=6'0&'=u292@1* %&-'sa''fpu2@=6'),=n1e* 0-'292@1* L s1 s3 s5 s7 6(&#3%*S4+&3'V* s9 s11 Mem s13 s15 8m 2m 512k 128k 32k 8k 2k -+&[#"0*'%(*'#j%*SG)(%'V* DE*

11 P%.H#()*o];*d%&,+&C."9%*#'"Y(*9+:"L"0*+K'*! >U.9(*+K*9+:"(*3+%'*"+(*K&%3#9(*K%&,+&C."9%*! 63F21E)31/4'9,E':FF6/'! n:'(*:"3%&'(."3*')'(%c*(+*+klc#j%*k%&,+&c."9%*! 8FG'63FK39+/'2F+6=:1E'9,E'1L12)*1E'! 8FG'+1+F3C'/C/*1+'=/'F3K9,=m1E'! 8FG'*F'+19/)31'63FK39+'613MF3+9,21'9,E'=E1,JMC'7FB:1,12</'! K1,139:=*C' DA* >U.CKH%*n.(&#U*n:HLKH#9.L+"*! "*9,E93E'E1/<*F6'2F+6)*134'H1,EF3'2F+6=:134')/=,K'F6J+=m9JF,'Q9K/'! $ _' Best code (K. Goto) Triple loop 160x DD*

12 nnn*dh+(;*<".h)'#'* Multiple threads: 4x Vector instructions: 4x Memory hierarchy and other optimizations: 20x! T19/F,'MF3'-.Lf'7:F2<=,K'F3'J:=,K4':FF6'),3F::=,K4'9339C'/29:93=m9JF,4' D?* d&%b&%q:#'#(%'*! &g-'9,e'&g$f'?,*3f';3fk39++=,k'?'9,e'??'! F"%*+,*a*9+&%*9+:&'%'*! $&&f'>f),e9jf,/'?'! $&-f'>f),e9jf,/'??'! $$&f'"d't1/=k,'9,e'?+6:1+1,*9jf,'! $$-f't9*9'(7/*392jf,/'! $%&f'8db"d'?,*13m921'! D]*

13 =6>]ee5]lA* =.K'(+"%'* 2-*Q%'#0"* =6>???* 6)'(%C'*d&+0* FK*6)'(%C'* =6>]EA* =+CK#H%&'* =6>]aA* R%(4+&['* =6>]l]* 6%9:&#()* =6>]aa* >CG*6)'(%C'* d%&,+&c."9%* =+CK\*<&9/\* =+"9:&&%"9)* n.9/#"%* =+3%* Q#'(&#G:(%3* 6)'(%C'* >U%9:L+"** n+3%h* P%.HB1#C%* =+"(&+H* "#$!%&'(&!)*+$,-./$! 89:#*(;,9+'-*,9$,-(#)'(,9<,9+' 43*:=3*#'39:')>?=3*#' =6*A]?* 8"(&+*d&+0*88* =+:&'%*d%&'k%9l$%*! t1/=k,'6=61:=,1e'63f21//f3'=,'d13=:fk'! a6139j,k'"c/*1+/'!?+6:1+1,*':93k1'6f3jf,/'fm'f6139j,k'/c/*1+'!!f+6=:13/'! D3=*1'2F+6=:13'MF3'/=+6:1':9,K)9K1'! O1*GF3<=,K'!?+6:1+1,*'9,E'/=+):9*1',1*GF3<'63F*F2F:/' Da*

14 =+:&'%*d%&'k%9l$%*s=+"(\v*! 1/#'*9+:&'%*#'*d&+0&.CC%&B=%"(&#9*! F,1'29,'71'+F31'1p12JH1'9/'9'63FK39++13'! A1B13'E17)KK=,K'! A1B13'79/=/'MF3'1H9:)9J,K'613MF3+9,21'! 8FG'+):J6:1'92JH=J1/'GF3<'=,'2F,213*'[1lKl4'a"'9,E')/13'63FK39+/_'! De* 1%U(G++['*! =+CK:(%&*6)'(%C';*<*d&+0&.CC%&Y'*d%&'K%9L$%T*D "3 *>3#L+"*! T9,E9:'#l'A3C9,*'9,E't9H=E'Tl'aY89::93F,''! 8FG'*F'/F:H1':97/'! ;392J21'63F7:1+/'*C6=29:'FM'1L9+'63F7:1+/'! (/ *>3#L+"*! "9+)1:';l'8937=/F,'???'9,E'V)C'0l'"*11:14'Z3l'! ;31,J21U89::4'-..-'! "F:=E'!'63FK39++=,K':9,K)9K1'31M131,21'! Dl*

15 =+:&'%*=+CK+"%"('*! N%9(:&%'*Sr?EV*! 6%9L+"'*SrAEV*! (66:=1E'2F,216*/4'=+6F3*9,*'*FF:/'9,E'/<=::/'MF3':97/4'2:93=N29JF,'FM' :12*)31/4'1L9+'31H=1G'9,E' JF,'! -&#I%"*.''#0"C%"('*S]V*! ;3F7:1+/'M3F+'*1L*'*F'/F:=E=MC'),E13/*9,E=,K'! N.G'*S]V*! >U.C'*SC#3(%&C*i*M".HV*! W1/*'CF)3'),E13/*9,E=,K'FM'2F,216*/'9,E'63=,2=6:1/' Dm* P%'+:&9%' **! =+:&'%*-%G*d.0%*! =+:&'%*Q#'9:''#+"*O+.&3*! "*9p'G=::'+F,=*F3'9,E'2F,*3=7)*1'! =+:&'%*n.#h#"0*n#'(*! 0FG'*39e2'P'+F/*:C'9,,F),21+1,*/u'CF)'931'9:319EC'/)7/23=71E'! 6(.c*%C.#H*! <"+")C+:'*J%%3G.9[*S4#HH*G%*H#"[%3*,&+C*/+C%K.0%V*!

16 d+h#9#%';*p&.3#"0*! >U.C';*4%#0/(%3*A5?*SC#3(%&CVT*D5?*SM".HV*! -&#I%"*.''#0"C%"(';*4%#0/(%3*.99+&3#"0*(+*%c+&(*! N.G'*.''#0"C%"(';*4%#0/(%3*.99+&3#"0*(+*%c+&(*! p&.3#"0;*! -%w'g3=b1,'9//=k,+1,*/'! $%w':97'9//=k,+1,*/'! g.w'1l9+/'?a* N%(Y'*/.$%*,:"*! N%(Y'*H%.&"*^*(+0%(/%&*! N%(Y'*9+CC:"#9.(%*! N%(Y'*'%(*(/%*G.&*,+&*.*:'%,:H*."3*#"(%&%'L"0*9H.''*! n.")*(/."['*(+*(/%*c.")*#"'(&:9(+&'*4/+*/.$%*'/.&%3*(/%#&* H%9(:&%*"+(%'*^*8*4#HH*G%*G+&&+4#"0*H#G%&.HH)*(/&+:0/*(/%*q(&*^* (/%)*3%'%&$%*.HH*(/%*9&%3#(T*(/%*%&&+&'*.&%*.HH*C#"%*!

Course Overview. Jo, Heeseung

Course Overview. Jo, Heeseung Course Overview Jo, Heeseung Course Theme: Abstraction Is Good But Don't Forget Reality Most CS and CE courses emphasize abstraction Abstract data types Asymptotic analysis These abstractions have limits

More information

Course Overview. CSCI 224 / ECE 317: Computer Architecture. Instructors: Prof. Jason Fritts. Slides adapted from Bryant & O Hallaron s slides

Course Overview. CSCI 224 / ECE 317: Computer Architecture. Instructors: Prof. Jason Fritts. Slides adapted from Bryant & O Hallaron s slides Course Overview CSCI 224 / ECE 317: Computer Architecture Instructors: Prof. Jason Fritts Slides adapted from Bryant & O Hallaron s slides 1 Overview Course theme Five realities Logistics 2 Course Theme:

More information

CS241 Computer Organization Spring

CS241 Computer Organization Spring CS241 Computer Organization Spring 2015 Prof. Searleman jets@clarkson.edu http://www.clarkson.edu/~jets/cs241 ! Name (as you like to be called)! Major! Graduating Year! Hometown! Programming & Computer

More information

Overview. Course Overview and Introduction

Overview. Course Overview and Introduction Here early? Try going to http://chimein.cla.umn.edu/ and see if you can answer an ice cream question Course Overview and Introduction CSci 2021: Machine Architecture and Organization Lecture #1, September

More information

Systems Programming and Computer Architecture ( )

Systems Programming and Computer Architecture ( ) (252-0061-00) Timothy Roscoe Herbstsemester 2013 Systems Group Department of Computer Science ETH Zürich 1 1: Introduction 252-0061-00, Herbstsemester 2013 Timothy Roscoe 2 This course covers in depth

More information

Systems Programming and Computer Architecture ( )

Systems Programming and Computer Architecture ( ) Systems Group Department of Computer Science ETH Zürich Systems Programming and Computer Architecture (252-0061-00) Timothy Roscoe Herbstsemester 2016 1 3: Integers in C Computer Architecture and Systems

More information

CS140 Lecture 08: Data Representation: Bits and Ints. John Magee 13 February 2017

CS140 Lecture 08: Data Representation: Bits and Ints. John Magee 13 February 2017 CS140 Lecture 08: Data Representation: Bits and Ints John Magee 13 February 2017 Material From Computer Systems: A Programmer's Perspective, 3/E (CS:APP3e) Randal E. Bryant and David R. O'Hallaron, Carnegie

More information

Computer Systems CEN591(502) Fall 2011

Computer Systems CEN591(502) Fall 2011 Computer Systems CEN591(502) Fall 2011 Sandeep K. S. Gupta Arizona State University 4 th lecture Data representation in computer systems (Slides adapted from CSAPP book) Announcements Programming assignment

More information

Representa7on of integers: unsigned and signed Conversion, cas7ng Expanding, trunca7ng Addi7on, nega7on, mul7plica7on, shiaing

Representa7on of integers: unsigned and signed Conversion, cas7ng Expanding, trunca7ng Addi7on, nega7on, mul7plica7on, shiaing Today s Topics Representa7on of integers: unsigned and signed Conversion, cas7ng Expanding, trunca7ng Addi7on, nega7on, mul7plica7on, shiaing CSE351 Inaugural Edi7on Spring 2010 1 Encoding Integers C short

More information

Systems Programming and Computer Architecture ( )

Systems Programming and Computer Architecture ( ) Systems Group Department of Computer Science ETH Zürich Systems Programming and Computer Architecture (252-0061-00) Timothy Roscoe Herbstsemester 2016 1 1: Introduction Systems Programming and Computer

More information

Computer Organization: A Programmer's Perspective

Computer Organization: A Programmer's Perspective A Programmer's Perspective Bits, Bytes, Nibbles, Words and Strings Gal A. Kaminka galk@cs.biu.ac.il Topics Why bits? Why 0/1? Basic terms: Bits, Bytes, Nibbles, Words Representing information as bits Characters

More information

University*of*Washington*

University*of*Washington* Roadmap C: car c = malloc(sizeof(car)); c->miles = 1; c->gals = 17; float mpg = get_mpg(c); free(c); Assembly language: Machine code: Computer system: get_mpg: pushq movq... popq ret %rbp %rsp, %rbp %rbp

More information

The Hardware/Software Interface CSE351 Spring 2013 (spring has sprung!)

The Hardware/Software Interface CSE351 Spring 2013 (spring has sprung!) The Hardware/Software Interface CSE351 Spring 2013 (spring has sprung!) Instructor: Luis Ceze Teaching Assistants: Katelin Bailey, Jeremy Lee, Jake Sanders, Rachel Sobel 1 Who is Luis? PhD in architecture,

More information

Digital Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

Digital Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University Digital Systems Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu SSE2030: Introduction to Computer Systems, Spring 2018, Jinkyu Jeong (jinkyu@skku.edu)

More information

The Hardware/Software Interface CSE351 Spring 2015

The Hardware/Software Interface CSE351 Spring 2015 The Hardware/Software Interface CSE351 Spring 2015 Instructor: Katelin Bailey Teaching Assistants: Kaleo Brandt, Dylan Johnson, Luke Nelson, Alfian Rizqi, Kritin Vij, David Wong, and Shan Yang Who are

More information

Great Reality #2: You ve Got to Know Assembly Does not generate random values Arithmetic operations have important mathematical properties

Great Reality #2: You ve Got to Know Assembly Does not generate random values Arithmetic operations have important mathematical properties Overview Course Overview Course theme Five realities Computer Systems 1 2 Course Theme: Abstraction Is Good But Don t Forget Reality Most CS courses emphasize abstraction Abstract data types Asymptotic

More information

Bits, Bytes, and Integers

Bits, Bytes, and Integers Bits, Bytes, and Integers CENG331 - Computer Organization Instructors: Murat Manguoglu (Section 1) Adapted from slides of the textbook: http://csapp.cs.cmu.edu/ Hello World! What happens under the hood?

More information

Introduction Presentation A

Introduction Presentation A CSE 2421/5042: Systems I Low-Level Programming and Computer Organization Introduction Presentation A Read carefully: Bryant Chapter 1 Study: Reek Chapter 2 Skim: Reek Chapter 1 08/22/2018 Gojko Babić Some

More information

Introduction to Computer Systems: Semester 1 Computer Architecture

Introduction to Computer Systems: Semester 1 Computer Architecture Introduction to Computer Systems: Semester 1 Computer Architecture Fall 2003 William J. Taffe using modified lecture slides of Randal E. Bryant Topics: Theme Five great realities of computer systems How

More information

Course Overview CSCE 312. Instructor: Daniel A. Jiménez. Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition

Course Overview CSCE 312. Instructor: Daniel A. Jiménez. Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition Course Overview CSCE 312 Instructor: Daniel A. Jiménez 1 Overview Course theme Five realities How the course fits into the CS/ECE curriculum Academic integrity 2 Course Theme: Abstraction Is Good But Don

More information

Computer Organization - Overview

Computer Organization - Overview Computer Organization - Overview Hyunyoung Lee CSCE 312 1 Course Overview Topics: Theme Five great realities of computer systems Computer system overview Summary NOTE: Most slides are from the textbook

More information

Introduction to Computer Systems

Introduction to Computer Systems CSCE 230J Computer Organization Introduction to Computer Systems Dr. Steve Goddard goddard@cse.unl.edu Giving credit where credit is due Most of slides for this lecture are based on slides created by Drs.

More information

Introduction to Computer Systems

Introduction to Computer Systems CSCE 230J Computer Organization Introduction to Computer Systems Dr. Steve Goddard goddard@cse.unl.edu http://cse.unl.edu/~goddard/courses/csce230j Giving credit where credit is due Most of slides for

More information

Time Measurement Nov 4, 2009"

Time Measurement Nov 4, 2009 Time Measurement Nov 4, 2009" Reminder" 2! Computer Time Scales" Microscopic Time Scale (1 Ghz Machine) Macroscopic Integer Add FP Multiply FP Divide Keystroke Interrupt Handler Disk Access Screen Refresh

More information

Computer Time Scales Time Measurement Oct. 24, Measurement Challenge. Time on a Computer System. The course that gives CMU its Zip!

Computer Time Scales Time Measurement Oct. 24, Measurement Challenge. Time on a Computer System. The course that gives CMU its Zip! 5-23 The course that gives CMU its Zip! Computer Time Scales Microscopic Time Scale ( Ghz Machine) Macroscopic class8.ppt Topics Time Measurement Oct. 24, 2002! Time scales! Interval counting! Cycle counters!

More information

CS , Fall 2001 Exam 2

CS , Fall 2001 Exam 2 Andrew login ID: Full Name: CS 15-213, Fall 2001 Exam 2 November 13, 2001 Instructions: Make sure that your exam is not missing any sheets, then write your full name and Andrew login ID on the front. Write

More information

Machine-Level Programming V: Unions and Memory layout

Machine-Level Programming V: Unions and Memory layout Machine-Level Programming V: Unions and Memory layout Slides adapted from Bryant and O Hallaron Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition 1 FAQ Call conventions

More information

Lecture 1: Course Overview

Lecture 1: Course Overview Lecture 1: Course Overview Computer Systems Organization (Spring 2017) CSCI-UA 201, Section 3 Instructor: Joanna Klukowska Slides adapted from Randal E. Bryant and David R. O Hallaron (CMU) Mohamed Zahran

More information

Overview of the ECE Computer Software Curriculum. David O Hallaron Associate Professor of ECE and CS Carnegie Mellon University

Overview of the ECE Computer Software Curriculum. David O Hallaron Associate Professor of ECE and CS Carnegie Mellon University Overview of the ECE Computer Software Curriculum David O Hallaron Associate Professor of ECE and CS Carnegie Mellon University The Fundamental Idea of Abstraction Human beings Applications Software systems

More information

CS , Fall 2001 Exam 2

CS , Fall 2001 Exam 2 Andrew login ID: Full Name: CS 15-213, Fall 2001 Exam 2 November 13, 2001 Instructions: Make sure that your exam is not missing any sheets, then write your full name and Andrew login ID on the front. Write

More information

The course that gives CMU its Zip! Time Measurement Oct. 24, 2002

The course that gives CMU its Zip! Time Measurement Oct. 24, 2002 15-213 The course that gives CMU its Zip! Time Measurement Oct. 24, 2002 Topics Time scales Interval counting Cycle counters K-best measurement scheme class18.ppt Computer Time Scales Microscopic Time

More information

CMSC 313 Fall2009 Midterm Exam 2 Section 01 Nov 11, 2009

CMSC 313 Fall2009 Midterm Exam 2 Section 01 Nov 11, 2009 CMSC 313 Fall2009 Midterm Exam 2 Section 01 Nov 11, 2009 Name Score out of 70 UMBC Username Notes: a. Please write clearly. Unreadable answers receive no credit. b. For TRUE/FALSE questions, write the

More information

Time Measurement. CS 201 Gerson Robboy Portland State University. Topics. Time scales Interval counting Cycle counters K-best measurement scheme

Time Measurement. CS 201 Gerson Robboy Portland State University. Topics. Time scales Interval counting Cycle counters K-best measurement scheme Time Measurement CS 201 Gerson Robboy Portland State University Topics Time scales Interval counting Cycle counters K-best measurement scheme Computer Time Scales Microscopic Time Scale (1 Ghz Machine)

More information

CS356: Discussion #7 Buffer Overflows. Marco Paolieri

CS356: Discussion #7 Buffer Overflows. Marco Paolieri CS356: Discussion #7 Buffer Overflows Marco Paolieri (paolieri@usc.edu) Array Bounds class Bounds { public static void main(string[] args) { int[] x = new int[10]; for (int i = 0; i

More information

!"#$%$&'(!"#$!%&!'#$(%)*+,-./0123/,*-/*4/561-7.*89:-75:* %.0 *;72-1.7<*!=*>?,1?.9*$=!=*

!#$%$&'(!#$!%&!'#$(%)*+,-./0123/,*-/*4/561-7.*89:-75:* %.0 *;72-1.7<*!=*>?,1?.9*$=!=* !"#$%$&'(!"#$!%&!'#$(%)*+,-./0123/,*-/*4/561-7.*89:-75:* %.0 *;72-1.7?,1?.9*$=!=*!"'#&)*#+&',** @ABB*C?27*?,0*D.7E/.9*F7:07,* -)#+./0(! -1$23#'(#+(423/4&(#5$(/)#+./0('6'#$2(! 7&/89:(+0'*$"49$'( ;(

More information

Introduction to Computer Systems /18 243, Spring st Lecture, Aug. 25 th. The course that gives CMU its Zip!

Introduction to Computer Systems /18 243, Spring st Lecture, Aug. 25 th. The course that gives CMU its Zip! Introduction to Computer Systems 15 213/18 243, Spring 2009 1 st Lecture, Aug. 25 th Instructors: Roger Dannenberg and Greg Ganger The course that gives CMU its Zip! Overview Course role and theme Five

More information

4. Specifications and Additional Information

4. Specifications and Additional Information 4. Specifications and Additional Information AGX52004-1.0 8B/10B Code This section provides information about the data and control codes for Arria GX devices. Code Notation The 8B/10B data and control

More information

CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #1

CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #1 CS 537: Introduction to Operating Systems Fall 2015: Midterm Exam #1 This exam is closed book, closed notes. All cell phones must be turned off. No calculators may be used. You have two hours to complete

More information

Problem 3. (12 points):

Problem 3. (12 points): Problem 3. (12 points): This problem tests your understanding of basic cache operations. Harry Q. Bovik has written the mother of all game-of-life programs. The Game-of-life is a computer game that was

More information

CIS-331 Spring 2016 Exam 1 Name: Total of 109 Points Version 1

CIS-331 Spring 2016 Exam 1 Name: Total of 109 Points Version 1 Version 1 Instructions Write your name on the exam paper. Write your name and version number on the top of the yellow paper. Answer Question 1 on the exam paper. Answer Questions 2-4 on the yellow paper.

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems Edward A. Lee & Sanjit A. Seshia UC Berkeley EECS 124 Spring 2008 Copyright 2008, Edward A. Lee & Sanjit A. Seshia, All rights reserved Lecture 19: Execution Time Analysis

More information

CIS-331 Exam 2 Fall 2015 Total of 105 Points Version 1

CIS-331 Exam 2 Fall 2015 Total of 105 Points Version 1 Version 1 1. (20 Points) Given the class A network address 117.0.0.0 will be divided into multiple subnets. a. (5 Points) How many bits will be necessary to address 4,000 subnets? b. (5 Points) What is

More information

1 /* file cpuid2.s */ 4.asciz "The processor Vendor ID is %s \n" 5.section.bss. 6.lcomm buffer, section.text. 8.globl _start.

1 /* file cpuid2.s */ 4.asciz The processor Vendor ID is %s \n 5.section.bss. 6.lcomm buffer, section.text. 8.globl _start. 1 /* file cpuid2.s */ 2.section.data 3 output: 4.asciz "The processor Vendor ID is %s \n" 5.section.bss 6.lcomm buffer, 12 7.section.text 8.globl _start 9 _start: 10 movl $0, %eax 11 cpuid 12 movl $buffer,

More information

6.24 Estimate the average time (in ms) to access a sector on the following disk:

6.24 Estimate the average time (in ms) to access a sector on the following disk: Homework Problems 631 There is a large body of literature on building and using disk storage Many storage researchers look for ways to aggregate individual disks into larger, more robust, and more secure

More information

The cache is 4-way set associative, with 4-byte blocks, and 16 total lines

The cache is 4-way set associative, with 4-byte blocks, and 16 total lines Sample Problem 1 Assume the following memory setup: Virtual addresses are 20 bits wide Physical addresses are 15 bits wide The page size if 1KB (2 10 bytes) The TLB is 2-way set associative, with 8 total

More information

CS 3330 Introduction. Daniel and Charles. CS 3330 Computer Architecture 1

CS 3330 Introduction. Daniel and Charles. CS 3330 Computer Architecture 1 CS 3330 Introduction Daniel and Charles CS 3330 Computer Architecture 1 lecturers Charles and I will be splitting lectures same(ish) lecture in each section Grading Take Home Quizzes: 10% (10% dropped)

More information

CIS-331 Fall 2014 Exam 1 Name: Total of 109 Points Version 1

CIS-331 Fall 2014 Exam 1 Name: Total of 109 Points Version 1 Version 1 1. (24 Points) Show the routing tables for routers A, B, C, and D. Make sure you account for traffic to the Internet. Router A Router B Router C Router D Network Next Hop Next Hop Next Hop Next

More information

Introduction to Computer Architecture. Meet your Colleagues. Course Theme CISC Michela Taufer September 4, 2008

Introduction to Computer Architecture. Meet your Colleagues. Course Theme CISC Michela Taufer September 4, 2008 CISC 360-010 Introduction to Computer Architecture Michela Taufer September 4, 2008 Topics: Course policies and overview Theme Five great realities of computer systems Powerpoint Lecture Notes for Computer

More information

CIS-331 Final Exam Spring 2018 Total of 120 Points. Version 1

CIS-331 Final Exam Spring 2018 Total of 120 Points. Version 1 Version 1 Instructions 1. Write your name and version number on the top of the yellow paper and the routing tables sheet. 2. Answer Question 2 on the routing tables sheet. 3. Answer Questions 1, 3, 4,

More information

FLIGHTS TO / FROM CANADA ARE DOMESTIC

FLIGHTS TO / FROM CANADA ARE DOMESTIC MINIMUM CONNECTING TIME Houston, USA FLIGHTS TO / FROM CANADA ARE DOMESTIC IAH (Intercontinental Airport) DOMESTIC TO DOMESTIC :45 AA TO DL :40 CO TO AC :30 AA, UA, US :20 CO :30 DL, WN :25 DOMESTIC TO

More information

CS , Fall 2003 Exam 2

CS , Fall 2003 Exam 2 Andrew login ID: Full Name: CS 15-213, Fall 2003 Exam 2 November 18, 2003 Instructions: Make sure that your exam is not missing any sheets, then write your full name and Andrew login ID on the front. Write

More information

CS , Fall 2004 Exam 1

CS , Fall 2004 Exam 1 Andrew login ID: Full Name: CS 15-213, Fall 2004 Exam 1 Tuesday October 12, 2004 Instructions: Make sure that your exam is not missing any sheets, then write your full name and Andrew login ID on the front.

More information

CSE-160 (Winter 2017, Kesden) Practice Midterm Exam. volatile int count = 0; // volatile just keeps count in mem vs register

CSE-160 (Winter 2017, Kesden) Practice Midterm Exam. volatile int count = 0; // volatile just keeps count in mem vs register Full Name: @ucsd.edu PID: CSE-160 (Winter 2017, Kesden) Practice Midterm Exam 1. Threads, Concurrency Consider the code below: volatile int count = 0; // volatile just keeps count in mem vs register void

More information

CIS-331 Exam 2 Fall 2014 Total of 105 Points. Version 1

CIS-331 Exam 2 Fall 2014 Total of 105 Points. Version 1 Version 1 1. (20 Points) Given the class A network address 119.0.0.0 will be divided into a maximum of 15,900 subnets. a. (5 Points) How many bits will be necessary to address the 15,900 subnets? b. (5

More information

Solutions to Assessment

Solutions to Assessment Solutions to Assessment [1] What does the code segment below print? int fun(int x) ++x; int main() int x = 1; fun(x); printf( %d, x); return 0; Answer : 1. The argument to the function is passed by value.

More information

Chapter. Computer Architecture

Chapter. Computer Architecture Chapter 4 Computer Architecture Figure 4.1 Input device Central processing unit Main memory Output device Bus Data flow Control Figure 4.2 Central processing unit () Status bits ( ) Accumulator ( ) Index

More information

mith College Computer Science CSC231 - Assembly Week #3 Dominique Thiébaut

mith College Computer Science CSC231 - Assembly Week #3 Dominique Thiébaut mith College Computer Science CSC231 - Assembly Week #3 Dominique Thiébaut dthiebaut@smith.edu memory mov add registers hexdump listings number systems Let's Review Last Week's Material section.data

More information

Variables Data types Variable I/O. C introduction. Variables. Variables 1 / 14

Variables Data types Variable I/O. C introduction. Variables. Variables 1 / 14 C introduction Variables Variables 1 / 14 Contents Variables Data types Variable I/O Variables 2 / 14 Usage Declaration: t y p e i d e n t i f i e r ; Assignment: i d e n t i f i e r = v a l u e ; Definition

More information

An Experience Like No Other. Stack Discipline Aug. 30, 2006

An Experience Like No Other. Stack Discipline Aug. 30, 2006 15-410 An Experience Like No Other Discipline Aug. 30, 2006 Bruce Maggs Dave Eckhardt Slides originally stolen from 15-213 15-410, F 06 Synchronization Registration If you're here but not registered, please

More information

6. Specifications & Additional Information

6. Specifications & Additional Information 6. Specifications & Additional Information SIIGX52004-3.1 Transceier Blocks Table 6 1 shows the transceier blocks for Stratix II GX and Stratix GX deices and compares their features. Table 6 1. Stratix

More information

Memory hierarchies: caches and their impact on the running time

Memory hierarchies: caches and their impact on the running time Memory hierarchies: caches and their impact on the running time Irene Finocchi Dept. of Computer and Science Sapienza University of Rome A happy coincidence A fundamental property of hardware Different

More information

Lecture 4: Outline. Arrays. I. Pointers II. III. Pointer arithmetic IV. Strings

Lecture 4: Outline. Arrays. I. Pointers II. III. Pointer arithmetic IV. Strings Lecture 4: Outline I. Pointers A. Accessing data objects using pointers B. Type casting with pointers C. Difference with Java references D. Pointer pitfalls E. Use case II. Arrays A. Representation in

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems Sanjit A. Seshia UC Berkeley EECS 149/249A Fall 2015 2008-2015: E. A. Lee, A. L. Sangiovanni-Vincentelli, S. A. Seshia. All rights reserved. Chapter 16: Quantitative (Execution

More information

CS 201 Winter 2014 (Karavanic) Final Exam

CS 201 Winter 2014 (Karavanic) Final Exam CS 201 Winter 2014 (Karavanic) Final Exam Your Name: (1 point) Instructions: - Be sure to write your name on the first sheet. - All answers, and all work submitted in support of answers, should be written

More information

ANSI C Reserved Words

ANSI C Reserved Words Multimedia Programming 2004 Lecture 3 Erwin M. Bakker Joachim Rijsdam ANSI C Reserved Words auto, break, case, char, const, continue, default, do, double, else, enum, extern, float, for, goto, if, int,

More information

Representing and Manipulating Integers Part I

Representing and Manipulating Integers Part I Representing and Manipulating Integers Part I Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Introduction The advent of the digital age Analog

More information

C1098 JPEG Module User Manual

C1098 JPEG Module User Manual C1098 JPEG Module User Manual General Description C1098 is VGA camera module performs as a JPEG compressed still camera that can be attached to a wireless or PDA host. Users can send out a snapshot command

More information

Introduction to 8086 Assembly

Introduction to 8086 Assembly Introduction to 8086 Assembly Lecture 13 Inline Assembly Inline Assembly Compiler-dependent GCC -> GAS (the GNU assembler) Intel Syntax => AT&T Syntax Registers: eax => %eax Immediates: 123 => $123 Memory:

More information

Important From Last Time

Important From Last Time Important From Last Time Embedded C Pros and cons Macros and how to avoid them Intrinsics Interrupt syntax Inline assembly Today Advanced C What C programs mean How to create C programs that mean nothing

More information

Representing Integers. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Representing Integers. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Representing Integers Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Unsigned Integers Encoding unsigned integers B [ bw 1, bw2,..., b0 ] x = 0000

More information

Page 1. Today. Important From Last Time. Is the assembly code right? Is the assembly code right? Which compiler is right?

Page 1. Today. Important From Last Time. Is the assembly code right? Is the assembly code right? Which compiler is right? Important From Last Time Today Embedded C Pros and cons Macros and how to avoid them Intrinsics Interrupt syntax Inline assembly Advanced C What C programs mean How to create C programs that mean nothing

More information

Communications guide. Line Distance Protection System * F1* GE Digital Energy. Title page

Communications guide. Line Distance Protection System * F1* GE Digital Energy. Title page Title page GE Digital Energy D90 Plus Line Distance Protection System Communications guide D90 Plus firmware revision:.9x GE publication code: 60-9070-F (GEK-3469) GE Digital Energy 650 Markland Street

More information

Lecture 02 C FUNDAMENTALS

Lecture 02 C FUNDAMENTALS Lecture 02 C FUNDAMENTALS 1 Keywords C Fundamentals auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void

More information

Topics of this Slideset. CS429: Computer Organization and Architecture. It s Bits All the Way Down. Why Binary? Why Not Decimal?

Topics of this Slideset. CS429: Computer Organization and Architecture. It s Bits All the Way Down. Why Binary? Why Not Decimal? Topics of this Slideset CS429: Computer Organization and Architecture There are 10 kinds of people in the world: those who understand binary, and those who don t! Dr. Bill Young Department of Computer

More information

CS429: Computer Organization and Architecture

CS429: Computer Organization and Architecture CS429: Computer Organization and Architecture Dr. Bill Young Department of Computer Sciences University of Texas at Austin Last updated: September 11, 2017 at 08:58 CS429 Slideset 2: 1 Topics of this Slideset

More information

CS , Fall 2002 Exam 1

CS , Fall 2002 Exam 1 Andrew login ID: Full Name: CS 15-213, Fall 2002 Exam 1 October 8, 2002 Instructions: Make sure that your exam is not missing any sheets, then write your full name and Andrew login ID on the front. Write

More information

CPEG421/621 Tutorial

CPEG421/621 Tutorial CPEG421/621 Tutorial Compiler data representation system call interface calling convention Assembler object file format object code model Linker program initialization exception handling relocation model

More information

CS , Spring 2004 Exam 1

CS , Spring 2004 Exam 1 Andrew login ID: Full Name: CS 15-213, Spring 2004 Exam 1 February 26, 2004 Instructions: Make sure that your exam is not missing any sheets (there should be 15), then write your full name and Andrew login

More information

Helping Johnny To Analyze Malware: A Usability-Optimized Decompiler and Malware Analysis User Study

Helping Johnny To Analyze Malware: A Usability-Optimized Decompiler and Malware Analysis User Study Helping Johnny To Analyze Malware: A Usability-Optimized Decompiler and Malware Analysis User Study Khaled Yakdan University of Bonn Fraunhofer FKIE Sergej Dechand University of Bonn Elmar Gerhards-Padilla

More information

X86 Assembly Language and C Fundamentals. Chapter 5. Data Transfer Instructions. X86 Code Figures

X86 Assembly Language and C Fundamentals. Chapter 5. Data Transfer Instructions. X86 Code Figures 1 X86 Assembly Language and C Fundamentals Chapter 5 Data Transfer Instructions X86 Code Figures 2 Page 200, Figure 5.4 ;swap_bytes.asm ;-----------------------------------------------------------.STACK

More information

Memory, Data, & Addressing II CSE 351 Spring

Memory, Data, & Addressing II CSE 351 Spring Memory, Data, & Addressing II CSE 351 Spring 2018 http://xkcd.com/138/ Review Questions 1) If the word size of a machine is 64-bits, which of the following is usually true? (pick all that apply) a) 64

More information

CIS 2107 Computer Systems and Low-Level Programming Spring 2012 Final

CIS 2107 Computer Systems and Low-Level Programming Spring 2012 Final Spring 2012 Name: Page Points Score 1 14 2 7 3 6 4 5 5 5 6 5 7 10 8 11 9 10 10 9 11 8 12 10 Total: 100 Instructions The exam is closed book, closed notes. You may not use a calculator, cell phone, etc.

More information

ECHO Process Instrumentation, Inc. Modbus RS485 Module. Operating Instructions. Version 1.0 June 2010

ECHO Process Instrumentation, Inc. Modbus RS485 Module. Operating Instructions. Version 1.0 June 2010 ECHO Process Instrumentation, Inc. Modbus RS485 Module Operating Instructions Version 1.0 June 2010 ECHO Process Instrumentation, Inc. PO Box 800 Shalimar, FL 32579 PH: 850-609-1300 FX: 850-651-4777 EM:

More information

CS341 *** TURN OFF ALL CELLPHONES *** Practice NAME

CS341 *** TURN OFF ALL CELLPHONES *** Practice NAME CS341 *** TURN OFF ALL CELLPHONES *** Practice Final Exam B. Wilson NAME OPEN BOOK / OPEN NOTES: I GIVE PARTIAL CREDIT! SHOW ALL WORK! 1. Processor Architecture (20 points) a. In a Harvard architecture

More information

Page 1. Today. Last Time. Is the assembly code right? Is the assembly code right? Which compiler is right? Compiler requirements CPP Volatile

Page 1. Today. Last Time. Is the assembly code right? Is the assembly code right? Which compiler is right? Compiler requirements CPP Volatile Last Time Today Compiler requirements CPP Volatile Advanced C What C programs mean int my_loop (int base) { int index, count = 0; for (index = base; index < (base+10); index++) count++; urn count; my_loop:

More information

Machine and Assembly Language Principles

Machine and Assembly Language Principles Machine and Assembly Language Principles Assembly language instruction is synonymous with a machine instruction. Therefore, need to understand machine instructions and on what they operate - the architecture.

More information

New York University CSCI-UA : Advanced Computer Systems: Spring 2016 Midterm Exam

New York University CSCI-UA : Advanced Computer Systems: Spring 2016 Midterm Exam New York University CSCI-UA.480-008: Advanced Computer Systems: Spring 2016 Midterm Exam This exam is 75 minutes. Stop writing when time is called. You must turn in your exam; we will not collect it. Do

More information

Course Overview Computer Science 104: Machine Organiza;on and Programming. Overview 1/12/11

Course Overview Computer Science 104: Machine Organiza;on and Programming. Overview 1/12/11 Course Overview Computer Science 104: Machine Organiza;on and Programming Instructor: Alvin R. Lebeck Overview Administrivia Machine/system overview Course theme Five reali;es 2 1 Staff Informa;on Instructor:

More information

Assembly Programmer s View Lecture 4A Machine-Level Programming I: Introduction

Assembly Programmer s View Lecture 4A Machine-Level Programming I: Introduction Assembly Programmer s View Lecture 4A Machine-Level Programming I: Introduction E I P CPU isters Condition Codes Addresses Data Instructions Memory Object Code Program Data OS Data Topics Assembly Programmer

More information

Exploits and gdb. Tutorial 5

Exploits and gdb. Tutorial 5 Exploits and gdb Tutorial 5 Exploits and gdb 1. Buffer Vulnerabilities 2. Code Injection 3. Integer Attacks 4. Advanced Exploitation 5. GNU Debugger (gdb) Buffer Vulnerabilities Basic Idea Overflow or

More information

Assembly Language: IA-32 Instructions

Assembly Language: IA-32 Instructions Assembly Language: IA-32 Instructions 1 Goals of this Lecture Help you learn how to: Manipulate data of various sizes Leverage more sophisticated addressing modes Use condition codes and jumps to change

More information

CS165 Computer Security. Understanding low-level program execution Oct 1 st, 2015

CS165 Computer Security. Understanding low-level program execution Oct 1 st, 2015 CS165 Computer Security Understanding low-level program execution Oct 1 st, 2015 A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns

More information

BUFFER OVERFLOW. Jo, Heeseung

BUFFER OVERFLOW. Jo, Heeseung BUFFER OVERFLOW Jo, Heeseung IA-32/LINUX MEMORY LAYOUT Heap Runtime stack (8MB limit) Dynamically allocated storage When call malloc(), calloc(), new() DLLs (shared libraries) Data Text Dynamically linked

More information

Buffer Overflow. Jo, Heeseung

Buffer Overflow. Jo, Heeseung Buffer Overflow Jo, Heeseung IA-32/Linux Memory Layout Heap Runtime stack (8MB limit) Dynamically allocated storage When call malloc(), calloc(), new() DLLs (shared libraries) Data Text Dynamically linked

More information

Format string vulnerabilities

Format string vulnerabilities Format string vulnerabilities Goal Take control of the program (as usual) How? Write4 (write 4 bytes to an arbitrary location) Inject shellcode (or other exploits) into the process What should we overwrite?

More information

CS61C : Machine Structures

CS61C : Machine Structures inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 3 Introduction to C (pt 2) 2010-06-23! C help session: Tonight 7:00-9:00pm @ 306 Soda!!!Instructor Paul Pearce! The typical! development

More information

Review! * follows a pointer to its value! & gets the address of a variable! Pearce, Summer 2010 UCB! ! int x = 1000; Pearce, Summer 2010 UCB!

Review! * follows a pointer to its value! & gets the address of a variable! Pearce, Summer 2010 UCB! ! int x = 1000; Pearce, Summer 2010 UCB! CS61C L03 Introduction to C (pt 2) (1)! inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 3 Introduction to C (pt 2) 2010-06-23!!!Instructor Paul Pearce! The typical! development cycle!

More information

GCC and Assembly language. GCC and Assembly language. Consider an example (dangeous) foo.s

GCC and Assembly language. GCC and Assembly language. Consider an example (dangeous) foo.s GCC and Assembly language slide 1 GCC and Assembly language slide 2 during the construction of an operating system kernel, microkernel, or embedded system it is vital to be able to access some of the microprocessor

More information

Triple DES and AES 192/256 Implementation Notes

Triple DES and AES 192/256 Implementation Notes Triple DES and AES 192/256 Implementation Notes Sample Password-to-Key and KeyChange results of Triple DES and AES 192/256 implementation For InterWorking Labs customers who require detailed information

More information

Buffer Overflow. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Buffer Overflow. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Buffer Overflow Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu IA-32/Linux Memory Layout Runtime stack (8MB limit) Heap Dynamically allocated storage

More information