3 min read

<운영체제> Computer Booting

<운영체제> Computer Booting

본 게시물은 영남대학교 곽종욱 교수님의 강의를 기반으로 제작되었습니다.


  1. Computer Startup
    • Bootstrap program : 컴퓨터 시작 시 자동으로 구동되는 프로그램
    • 이는 펌웨어(ROM or EEPROM)-BIOS(CMOS)에 저장되어있다.
    • Firmware : Hardware(수정이 불가한 물리적인 device)와 Software(수정 가능한 프로그램)의 중간단계
    • POST(Power On Self Test)-Routine을 진행 : 전원이 인가된 후 스스로 점검함.
    • 이후 CPU Register에서 디바이스까지 초기화 진행
    • 마지막으로 OS Kernel의 위치를 발견해서, 커널을 실행(execution)시킨다.
    • Two step process(BIOS -> boot sector -> OS Location)를 거친다
BIOS에서 BIOS 프로그램 실행 후, Boot sector에 Bootstrap코드를 불러온다. 이후 메모리 버스를 통해 메인 메모리에 할당시킴
  1. Computer System Organization
    • Common bus : 아래 그림의 디바이스들을 연결하는 선들이 bus이다!
    • 즉 제어신호가 왔다갔다하는 인터페이스이다.
    • 동시에 여러개의 신호를 나르지 못함 -> 한번에 하나의 신호만 carry!
    • 그래서 Memory-Cycles을 얻기위해 서로 경쟁

computer-system operation
  1. Computer-System Operation
    • General Operation인 상황
      • CPU와 I/O 디바이스는
      • CPU moves data from/to main memory to/from local buffers
      • I/O moves data from the device to local buffer of controller
      • Device Controller
        • CPU에게 Interrupt를 발생시켜 어떤 작업이 끝났다고 보고함
    • Device / Device controller / Device driver
      • Device : 소위 말하는 장비 그 자체
      • Device-Controller : 디바이스가 동작하게 하는 장비(하드웨어)
      • Device-Driver : 디바이스를 설치하는 소프트웨어(OS에 포함되는 경우도 존재)
  1. Common Fuctions of Interrupts
    • 컴퓨터와 상호작용하는 모든 수단은 Interrupt이다.
    • Interrupt service routine에 interrupt vector를 통해 제어를 준다.
    • Interrupt Vector(IVT) : 여러가지 Interrupt 종류들에 대해서 일괄적으로 모아놓는 이차원 배열의 Table이다.
    • Interrupt service routine(ISR) : 특정한 Interrupt에 대한 적절한 대응 방식 및 루틴
    • Interrupt architecture는 Interrupt종료 후 save point를 만들어 놔야한다.
    • Interrupt가 실행중 일때, 또 다른 Interrupt 발생 시 : Interrupt priotity
    • 우선 순위가 높은 Interrupt 먼저 처리하고 다시 돌아옴 ->Interrupt는 계층구조를 가진다
    • 우선 순위가 낮으면 disabled, 즉 발생하지 않도록 조치함.
    • Trap : Software-generated interrupt(error or user request)
    • cf) Interrupt는 Hardware에 의해 발생된다.
Common Fuctions of Interrupts-> Clock Interrupt

An operating system is Interrupt driven!