Computer Architecture - Chapter 1 Introduction

nathan·2021년 10월 18일
0

Computer Architecture

목록 보기
1/3

Computer Abstractions & Technology

Abstraction

Abstraction in Computer Architecture

  • hide lower-level details of computer systems (시스템의 자세한 사항들을 숨김으로)
  • in order to facilitate design of sophisticated systems (복잡한 시스템 설계를 쉽게 함)

Instruction Set Architecture(ISA) (=Architecture)

  • Interface between hardware and lower-level software
  • programmer가 다루는 computer system의 속성(형태)
    • concepture structure(state) and functional behavior (operation)
    • as distinct from the organization of the data flows and controls, the logic design, and the physical implementation
  • 명령어 집합 구조 : 하드웨어 최하위 계층 소프트웨어 사이의 인터페이스, 명령어, 레지스터, 메모리 접근, 입출력 등을 포함해서 정확히 작동하는 기계어 프로그램을 작성하기 위해 알아야 하는 모든 정보.

Computer System Inside

Classic 5 components

  • Processor = Datapath + Control
  • Memory
  • Input & Output

Input/Output includes

  • User-interface devices
    • display, keyboard, mouse
  • Storage devices
    • HDD, ODD(Optical disc drive), Flash
  • Network adpapters
    • for communicating with other computers

Inside the Processor(CPU)

  • Datapath

    • performs operations on data
    • ALU, registers, internal buses
  • Control

    • sequences(controls) the datapath, memory, and bus operations..
  • cf.cache memory

    • called on-chip cache or level-1 cache
    • small fast SRAM memory for immediate access to data

CPU Clocking

  • Digital hardware operations governed by a constant-rate clock

    • Clock period: duration of a clock cycle
      • e.g., 250ps = 0.25ns = 250 x 10^-12s
    • Clock frequecny(rate) : cycles per second (CPU 사이클)
      • e.g., 4.0GHz = 4000MHz = 4.0 x 10^9 Hz

CPU Performance and Its Factors

  • CPU execution time

    • = CPU clock cycles x clock cycle time
    • = CPU clock cycles / clock rate(frequency)
  • CPU 실행 시간 = 프로그램 CPU 클럭 사이클 수 X 클럭 사이클 시간

  • CPU 실행 시간 = 프로그램 CPU 클럭 사이클 수 / 클럭 속도

  • 클럭 속도와 클럭 사이클 시간은 역수 관계

  • GHz, MHz : 사이클 / 초 (클럭 속도를 나타냄)

  • Example:

    • Same instruction sets
    • Computer A : 4GHz, 10 seconds
    • Computer B : ?GHz, 6 seconds
    • B requires 1.2 times as many clock cycles as A.
  • Answer:

    • CPU time(A) = CPU clock cycles(A) / clock rate(A)
    • 10 seconds = CPU clock cycles(A) / (4 x 10^9 cycles/sec)
    • CPU clock cycles(A) = 10 sec. X 4 X 10^9 cycles/sec
    • CPU time(B) = CPU clock cycles(B) / clock rate(B)
      • = 1.2 X CPU clock cycles(A) / clock rate(B)
    • 6 seconds = 1.2 X 40 X 10^9 cycles / clock rate(B)
    • clock rate(B) = 1.2 X 40 X 10^9 cycles / 6 seconds = 8GHz

CPI (Clock cycle Per Instruction) : 명령어 당 클럭 사이클 수

  • CPU clock cylce 수 = 명령어의 수 X CPI
  • CPU Time = 명령어 수 X CPI / 클럭 속도 = 명령어 수 X CPI X 클럭 사이클 시간

Multiprocessors

  • Multicore microprocessors
    • More than one processor per chip
  • Requires explicitly parallel programming
    • Compare with instruction level parallelism
      • Hardware executes multiple instructions at once
      • Hidden from the programmer
    • Hard to do
      • Programming for performance
      • Load balancing
      • Optimizing communication and synchronization

For Good Performance

  • Algorithm
    • Determines number of operations executed
  • Programming language, compiler, architecture
    • Determine number of machine instructions executed per operation
  • Processor and memory system
    • Determine how fast instructions are executed
  • I/O system (including OS)
    • Determines how fast I/O operations are executed

8 Great Ideas for Performance

  • Design for Moore's Law
  • Use abstraction to simplify design
  • Make the common case fast
  • Performance via parallelism
  • Performance via pipelining
  • Performance via prediction
  • Hierarchy of memories
  • Dependability via redundancy(중복을 통한 신뢰성)

..

  • MIPS는 명령어 실행속도를 의미한다. (실행시간의 역수로 성능을 표시함)
  • MIPS = 명령어 개수 / 실행시간 X 10^6
    • = 명령어 개수 / ((명령어 개수 X CPI X 10^6)/클럭속도) = 클럭 속도 / CPI X 10^6
profile
나는 날마다 모든 면에서 점점 더 나아지고 있다.

0개의 댓글