배고픈 개발자 이야기

0.운영체제 본문

전산학/운영체제

0.운영체제

이융희 2019. 9. 14. 15:38
728x90

운영체제

컴퓨터 하드웨어 바로 위에 설치되어 사용자 및 다른 모든 소프트웨어와 하드웨어를 연결하는 소프트웨어 계층- 컴퓨터 시스템의 자원을 효율적으로 관리

자원 : 프로세서, 기억장치, 입출력장치 / 프로세스, 파일, 메시지

좁은의미 : 커널 - 부팅후 메모리 상주

넓은의미 : +주변 시스템 유틸리티를 포함한 개념

 

-single tasking - MS-DOS

-multi tasking - UNIX, MS Windows

-single user - MS-DOS, MS Windows

-multi user - UNIX, NT server

-batch processing

-time sharing(빠른 응답 시간), interactive한 방식

사람이 느끼기에 빠른시간에 처리, 자원을 최대한 활용

-Realtime OS - 정해진 시간 안에 어떠한 일이 반드시 종료됨이 보장되어야 하는 실시간시스템을 위한 OS

CPU 스케줄링, 메모리 관리, 파일관리

mode bit : 0 - os명령 수행, 1 - 사용자 프로그램 명령 수행

 

Device Controller

-I/O장치를 관리하는 일종의 작은 CPU

-제어 정보를 위해 control register, status register를 가짐

-local buffer를 가짐 (일종의 data register)

-Device Controller는 I/O가 끝난 경우 CPU에 interrupt로 알림

DMA controller

메모리는 원칙적으로 cpu만 접근 가능하나 다른 장치가 접근 가능하게함

cpu가 일을 중단하고 일처리를 하는 오버헤드를 줄여줌(메모리에 복사)

모든 입출력 명령은 특권 명령(mode bit 0)

사용자 프로그램은 어떻게 I/O를 하는가? SYSTEM CALL을 통해(OS 함수)

사용자 프로그램이 직접 interrupt를검(mode bit 0) 사용자 요청 SYSTEM CALL을 OS가 수행

-여기서 interrupt는 software interupt (TRAP) : Exception, SYSTEM CALL

timer interrupt는 하나의 프로그램의 시스템 독점을 방지

인터럽트 관련 용어

-인터럽트 벡터 : 해당 인터럽트의 처리 루틴 주소를 가지고 있음

-인터럽트 처리 루틴 : 해당 인터럽트를 처리하는 커널 함수(인터럽트 핸들러)

 

4. OS : CPU 스케줄러, 문맥교환, 스핀락vs세마포어 / +데드락

Introduction - how the managed / how work

Operating System이란?

  • 컴퓨터 사용자와 컴퓨터 하드웨어 사이의 중개자 역할을 하는 프로그램

Goals

  • 사용자 프로그램을 실행하고 사용자 문제를 더 쉽게 해결할 수 있게 해줍니다.
  • 컴퓨터 시스템을 사용하기 편리하게 만든다.
  • 컴퓨터 하드웨어를 효율적으로 사용한다.

컴퓨터 시스템은 4가지 구성요소로 나눌 수 있습니다.

  • Hardware - provides basic computing resources

    • CPU, memory, I/O devices
  • Operating system

    • Controls and coordinates use of hardware among various applications and users
  • Application programs - define the ways in which the system resources

    are used to solve the computing problems of the resources?

OS is a resource allocator

  • Manages all resources
  • Decides between conflicting requests for efficient and fair resource use

OS is a control program

  • Controls execution of programs to prevent prevent errors and improper use of the computer

"The one program running at all times on the computer" is the kernel.

Everything else is either a system program (ships with the operating system) or an application program.

Bootstrap program is loaded at power-up or reboot

  • Typically stored in ROM or EPROM, generally known as firmware
  • Initializes all aspects of system
  • Loads operating system kernel and starts execution

https://www.youtube.com/watch?v=oJMYYMIGVMU&list=PLTZbNwgO5ebqnympIYe2GX4hjjsS9Psdm&index=2

2강의부터 차근차근 다시 들어볼만한 강의

Comments