숙제는 각 장에서 자료에 대한 지식을 굳히기 위해 사용될 수 있습니다. 많은 숙제는 운영 체제의 일부 측면을 모방하는 시뮬레이터를 실행하는 것에 기초합니다. 예를 들어 디스크 스케줄링 시뮬레이터는 다양한 디스크 스케줄링 알고리즘이 작동하는 방식을 이해하는 데 유용할 수 있습니다. 일부 다른 숙제들은 실제 시스템이 어떻게 작동하는지 탐구할 수 있게 해주는 짧은 프로그래밍 연습일 뿐입니다.
시뮬레이터의 기본 아이디어는 간단합니다. 아래의 각 시뮬레이터를 사용하면 문제를 생성하고 무한한 수의 문제에 대한 해결책을 얻을 수 있습니다. 일반적으로 다른 랜덤 시드를 사용하여 다른 문제를 생성할 수 있습니다. -c 플래그를 사용하면 정답이 계산됩니다(아마 직접 계산을 시도한 후에!).
아래에 포함된 각 숙제는 어떻게 해야 하는지 설명하는 README 파일을 가지고 있습니다. 이전에, 이 자료는 장 자체에 포함되어 있었지만, 그것은 책을 너무 길게 만들었습니다. 이제 이 책에 남아 있는 것은 시뮬레이터로 답하고 싶은 질문뿐입니다. 코드를 실행하는 방법에 대한 자세한 내용은 README에 모두 있습니다.
그러므로, 여러분의 과제는 한 장을 읽고, 그 장의 끝에 있는 질문들을 보고, 숙제를 함으로써 그 질문들에 답하도록 노력하는 것입니다. 일부는 시뮬레이터(Python으로 작성)가 필요하며, 아래에서 사용할 수 있습니다. 코드를 작성해야 하는 경우도 있습니다. 이 시점에서 관련 README를 읽는 것이 좋습니다. 여전히 다른 것들은 C 코드를 작성하는 것과 같은 몇 가지 다른 것들을 필요로 합니다.
To use these, the best thing to do is to clone the homeworks. For example:
prompt> git clone https://github.com/remzi-arpacidusseau/ostep-homework/
prompt> cd file-disks
prompt> ./disk.py -h
Chapter | What To Do |
---|---|
Introduction | No homework (yet) |
Chapter | What To Do |
---|---|
Abstraction: Processes | Run process-run.py |
Process API | Run fork.py and write some code |
Direct Execution | Write some code |
Scheduling Basics | Run scheduler.py |
MLFQ Scheduling | Run mlfq.py |
Lottery Scheduling | Run lottery.py |
Multiprocessor Scheduling | Run multi.py |
Abstraction: Address Spaces | Write some code |
VM API | Write some code |
Relocation | Run relocation.py |
Segmentation | Run segmentation.py |
Free Space | Run malloc.py |
Paging | Run paging-linear-translate.py |
TLBs | Write some code |
Multi-level Paging | Run paging-multilevel-translate.py |
Paging Mechanism | Run mem.c |
Paging Policy | Run paging-policy.py |
Complete VM | No homework (yet) |
Chapter | What To Do |
---|---|
Threads Intro | Run x86.py |
Thread API | Run some C code |
Locks | Run x86.py |
Lock Usage | Write some code |
Condition Variables | Run some C code |
Semaphores | Read and write some code |
Concurrency Bugs | Run some C code |
Event-based Concurrency | Write some code |
Chapter | What To Do |
---|---|
I/O Devices | No homework (yet) |
Hard Disk Drives | Run disk.py |
RAID | Run raid.py |
FS Intro | Write some code |
FS Implementation | Run vsfs.py |
Fast File System | Run ffs.py |
Crash Consistency and Journaling | Run fsck.py |
Log-Structured File Systems | Run lfs.py |
Solid-State Disk Drives | Run ssd.py |
Data Integrity | Run checksum.py and Write some code |
Distributed Intro | Write some code |
NFS | Write some analysis code |
AFS | Run afs.py |