[Computer architecture] 성능(Performance)

2024. 9. 15. 18:41·Computer architecture

 

 

 

 

Instruction Set Architecture (ISA)
• 하드웨어와 저수준 소프트웨어 간의 인터페이스
• 프로세서가 명령어를 해석하고 실행하는 방법
• 개발자가 하드웨어의 자세한 내부 작동을 이해할 필요 없이 소프트웨어를 작성할 수 있도록 함.
• 이식성: 하드웨어는 소프트웨어를 변경하지 않고도 진화할 수 있음.
• 명령어가 실행되는 방법, 사용 가능한 레지스터, 데이터에 액세스하고 조작하는 방법에 대한 약속.

 

* FLOPS : FLoating-point Operations Per Second

* MIPS : Million Instructions Per Second

 

 

성능(Performance) 

 

- 알고리즘

  실행되는 operation의 수를 결정

 

 - 프로그래밍 언어, 컴파일러, 아키텍쳐

  operation당 실행되는 machine instruction의 수를 결정

 

 - 프로세서 및 메모리 시스템

  instruction이 얼마나 빠르게 실행될 지 결정

 

 - I/O 시스템(OS 포함)

  I/O 작업이 얼마나 빠르게 실행되는 지 결정

 

* 무어의 법칙 : IC 용량은 18~24개월마다 2배로 늘어난다.

 

 

성능 비교(Comparing Performance) 

 

(1) Response time (latency, execution time) :  How long does it take to do a task/job?

 

 

 

실행 시간(Execution Time)

 

• 경과 시간(Elapsed time) : Total response time, including all aspects, not good for comparison

• CPU 시간(CPU time) 

 - CPU time = user CPU time + system CPU time

 - User CPU time = User mode, time running actual instructions of the program

 - System CPU time = Kernel mode (hardware access, I/O, memory management)

프로그램에 있는 코드를 실행하는데 소요되는 시간은 user CPU 시간이므로

앞으로 언급되는 Execution Time = user CPU 시간

 

 

성능(Performance)은 실행시간(execution time = user CPU time)에 의해 결정된다.

 

*Clock rate = Clock frequency

*Clock Cycle Time = Clock period

 

• Trade-off often exists between clock rate against cycle count (clock cycles)

 

 

Instruction Count

• Determined by program, ISA and compiler

 

CPI (clock Cycles Per Instruction)

• Determined by CPU hardware

• If different instructions have different CPI, calculate Average CPI for instruction mix

 

 

 

 

 

 

(2) Power

Power ∝ 1/2 × Capacitive load(저장 공간) × Voltage(전압)^2 × Frequency(주파수)

 

 

 

ILP vs Explicitly parallel programming

 

* Instruction-level parallelism (ILP)는 컴퓨터 아키텍처에서 명령어를 동시에 실행하여 성능을 향상시키는 기법입니다. ILP는 프로세서가 여러 명령어를 동시에 처리할 수 있는 능력을 의미하며, 이를 통해 전체 프로그램의 실행 속도를 높일 수 있습니다.

* Explicitly parallel programming은 프로그래머가 병렬성을 명시적으로 코드에 포함시켜서 병렬 처리를 제어하는 프로그래밍 방식입니다. 이 방식에서는 프로그래머가 어떤 코드가 병렬로 실행될지를 명확히 지정하고, 병렬 작업의 분할 및 조정도 직접 처리합니다. 병렬 처리를 활용하여 성능을 극대화할 수 있지만, 프로그래머의 작업이 복잡해질 수 있습니다.

 

관계 및 차이점

  1. 병렬성 수준:
    • Explicitly Parallel Programming: 작업이나 스레드 수준에서 병렬성을 다루며, 소프트웨어에서 병렬성의 분할과 관리를 직접 수행합니다.
    • ILP: 명령어 수준에서 병렬성을 다루며, 하드웨어에서 명령어의 병렬 실행을 자동으로 관리합니다.
  2. 제어 및 관리:
    • Explicitly Parallel Programming: 프로그래머가 병렬 처리의 세부 사항을 직접 제어하고, 동기화 및 데이터 공유를 직접 관리합니다.
    • ILP: 하드웨어가 명령어의 병렬성을 자동으로 탐지하고 처리하므로, 프로그래머가 직접 개입할 필요가 없습니다.
  3. 병렬성 활용:
    • Explicitly Parallel Programming: 전체 애플리케이션의 구조를 병렬로 디자인하고, 작업 분할과 스레드 관리 등을 통해 병렬성을 최대화합니다.
    • ILP: 단일 프로세서 내에서 명령어 간의 병렬성을 최대화하기 위해 하드웨어적으로 명령어 파이프라인과 실행 유닛을 활용합니다.

 

멀티 프로세서

명시적 병렬 프로그래밍이 필요하다. (ILP와 비교)

어려운 점 : 성능 최적화 위한 프로그래밍, 부하 균형 조정, 통신 및 동기화 최적화

 

 

SPEC Benchmark

Standard Performance Evaluation Corp에서 개발하는 

성과 측정에 사용되는 일반적인 프로그램 세트 

SPEC CPU benchmark, SPEC Power benchmark...

 

 

Amdahl’s Law

 

 

성능 지표로서의 MIPS(한계)

 

- Doesn’t account for

• Different ISAs between computers

• Differences in complexity between instructions

 

- CPI varies between programs on a given CPU

 

 

RISC vs CISC

 

RISC (Reduced Instruction Set Computing) architecture

▪ Example : MIPS architecture, ARM, PowerPC, etc.

 

▪ Advantages: Simplified and Small Set of Instructions

 - Faster Execution

 - Power-efficient

 - Scalability: Easier implementation of features like parallelism

 

▪ Disadvantages: Simplified and Small Set of Instructions

 - More Instructions for Complex Tasks: increasing program size

 

 

CISC (Complex Instruction Set Computing) architecture

▪ Example : x86, x86-64 (Intel, AMD)

 

▪ Advantages

 - Reduced Program Size

 - Compatibility with older instructions

 

 • Disadvantages

 - Slower Execution and Higher Power Consumption

'Computer architecture' 카테고리의 다른 글
  • [Computer architecture] Pipeline
  • [Computer architecture] Data Path
  • [Computer architecture] 컴퓨터의 산술 연산(Arithmetic Operations)
  • [Computer architecture] MIPS Instructions
vysryoo
vysryoo
  • vysryoo
    vysryoo
    vysryoo
  • 전체
    오늘
    어제
    • 분류 전체보기 (129)
      • Python (20)
      • Data structure (12)
      • Algorithm (14)
      • Operating system (18)
      • Programming language theory (12)
      • Computer architecture (6)
      • Softeware engineering (8)
      • Multicore (2)
      • Data Base (3)
      • Problem solving (24)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
vysryoo
[Computer architecture] 성능(Performance)
상단으로

티스토리툴바