You are on page 1of 5

Instructors

Computer Architecture
Md E Haque mdhaque@cs.rutgers.edu

01:198:211

Me:

Md E Haque
mdhaque@cs.rutgers.edu Office Hour: TBD (HLL 204)

TAs: Guilherme Cox


cox@computer.org Office Hour: Mondays 5-6pm (CoRE 331)

Rutgers University

Course Web

Course Material

Course information:

Required

Overview and schedule:

http://www.cs.rutgers.edu/~mdhaque/teaching.html Announcements, course material, assignment hand-in, etc. If you are registered, when you login to Sakai using your netid, you should see a tab 01:198:211:F6 Su13

Bryant and OHallaron. Computer Systems: A Programmers Perspective, 2nd edition. Addison-Wesley, 2011.

Sakai: https://sakai.rutgers.edu

Several different options for getting the book

Recommended

Any good C book should be fine


http://en.wikibooks.org/wiki/C_Programming Kernighan and Ritchie. The C Programming Language, 2nd Edition, Prentice Hall, 1988. A free online C book: http://publications.gbdirect.co.uk/c_book/

Disclaimer: I know nothing about the quality of this book

Rutgers University

Rutgers University

What You Should Know

What You Will Learn

Prerequisite: 198:112

You You You You

know know know know

some math a bit about algorithms at least one programming language (Java) something about how to write, run, and test programs

How to program in two more programming languages (C and Assembly) The major hardware components in computer systems

Trends in technology and computer architecture

How hardware components are built from digital logic How programs written in a high-level language (e.g., C) is actually executed by the hardware How to understand and improve the performance of programs

Rutgers University

Rutgers University

Course Expectations

No Late Assignments

The fun part


3 programming assignments 3 paper & pencil homework assignment 1 midterm and 1 final exams Attend lectures and recitations

We will NOT accept late assignments Programming assignments to be handed-in on Sakai

The not so fun part

Deadline will be enforced by Sakai


What we expect from you

Assignments will not be accepted after deadline passes Can hand-in assignments multiple times so if you are working at the last minute, hand-in a version early (e.g., hour before deadline)

Homework assignments to be handed-in in lecture

Read the assigned readings before lecture Read and think about the programming and homework assignments

I will stop accepting assignments once I leave the lecture room

Emails with assignments attached will be discarded

Ask questions Start programming assignments early

Rutgers University

Rutgers University

Collaboration vs. Cheating

Tentative List of Topics

Collaboration is encouraged

Introduction

You learn by discussing with others BUT, must not cheat We hate it, we will not tolerate it, we will look for it If we find cheating, everyone involved will be punished

Hardware trends

Cheating

C programming Information representation Assembly (x86) programming

Departments academic integrity policy: http://www.cs.rutgers.edu/policies/academicintegrity/ Come talk to me I will help you if I can

Compiling

If you are having trouble with the course for any reason

Corollary: once cheating has occurred, theres nothing I can do to help you avoid the consequences

Digital logic Processor architecture Memory hierarchy Recent processors

Rutgers University

Rutgers University

10

Programming Assignments

Grading

3 programming assignments Program in C and/or Assembly


Grading:

Dont wait until the last minute Learn how to use tools http://ilab.rutgers.edu

Will be done using the Instructional Lab

25%: Midterm 30%: Final 15%: Homework 25%: Programming assignments

If you dont already have an account, get one asap You can use Eclipse and/or the gnu tools (gcc, gmake, gdb, etc.)

No make-up exams except for university sanctioned reasons.


You will be programming in a Linux environment

Must inform instructor before the exam Informing professor ok to take make-up

Rutgers University

11

Rutgers University

12

Computer Architecture

Main Components

CPU Memory Bus I/O devices

Memory Input CPU

Human Interface

Mouse, keyboard, screen, etc. Output Bus

Storage Networking Graphics

Rutgers University

13

Rutgers University

14

Von Neumann Model


Memory CPU ALU 0 1 2 3 4 5 6 7 8 9 Store both instructions and data

Basic CPU Function

FETCH[PC++]

+ * /
N

DECODE

PC

EXECUTE

Arithmetic: +, -, *, / Logic: bre, jmp

Rutgers University

15

Rutgers University

16

Programming Meets Hardware


#include <stdio.h> int main() { int x, y, temp; x=1; y=2; temp =x; x=y; y=temp; printf("%d %d %d\n",x,y,temp); }
movl movl movl movl movl movl movl movl movl movl movl movl movl movl $1, -8(%ebp) $2, -12(%ebp) -8(%ebp), %eax %eax, -16(%ebp) -12(%ebp), %eax %eax, -8(%ebp) -16(%ebp), %eax %eax, -12(%ebp) -16(%ebp), %eax %eax, 12(%esp) -12(%ebp), %eax %eax, 8(%esp) -8(%ebp), %eax %eax, 4(%esp)

Input/Output
Memory CPU 0 1 2 3 4 5 6 7 8 9 Devices: Input: mouse, keyboard Output: screen, speaker Storage: disk, tape Graphics Networking

High-Level Language Program Compiler Assembly Language Program Assembler Machine Language Program

ISA

+ * /
N

7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 02 00 03 00 01 00 00 00 f0 82 04 08 34 00 00 00 c4 0c 00 00 00 00 00 00 34 00

Rutgers University

17

Rutgers University

18

In Practice
CPU Register file PC ALU System bus Memory bus

Where Is the OS?


App App App OS
Main memory

OS

Bus interface

I/O bridge

Hardware

Hardware

I/O bus USB controller Mouse Keyboard Graphics adapter Display Disk controller

Expansion slots for other devices such as network adapters

Does this mean apps run on OS rather than the hardware?

Apps typically runs directly on hardware. Will switch over to OS when need help.

Actually, 1st picture is used frequently because OS does extend the hardware, making the hardware appear more powerful through abstractions such as processes, threads, virtual memory, files, etc.
19 Rutgers University 20

Input
Rutgers University

Output

Disk

Computer Architecture

Architecture Trends: Moores law


How to design and build the components How to design and build systems from the components In this class:

Understand basics of current components and systems Understand how programs run on current systems Understand how current architecture affect my high-level language programs

Gordon Moore was an Intel Engineer An observation about improvements in hardware No. of transistors on a chip double every 18 months Exponential growth seen in other hardware dimensions

Processor speed: 2x every 18 months Memory capacity: 2x every 2 years Disk capacity: 2x every year

Rutgers University

21

Rutgers University

22

Number of Transistors on a Chip

Clock speed

Rutgers University

23

Rutgers University

24

Processor Performance
2x every 18 months

Memory Capacity

Rutgers University

25

Rutgers University

26

Disk Capacity

CPU/Memory Performance Gap


1000 Performance 100 10
DRAM CPU

Proc 60%/yr.

Processor-Memory Performance Gap: (grows 50% / year) DRAM 7%/yr.

Implication: memory hierarchy

registers, caches
28

Rutgers University

27

Rutgers University

Processor Speed vs. Memory Bandwidth

Power Wall

Source: Heath, Kaur, Martin, Nguyen. HPCA 2001.

Rutgers University

29

Rutgers University

1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000

30

You might also like