lecture01-intro
lecture01-intro
Architecture
Anton Burtsev
September, 2021
Class details
●
Graduate
●
45 students
●
Instructor: Anton Burtsev
●
Meeting time: 8:00pm-9:20pm (Mon/Wed)
●
Discussions
●
1 TA
●
Semen
●
Web page
●
https://www.ics.uci.edu/~aburtsev/250P/
More details
●
Several small homeworks
●
Midterm
●
Final
●
Grades are curved
●
Homework: 50%, midterm exam: 25%, final exam:
25% of your grade.
●
You can submit late homework 3 days after the
deadline for 60% of your grade
This course
●
Book: Hennessy and Patterson’s
●
Computer Architecture, A Quantitative Approach, 6th
Edition
●
Topics
●
Measuring performance/cost/power
●
Instruction level parallelism, dynamic and static
●
Memory hierarchy
●
Multiprocessors
●
Storage systems and networks
Course organization
●
Lectures
●
High level concepts and abstractions
●
Reading
●
Hennessy and Patterson
●
Bits of additional notes
●
Homeworks
Computer technology
●
Performance improvements:
●
Improvements in semiconductor technology
– Feature size, clock speed
●
Improvements in computer architectures
– Enabled by high-level language compilers, general operating systems
– Lead to RISC architectures
●
Together have enabled:
●
Lightweight computers
●
Productivity-based managed/interpreted programming languages
Single processor performance
Points to note
●
The 52% growth per year is because of faster clock speeds
and architectural innovations (led to 25x higher speed)
●
Clock speed increases have dropped to 1% per year in recent
years
●
The 22% growth includes the parallelization from multiple cores
●
End of Dennard scaling
●
End of Moore’s Law: transistors on a chip double every 18-24
months
Clock speed growth
Current trends in architecture
●
Cannot continue to leverage Instruction-Level
parallelism (ILP)
●
Single processor performance improvement ended
in 2003
●
End of Dennard scaling
●
End of Moore’s Law
Why does it matter to you?
Basics of hardware and x86 instruction set
CPU
●
1 CPU socket
●
4 cores
●
2 logical (HT) threads each
A simple 5-stage pipeline
Memory
Memory abstraction
I/O Devices
Dell R830 4-socket server
●
<mem> A memory address (e.g., [eax], [var + 4], or dword ptr
[eax+ebx])
●
<con32> Any 32-bit constant
●
<con16> Any 16-bit constant
●
<con8> Any 8-bit constant
●
<con> Any 8-, 16-, or 32-bit constant
mov instruciton
●
Copies the data item referred to by its second operand (i.e.
register contents, memory contents, or a constant value) into the
location referred to by its first operand (i.e. a register or memory).
●
Register-to-register moves are possible
●
Direct memory-to-memory moves are not
●
Syntax
mov <reg>,<reg>
mov <reg>,<mem>
mov <mem>,<reg>
mov <reg>,<const>
mov <mem>,<const>
mov examples
mov eax, ebx ; copy the value in ebx into eax
mov byte ptr [var], 5 ; store 5 into the byte at location var
mov eax, [ebx] ; Move the 4 bytes in memory at the address
; contained in EBX into EAX
mov [var], ebx ; Move the contents of EBX into the 4 bytes
; at memory address var.
; (Note, var is a 32-bit constant).
mov eax, [esi-4] ; Move 4 bytes at memory address ESI + (-4)
; into EAX
mov [esi+eax], cl ; Move the contents of CL into the byte at
; address ESI+EAX
mov: access to data structures
struct point {
int x; // x coordinate (4 bytes)
int y; // y coordinate (4 bytes)
}
struct point points[128]; // array of 128 points
●
lea
// load the address of the y coordinate of the i-th point into p
int *p = &points[i].y;
●
Subtract 4 from ESP
●
Insert data on the
stack
Manipulating
stack
●
POP instruction
pop EAX
●
Removes data from
the stack
●
Saves in register or
memory
●
Adds 4 to ESP
Thank you!