Chp 1 Introduction
Operation System
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
“The one program running at all times on the computer” is the kernel.
Program, Proccese, Thread
Ref: Program/Process/Thread 差異
-
Program: 還尚未load入記憶體的 code (工廠藍圖)
- 相同 Program 的 Process 可以多個同時存在
- Passive Entity
-
Process: 已經執行並且 load 到記憶體中的 Program (運作之工廠)
- Active Entity
- Process 是電腦中已執行 Program 的實體
- 一個 CPU 一次只能執行一個 Process,每一個 Process 互相獨立
- Process 的運行量總量不會少於 CPU 的總量
-
Thread: Process 是 Thread 的容器 (工廠工人)
- 同一個 Process 可以同時存在多個 Thread
同一個 Process 底下的 Thread 共享資源,不同的Process 則否
- 兩個以上執行緒若同時存取或改變全域變數(Global Variable),則可能發生同步(Synchronization,恐龍本第六章)問題。
- 若執行緒之間互搶資源,則可能產生死結(Deadlock,恐龍本第七章)
不同的Process一樣可以共享資源,這可以藉由share memory或是message passing model達成,message passing model可以是socket或是其他的通訊方式
不管是thread或是process之間,要共享資源就要解決互搶資源的現象,如同Thread第3,4點所述,解決的方式可以藉由添加互斥鎖,之後會教。
Neko
- program counter
- specifying location of next instruction to execute
- one program counter per thread
Interrupt
I/O Structure
-
System call
- request to the OS to allow user to wait for I/O completion.
-
Device-status table
Storage
- Storage Hierarchy
- Speed
- Cost
- Volatility (need extra power to store the data)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Computer-System Architecture
-
DEFINITION
- Core — The basic computation unit of the CPU.
- CPU — The hardware that executes instructions.
- Processor — A physical chip that contains one or more CPUs.
-
Multiprocessors
- parallel systems, tightly-coupled systems
- Types & Difference
- Asymmetric Multiprocessor
- Only Master processor run the tasks of OS
- Master processor allocate work to slave processor
- No-shared memory
- Symmetric Multiprocessor
- Each processor run the tasks in OS
- shared memory
-
Multi-chip, Multicores
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
-
Multiprocessor VS Multicore
|
Multicore |
Multiprocessor |
Definition |
a single CPU with multiple execution unit |
a system that has two or more CPUs |
Advantage |
execute single program faster |
execute multiple program faster |
Reliablility |
not reliable |
more reliable CPU won't affect the other |
Network 的概念?
Omnom
Dual-Mode
- Purpose: Allow OS to protect itself and other system components.
- user mode (mode bit=1) and kernel mode (mode bit=0)
- Some privileged instructions only excutable in kernel mode
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Network
Virtualization
Simulator and Emulator