Introduction to Computer Organization - PowerPoint PPT Presentation

1 / 57
About This Presentation
Title:

Introduction to Computer Organization

Description:

04-829-2226, Cooper 427. I am a PhD Candidate in the faculty of Industrial Engineering ... and the most important: Enjoying learning about the amazing IT world! ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 58
Provided by: NEW94
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Computer Organization


1
Introduction to Computer Organization
  • Computer Hardware Software

2
Administrative Issues
  • About me
  • Perelman Valeria
  • Working tel. 04-829-2226, Cooper 427
  • I am a PhD Candidate in the faculty of Industrial
    Engineering Management, Technion
  • Have a single daughter and a husband ?

3
Administrative Issues cont.
  • The goal of the course
  • Promo to my wonderful profession ?
  • An overall overview on the IT (Information
    Technology) field
  • Some needed background for the MBA program,
  • and the most important Enjoying learning about
    the amazing IT world!

4
Administrative Issues cont.
  • The course requirements are
  • To be nice and open minded ?
  • To submit your solutions to at least 95 of the
    assignments (there will be 3)
  • To pass the exam (there is a boolean result)

5
The Major Topics (Syllabus)
  • Computer Organization (HWSW)
  • Programming with Java
  • Algorithms Data Structures
  • Databases Management (SQL, ERD)
  • Complex Systems Design at the Conceptual Level
    with OPM
  • Web Based Applications, Service Oriented
    Architecture (SOA)

6
Outline
  • Computer Architecture
  • What is all about?
  • A brief architectural history
  • Computing Systems
  • A typical computer system
  • Hardware (HW) Software - terminology, layered
    organization)
  • Operating Systems
  • Data in the Computer

7
Computer Architecture What is it?
  • Computer architecture is the computer as seen by
    the user
  • - Amdhal et al, (64)
  • ...by architecture, we mean the structure of
    the modules as they are organized in a computer
    system...
  • - Stone, H. (1987)
  • The architecture of a computer is the
    interface between the machine and the
    software
  • - Andris Padges
  • IBM 360/370 Architect

8
Architecture the building blocks
  • Structure -static arrangement of the parts (plan)
  • Organization - dynamic interaction of these parts
    and their management (design)
  • Implementation - the design of specific building
    blocks (construction)
  • Performance evaluation - the behavior study of
    the system (decorative treatment)

9
Computer Architecture Disciplines
  • Hardware/software structure
  • Algorithms and their implementation
  • Language Issues and programming models

10
A Brief Architectural History of the Computer
  • Can we define the date of the computer
    invention?

11
A Brief Architectural History of the Computer
cont.
  • The Abacus - 500 B. C. (Greeks and Romans
    Civilization)

Modern Abacus
The Roman Abacus Copy
12
A Brief Architectural History of the Computer
cont.
  • Blaice Pascal, a noted French mathematician,
    invented a calculating machine (without
    constructing it) by 1642 (at the age of 19)

13
A Brief Architectural History of the Computer
cont.
  • In 1801, Joseph Marie Jacquard invented a loom
    that used punched cards

14
A Brief Architectural History of the Computer
cont.
  • In early 1800s, Charles Babbage and Augusta Ada
    Byron (the first computer programmer)
    mechanical calculating machine, called
    analytical engine.

15
A Brief Architectural History of the Computer
cont.
  • In the same time George Boole developed the
    binary theory (Boolean Logic).
  • Relation of binary arithmetic with this logic
    made it possible implementing the modern
    electronic computers

16
A Brief Architectural History of the Computer
cont.
  • In the later 1930, 1940 Mark I was built by
    Howard H. Aiken (IBM) and another computer by
    Conrad Zuse (both with decimal numbers)
  • In 1939 ABC (Atanasoff Berry Computer) a
    binary-based machine with vacuum tubes for
    switching
  • Finally, between 1943-1946 the first
    all-electronic digital computer was developed
    (named ENIAC) by Mauchly Eckert

17
The ENIAC
18
A Typical Computer System
Hard disk
Printer
Monitor
CD-Rom
Speaker
19
The Building Blocks CPU
  • CPU Central Processing Unit consists of
  • ALU Arithmetic and Logic Unit
  • Set of registers (including program counter
    keeping the address of the next instruction to be
    performed)
  • Control Unit decoding instructions and
    controlling internal data movement among
    different CPU parts
  • Interface Unit moves data between CPU and other
    hardware components
  • And more

20
The Building Blocks Memory
  • The main memory primary storage or RAM Random
    Access Memory
  • Holds data or a piece of a program code
    (instructions)
  • Consists of a large number of cells, each
    individually addressable.
  • Cell is called byte and consists of 8 bits
    (binary elements holding 0 or 1)
  • Usually a word consists of 4 bytes.
  • In most cases volatile memory
  • The multilevel cash - an intermediate stage
    between ultra-fast registers (inside CPU) and
    much slower main memory.
  • Most actively used information in the main memory
    is duplicated in the cache, which is faster, but
    of much lesser capacity.

21
CPU Memory Organization
22
Levels of Representation
temp vk vk vk1 vk1 temp
High Level Language Program (e.g., C)
Compiler
lw to, 0(2) lw t1, 4(2) sw t1, 0(2) sw t0,
4(2)
Assembly Language Program
Assembler
0000 1001 1100 0110 1010 1111 0101 1000 1010 1111
0101 1000 0000 1001 1100 0110 1100 0110 1010
1111 0101 1000 0000 1001 0101 1000 0000 1001
1100 0110 1010 1111
Machine Language Program
Machine Interpretation
Control Signal Specification

23
The Datapath example
Memory
I/O
24
HW Design Principles
  • CISC vs. RISC
  • Instructions directly executed by hardware
  • Maximize instruction issue rate (ILP)
  • Simple instructions (easy to decode)
  • Access to memory only via load/store
  • Plenty of registers
  • Pipelining

25
Computing System
Application (Netscape)
Operating
Compiler
System (Windows 98)
Software
Assembler
Instruction Set Architecture
Hardware
I/O system
Processor
Memory
Datapath Control
Digital Design
Circuit Design
transistors
  • Coordination of many levels of abstraction

26
Operating System (OS)
User Interface (UI)
Application
Application UI
Kernel
File System
Network Modules
I/O drivers
27
Operating System
  • OS is a broker among the computer hw and the
    user applications
  • OS itself is a software
  • OS is usually stored on a hard disk
  • the bootstrap or IPL (Initial Program Load) is
    stored within the non-volatile computer memory

28
Operating System - Multiprogramming
  • A multiprogramming OS allows running many
    programs - each running program is referred as a
    process.
  • The kernel creates a process by allocating
  • some memory,
  • loading program code from a peripheral storage
    into the newly allocated space,
  • and starting its execution.

29
Operating System Multiprogramming
  • Each process is identified by its
  • PID,
  • memory space allocated to it by the OS,
  • location of the program code,
  • last values of all the registers, a program
    counter, a stack
  • A process may split itself into multiple
    'daughter' sub-processes or threads that execute
    in parallel, running different instructions on
    much of the same resources and data. This is
    often done for GUIs (Graphical User Interfaces)

30
Operating System Multitasking
  • Multitasking parallel tasks executing
  • Control - the program access to the CPU and
    memory
  • OS scheduler decides when to pass the control
    from one task to another
  • Context-switch control is passed to a process
    by the kernel
  • Cooperative multitasking each program that gets
    the CPU, runs until it decides to return the
    control to the kernel
  • Preemptive multitasking - all programs are given
    regular time on the CPU
  • A process may be blocked by referring to a
    peripheral device, then the control is taken from
    it by the kernel

31
Interrupts
  • Interrupts are central to operating systems as
    they allow the OS to deal with the unexpected
    activities of running programs and the world
    outside the computer (what also?)
  • When an interrupt is received, the HW suspends a
    currently running program by pushing the current
    state (including registers) on a process stack.
  • Interrupts may come from either the computer's
    HW, or from the running program. The OS kernel
    deals with each interrupt.

32
Operating System Virtual Memory
  • If a program tries to access memory that isn't in
    its current range of accessible memory, but has
    been allocated to it, the kernel will receive an
    INT.

33
Operating System Virtual Memory
  • Under UNIX this kind of interrupt is referred to
    as a page fault.
  • Then using a special table (yellow pages), the
    OS finds from where to load the needed pages
  • Less recently used pages inside the memory then
    are thrown, and the needed pages are loaded
    instead of them this process is called swapping
  • Frequently used pages in the same memory are
    raised to the cash (the same process is repeated
    for the multilevel cash)

34
Operating System Other Features
  • Protected and supervisor modes of tasks executing
  • File system management
  • Networking
  • I/O Drivers
  • Users Administration

35
Data Representation in the Computer
  • Binary representation (characters integers we
    will see)
  • Image Data Representation
  • Audio Data Representation
  • Data Safety (examples parity code)
  • Data Compression

36
Counting in Different Bases
  • Counting in base 10 (digits 1-9)
  • Counting in base 5 (digits 1-4)

37
Representing Characters
  • ASCII encoding (American Standard Code for
    Information Interchange)
  • Each character is represented by a byte
  • Other representations possible too (Unicode,
    EBCDIC)

38
Representing Integers
  • Computers represent integers using a base-2
    positional notation.
  • So the number 101011 means
  • 1?25 0?24 1?23 0?22 1?21 1?20
  • 1?32 0?16 1?8 0?4 1?2 1?1
  • 43

39
Operating System Virtual Memory
  • Virtual memory addressing - means that the kernel
    can choose which memory each program may use at
    any given time.
  • This implies that the OS may allocate the same
    space for multiple tasks.

40
Arithmetic (binary basis) similar to the decimal
41
Representing Integers
  • The first few binary numbers are 0000.........
    ...........0 0001....................1 0010...
    .................2 0011....................3 0
    100....................4 0101...................
    .5 0110....................6 0111.............
    .......7 1000....................8 1001.......
    .............9 1010....................10 1011
    ....................11 1100....................1
    2 1101....................13

42
Converting decimal to binary
  • 123 1111011
  • 2
  • 61 ? remainder 1
  • 2
  • 30 ? remainder 1
  • 2
  • 15 ? remainder 0
  • 2
  • 7 ? remainder 1
  • 2
  • 3 ? remainder 1
  • 2
  • 1 ? remainder 1
  • 2
  • 0 ? remainder 1

43
Converting decimal to binary
102 1100110 2 51 ? remainder 0
2 25 ? remainder 1 2 12 ? remainder
1 2 6 ? remainder 0
2 3 ? remainder 0 2 1 ? remainder 1
2 0 ? remainder 1
Most significant bit
44
Converting decimal to binary
102 1100110 2 51 ? remainder 0
2 25 ? remainder 1 2 12 ? remainder
1 2 6 ? remainder 0
2 3 ? remainder 0 2 1 ? remainder 1
2 0 ? remainder 1
Least significant bit
45
Representing Signed Integers
  • To handle negative integers, we need to use one
    of the bits to store the sign.
  • The rest of the bits store the absolute value of
    the number.
  • Hence this is known as "signed magnitude"
    representation.

46
Representing Signed Integers
  • If we use the first ("top") bit for the
    sign 0000....................0 0001........
    ............1 0010....................2 0011
    ....................3 0100....................
    4 0101....................5 0110.............
    .......6 0111....................7 1000.....
    ...............0 1001....................1 1
    010....................2

47
Adding binary numbers
  • The previously seen adding op. works only for
    unsigned numbers.
  • For signed numbers it's much more complicated.
  • Try and work out a scheme yourself (hint you
    need to consider four cases).

48
Two's complement representation
  • Another representation scheme makes addition and
    subtraction easy, regardless of the signs of the
    operands.
  • Rather than using the first bit as a sign bit, we
    give it a negative weight.
  • In other words, if its the eighth bit, its
    positional value is -27, rather than 27

49
Two's complement representation
  • So now the number 101011 means
  • 1?-25 0?24 1?23 0?22 1?21 1?20
  • 1?-32 0?16 1?8 0?4 1?2 1?1
  • -21

50
Two's complement representation
  • Now the first few numbers are 0000............
    ........0 0001....................1 0010....
    ................2 0011....................3
    0100....................4 0101.................
    ...5 0110....................6 0111.........
    ...........7 1000....................8 1001.
    ...................7 1010....................6

51
Negation with two's complement
  • Even though the top bit indicates the sign, we
    can't just flip the bit to negate a number.
  • To negate a two's complement number, we have to
    flip all its bits and then add 1
  • 00101010 (-003208020) 42
  • 11010101 (-12864016041) -43
  • 11010110 (-43 1) -42

52
Addition with two's complement
  • The mechanics are exactly the same as in the
    earlier example (except we only have 8 bits so we
    throw away the extra one)
  • 11100101 ? -27 01011101 ?
    93 01000010 ? 66

53
Addition with two's complement
  • Consider the addition of two large positive
    numbers
  • 01100101 ? 101 01011101 ?
    93 11000010 ? -62
  • Oops!
  • This is known as overflow.

54
Subtraction with two's complement
  • X Y X (-Y)
  • Therefore to subtract two's complement numbers,
    negate the second operand and add.

55
Limitations of representations
  • None of these number representations acts exactly
    like the integers.
  • Infinitely many integers, but only 2N binary
    numbers for a specific N-bit representation.

56
Limitations of representations
  • That means some operations will overflow.
  • If the program doesn't crash when that happens,
    it will simply produce wrong answers (which is
    worse!)

57
References Further Reading
  • The Architecture of Computer Hardware and
    Systems Software by Irv Englander
  • Introduction to Computer Organization by Mark
    Schmalz
  • Computer Organization and Design by Morgan
    Kaufmann
  • A lot of Wikipedia ? ( some personal experience)
Write a Comment
User Comments (0)
About PowerShow.com