COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer...
Transcript of COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer...
COEN 311Computer Organization & Software
Chapter 1Introduction and Terminology
(Prof. Sofiène Tahar)
Concordia University Electrical & Computer Engineering
Conceptual View of a Computer System
P. E. Livadas, C. Ward, Computer Organization and the MC6800, Chapter 1.
Software Layer – Operating System View
P. E. Livadas, C. Ward, Computer Organization and the MC6800, Chapter 1.
Inner Layers of Hardware – Physical View
P. E. Livadas, C. Ward, Computer Organization and the MC6800, Chapter 1.
Hardware Components of a Computer System
P. E. Livadas, C. Ward, Computer Organization and the MC6800, Chapter 1.
Opening the Box
Inside the Processor• AMD Barcelona: 4 processor cores
Memory• Volatile main memory
– Loses instructions and data when power off
• Non‐volatile secondary memory– Magnetic disk– Flash memory– Optical disk (CDROM, DVD)
Networks• Communication and resource sharing• Local area network (LAN): Ethernet
– Within a building
• Wide area network (WAN): the Internet• Wireless network: WiFi, Bluetooth
Organization of Single Bus System
P. E. Livadas, C. Ward, Computer Organization and the MC6800, Chapter 1.
Time Sharing Process
Time
Printer
Disk
OS Routines
Program
User program and OS routine sharing of the processor
t5t4t3t2t1t0
Software
High Level Language
Assembly Language
Machine Code
Hardware
OS
Compiler
Assembler
Loader
Word processor; Video game
C‐ compiler (high level language & processor dependent)
Instructions (processor dependent)Pentium, Power PC, MC68000
Binary (processor dependent)Pentium, Power PC,MC68000
Processor: Pentium,AMD,Power PCMemory IO devices
Windows 7Unix, Linux
C++Java
(processor dependent)
ADD R1, R2
01010110
compiler
Compilation flow
SW Application
High Level SW Program
3 + 2 =? 5
beginvar int a, b, c;a := 3;b := 2;c := a+b;end
Compilation Flow: Example
Computer HW:
Assembly Program:
Allocate variables to registersa <‐‐> R1b <‐‐> R2 c <‐‐> R3
1000 0010 10
1010 01 10 11
1000 0011 01 Machine Program:
+
Processor Memory
Registers (R1,R2,…)
LOAD 3, R1; R1 <‐ 3LOAD 2, R2; R2 <‐ 2ADD R1, R2, R3; R3 <‐ R1+ R2 = 5
Computer HW:
Assembly Program:
Allocate variables to registersa <‐‐> R1 b <‐‐> R2 c <‐‐> R3
LOAD R1, 3; R1 <‐ 3LOAD R2, 2; R2 <‐ 2ADD R3, R1, R2; R3 <‐ R1+ R2 = 5
1000 10 0010
1010 11 01 10
1000 01 0011 Machine Program:
+
CPU Memory
Registers (R1,R2,…)
Computer Hardware
PC
IR
MBRControl
ALU
ProcessorR0R1R2
4 general purpose registers
Memory
MAR
R3
PC
IR
MBRControl
ALU
Instruction Execution
Fetch
MAR PC
MDR M[MAR]
IR MDR
Processor
Memory
MAR
R0R1R2
4 general purpose registers
R3
PC
IR
Control
Instruction Execution
processor
MemoryExecuteR3 <‐ R1+R2
read (R1)read (R2)addwrite (R3)
MBR
R0R1R2
4 general purpose registers
R3 ALU
+
MAR
ADD R1, R2, R3
MAR PC
MBR M[MAR]
IR MBR
R3 R1 + R2
PC PC + 1
InterpretADD Ri,Rj,Rk
Increment PC
Execute
Decode
Fetch
Instruction Execution Flow