소프트웨어 전공/시스템 프로그램

    [System Program] [7] [Virtual Memory]

    [System Program] [7] [Virtual Memory]

    > A System Using Physical Addressing; 간단한 시스템에 사용 > A System Using Virtual Addressing # MMU(Memory Management Unit); VA를 PA로 변환해주는 역할 > Address Spaces # Linear address space {0, 1, 2, 3, 4, ...} # Virtual address space {0, 1, 2, 3, 4, ..., N-1}; 2^n가지의 virtual address # Physical address space {0, 1, 2, 3, 4, ..., M-1}; 2^m가지의 physical address > VM as a Tool for Caching # Virtual Memory; 실제 메모리 크..

    [System Program] [9] Concurrent Programming

    [System Program] [9] Concurrent Programming

    > Iterative Servers (반복 서버) one thread로 여러 클라이언트의 요청을 처리하는 방식 (순차적) 한 번에 하나의 request만 처리 가능하다. (sequential하게 처리) -> 연결된 서버와 클라이언트 간 통신 시간이 길어지면 다른 클라이언트의 대기 시간이 길어질 수 있다. => Solution: concurrent servers(병행/병렬 서버)를 사용한다. 여러 클라이언트의 요청을 한 번에 처리하기 위해 multiple concurrent flow를 사용 > Concurrent Servers Concurrent server를 구현하는 방식에는 3가지 방법이 있다. # Process-based 커널이 multiple logical flow를 생성; 각 flow는 priva..

    [System Program] [5] Exceptions and Processes

    [System Program] [5] Exceptions and Processes

    > Control flow (제어 흐름) # 프로세서는 한 번에 하나의 instruction을 실행한다. 시작부터 끝까지, CPU는 일련의 instuction들을 하나씩 읽고 처리한다. -> CPU's control flow; 프로그램에서 실행되는 각 구문, 명령어나 함수가 호출되는 순서 > Altering the Control Flow 순차적으로 진행되는 제어 흐름의 변화를 일으키는 요인 # program state를 변화시키는 요소 Jumps and branches Call and return # system state를 변화시키는 요소 -> exceptional control flow 발생 Data arrives from a disk or a network adapter Instruction div..

    [System Program] [4] Cache Memory

    [System Program] [4] Cache Memory

    > Cache Memories Cache memories are small, fast SRAM-based memories managed automatically in hardware 이번 강의에서 cache는 CPU와 Main memory 사이의 data access time 차이를 줄여주는 역할을 하는 메모리로 제한 > Cache Memory 구조 Cache size: C = B * E * S data bytes > Addressing Cache; 캐시를 찾는 방법 # m bits는 2^m가지의 address를 표현가능하다. > Direct-Mapped Cache; 1 line per set # set selection; set index를 사용해서 set에 접근 # line matching; tag가..

    [System Program] [3] Memory Hierarchy

    [System Program] [3] Memory Hierarchy

    [Memory Hierarchy] > Random-Access memory(RAM) # 주요 특징 RAM is traditionally pachaged as a chip 저장 단위는 'cell' (one bit per cell) 여러 RAM chips가 메모리를 구성한다. # SRAM (Static RAM) 전원 공급이 유지된다면, 값(value)를 무한이 유지한다. 접근이 빠르고, 비싸다. # DRAM (Dynamic RAM) 접근이 SRAM에 비해 상대적으로 느리고, 싸다. > Connecting CPU and Memory # bus; CPU와 memory는 bus에 의해서 연결된다. -> bus는 주소, 데이터, 제어 신호를 전달하는 collection of parallel wires이다. > Co..

    [System Program] [1] Data Presentation

    [System Program] [1] Data Presentation

    [0. Overview] # compile [.cpp, .h]-> preprocessing [.i, .ii]-> compilation [.s]-> assemble [.o, .obj]-> linking[.exe] # objdump: object file의 binary data를 확인 가능하게 해주는 리눅스 명령어/ reverse engineer # 'int's are not integers, 'float's are not reals - finite space 때문(수는 무한하지만, 컴퓨터 자료형의 표현 공간은 유한) Is x^2 >= 0? int는 4byte에 표현되지 않으면 overflow가 발생 Is (x+y)+z = x+(y+z) ? [1. Bits and Bytes] # Boolean Algebra..