1 comp201 computer systems dr richard nelson [email protected] room g.1.29

29
1 COMP201 Computer Systems Dr Richard Nelson [email protected] Room G.1.29

Upload: patience-reeves

Post on 16-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

1

COMP201 Computer Systems

Dr Richard [email protected]

Room G.1.29

Page 2: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

2

Computer Systems

Course Outline Course Web Page:

http://wand.cs.waikato.ac.nz/~201/2004/index.html

Class Representatives Introducing Computer Systems

Hardware Software

WRAMP and REX Board

Page 3: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

3

Topics

Introduction to course Data representation Assembly language programming Processor structures

(end of first term…)

I/O Memory management Operating systems Data communications

Page 4: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

4

Course Structure

Page 5: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

5

Administration

Website

Class Reps

Linux

Page 6: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

6

Introduction

Chapter One – Englander

Computer Systems: Course is about the function and design of the

various units of that make up digital computers Also about the interaction between software and

hardware

Question: What do the insides of a Computer look like and why do we care?

Page 7: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

7

Introduction

A single question, but many answers. You should care, for many reasons…

As a User You will be aware of strengths and limitations of your

computer system As a Programmer

You will be able to write better programs As a Systems Analyst

You will need to specify computer systems for purchase As a Systems Administrator or Manager

You will be able to more effectively manage computer systems

Page 8: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

8

Computer Ad

Suppose you need a new computer, can you understand these specifications enough to make an intelligent choice?

Page 9: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

9

Computer Ad (2)

Page 10: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

10

Components of a Computer System The Computer Hardware

Processor, Memory, Input/output devices, interconnects

The Software Programs, structures

The Data to be Manipulated Data format, max and min values, precision

The Communications Component Networking, human interface

Page 11: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

11

Computer Systems Introduction Components of a Computer System

The Computer Hardware The Software The Data to be Manipulated The Communications Component

Page 12: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

12

The Hardware Component

Page 13: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

13

The Hardware Component

CPU (central processing unit) Where operations and calculations carried out Composed of three main units

Arithmetic Logic Unit – where arithmetic and logic operations are performed

The control unit – controls processing of instructions and movement of internal data

The interface unit – moves data and instruction between the CPU an other components

Page 14: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

14

Memory Often known as primary storage or RAM (random

access memory) Made up of a large number of cells

Each location can hold a binary number (8/16/32/64 bits on most computers, 32 bits on REX board)

Each has a unique address Amount of primary storage has raised dramatically

over time: 64K bytes was considered a large amount of memory in 1980 Current PC’s come with 128Mbytes or 256Mbytes as standard That’s about 2000 times as much!! More memory allows more sophisticated programs to be run

E.g. Windows

Page 15: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

15

Sound Card

Page 16: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

16

Network Card

Page 17: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

17

Processor

Page 18: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

18

Memory

Page 19: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

19

Mother Board

Page 20: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

20

Expansion Slots

Page 21: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

21

Software, a key component

Without the software, the hardware is useless.

The software, often termed the Program, exists at different levels of abstraction. Processor itself operates on binary (bits) Humans understand and like higher-level

programs

Page 22: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

22

Below your Program

Instructions (which tell the computer what to do) are collections of symbols (bits)

For example, the bits 1000110010100000 may tell one computer to add two numbers together

This is in fact the way that the first programmers communicated to computers very tedious and error-prone

Page 23: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

23

Front panel… early computer

Page 24: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

24

Below your Program

Assembly languages and assemblers were developed to help programmers eg. ADD C, A, B

Programmer’s productivity later further improved by the introduction of high-level languages and compilers

FORTRAN, COBOL, BASIC were early languages C, C++, Java are more recent

Page 25: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

25

At the different levels, a program may take on different structures:

int greater(int a, int b)

{ int c; if (a > b) c = a; else c = b; return c;}

greater:...lw $2,16($fp)lw $3,20($fp)slt $2,$3,$2beq $2,$0,$L2lw $2,16($fp)...

compile

8FC20010 8FC3001400000000 0062102A10400005 000000008FC20010 ...

asmC code

Machine code

Assembler code

Page 26: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

26

Below your Program

Other improvements that have helped programmers develop software include: Use of subroutine libraries which include widely

used routines Use of operating systems to better manage a

computer’s resources Newer languages are less rigid in structure,

allowing programs to be created which are readable.

Page 27: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

27

Technology => dramatic change

Processor logic capacity: about 30% per year clock rate: about 50% per year

Memory DRAM capacity: about 60% per year (4x every 3 years) Memory speed: about 10% per year Cost per bit: improves about 25% per year

Disk (Hard drive) capacity: about 60% per year

Page 28: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

28

Moore’s Law

Page 29: 1 COMP201 Computer Systems Dr Richard Nelson richardn@cs.waikato.ac.nz Room G.1.29

29

Characteristics over Time

Year Name Size (cu. Ft.)

Power (watts)

Performance (adds/sec)

Memory (KB)

Adjusted price (1996$)

Adjusted price / perfomance

1951 UNIVAC1 1000 124,500 1,900 48 4,996,749 1

1964 IBM S/360 model 50

60 10,000 500,000 64 4,140,257 318

1965 PDP-8 8 500 330,00 4 66,071 13,135

1976 Cray-1 58 60,000 166,000,000 32,768 8,459,712 51,604

1981 IBM PC 1 150 240,000 256 4,081 154,673

1991 HP9000 /model 750

2 500 50,000,000 16,384 8,156 16,122,356

1996 Intel Pro PC

2 500 400,000,000 16,384 4,400 239,078908