Operation System Concepts Ch.2 OS Structure

Overview

Operation system services: UI, program execution, i/o, fs operation, communication, error detection

Functions of OS: resource allcation, accounting, protection and security

CLI: by kernel/by sys program, fetch cmd and execute, cmds are built-in or names of programs

Syscall

Syscalls: programming interface to service provided by the OS, wrapped with API (portability, easy)

each syscall has a number

How to perform privileged operation? Syscalls

How to execute syscall? Trap/trap-handler/return-from-trap

How to restore context? Kernel stack

Separation of Policy from Mechanism: flexibility (if policy are to be change later)

Structure

Simple: most functionality in least space, not well separated

Layered: each on top of lower layers, 0 is hardware, n is UI

Microkernel: move as much from kernel into user space (message passing) easy to extend/port, reliable, secure, communication overhead

Modules: loadable kernel modules (separate, more flexible)

Hybrid

原文地址:https://www.cnblogs.com/mollnn/p/14703737.html