Computer Science/Computer Architecture

[컴퓨터구조] Lecture 03: Computer Abstractions and Technology - Part2

kangkyunghyun 2026. 2. 8. 15:58
728x90
반응형

경희대학교 김정욱 교수님의 컴퓨터구조 강의를 기반으로 정리한 글입니다.

Measuring Performance

  • Clock speed
  • CPI(Clock Cycles per Instruction)
  • MIPS(Millions of Instructions per Second)
  • Etc.

Performance

Defining performance

  • 상황에 따라 성능이 다르게 평가될 수 있음

Time

  • Response time(=Execution time): Second(s)/Program

CPU execution time

Clock cycle Per Instruction(CPI)

  • 각 명령이 수행되기 위해 필요한 clock cycle 개수

CPU performance equation

Example

  • 동일한 CPU라고 가정한다면(Clock rate가 같다면) CPU clock cycles이 적은 Code sequence 2가 더 빠름

Understanding Program Performance

Algorithm(Instruction count, CPI)

  • 알고리즘을 어떻게 짜냐에 따라 instruction count가 달라지고 CPI도 달라질 수 있음

Programming Language

  • 프로그램에 따라 instruction count가 달라지고 CPI도 달라질 수 있음

Compiler

  • source language instructions를 computer instructions로 변환하는 과정을 결정

Instructions Set Architecture(ISA)

  • 명령어 집합 구조 → 덧셈, 곱셈 같은 약속들을 CPU에서 정해둔 것
  • 함수마다 필요한 instruction 수가 다르고, instruction마다 필요한 cycle도 다름, processor의 전체 clock rate도 다름

MIPS(Million Instructions Per Second)

  • 1초에 몇 백만 개의 instruction을 실행시킬 수 있는지

  • 전체 명령어 실행 속도를 의미함 → 명령어 하나가 얼마나 많은 일을 수행하는지, 오래 걸리는지는 알 수 없음
  • 같은 컴퓨터에서도 어떤 프로그램을 실행하느냐에 따라 값이 다름
  • 새 프로그램이 더 많은 명령어를 실행하지만 각각의 속도가 빠르다면 → MIPS는 performance와 독립적으로 다양해질 수 있음

Summary

728x90
반응형