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

正文內容

chapter4processes進程(參考版)

2024-10-03 21:59本頁面
  

【正文】 2020年 9月 26日 12時 27分 Operating System Concepts Fig Marshalling Parameters 2020年 9月 26日 12時 27分 Operating System Concepts Exercises ? ? ? 。 ? 一個 RPC服務對應一個 port( 端口,就像 socket中的 port), 如果 client不知道某個 RPC的 port, 可以詢問 matchmaker( 媒人 ),matchmaker也是一個服務,但它占用固定的 RPC端口 2020年 9月 26日 12時 27分 Operating System Concepts Fig Execution of RPC (RPC執(zhí)行 ) 2020年 9月 26日 12時 27分 Operating System Concepts Remote Method Invocation 遠程方法調用 ? Remote Method Invocation (RMI) is a Java mechanism similar to RPCs. 遠程方法調用 (RMI)是類似與 RPCs的一種 Java 機制。 ? The serverside stub receives this message, unpacks the marshalled parameters, and performs the procedure on the server. 客戶端 stub接受這條消息,解包 marshalls 參數。 ? 操作系統(tǒng)中的很多服務 (services)依賴于 RPC來實現(xiàn) ,如 windows2020中的COM+、 DHCP、 DNS server、 remote storage、 tel等) ? Stubs (存根 ) – clientside proxy for the actual procedure on the server. .(隱藏 RPC調用的細節(jié) ) StubS在服務器上客戶端真正程序的代理。 closesocket(sd)。 ConnectSocket(sd,port)。 int port = 1280。 closesocket(sd2)。 while(1){ sd2=AcceptSocket( sd )。 BindSocket( sd , nPort ) 。 int port = 1280。 如果 k e y 是 p u b l i c ,那么任何進程都可通過 k e y 找到該消息隊列。 /* 訪問模式,其意義同文件訪問模式 */ ushort seq。 /* 資源創(chuàng)建者的有效標識 */ ushort cgid。 /* 資源擁有者的有效標識 */ ushort gid。消息隊列數據結構: 2020年 9月 26日 12時 27分 Operating System Concepts struct ipc_perm { key_t key。 / * 發(fā)送此條消息的時間 */ s h o r t m s g _ t s 。 / * 消息類型 * / c h a r * m s g _ s p o t 。s t r u c t m s g { / * 每條消息占一個 m s g 結構, i n c l u d e / l i n u x / m s g . h * / s t r u c t m s g * m s g _ n e x t 。 / * 最后一個發(fā)送消息的進程的標識號 */ u s h o r t m s g _ l r p i d 。 / * 隊列中的消息數 */ u s h o r t m s g _ q b y t e s 。 / * 讀消息進程的等待隊列 * / u s h o r t m s g _ c b y t e s 。 / * 最后修改時間 * / s t r u c t w a i t _ q u e u e * w w a i t 。 / * 最后發(fā)送時間 * / t i m e _ t m s g _ r t i m e 。 / * 指向消息隊列的第一條消息 * / s t r u c t m s g * m s g _ l a s t 。 / * i p c / m s g . c * /s t r u c t m s q i d _ d s { / * 每個消息隊列占一個 m s q i d _ d s 結構, i n c l u d e / l i n u x / m s g . h * / s t r u c t i p c _ p e r m m s g _ p e r m 。 ? Second type avoids copying large messages by pointing to a shared memory section object created for the channel. 第二種類型,避免拷貝大量消息,由指向共享存儲區(qū)段 (稿件 )對象的建立。s message queue is used as intermediate storage, and the messages are copied from one process to the other. 第一種類型,適合少量消息 , 最多 256 個字節(jié) 。 ? First type is suitable for small messages, up to 256 bytes。 ? In particular, it is used to request services from the various 2020 subsystems. 特別地 , 它被用來從各種各樣 2020 子系統(tǒng)中請求服務 。 LPC 類似于廣泛地被使用的標準 RPC 機制,但是它被優(yōu)化為并且規(guī)范到Windows 2020中 。 implemented in one of three ways. 消息隊列附加在連接上;采用三個之一的實現(xiàn)方案 1. Zero capacity ,a message system with no buffer – 0 messages , Sender must wait for receiver (rendezvous). 零容量 0 消息,發(fā)送者必須等待接收者 capacity – finite length of n messages, Sender must wait if link full. 有界容量 n個消息有限長度,若連接滿了發(fā)送者必須等待 capacity – infinite length, Sender never waits. 無界容量 無限長度 , 發(fā)送者從不等待 2020年 9月 26日 12時 27分 Operating System Concepts An Example例 : Windows 2020 ? Windows 2020 an example of modern design that employs modularity to increase functionary and decrease the time needed to implement new features . Windows 2020—使 用模塊化增加功能和實現(xiàn)新功能節(jié)約時間的現(xiàn)代設計的一個例子。 ? Different binations of send and receive are possible. 發(fā)送和接受不同的組合是可能的。阻塞被認為同步 。發(fā)送者被通知誰是接收者 2020年 9月 26日 12時 27分 Operating System Concepts Synchronization同步 ? Message passing may be either blocking or nonblocking. Blocking is considered synchronous。 wc –l pipename 2020年 9月 26日 12時 27分 Operating System Concepts MessagePassing System消息傳遞系統(tǒng) ? Message system – processes municate with each other without resorting to shared variables. 消息系統(tǒng) 進程間通信無須對共享變量進行再分類 ? IPC facility provides two operations:IPC提供兩個操作 : ?send(message) – message size fixed or variable 發(fā)送 固定或可變大小消息 ?receive(message) 接受 2020年 9月 26日 12時 27分 Operating System Concepts MessagePassing System (Cont.) ? If P and Q wish to municate, they need to: 若 P與 Q要通信,需要 : ?establish a munication link between them 建立通信連接 ?exchange messages via send/receive 通過 send/receive交換消息 ? Implementation of munication link通信連接的實現(xiàn) ?physical (., shared memory, hardware bus) 物理的(如,共享存儲,硬件總線) ? logical (., logical properties) 邏輯的(如,邏輯特性) 2020年 9月 26日 12時 27分 Operating System Concepts MessagePassing System (Cont.) ? several method for implementing a link and the send / receive operation : 實現(xiàn)鏈接的幾種方法和發(fā)送 /接收操作 : ?Direct or indirect munication 直接或間接的通信 ?Symmetric or asymmetric munication 同步或異步通信 ?Automatic or explicit bu
點擊復制文檔內容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1