새발블로그

[System Programming] A tour on Computer System 본문

Computer Science/System programming

[System Programming] A tour on Computer System

EUG 2024. 1. 3. 23:11

compliation system

unix > gxx -o hello hello.c

gcc: 소스코드를 실행코드로 바꿀 수 있는 utility

Preprocessing
: Source program(text) -> Modified source program(text)
ex) hello.c -> hello.i

Compiliation
: Assembly program(text)
ex) hello.i -> hello.s

Assembly
: Relocatable object programs(binary)
ex) hello.s -> hello.o

Linking
: Executable object programs(binary)
ex) hello.o -> hello
이 때, 다른 object 도 결합

Running (HW organization)

  • bus and word : cpu, memory 간의 전송 단위
    • word size: 1/2/4/8 bytes
  • controller and adapter
    • Controller: Chipset in the device itself or on the system's main PCB
    • Adapter: Card that plugs into a slot on the PCB
  • instruction cycle
    • IF/ID/OF/EX/IC

Cache

L1 < L2 < L3

  • Exploits locality : 한 번 접근된 데이터는 또 다시 접근될 가능성이 높음

Multi-core Architectures

several processors(cores) integrated into a single inteegrated-circuit chip

Storage Hierarchy

regs -> L1 cache -> L2 cache -> L3 cache -> main memory -> local secondary storage -> remote secondary storage(cloud)

->> larger, slower, cheaper storage devices

Operating Systems

Functions of OS : User interface, Resource management, Process management, Networking, Security & Protection

OS abstraction

Processes
: context switching (cpu 데이터 보관)
Virtual memory
: physical memory에 일부만 저장
Files
: uniform vies

Network

remote execution by telnet

Concurrency

Multiple processes execute at the same time, using processors alternately
동시에 cpu가 번갈아가면서 사용되는 것( physically change x)

Parallelism

Supports multiple processors for the processes
여러 cpu에서 여러 process 작동 -> multi-core
하나의 cpu는 하나만 실행

Thread-level parallelism : Hyperthreading

동시에 실행하는 것처럼 보임

  • A technique that allows a single CPU to execute multiple flows of control
  • very short thread-switching time

hyperthreading은 하나의 core에서 thread를 교체하는 것
<->

multithreading

여러 개의 thread를 여러 core 에 배치하는 것

SIMD parallelism

Single-instructon multiple-date architecture