Computer Science/Computer Architecture

[Computer Architecture] Computer abstraction & Technology

LeeJaeJun 2023. 12. 30. 23:37
728x90
반응형

Understanding Performance

  • Algorithm: Determines number of operations executed. ex) sorting, matrix multiply
  • Programming language, compiler, architecture: Determine number of machine instructions executed per operation
    • Programming language: ex) Using object oriented language, you may require accessing memory multiple times when accessing data.
    • Compiler: This is because the degree of optimization vaires depending on the compiler. It also varies depending on options within the compiler.
    •  Architecture: CISC(ex. Intel IA-32, Intel IA-64) has a relatively small number of insturctions. In contrast, RISC(ex. ARM, MIPS, RISC-V) has a relatively large number of instructions.
  • Processor and memory System: Determine how fast instructions are executed.
  • I/O system(including OS): Determines how fast I/O operations are executed. (ex. Disk(SSD), Network)
    • I/O devices' speed is very slow compared to processor.
    • When a program accesses an I/O device during execution, hundres or thousands of cycles in the number of clock cycles of the process pass.
    • How quicklly access to I/O devices or how little access to I/O has a signficant impact on performance.

 

Components of a computer

  • Same components for all kinds of computer: desktop, server, embedded
  • Input/output includes:
    • User-interface devices: display, keyboard, mouse
    • Storage devices: hard disk, CD/DVD, flash
    • Network adpaters: for communicating with other computers
  • Processor

 

Memory

  • Volatile main memory: loses instructions and data when power off.
  • Non-volatile secondary memory:
    • Magnetic disk
    • Flash memory
    • Optical disk(CDROM, DVD)
     

SSD

 

Class of Computers

  • Personal computers
    • General purpose, variety of software
    • Subject to cost/performance tradeoff
  • Server computers
    • Network based
    • High capacity, performance, reliability
    • Range from small servers to building size
    • Cloud computing: Google, Amazon, MS
  • Supercomputers
    • High-end scientific and engineering calculations
    • Highest capability but represent a small fraction of the overall computer market
    • Use only for special purposes
  • Embedded computers
    • Hidden as components of systems
    • Most prevalent type
    • Stringent power/performance/cost constraints
    • Designed to run one application
    • Annual growth rate of 40% (vs. 9% for desktops and servers)
    • SW is integrated with H/W and delivered as a single system
    • Unique application requirements(performance, cost, and power)
    • Low tolerance for failure
      • If the camera software breaks down, there is a high possibility that people will no longer buy the product due to a decrease in trust in the product

 

The computer revolution

  • Progress in computer technology: Underpined by Moore's Law
    • Moore's law: the number of transistors per integrated circuit would double every 18 months.
  • Makes novel applications feasible
    • Smartphones
    • Computers in automobiles
    • AI, Machine Learning, Big data
    • Human genome project
  • Computers are pervasive

 

Neural Processing Unit(NPU, 신경망 처리 장치)

TPU: specially designed to perform high-speed matrix multiplication operations required in machine learning

 

 

Uniprocessor Performance

Almost 1% per week advancement

Limitation

  1. The existing computer architecture was designed to execute instructions in parallel, but this reached its limits.
  2. No matter how fast the processor is made, frequent access to memory will reduce the speed. Memory access speed is still relatively slow. So a fast processor is of no use.
  3. As clock speed increases, power consumption increases. I can't handle this, so I can't increase the speed.

Performance Improvement Contributor

Technology

  1. Processor
    • logic capacity: number of transistors that can be placed on a chip. about 30% per year
    • clock rate: number of cycles the CPU executes per second 
  2. Memory (Memory capacity and cost per bit are mainly developed)
    • DRAM capacity: about 60% per year (4x every 3 years)
    • Memory speed: about 10% per year (The memory speed itself did not increase that much)
    • Cost per bit: improves about 25% per year
  3. Disk
    • Capacity: about 60% per year

Computer Architecture

  1. Exploiting Parallelism (single processor)
    • Pipelining
    • Superscalar
    • VLIW(Very long Instruction Word)
  2. Multiprocessor
  3. Media Instructions (SIMD)
    • SIMD(Single Instruction Multiple Data): Generally, one data is processed with one instruction, but this method processes multiple data with one instruction.
  4. Cache Memory:  small and fast

 

Superscalar Processors

: Structure with multiple computing units in one chip.

 

Multicore Processor

: Integrated circuit containing two or more processors. Usually, each of these cores is a super scalar processor.

 

 

Eight Great Ideas

  • Design for Moore's Law
  • Use abstraction to simplify design
    • Software engineers can use the overall hardware by knowing only the abstracted interface of the hardware, even if they do not know the internals of the hardware.
    • Hardware engineers can design hardware independently of software by designing based on such interfaces.
  • Make the common case fast
    • Designing frequently occurring cases more quickly yields greater results than quickly designing infrequently occurring cases.
  • Performance via parallelism
  • Performance via pipelining
    • Overlapping the execution of multiple Instructions
  • Performance via prediction
  • Hierarchy of memories
    • The closer it is to the processor, the faster it is, but the smaller the memory it uses. Conversely, if it is far from the processor, it will use slower but larger memory.
    • The hierarchical structure makes it appear to the processor as if there is a large capacity and fast memory.
  • Dependability via redundancy
    • If you have multiple devices in redundancy, the entire system can continue to operate even if one of them breaks down.

 

Structure of Processor

  • Control: tells teh datapath, memory, and I/O devices what to do
  • Datapath: performs the arithmetic operations

 

How does a machine code program execute?

Sequential execution

  1. Fetch: Brings instructions from memory.
  2. Decode: Interprets the read Instruction to determine what do execute.
  3. Execution: Perform work according to interpretation. Datapath executes the instruction as directed by control.
  4. Completion: At program completion the data to be output resides in memory.

 

The Hardware/Software Interface

  • Why the text sub-title is the hardware/software interface?
    • Hardware needs software to operate
  • Instruction Set Architecture(ISA)
    • It is an interface between hardware and software. It represents the way they communicate.
    • Everything programmers need to know to make a binary program to wrok
    • System attributes that have a direct impact on the logical execution of a program.
      • Instructions, Registers Available, Register Size, Data representation, Memory addressing
  • The interface is important since it influences the performance of the computer.
  • It also allows a given instruction set to work on different machines.
  • A given ISA may have different implementations in hardware.
    • Computer Architecture vs. Computer Ogranization
    • Computer Architecture includes ISA.
    • Computer Organization just mean how to design hardware.
    • Computer architecture emphasizes the software aspects that deal with the interaction between the user or the system being handled and the computer. Differently, computer organization emphasizes hardware aspects that deal with the design and configuration of computer hardware.

 

Instruction Set Architecture(ISA)

  • A set of assembly language instructions(ISA) provides a link between software and hardware.
  • Given an instruction set, software programmers and hardware engineers work more or less independently. (Abstraction)
  • ISA is designed to extract the most performance out of the available hardware technology.
  • Examples: ARM (cell phones), Intel x86 (i9, i7, i5, i3), IBM/Motorola PowerPC (old Macs), MIPS, RISV-V

 

ISA Evolution

  • CISC(Complex Instruction Set Computing):
    • Early trend in ISA Design was to add more and more instructions to new CPUs to do elaborate operations.
    • VAX architecture had an insturction to multiply polynomials.
    • It was designed that one command can do many things.
    • It is characterized by its large number of instructions and complexity.
    • Examples: Intel
  • RISC(Reduced Instruction Set Computing):
    • A single instruction can only perform one operation.
    • Keep the instruction set small and simple, make it easier to build fast hardware.
    • Let software do complicated operations by composing simpler ones. (through compiler)
    • Examples: ARM, MIPS, RISC-V
CISC RISC
Complex structure Simple structure
Complex and many instruction Simple and minimal instruction
Various instruction length Fixed instruction length
Few register Many register
Slow speed High speed
for the personal computer for server or workstation

 

Computer Organization

This refers to content related to actual hardware design.

  • Organization: Physical details that are transparent to a programmer, such as
    • Hardware implementation of an instruction
    • Control signals
    • Memory technology used
  • This is what softare programmer don't need to know.
  • Example: System/370 architecture has been used in many IBM computers, which widely differ in their organization.
728x90
반응형