Here is a diagram of a simple computer system: (this diagram will be the one needed for exams) CPU. cache



Similar documents
Block diagram of typical laptop/desktop

What's in a computer?

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

MICROPROCESSOR AND MICROCOMPUTER BASICS

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

The Central Processing Unit:

MACHINE ARCHITECTURE & LANGUAGE

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

CHAPTER 7: The CPU and Memory

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

BIOS and CMOS. Overview. The Function of BIOS. The Bus

CHAPTER 2: HARDWARE BASICS: INSIDE THE BOX

Introducción. Diseño de sistemas digitales.1

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

Parts of a Computer. Preparation. Objectives. Standards. Materials Micron Technology Foundation, Inc. All Rights Reserved

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Operating System Overview. Otto J. Anshus

Chapter 2 Logic Gates and Introduction to Computer Architecture

1 PERSONAL COMPUTERS

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Computer Systems Design and Architecture by V. Heuring and H. Jordan

Slide Set 8. for ENCM 369 Winter 2015 Lecture Section 01. Steve Norman, PhD, PEng

Chapter 5 Busses, Ports and Connecting Peripherals

Central Processing Unit (CPU)

EUCIP - IT Administrator. Module 1 - PC Hardware. Version 2.0

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Instruction Set Architecture (ISA)

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Notes on Assembly Language

Introducing Big Data. Abstract. with Small Changes. Agenda. Big Data in the News. Bits and Bytes

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008

Communicating with devices

RAM & ROM Based Digital Design. ECE 152A Winter 2012

Lecture 2: Computer Hardware and Ports.

İSTANBUL AYDIN UNIVERSITY

CPU Organization and Assembly Language

(Refer Slide Time: 02:39)

CHAPTER 6: Computer System Organisation 1. The Computer System's Primary Functions

(Refer Slide Time: 00:01:16 min)

Computer Organization. and Instruction Execution. August 22

Discovering Computers Living in a Digital World

Data Storage. 1s and 0s

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

Chapter 3: Computer Hardware Components: CPU, Memory, and I/O

EMBEDDED SYSTEM BASICS AND APPLICATION

Summary of the MARIE Assembly Language

Chapter 1. The largest computers, used mainly for research, are called a. microcomputers. b. maxicomputers. c. supercomputers. d. mainframe computers.

Basic Computer Organization

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

85MIV2 / 85MIV2-L -- Components Locations

Central Processing Unit

361 Computer Architecture Lecture 14: Cache Memory

Primary Memory. Input Units CPU (Central Processing Unit)

Computer Organization

Chapter 1 Computer System Overview

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

Memory Systems. Static Random Access Memory (SRAM) Cell

Like millions of other computer users, you have probably used your

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

TEST CHAPTERS 1 & 2 OPERATING SYSTEMS

Instruction Set Design

7a. System-on-chip design and prototyping platforms

Obj: Sec 1.0, to describe the relationship between hardware and software HW: Read p.2 9. Do Now: Name 3 parts of the computer.

LSN 2 Computer Processors

Chapter 7D The Java Virtual Machine

COMPUTER BASICS. Seema Sirpal Delhi University Computer Centre

Technical Product Specifications Dell Dimension 2400 Created by: Scott Puckett

Overview of MIS Professor Merrill Warkentin

Figure 1: Graphical example of a mergesort 1.

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

A+ Unit Two: Hardware Basics

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Memory Hierarchy. Arquitectura de Computadoras. Centro de Investigación n y de Estudios Avanzados del IPN. adiaz@cinvestav.mx. MemoryHierarchy- 1

1 Classical Universal Computer 3

Introduction To Computers: Hardware and Software

Chapter 13. PIC Family Microcontroller

Microprocessor & Assembly Language

1. Introduction. 3. Package Content USB bit PC Card * 1 USB 2.0 Driver Utility * 1 User s Manual * 1

Introduction to Microcontrollers

Computer Components Study Guide. The Case or System Box

Router Architectures

Computer organization

Tech Application Chapter 3 STUDY GUIDE

CSE 141L Computer Architecture Lab Fall Lecture 2

EUCIP IT Administrator - Module 1 PC Hardware Syllabus Version 3.0

Hardware: Input, Processing, and Output Devices. A PC in Every Home. Assembling a Computer System

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

We will use the accumulator machine architecture to demonstrate pass1 and pass2.

PART B QUESTIONS AND ANSWERS UNIT I

Memory Basics. SRAM/DRAM Basics

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

Transcription:

Computer Systems Here is a diagram of a simple computer system: (this diagram will be the one needed for exams) CPU cache bus memory controller keyboard controller display controller disk

Computer Systems A current consumer PC uses multiple buses (this diagram is *not* required for exams) DRAM memory Backside = L2 cache = CPU core FSB 800 MHz North-Bridge Controller (memory hub) AGP Graphics accelerator (with local memory) 1 Gbit Ethernet monitor disk Serial ATA Parallel ATA CD/DVD 10 Mbit Ethernet PCI bus South-Bridge Controller (I/O hub) South-Bridge has dedicated ports for legacy devices, such as Q Mouse keyboard, floppy; also has serial and parallel ports South-Bridge typically contains flash eprom holding the BIOS, real-time clock, CMOS memory, w\ independent battery backup.

Computer Components input - keyboard, mouse, scanner,... output - display, printer, sound,... CPU == central processing unit == processor composed of two parts: 1. datapath (temporary memory, called registers, and function units) 2. control logic (sequencing of datapath actions) different instruction sets: Intel IA32 (x86), Apple/IBM/Motorola PowerPC, Sun SPARC, ARM,... common instructions include add, subtract, jump,...

Computer components (cont d) memory multilevel hierarchy due to cost vs. speed tradeoffs fastest and most expensive --> CPU registers cache (perhaps multiple levels) main memory slowest and least expensive -> long-term storage

Computer components (cont d) memory cache and main memory are made of RAM - random access memory DRAM - dynamic RAM - most main memories SRAM - static RAM - fast and expensive, used for caches ROM - read-only memory (holds initial "bootstrap loader program and basic I/O programs)

Computer components (cont d) long-term storage - so slow that it is treated as I/O floppy disk hard disk CD-ROM DVD

Prefixes for speed, time, and capacity K (kilo-) = one thousand = 10 3 ~ 2 10 m (milli-) = 10-3 M (mega-) = one million = 10 6 ~ 2 20 u (micro-) = 10-6 G (giga-) = one billion = 10 9 ~ 2 30 n (nano-) = 10-9 T (tera-) = one trillion = 10 12 ~ 2 40 p (pico-) = 10-12 P (peta-) = one quadrillon = 10 15 ~ 2 50 f (femto-) = 10-15 E (exa-) = one quintillion = 10 18 ~ 2 60 a (atto-) = 10-18 main memory size is measured in powers of two, while speed is in powers of 10 (the capacity of most hard disks is measured in powers of ten)

Prefixes for speed, time, and capacity note that some folks are now using special binary prefixes to prevent any confusion (http://physics.nist.gov/cuu/units/binary.html) Ki (kibi-) = kilobinary = 2 10 Mi (mebi-) = megabinary = 2 20 Gi (gibi-) = gigabinary = 2 30 Ti (tebi-) = terabinary = 2 40 Pi (pebi-) = petabinary = 2 50 Ei (exbi-) = exabinary = 2 60

Program translation symbolic (i.e., human readable) languages high-level language (HLL) assembly language one-to-one (approx.) correspondence with machine insts. machine instructions - represented inside the computer in bit (0/1) patterns HLL assembly lang machine code(object file or executable) ---- --------------- ------------------------------------------- A = B + C; --> load(b) --> 0000 0010 0010 0100 add(c) 0000 0001 0010 0101 store(a) 0000 0011 0010 0011 each moves closer to the bit representation needed by hardware for execution

Program translation Compiler A translator that translates statements written in a high-level language (HLL) into assembly code, performing various optimizations and register allocations along the way. Interpreter A translator that translates and executes all at a single time Assembler A program that takes assembly instructions and converts them into machine code that the computer's processor can use to perform its basic operations. The resulting file is called an object file.

Program translation Assembly Language a statement in an assembly language is called an instruction an instruction is composed of operation code (opcode) operands (names of registers and/or information needed to generate a memory address)

example: ARM assembler ARM symbolic code -------> address machine code (in hexadecimal) main: mov r0, #0x1 0x00000000 0xE3A00001 mov r1, #0x0 0x00000004 0xE3A01000 loop: cmp r0, #0x5 0x00000008 0xE3500005 beq stop 0x0000000C 0x0A000002 add r1, r0, r1 0x00000010 0xE0801001 add r0, r0, #0x1 0x00000014 0xE2800001 b loop 0x00000018 0xEAFFFFFA stop:

Assembly Language labels (like loop" in the previous example) represent symbolic addresses of data and branch targets in the program each label must be unique (i.e., it must be defined only once) assembly symbolic program (human readable) ----------> machine code (binary) symbolic labels opcodes operand identification (registers and memory address info) immediate operand values (constants) memory addresses bit patterns in instructions bit patterns in instructions bit patterns in instructions

Assembler Assemblers have a two-pass structure instructions can have forward or backward references to labels because of forward references, most assemblers use a two-pass assembly structure, since you encounter a "use" before its "definition" and thus cannot immediately translate the label into its memory address

Assembler two-pass structure: pass 1 - a) increment a location counter as you read each assembly language statement and b) collect any label definitions into a symbol table with the corresponding location counter values pass 2 - using the symbol table, translate the assembly language statements into machine code

Forward references example: the instruction "jmp next" - forward reference to jump target label "next" the instruction "add x" - forward reference to data label "x" symbolic code pass 1 pass 2 ----------> ----------> assign addresses translated code (will be using a location represented in binary) counter 100: jmp next 101: jmp next <jmp op> <addr=103> 102: next: add x 103: add x <add op> <addr=106> 104: halt 105: halt <halt op> x:.word 16 106: 15 <value=15>

New entry when you encounter a label _symbol_table_ symbol addr next 103 x 106 Table lookup yielding address when you encounter a symbolic label (note that the symbol table for the assembler holds the address 106 of "x", not its initial value of 15) alternatively, if you keep all the translated code in memory, you can translate in one pass over the input -- but you must keep a record of all unresolved uses of a label (e.g., the symbol table entry for an as-yet-undefined label points to a linked list of all forward references) and then you backtrack and fix up those uses whenever the definition is encountered