# OS-Chap1 - Introduction ###### tags:`作業系統 Operating System note`, `110-1`, `2021` # Table Of Content [TOC] --- # Computer-System Structure(電腦結構) - 由四個**資源 ( components )** 組成 1. 硬體(Hardware=HW) -> basic computing resources - CPU, memory(RAM), I/O devices(滑鼠、鍵盤) 2. **作業系統** : ___>>**purpose** - for user : ___>>**讓使用者方便** - API - 只重視 easy of use(容不容易使用) + good performance(效能好不好/快不快) - for system : ___>>**提高電腦的使用效率** - Resource Allocator《資源分配者》 - 管理所有 recources ->讓 resources be used fair(公平) & effective(有效率)。 ->slove resources 使用上的衝突。 - Control program《控制程式者》 - scheduling(排程) - avoid error by 監控 user program 執行 - A **"permanent"** software - control hardware resource 並提供 API 給 user > - 不會讓 app 直接存取 HW 裡面的東西,而透過 OS 提供的 library 存取 HW 內容 > - ![](https://i.imgur.com/f9RlJNs.jpg) ## Kernel - Kernel 是什麼? 作業系統的核心元件,負責處理應用程式和硬體之間的溝通 - 負責整個硬體的驅動 - 提供各種系統所需的核心功能 1. process manager(行程管理員) ex. Scheduling(排程) 2. memory manager ex. caching(快取)、虛擬記憶體 3. device manager ex. 滑鼠、煞車接收器、螢幕 - ### Goals of OS 1. Convenience: 符合 User 需求->讓電腦更容易使用+計算 2. Efficiency: fast, no delay, for large, shared, multiuser systems - 魚與熊掌不可兼得,contradictory。 -- 想要 convenience 就必須加一些東西,造成 Efficiency slower。 - ### Importance of OS 1. API -> Hardware 和 Application 之間唯一的Interface。 --- API are designed for general-purpose, not performance driven 2. OS的code不能允許任何bug存在。 --- bug會造成整台電腦crash,使用到一半的狀態或program都會消失。 3. 掌控OS technology的人,也同時控制software和hardware的產業。 --- ex. Wintel (=Windows(軟) +Intel(硬)的合作) 4. OS 和 計算機結構會互相影響(influence each other)。 --- 硬體的結構,使用者的需求,都會改變OS的設計。 --- ex.手機和電腦的OS系統不同。 ![](https://i.imgur.com/2b2zvCr.jpg) 3. 應用程式(Application programs) : software - purpose: slove computing problems 4. 使用者(User) - people, machines, other computers(不只局限於人) - ex. 自動駕駛裡面的OS,物連網 ![](https://i.imgur.com/S8CNJX4.png) # Computer-System Organization(電腦組織) # Computer-System Architecture(電腦架構) # Hardware Protection(硬體的保護方式) # Operating-System Structure(OS結構) # Operating-System Operations(OS操作)