운영체제 — 컴퓨터 구조 및 OS 역사

2019년 2학기 고려대학교 최린 교수님 운영체제 수업(1)

SoniaComp
4 min readJan 31, 2021

Computer System Overview

Operating System Overview

참고 및 인용문 출처

1. Computer System Overview

‘컴퓨터’란?

Machine 이 그냥 기계라면, Computer 는 데이터 시스템을 말합니다. 데이터 시스템은 모든 정보를 0과 1로 표현하고, 논리게이트로 구성됩니다. 프로그램을 실행할 수 있는(=프로세스를 생성할 수 있는) CPU(프로세서)가 있다면 컴퓨터라고 할 수 있죠.

컴퓨터 시스템의 State(데이터)는 Register, Memory 2개로 구성됩니다. 컴퓨터는 그러한 State의 집합체라고 할 수 있는데, instruction을 통해 그 state를 변경할 수 있습니다.

Basic Elements of Computer system

  • Processor: CPU(Central Processing Unit) 데이터 가공
  • Main memory: 데이터 저장
  • I/O module: 데이터 입출력
  • System bus: 위 세가지를 연결

Processor가 instruction을 수행하는 방법

출처: Operating Systems: Internals and Design Principles 7th

interrupts 개념과 사용하는 이유

Virtually all computers provide a mechanism by which other modules (I/O, memory) may interrupt the normal sequencing of the processor. Interrupts are provided primarily as a way to improve processor utilization. With interrupts, the processor can be engaged in executing other instructions while an I/O operation is in progress.

Memory Hierarchy(계층 구조)

메모리에 대한 디자인의 기준은 다음 3가지 입니다.

  • 얼마나 많은가(How much)?
  • 얼마나 빠른가(How fast)?
  • 얼마나 비싼가(How expensive)?
출처: https://www.gatevidyalay.com/cache-mapping-cache-mapping-techniques/

멀티프로세서

기존에 순차적으로(sequential) 처리하던 프로세서의 성능 향상을 위한 병렬처리(parallelism)가 가능한 방법입니다. 대표적인 3가지 방법에는 symmetric multiprocessors (SMPs), multicore computers, and clusters가 있습니다.

멀티프로세서의 장점은 다음 4가지 입니다.

  • Performance(성능) 향상
  • Availability(가용성): 한 프로세서가 고장나도 남아있는 프로세서로 계속해서 컴퓨팅할 수 있음)
  • Incremental Growth: 프로세서 개수를 늘림으로, 성능을 향상시킬 수 있음
  • Scaling: 어떤 종류의 프로세서들로 구성하느냐에 따라 성능이 결정됨

멀티코어 컴퓨터의 정의는 다음과 같다.

A multicore computer, also known as a chip multiprocessor, combines two or more processors (called cores) on a single piece of silicon (called a die).

2. Operating System Overview

Operating System 목적 3가지

Operating System is a layer of a software between application programs and the hardware.

  1. Ease of use: user/computer interface
  2. Sharing: resource manager
  3. Protection: protect the hardware from misuse by runaway applications

위 세가지 목적에 따라 OS에 제공되는 기능은 다음과 같습니다. → program development(editors, debuggers), program execution(scheduling), access to I/O devices, controlled access to files, system access, error detection and responses, accounting(collect usage statistics)

Computer System이 제공하는 3가지 주요기능

  • ISA(Instruction Set Architecture): define the interface between SW and HW
    → ISA의 종류로는 CISC(Complex Instruction Set Computer)와 RISC(Reduced Instruction Set Computer)가 있습니다. 모든 컴퓨터(H/W)는 자신만의 언어, ISA(Instruction Set Architecture)를 가지고 있습니다. 예를 들어, X86와 ARM(64bit)의 기계어는 다릅니다.
  • ABI(Application Binary Interface): define the system call interface to OS
  • API(Application Programming interface): define the program call interface to system services. system calls are preformed through library calls.

OS 역사

  • Serial Processing: OS가 없었기 때문에, 프로그래머가 하드웨어를 직접 제어했습니다.
  • Simple Batch Systems

The central idea behind the simple batch-processing scheme is the use of a piece of software known as the monitor. With this type of OS, the user no longer has direct access to the processor. Instead the user submits the job on cards or tape to a computer operator, who batches the jobs together sequentially and places the entire batch on an input device, for use the monitor.

  • Multiprogrammed Batch Systems

Even with the automatic job sequencing provided by a simple batch OS, the processor is often idle. The problem is that I/O devices are slow compared to the processor. When one job needs to wait for I/O, the processor can switch to the other job, which is likely not waiting for I/O. Furthermore, we might expand memory to hold three, four, or more programs and switch among all of them. The approach is known as multiprogramming or multitasking. it is the central theme of modern operating systems.

I/O대기 시간에 바로 프로세스를 처리하기 때문에 CPU utilization 을 높일 수 있습니다. 또한, 메모리에 여러 프로세스가 올려져 있기 때문에, CPU idle 을 줄일 수 있습니다.

  • Time Sharing Systems

For many jobs, it is desirable to provide a mode in which the user interacts directly with the computer. Indeed, for some jobs, such as transaction processing, an interactive mode is essential. Just as multiprogramming allows the processor to handle multiple batch jobs at a time, multiprogramming can also be used to handle multiple interactive jobs. In this latter case, the technique is referred to as time sharing, because processor time is shared among multiple users.

Time sharing System에서는 여러명의 사용자가 동시에 OS를 통해 시스템을 이용할 수 있지만, 하나의 프로세서를 나눠서 사용함으로, 체감하는 프로세서의 성능은 1/n(사용자 수)만큼 줄어들게 됩니다.

CTSS는 최초의 time-sharing OS중 하나입니다.

cf. 데이터 시스템의 발전: Combinational logic → FSM(Final State Machine) → Push Down automate(스택을 기반으로 한 가상머신) → Turing Machine

OS 4가지 major achievements

  • Processes
  • Memory management
  • Information Protection and security
  • Scheduling and resource management

--

--

SoniaComp

Data Engineer interested in Data Infrastructure Powering Fintech Innovation (https://www.linkedin.com/in/sonia-comp/)