linux系統組成部分:linux核心、shell、工具 + 生產力utility、應用程式、檔案系統。
原語:若干機器指令構成的一段代碼,原語在執行期間不可分割,一旦開始執行,不能被中斷。
PV原語:與處理序間通訊機制訊號量對應的話,當訊號量大於0時,表示可供並發進程使用的資源數,小於0時,表示等待中的進程數。P操作訊號量-1,V操作訊號量+1。PV操作每個進程只能成對使用一次。
進程調度:先進先出、時間片輪詢、最高優先順序和多級隊列反饋。
處理序間通訊方法:
訊號量(特殊地,互斥訊號量和同步訊號量為初始值為1和0的訊號量)、
共用記憶體、
訊息機制(包括訊息緩衝和信箱)、
管道通訊(也叫共用檔案通訊)。
http://en.wikipedia.org/wiki/Deadlock
進程死結的四個條件:互斥條件、請求與保持條件、不剝奪條件和迴圈等待條件。
A deadlock situation can arise if and only if all of the following conditions hold simultaneously in a system:[1]
- Mutual Exclusion: At least one resource must be non-shareable.[1] Only
one process can use the resource at any given instant of time.
- Hold and Wait or Resource Holding: A process is currently holding at least one resource and requesting additional resources which are being held by other processes.
- No Preemption: The operating system must not de-allocate resources
once they have been allocated; they must be released by the holding process voluntarily.
- Circular Wait: A process must be waiting for a resource which is being
held by another process, which in turn is waiting for the first process to release the resource. In general, there is a set of
waiting processes, P = {P1, P2, ..., PN}, such that P1 is waiting for a resource held by P2,
P2 is waiting for a resource held by P3 and so on till PN is waiting for a resource held by P1.[1][7]
These four conditions are known as the Coffman conditions from their first description in a 1971 article by Edward
G. Coffman, Jr.[7]Unfulfillment of any
of these conditions is enough to preclude a deadlock from occurring.
------------------------------------------------------------------------------
儲存管理:可變分區管理、頁式管理、虛擬頁式管理(又叫請求頁式管理)。
可變分區管理:編程時,所用地址都是邏輯地址,當程式裝載到記憶體時,通過儲存管理得到該進程記憶體空間的物理基地址和限定長度,並將兩者儲存在該進程的進程式控制制塊PCB中。進程運行時,所有地址的訪問,均會“邏輯地址+基地址”得到程式或資料的物理地址。邏輯上相鄰的地址,物理上也相鄰。
頁式管理:記憶體等長地分為若干物理頁面(塊),程式的邏輯空間按照同樣大小劃分為等長邏輯頁面(頁)。每個進程有一張頁表,記錄邏輯頁面和物理頁面的對應關係,頁表行數等於邏輯頁面數。邏輯上相鄰的頁面,物理上不一定相鄰。頁表基址和頁表長度儲存在該進程的進程式控制制塊中。如果程式佔用儲存空間較大,則頁表佔用空間可能超過一個頁面,此時可採用多級頁表結構。