---
# System prepended metadata

title: 作業系統 Ch1 Introduction
tags: [作業系統]

---

---
tags: 作業系統
---

# 作業系統 Ch1 Introduction

### 4 component of computer structure
- hardware (CPU、memory、I/O device)
- operation system
- application and software program
- User

### OS definition
- control program
- resource allocator

### storage device hierarchy
register -> cache -> main memory (volatile)

### DMA (direct memory access)
- high-speed data transfer from buffer to memory without CPU (DMA controller) 

### multiprocessor (parallel system)
- type
    - asymmetric multiprocessing: each for special task
    - symmetric multiprocessing each for all task
- benefit
    - increase throughout
    - economy of scale
    - increased reliablity
- cache coherency 整合: to have most recent value


### clustered system
- type
    - asymmtric clusting: one for hoy-standby mode
    - symmtric clusting
- multiply system running together
- high-avalibility(高可用性)
- HPC (high-performance computer)
- DLM (distributed lock manager)

- multiprogramming(batch system)
- timesharing(multitask)

### OS operation
- software、 hardware 中斷
    - software: exception、trap
    - hardware: interrupt
- interrupt type
    - polling
    - vectored interrupt: 
- OS interrupt driven
- interrupt vector: contain all address of service routine
- controller have buffer
- use system call by API to get allow to use kernal service
- device driver: between controller and kernel
- dual-mode: kernal 0 、user 1 (mode-bit provide by hardware，change mode by system call)
- privilege instruction: only support in kernal mode

### OS subsystem
- file management
- memory management
- device-driver interface
- driver for specific hardware device
- protection: control resource access right (privilege escalation)
- security: defense attack

### computer environment
- portal: web access
- distributed computing
    - LAN、WAN、MAN、PAN
- peer-to-peer(discovery protocol)

### cloud computing
- SaaS: several application
- PaaS: software stack
- IaaS: server or storage

