이 책은 세가지 핵심요소를 다룬다!

1. virtualization

2. concurrency

3. persistence



Virtualization

실행 중인 프로세스는 고유한 가상 메모리 공간을 가진다.

OS는 물리적 메모리 공간을 각각의 가상 메모리 공간에 대응 시키는 역할을 한다.

각 프로세스의 가상 메모리는 다른 프로세스의 가상 메모리와 얽히지 않는다.

하지만 물리적 메모리 공간은 유한하기 때문에 프로세스가 이를 효율적으로 사용할 수 있도록 해주는 것이 OS의 역할이다.


Each process accesses its own private virtual address space (sometimes just called its address space), which the OS somehow maps onto the physical memory of the machine. A memory reference within one running program does not affect the address space of other processes (or the OS itself); as far as the running program is concerned, it has physical memory all to itself. The reality, however, is that physical memory is a shared resource, managed by the operating system.


실습 : intro/cpu & intro/mem



Concurrency

여러 프로세스를 동시에 실행하다보면 많은 문제점들이 발생한다.

실습 threads는 전역변수 counter를 1씩 증가하는 작업을 입력인 loop회 반복하는 두 개의 스레드를 실행시키는 프로그램이었다. 입력으로 10을 주면 counter의 최종 결과가 20이었고 500을 입력하면 counter는 최종적으로 1000의 값을 가졌다. 하지만 입력으로 1000000과 같이 큰 수를 주자 counter는 더이상 입력 * 2 의 형태를 띠지 않았다. 이는 운영체제가 counter를 증가시키기 위해 원래 값을 메모리에서 불러오고, 1을 더한 뒤 다시 메모리에 저장하는 과정을 한번에 처리하는 것이 아니기 때문에 발생한 일이었다.


실습 : intro/threads



Persistence

정보를 영구히 저장하기 위해 우리는 hard drive나 SSD(solid-state drive)같은 저장장치를 사용한다.

file system에 대해 배운다.


실습 : intro/io




Abstraction에 대해 잘 설명해놓은 문장

Abstraction makes it possible to write a large program by dividing it into small and understandable pieces, to write such a program in a high-level language like C without thinking about assembly, to write code in assembly without thinking about logic gates, and to build a processor out of gates without thinking too much about transistors.

'Operating Systems: Three Easy Pieces' 카테고리의 다른 글

07 CPU Scheduling (1)  (1) 2018.10.16
06 Direct Execution  (0) 2018.10.15
[Operating Systems: Three Easy Pieces] 책소개  (0) 2018.10.15
05 Process API  (1) 2018.10.03
04 Processes  (0) 2018.10.03

+ Recent posts