freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[工學(xué)]西安交通大學(xué)操作系統(tǒng)原理課件第三章(完整版)

  

【正文】 s Control Block 進(jìn)程控制塊 Information associated with each process. ? Process state 進(jìn)程狀態(tài) ? Program counter 程序計(jì)數(shù)器 ? CPU registers CPU寄存器 ? CPU scheduling information CPU調(diào)度信息 ? Memorymanagement information 內(nèi)存管理信息 ? Accounting information 計(jì)賬信息 ? I/O status information I/O狀態(tài)信息 ? 進(jìn)程標(biāo)識(shí)符 name – 每個(gè)進(jìn)程都必須有一個(gè)唯一的標(biāo)識(shí)符 , 可以是字符串 , 也可以是一個(gè)數(shù)字 。 七狀態(tài)進(jìn)程模型 活動(dòng) 掛起 事件 發(fā)生 事件 發(fā)生 等待 事件 掛起 調(diào)度 超時(shí) 釋放 活動(dòng) 掛起 新?tīng)顟B(tài)轉(zhuǎn)換 ? 引入掛起狀態(tài)后,又將增加新的狀態(tài)轉(zhuǎn)換: 1.活動(dòng)就緒 靜止就緒 – 當(dāng)進(jìn)程處于未被掛起的就緒狀態(tài)時(shí),稱此為活動(dòng)就緒狀態(tài)(Readya)。 – 它不再有執(zhí)行資格 。 – 進(jìn)程位于某個(gè)隊(duì)列 (就緒 、 等待某事件隊(duì)列 )。 進(jìn)程的類型 ? 系統(tǒng)進(jìn)程 – 系統(tǒng)進(jìn)程起著資源管理和控制的作用 ,或者:執(zhí)行操作系統(tǒng)核心代碼的進(jìn)程 。 ? 進(jìn)程與程序的組成不同:進(jìn)程的組成包括程序、數(shù)據(jù)和進(jìn)程控制塊(即進(jìn)程狀態(tài)信息)。 可能出現(xiàn)多報(bào)或漏報(bào) 。SN Coend。 進(jìn)程的引入 ? OS基本特性是并發(fā)與共享 , 即在系統(tǒng)中 ( 內(nèi)存 ) 同時(shí)存在幾個(gè)相互獨(dú)立的程序 , 他們交叉地運(yùn)行 , 并共享資源 , 這就會(huì)引起諸如 : – 資源的競(jìng)爭(zhēng) – 程序之間的合作與協(xié)同 – 程序之間的通信等問(wèn)題 。 Dijkstra給出了一種描述: Cobegin S1。 ? 不可再現(xiàn)性:由于失去封閉性 , 初始條件相同 ,但是結(jié)果不一定相同 。 ? A program is a passive entity。是最重要的特征。 進(jìn)程描述 ? 進(jìn)程存在意味著: – 進(jìn)程控制塊 PCB( 數(shù)據(jù)結(jié)構(gòu) ) 。 進(jìn)程狀態(tài)變遷 其他狀態(tài): ? 創(chuàng)建狀態(tài),終止?fàn)顟B(tài) ? 掛起狀態(tài)(調(diào)節(jié)負(fù)載,對(duì)換,父進(jìn)程,操作系統(tǒng),終端用戶) 進(jìn)程狀態(tài)變遷 ? 創(chuàng)建 ( 新 ,new)狀態(tài) – OS 已完成為創(chuàng)建一進(jìn)程所必要的工作 ? 已構(gòu)造了進(jìn)程標(biāo)識(shí)符 。 3,操作系統(tǒng)的需要 操作系統(tǒng)有時(shí)需要掛起某些進(jìn)程 , 檢查運(yùn)行中資源的使用情況及進(jìn)行記帳 , 以便改善系統(tǒng)的運(yùn)行性能 。 Process Control Block進(jìn)程控制塊 ? PCB (Process Control Block):一個(gè)專門(mén)的數(shù)據(jù)結(jié)構(gòu),系統(tǒng)用它來(lái)記錄進(jìn)程的外部特征,描述進(jìn)程的運(yùn)動(dòng)變化過(guò)程 ? PCB是進(jìn)程管理和控制的最重要的數(shù)據(jù)結(jié)構(gòu) , 在創(chuàng)建進(jìn)程時(shí) , 建立PCB, 并伴隨進(jìn)程運(yùn)行的全過(guò)程 , 直到進(jìn)程撤消而撤消 。 ? 當(dāng)前隊(duì)列指針 next – 登記與本進(jìn)程處于同一隊(duì)列的下一個(gè)進(jìn)程的 PCB的地址 Process Control Block進(jìn)程控制塊 ? 執(zhí)行程序開(kāi)始地址 startaddr ? 進(jìn)程優(yōu)先級(jí) priority – 進(jìn)程的優(yōu)先級(jí)反映進(jìn)程的緊迫程度 , 通常由用戶指定和系統(tǒng)設(shè)置 。 few very long CPU bursts. CPU 型進(jìn)程 花費(fèi)更多時(shí)間于計(jì)算,許多長(zhǎng) CPU處理 ? Longterm scheduler controls the process mix of I/Obound process and CPUbound process Schedulers(Cont.) Addition of Medium Term Scheduling中程調(diào)度( time_sharing,交換技術(shù)) swapping Process Context 進(jìn)程上下文 ? 對(duì)進(jìn)程執(zhí)行活動(dòng)全過(guò)程的靜態(tài)描述 ? 由進(jìn)程的用戶地址空間內(nèi)容、硬件寄存器內(nèi)容及與該進(jìn)程相關(guān)的核心數(shù)據(jù)結(jié)構(gòu)組成 – 用戶級(jí)上下文:進(jìn)程的用戶地址空間(包括用戶棧各層次),包括用戶正文段、用戶數(shù)據(jù)段和用戶棧 – 寄存器級(jí)上下文:程序計(jì)數(shù)器、程序狀態(tài)寄存器、棧指針、通用寄存器的值 – 系統(tǒng)級(jí)上下文: ? 靜態(tài)部分( PCB和資源表格) ? 動(dòng)態(tài)部分:核心棧(核心過(guò)程的棧結(jié)構(gòu),不同進(jìn)程在調(diào)用相同核心過(guò)程時(shí)有不同核心棧) Context Switch 上下文切換 ? When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process. 當(dāng) CPU切換至另一個(gè)進(jìn)程時(shí),系統(tǒng)必須保存舊進(jìn)程狀態(tài)并為新進(jìn)程調(diào)入所保留的狀態(tài)(包括寄存器,存儲(chǔ)管理信息) ? Contextswitch time is overhead。(如打印請(qǐng)求) ? 應(yīng)用請(qǐng)求:應(yīng)用進(jìn)程的需要,由它自己創(chuàng)建一個(gè)新進(jìn)程,使新進(jìn)程以并發(fā)運(yùn)行方式完成特定任務(wù)。 使程序計(jì)數(shù)器指向程序的入口地址,棧指針指向棧頂。 } else if (pid == 0) { /* child process */ execlp(/bin/ls, ls, NULL)。 入口 保存當(dāng)前進(jìn)程的 CPU現(xiàn)場(chǎng) 置該進(jìn)程的狀態(tài) 被阻塞進(jìn)程入等待隊(duì)列 轉(zhuǎn)進(jìn)程調(diào)度 阻塞原語(yǔ) Process Blocking 進(jìn)程阻塞 進(jìn)程喚醒 ? 當(dāng)進(jìn)程所等待的事件發(fā)生時(shí),該進(jìn)程將被喚醒 (由進(jìn)程喚醒操作完成 )。 UNIX相關(guān)系統(tǒng)調(diào)用介紹 (pid,sig): 一個(gè)進(jìn)程向同一用戶的其他進(jìn)程 pid發(fā)送一中斷信號(hào) (sig,function): 捕捉中斷信號(hào) sig后執(zhí)行 function規(guī)定的操作?!?; 返回值為實(shí)際的掛起時(shí)間。 /*i0,在父進(jìn)程中 */ else printf(“it is a child process!\n”)。 exit(0)。)。 for(i=0。i++) printf(daughter %d\n,i)。 item buffer[BUFFER_SIZE]。 out = (out + 1) % BUFFER SIZE。 Pointer indicating the share memory address NULL: selecting by OS 1:read only 0:R/W MODE:READ,WRITE,OR BOTH Examples of IPC Systems Mach ? Mach munication is message based – Even system calls are messages – Each task gets two mailboxes at creation Kernel and Notify – Only three system calls needed for message transfer msg_send(), msg_receive(), msg_rpc() – Mailboxes needed for munication, created via port_allocate() Examples of IPC Systems – Windows XP ? Messagepassing centric via local procedure call (LPC) facility – Only works between processes on the same system – Uses ports (like mailboxes) to establish and maintain munication channels – Communication works as follows: ? The client opens a handle to the subsystem’s connection port object客戶機(jī)打開(kāi)子系統(tǒng)連接端口對(duì)象的句柄 ? The client sends a connection request客戶機(jī)發(fā)送連接請(qǐng)求 ? The server creates two private munication ports and returns the handle to one of them to the client ? The client and server use the corresponding port handle to send messages or callbacks and to listen for replies Local Procedure Calls in Windows XP in ClientServer Systems ? Sockets ? Remote Procedure Calls ? Remote Method Invocation (Java) Sockets ? A socket is defined as an endpoint for munication ? Concatenation of IP address and port ? The socket :1625 refers to port 1625 on host ? Communication consists between a pair of sockets Socket Communication Remote Procedure Calls ? Remote procedure call (RPC) abstracts procedure calls between processes on worked systems ? Stubs – clientside proxy for the actual procedure on the server存根是遠(yuǎn)程服務(wù)器上的過(guò)程在客戶端的代理 ? The clientside stub locates the server and marshalls the parameters客戶端的存根定位服務(wù)器并編組參數(shù) ,向服務(wù)器發(fā)送消息 ? The serverside stub receives this message, unpacks the marshalled parameters, and peforms the procedure on the server Remote Method Invocation ? Remote Method Invocation (RMI) is a Java mechanism similar to RPCs ? RMI allows a Java program on one machine to invoke a method on a re
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1