Advanced OS

Table of Contents

Multiprocessing

Process creation

Fork

fork: creates new child process by duplicating calling process

Simple part:

copy_mm:

COW: copy on write, share the same resource until one copy is written to, at which point you duplicate the resource.

Exec

Executes program pointed by filename.

implementation:

Scheduling

easy version:

Time management:

Linux clock sources:

Linux clock event devices:

Scheduling per-task building blocks:

Linux O(1) scheduler:

Linux CFS scheduler:

IPC

communications, sync, signals

Shared mem:

semaphores:

message queue:

POSIX: uses names instead of keys, thread safety, ref counting, shmem is file oriented