coen 311 computer organization softwaretahar/coen311/notes/chapter1.pdf · coen 311 computer...

19
COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. Sofiène Tahar) Concordia University Electrical & Computer Engineering

Upload: trinhkien

Post on 20-May-2018

221 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

COEN 311Computer Organization & Software

Chapter 1Introduction and Terminology

(Prof. Sofiène Tahar)

Concordia University Electrical & Computer Engineering

Page 2: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

Conceptual View of a Computer System

P. E. Livadas, C. Ward, Computer Organization and the MC6800, Chapter 1.

Page 3: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

Software Layer – Operating System View 

P. E. Livadas, C. Ward, Computer Organization and the MC6800, Chapter 1.

Page 4: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

Inner Layers of Hardware – Physical View

P. E. Livadas, C. Ward, Computer Organization and the MC6800, Chapter 1.

Page 5: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

Hardware Components of a Computer System

P. E. Livadas, C. Ward, Computer Organization and the MC6800, Chapter 1.

Page 6: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

Opening the Box

Page 7: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

Inside the Processor• AMD Barcelona: 4 processor cores

Page 8: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

Memory• Volatile main memory

– Loses instructions and data when power off

• Non‐volatile secondary memory– Magnetic disk– Flash memory– Optical disk (CDROM, DVD)

Page 9: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

Networks• Communication and resource sharing• Local area network (LAN): Ethernet

– Within a building

• Wide area network (WAN): the Internet• Wireless network: WiFi, Bluetooth

Page 10: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

Organization of Single Bus System

P. E. Livadas, C. Ward, Computer Organization and the MC6800, Chapter 1.

Page 11: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

Time Sharing Process

Time

Printer

Disk

OS Routines

Program

User program and OS routine sharing of the processor

t5t4t3t2t1t0

Page 12: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

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

Page 13: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

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

Page 14: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

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

Page 15: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

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,…)

Page 16: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

Computer Hardware

PC

IR

MBRControl

ALU

ProcessorR0R1R2

4 general purpose registers

Memory

MAR

R3

Page 17: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

PC

IR

MBRControl

ALU

Instruction Execution

Fetch

MAR  PC

MDR M[MAR]

IR MDR

Processor

Memory

MAR

R0R1R2

4 general purpose registers

R3

Page 18: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

PC

IR

Control

Instruction Execution

processor

MemoryExecuteR3 <‐ R1+R2

read (R1)read (R2)addwrite (R3) 

MBR

R0R1R2

4 general purpose registers

R3 ALU

+

MAR

Page 19: COEN 311 Computer Organization Softwaretahar/coen311/notes/chapter1.pdf · COEN 311 Computer Organization & Software Chapter 1 Introduction and Terminology (Prof. SofièneTahar) Concordia

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