|
1 | 1 | --- |
2 | | -title: Overview |
| 2 | +title: 기능 및 구조 미리보기 |
3 | 3 | --- |
4 | 4 |
|
5 | | -# What we will implement |
| 5 | +# 기능 및 구조 미리보기 |
6 | 6 |
|
7 | | -Before starting to build an OS, let's quickly get an overview of the features we will implement. |
| 7 | +OS를 본격적으로 만들기 시작하기 전에, 이 책에서 구현할 기능들을 간단히 살펴보겠습니다. |
8 | 8 |
|
9 | | -## Features in 1K LoC OS |
| 9 | +## 1,000줄 짜리 OS에서 구현할 주요 기능 |
10 | 10 |
|
11 | | -In this book, we will implement the following major features: |
| 11 | +다음과 같은 주요 기능들을 구현할 예정입니다: |
12 | 12 |
|
13 | | -- **Multitasking**: Switch between processes to allow multiple applications to share the CPU. |
14 | | -- **Exception handler**: Handle events requiring OS intervention, such as illegal instructions. |
15 | | -- **Paging**: Provide an isolated memory address space for each application. |
16 | | -- **System calls**: Allow applications to call kernel features. |
17 | | -- **Device drivers**: Abstract hardware functionalities, such as disk read/write. |
18 | | -- **File system**: Manage files on disk. |
19 | | -- **Command-line shell**: User interface for humans. |
| 13 | +- **멀티태스킹(Multitasking)**: 여러 애플리케이션이 CPU를 공유할 수 있도록 프로세스 간 전환을 지원합니다. |
| 14 | +- **예외 처리(Exception Handler)**: 잘못된 명령어 처리 등, OS의 개입이 필요한 이벤트를 다룹니다. |
| 15 | +- **페이징(Paging)**: 각 애플리케이션에 독립적인 메모리 주소 공간을 제공합니다. |
| 16 | +- **시스템 콜(System Calls)**: 애플리케이션이 커널 기능을 호출할 수 있는 방법을 제공합니다. |
| 17 | +- **디바이스 드라이버(Device Drivers)**: 디스크 읽기/쓰기처럼 하드웨어 기능을 추상화합니다. |
| 18 | +- **파일 시스템(File System)**: 디스크 상에서 파일을 관리합니다. |
| 19 | +- **명령줄 셸(Command-line Shell)**: 사람이 사용하는 명령줄 기반 인터페이스를 제공합니다. |
20 | 20 |
|
21 | | -## Features not implemented |
22 | 21 |
|
23 | | -The following major features are not implemented in this book: |
| 22 | +## 이 책에서 다루지 않는 기능 |
24 | 23 |
|
25 | | -- **Interrupt handling**: Instead, we will use a polling method (periodically check for new data on devices), also known as busy waiting. |
26 | | -- **Timer processing**: Preemptive multitasking is not implemented. We'll use cooperative multitasking, where each process voluntarily yields the CPU. |
27 | | -- **Inter-process communication**: Features such as pipe, UNIX domain socket, and shared memory are not implemented. |
28 | | -- **Multi-processor support**: Only single processor is supported. |
| 24 | +아래와 같은 기능들은 이번 책에서 구현하지 않습니다: |
29 | 25 |
|
30 | | -## Source code structure |
| 26 | +- **인터럽트 처리(Interrupt Handling)**: 대신 주기적으로 디바이스를 확인하는 폴링(polling) 방식을 사용합니다(busy waiting). |
| 27 | +- **타이머 처리(Timer Processing)**: 선점형(preemptive) 멀티태스킹은 구현하지 않습니다. 각 프로세스가 스스로 CPU를 양보하는 협력형(cooperative) 멀티태스킹을 사용할 예정입니다. |
| 28 | +- **프로세스 간 통신(Inter-process Communication)**: 파이프, UNIX 도메인 소켓, 공유 메모리 등의 기능은 구현하지 않습니다. |
| 29 | +- **멀티프로세서 지원(Multi-processor Support)**: 단일 프로세서만 지원합니다. |
31 | 30 |
|
32 | | -We'll build from scratch incrementally, and the final file structure will look like this: |
| 31 | +## 소스 코드 구조 |
| 32 | + |
| 33 | +맨바닥부터 점진적으로 빌드해나갈 것이며, 최종적으로 아래와 같은 파일 구조가 완성됩니다: |
33 | 34 |
|
34 | 35 | ``` |
35 | | -├── disk/ - File system contents |
36 | | -├── common.c - Kernel/user common library: printf, memset, ... |
37 | | -├── common.h - Kernel/user common library: definitions of structs and constants |
38 | | -├── kernel.c - Kernel: process management, system calls, device drivers, file system |
39 | | -├── kernel.h - Kernel: definitions of structs and constants |
40 | | -├── kernel.ld - Kernel: linker script (memory layout definition) |
41 | | -├── shell.c - Command-line shell |
42 | | -├── user.c - User library: functions for system calls |
43 | | -├── user.h - User library: definitions of structs and constants |
44 | | -├── user.ld - User: linker script (memory layout definition) |
45 | | -└── run.sh - Build script |
| 36 | +├── disk/ - 파일 시스템용 디렉터리 |
| 37 | +├── common.c - 커널/유저 공용 라이브러리(printf, memset 등) |
| 38 | +├── common.h - 커널/유저 공용 라이브러리용 구조체 및 상수 정의 |
| 39 | +├── kernel.c - 커널(프로세스 관리, 시스템 콜, 디바이스 드라이버, 파일 시스템 등) |
| 40 | +├── kernel.h - 커널용 구조체 및 상수 정의 |
| 41 | +├── kernel.ld - 커널용 링커 스크립트(메모리 레이아웃 정의) |
| 42 | +├── shell.c - 명령줄 셸 |
| 43 | +├── user.c - 유저 라이브러리(시스템 콜 관련 함수) |
| 44 | +├── user.h - 유저 라이브러리용 구조체 및 상수 정의 |
| 45 | +├── user.ld - 유저용 링커 스크립트(메모리 레이아웃 정의) |
| 46 | +└── run.sh - 빌드 스크립트 |
46 | 47 | ``` |
47 | 48 |
|
48 | 49 | > [!TIP] |
49 | 50 | > |
50 | | -> In this book, "user land" is sometimes abbreviated as "user". Consider it as "applications", and do not confuse it with "user account"! |
| 51 | +> 이 책에서 "user land"라는 용어는 종종 "user"로 축약해 사용됩니다. 이는 계정 단위의 “사용자(user account)”가 아니라, 애플리케이션 영역을 뜻하는 “유저 영역(user land)” 개념이니 혼동하지 마세요! |
0 commit comments