Lecture 1 COMP2611 Introduction Spring2018

Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

COMP2611: Computer Organization

Introduction

COMP2611 CSE HKUST


Course Info. 2

Course’s homepage http://course.cse.ust.hk/comp2611


Course Facebook (online learning community):
search HKUST CSE COMP2611 CSE HKUST Spring 2018

Lecture 1 TuTh 15:00 - 16:20, Rm 5583


Instructor: Dr. Cindy LI [email protected]
Lecture 2 Mo 13:30 - 14:50, Fr 09:00 – 10:20, Rm 5583
Lecture 3 MoWe 09:00 - 10:20, Rm 5583
Instructor: Dr. Alex Lam [email protected]

Lab Mo/Tu/We (starts from Feb 12 Mon)


Tutorial Mo/Th/Fr (starts from Feb 5 Mon)
Tutorials and Labs are necessary supplements to lectures

Textbook: Computer Organization and Design, MIPS Edition


(5th edition), ISBN 978-0-12-407726-3
Reading the textbook is also an important flow of the course
COMP2611 CSE HKUST Introduction
Course Info. 3

 Grading
 2 Homeworks 15% (2 x 7.5%)
• released on week 3 and week 7, due in 10 days
 1 Programming Project 15%
• Released on week 9, due in one month
 2 Midterm Exams 30% (2 x 15%)
• Week 6: Mar 13 (Tue) 7:15 pm LTB & LTC
• Week 9: Apr 16 (Mon) 7:15 pm LTB & LTC
 Final Exam 40%

 Policies
 Course project should be individual work; both ‘provider’
and ‘copier’ will be penalized equally and harshly
 Skipping the midterms or final examination without prior
approval will automatically lead to an "F" grade for the
course
COMP2611 CSE HKUST Introduction
Questions left Unanswered 4

 In COMP2011 (or other high-level programming courses), you’ve


learned
 Develop a program to solve problem

 But questions remain as:


 How does a computer actually work inside?
 How can we get electricity to perform abstract tasks like adding
and storing numbers?
 What actually happens when our programs are executed by a
computer?
 How do we design programming languages and hardware to work
together?
 How do we make computers faster?

COMP2611 CSE HKUST Introduction


Course Learning Outcomes 5

 Upon completion of the course, students are expected to be able to:

 Understand the basic concepts of digital logic and build the small
circuits involved in computer systems
 Describe the interaction between software and hardware and
instruction set architecture (ISA)
 Write and execute small programs of a few hundred lines in
assembly language
 Define the basic concepts of modern computer hardware,
including datapath, control, memory and input/output
 Describe the organizational paradigms that determine the
capability and performance of computer systems

COMP2611 CSE HKUST Introduction


Topics 6

 Topic 1: Digital Logic (combinational and sequential)


 Topic 2: Data Representation (integer, fractional, character)
 Topic 3: Instruction Set Architecture (ISA) and MIPS Assembly
Language
 Topic 5: Computer Arithmetic (addition, subtraction, multiplication,
division)
 Topic 6: Processor (datapath and control) and pipeline
 Topic 7: Memory System (cache, virtual memory)

COMP2611 CSE HKUST Introduction


Basic Assumptions and Terminology 7

 How do computers represent data? Electrical signals (two states)


 Therefore computing relies on base 2 to represent numbers.
 What is base 2 anyway?
 We actually use base 10 (decimal) in our daily calculations

• 1452 is actually: 1 4 5 2
103 102 101 100

• Base 10 has 10 digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9

 Base 2 (binary) uses two digits or bits 0 and 1


• 810 = 10002; 1710 = 100012
• Conversion from base 10 to 2 is done via successive divisions by 2

 Many other bases have been used over the millennia


 Base 60 (Sumerians civilization in Iraq, remnants are found in timekeeping)
 Base 1 (herringbone)
 Base 16 (hexadecimal) very useful in Computer Science (seen later)
• 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

COMP2611 CSE HKUST Introduction


Basic Assumptions and Terminology (cont.) 8

 When dealing with a size (e.g.,  When dealing with a


Memory or file) rate/frequency (e.g., #
instructions per second, # clock
ticks per second)

 Kilo – 103 or 1000


 Kilo – 210 or 1024
 Mega – 106 or 1000 Kilo
 Mega – 220 or 1024 Kilo
 Giga – 109 or 1000 Mega
 Giga – 230 or 1024 Mega
 Tera – 1012 or 1000 Giga
 Tera – 240 or 1024 Giga
 Peta - 1015 or 1000 Tera
 Peta - 250 or 1024 Tera
 …
 …

Example:
Example:
- The speed of my network card is
- The memory in my computer is
1 Gigabit per second
4 Gigabytes
- The speed of my Intel processor is
- The PPT file for this lecture is
2.89 Gigahertz
2.5 Megabytes

COMP2611 CSE HKUST Introduction


Classes of Computers 9

 Personal computers
 General purpose, variety of software
 Subject to cost/performance tradeoff
 Server computers
 Network based
 High capacity, performance, reliability
 Range from small servers to building sized
 Supercomputers
 High-end scientific and engineering calculations
 Highest capability but represent a small fraction of the overall
computer market
 Embedded computers
 Hidden as components of systems
 Stringent power/performance/cost constraints

COMP2611 CSE HKUST Introduction


10

COMP2611 CSE HKUST Introduction


The Computer Revolution 11

Computers have led to a third revolution for civilization:


agricultural -> industrial -> information

 Progress in computer technology


 Underpinned by Moore’s Law
 Makes novel applications feasible
 Computers in automobiles
 Cell phones
 Human genome project
 World Wide Web
 Search Engines
 Computers are pervasive

COMP2611 CSE HKUST Introduction


Below Your Program 12

 Application software
 Written in high-level language
 System software
 Compiler: translates HLL code to
machine code
 Operating System: service code
• Handling input/output
• Managing memory and storage
• Scheduling tasks & sharing
resources
 Hardware
 Processor, memory, I/O controllers

COMP2611 CSE HKUST Introduction


Levels of Program Code 13

 High-level language
 Level of abstraction closer to
problem domain
 Provides for productivity and
portability
 Assembly language
 Textual representation of
instructions
 Hardware representation
 Binary digits (bits)
 Encoded instructions and
data

COMP2611 CSE HKUST Introduction


Levels of Abstraction 14

Impossible to understand computer components by looking at every


single transistor. Instead, abstraction is needed.

Focus of COMP2611

Instruction Set Architecture (ISA)


Hardware

System Software (e.g. Windows, Linux)

Applications (Powerpoint, Warcraft, Winamp)

COMP2611 CSE HKUST Introduction


Levels of Abstraction (cont’d) 15

 Key ideas:
 Both hardware and software are organized into hierarchical
layers.
 Hierarchical organization helps to cope with system complexity.
 Lower-level details are hidden to offer a simpler view at the
higher levels.
 Interaction between levels occurs only through well-defined
interface.
• Interface between hardware and software: Instruction set
architecture (ISA)

COMP2611 CSE HKUST Introduction


Instruction Set Architecture 16

An instruction set architecture (ISA) provides an abstract


interface between hardware and low-level software.

 Advantage: allows different implementations of varying cost and


performance to follow the same instruction set architecture (i.e., to
run the same software).
 Example: 80x86, Pentium, Pentium II, Pentium III, Pentium 4 all
implement the same ISA

 Some instruction set architectures:


 80x86/Pentium/K6 (offers different implementations)
 MIPS
 ARM
 PowerPC

COMP2611 CSE HKUST Introduction


Computer in the Ooooooooooold Days 17

COMP2611 CSE HKUST Introduction


18

IBM model 350 disk file in 1950’s

COMP2611 CSE HKUST Introduction


Programmer in the Old Days 19

Fortran code in punch card

Programmers in 1970’s

COMP2611 CSE HKUST Introduction


Components of Computer 20

Five Basic Components (all kinds of computers)


 Input:
 To communicate with the computer
 Data and instructions transferred to
the memory
 Output:
 To communicate with the user
 Data is read from the memory
 Memory:
 Large store to keep instructions and data
 Processor, which consists of:
 Datapath: processes data according to instructions.
 Control: commands the operations of input, output, memory, and
datapath according to the instructions.

COMP2611 CSE HKUST Introduction


Anatomy of a Computer: Opening the Box 21

COMP2611 CSE HKUST Introduction


Anatomy of a Computer: Opening the Box (cont.) 22

COMP2611 CSE HKUST Introduction


Anatomy of a Computer: Inside the Processor 23

 AMD Barcelona: 4 processor cores

COMP2611 CSE HKUST Introduction


Anatomy of a Computer: Inside the Processor (cont.) 24

 Apple A5

COMP2611 CSE HKUST Introduction


25

COMP2611 CSE HKUST Introduction


Anatomy of a Computer: Memory 26

 Volatile main memory (RAM)


 Used by the processor to store programs and data
 Loses instructions and data when powered off
 Non-volatile secondary memory
 Magnetic disk / hard drive
 Flash storage
 Optical disk (CDROM, DVD)

COMP2611 CSE HKUST Introduction


Networks

 Communication, resource sharing, nonlocal access


 Local area network (LAN): Ethernet
 Wide area network (WAN): the Internet
 Wireless network: WiFi, Bluetooth

Introduction
Rapidly Changing Forces on Computer Architecture 28

Technology Operating systems

Computer
Architecture

Programming languages Applications

COMP2611 CSE HKUST Introduction


Generations of Technologies

Vacuum Tubes (1950s) Transistors (1950s and 1960s)

Integrated Circuits (1960s and 70s) Very Large Scale Integrated (VLSI) Circuit (1980s and on)
Technology Trends 30

 Electronics technology
continues to evolve
 Increased capacity and
performance
 Reduced cost

DRAM capacity

Year Technology Relative performance/cost


1951 Vacuum tube 1
1965 Transistor 35
1975 Integrated circuit (IC) 900
1995 Very large scale IC (VLSI) 2,400,000
2013 Ultra large scale IC 250,000,000,000

COMP2611 CSE HKUST Introduction


Semi-conductor Technology 31

 Silicon: semiconductor
 Add materials to transform properties:
 Conductors
 Insulators
 Switch

 Intel core i7 wafer


 300mm wafer, 280 chips, 32nm technology
 Each chip is 20.7 x 10.5 mm

COMP2611 CSE HKUST Introduction


Manufacturing ICs 32

 Yield: proportion of working dies per wafer

COMP2611 CSE HKUST Introduction


Moore’s Law 33

 In 1965 Gordon Moore (CEO of Intel) predicted that the number of transistors
that can be integrated on a single chip will double every 18 months to 2 years

Source Wikipedia

COMP2611 CSE HKUST Introduction


Concluding Remarks 34

 Recognize the five basic components of a computer


 input, output, memory, processor (datapath + control)

 Understand the Principle of abstraction


 Help cope with design complexity by hiding low level details
 Levels of program code: high-level language, low-level language
(e.g. assembly), machine code

 Instruction set architecture


 The hardware/software interface

 Recognize the technology trend


 Cost/performance is improving
 Due to underlying technology development

COMP2611 CSE HKUST Introduction

You might also like