Vous êtes sur la page 1sur 24

Computer System Architecture

CSC 203 1.5

Computer System Architecture

Budditha Hettige
Department of Statistics and Computer Science University of Sri Jayewardenepura
1

Computer System Architecture

Introduction

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

Computer System Architecture

What is Computer?
Is a machine that can solve problems for people by carrying out instructions given to it The sequence of instructions is call Program The language machine can understand is call machine language

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

Computer System Architecture

What is Machine Language?


Machine language(ML) is a system of instructions and data executed directly by a computer's Central Processing Unit The codes are strings of 0s and 1s, or binary digits (bits) Instructions typically use some bits to represent
Operations (addition ) Operands or Location of the next instruction.

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

Computer System Architecture

Machine Language contd..


Advantages
Machine can directly access (Electronic circuit) High Speed

Disadvantages
Human cannot identify Machine depended (Hardware depended)

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

Computer System Architecture

More on Machines
Machine defines a language
Set of instructions carried out by the machine

Language defines by the machine


Machine executing all the program, writing in the language

Language

Machine

Language

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

Computer System Architecture

Two Layer (Level) Machine


This machine contains only New Language (L1) and the Machine language (LO)
Virtual Machine (L1) Translate/ Interpreter

Machine Language (L0)

Virtual Machine (L1)

Machine Language (L0)

Machine

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

Computer System Architecture

Translation (L1 L0)


1. Replace each instruction written in L1 in to LO 2. Program now execute new Program 3. Program is called compiler/ translator

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

Computer System Architecture

Interpretation
Each instruction in L1 can execute through the relevant L0 instructions directly Program is call interpreter

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

Computer System Architecture

Multi Level Machine


High-level Language Program (C, C++)

Assembly Language Program

Machine Language

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

10

Computer System Architecture

Multilevel Machine
Virtual Machine Ln

Virtual Machine Ln-1 . . .

Machine Language L0

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

11

Computer System Architecture

Six-Level Machine
Computer that is designed up to the 6th level of computer architecture

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

12

Computer System Architecture

Digital Logic Level


The interesting objects at this level are gates; Each gate has one or more digital inputs (0 or 1) Each gate is built of at most a handful of transistors A small number of gates can be combined to form a 1-bit memory, which can store a 0 or 1; The 1-bit memories can be combined in groups of, for example, 16, 32 or 64 to form registers Each register can hold a single binary number up to some maximum; Gates can also be combined to form the main computing engine itself.
Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

13

Computer System Architecture

Microarchitecture level
A collection of 8-32 registers that form a local memory and a circuit called an ALU (Arithmetic Logic Unit) that is capable of performing simple arithmetic operations; The registers are connected to the ALU to form a data path over which the data flow; The basic operation of the data path consists of selecting one or two registers having the ALU operate on them; On some machines the operation of the data path is controlled by a program called a microprogram, on other machine it is controlled by hardware.

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

14

Computer System Architecture

Data Path

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

15

Computer System Architecture

Instruction Set Architecture Level


The ISA level is defined by the machines instruction set This is a set of instructions carried out interpretively by the microprogram or hardware execution sets

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

16

Computer System Architecture

Operating System Level


Uses different memory organization, a new set of instructions, the ability to run one or more programs concurrently Those level 3 instructions identical to level 2s are carried out directly by the microprogram (or hardwired control), not by the OS; In other words, some of the level 3 instructions are interpreted by the OS and some of the level 3 instructions are interpreted directly by the microprogram; This level is hybrid

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

17

Computer System Architecture

Assembly Language Level


This level is really a symbolic form for the one of the underlying languages; This level provides a method for people to write programs for levels 1, 2 and 3 in a form that is not as unpleasant as the virtual machine languages themselves; Programs in assembly language are first translated to level 1, 2 or 3 language and then interpreted by the appropriate virtual or actual machine; The program that performs the translation is called an assembler.
Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

18

Computer System Architecture

Between Levels 3 and 4


The lower 3 levels are not for the average programmer Instead they are primarily for running the interpreters and translators needed to support the higher levels; These are written by system programmers who specialise in developing new virtual machines; Levels 4 and above are intended for the applications programmer Levels 2 and 3 are always interpreted, Levels 4 and above are usually, but not always, supported by translation;
Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

19

Computer System Architecture

Problem-oriented Language Level


This level usually consists of languages designed to be used by applications programmers; These languages are generally called higher level languages Some examples: Java, C, BASIC, LISP, Prolog; Programs written in these languages are generally translated to Level 3 or 4 by translators known as compilers, although occasionally they are interpreted instead;
Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

20

Computer System Architecture

Multilevel Machines: Hardware


Programs written in a computers true machine language (level 1) can be directly executed by the computers electronic circuits (level 0), without any intervening interpreters or translators. These electronic circuits, along with the memory and input/output devices, form the computers hardware. Hardware consists of tangible objects:
integrated circuits printed circuit boards Cables power supplies Memories Printers

Hardware is not abstract ideas, algorithms, or instructions.

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

21

Computer System Architecture

Multi level machine Software


Software consists of algorithms (detailed instructions telling how to do something) and their computer representations-namely, programs Programs can be stored on hard disk, floppy disk, CDROM, or other media but the essence of software is the set of instructions that makes up the programs, not the physical media on which they are recorded. In the very first computers, the boundary between hardware and software was crystal clear. Over time, however, it has blurred considerably, primarily due to the addition, removal, and merging of levels as computers have evolved. Hardware and software are logically equivalent
Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

22

Computer System Architecture

The Hardware/Software Boundary


Any operation performed by software can also be built directly into the hardware; Also, any instruction executed by the hardware can also be simulated in software; The decision to put certain functions in hardware and others in software is based on such factors as:
Cost Speed Reliability and Frequency of expected changes
23

Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

Computer System Architecture

Exercises
1. Explain each of the following terms in your own words
Machine Language Instruction

2. What are the differences between Interpretation and translation? 3. What are Multilevel Machines? 4. What are the differences between two-level machine and the six-level machine
Budditha Hettige
http://www.dscs.sjp.ac.lk/~budditha/index.html

24

Vous aimerez peut-être aussi