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

正文內容

chapter4processes進程-資料下載頁

2025-09-20 21:59本頁面

【導讀】Batchsystem–jobs批處理系統(tǒng)-作業(yè)。進程是活動著的程序,任何進程在任何時刻都處于某一狀態(tài):。New(新建):進程剛被創(chuàng)建,還沒提交給系統(tǒng)。Waiting(等待):進程因為等待某事件的發(fā)生如I/O完成,不能繼續(xù)執(zhí)行.Ready(就緒):萬事具備,只欠東風(被執(zhí)行).Terminated(終止):進程已經(jīng)執(zhí)行完.實際系統(tǒng)中進程的狀態(tài)劃分略有差異,如LINUX:。所申請資源有效,申請資源未果,schedule()時間片到申請資源未果,

  

【正文】 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 。 s t r u c t m s g * m s g _ f i r s t 。 / * 指向消息隊列的第一條消息 * / s t r u c t m s g * m s g _ l a s t 。 / * 指向消息隊列的最后一條消息 */ t i m e _ t m s g _ s t i m e 。 / * 最后發(fā)送時間 * / t i m e _ t m s g _ r t i m e 。 / * 最后接收時間 * / t i m e _ t m s g _ c t i m e 。 / * 最后修改時間 * / s t r u c t w a i t _ q u e u e * w w a i t 。 / * 寫消息進程的等待隊列 * / s t r u c t w a i t _ q u e u e * r w a i t 。 / * 讀消息進程的等待隊列 * / u s h o r t m s g _ c b y t e s 。 / * 隊列中消息的字節(jié)數(shù) */ u s h o r t m s g _ q n u m 。 / * 隊列中的消息數(shù) */ u s h o r t m s g _ q b y t e s 。 / * 隊列中消息的最大字節(jié)數(shù) */ u s h o r t m s g _ l s p i d 。 / * 最后一個發(fā)送消息的進程的標識號 */ u s h o r t m s g _ l r p i d 。 / * 最后一個接收消息的進程的標識號 */}。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 。 / * 后繼節(jié)點,后一條消息 * / l o n g m s g _ t y p e 。 / * 消息類型 * / c h a r * m s g _ s p o t 。 / * 消息文本的地址 */ t i m e _ t m s g _ s t i m e 。 / * 發(fā)送此條消息的時間 */ s h o r t m s g _ t s 。 / * 消息文本的長度 */}。消息隊列數(shù)據(jù)結構: 2020年 9月 26日 12時 27分 Operating System Concepts struct ipc_perm { key_t key。 /* 整型, 0 表示 private ,非 0 表示 public */ ushort uid。 /* 資源擁有者的有效標識 */ ushort gid。 /* 資源擁有者所在組的有效標識 */ ushort cuid。 /* 資源創(chuàng)建者的有效標識 */ ushort cgid。 /* 資源創(chuàng)建者所在組的有效標識 */ ushort mode。 /* 訪問模式,其意義同文件訪問模式 */ ushort seq。 /* 序列號 */ }。 如果 k e y 是 p u b l i c ,那么任何進程都可通過 k e y 找到該消息隊列。 Operations on message queue: Msgget Msgsend Msgrcv Msgctl 2020年 9月 26日 12時 27分 Operating System Concepts ClientServer Communication 客戶機 服務器通信 ? Sockets套接字 ? Remote Procedure Calls ( RPC) 遠程過程調用 ? Remote Method Invocation (Java) 遠程方法啟用 (Java) 2020年 9月 26日 12時 27分 Operating System Concepts Sockets套接字 ? Originated from BSD UNIX ? A socket is defined as an endpoint for munication. 一個套接定義成通信的一個端點 ? Concatenation of IP address and port IP地址的拼接和端口 ? Port:一個 16位的整數(shù), 1024以下為系統(tǒng)用,如 23為 tel service專用, 21為 ftp server專用, 80為 server專用,應用程序應使用1024以上的端口 ? The socket :1625 refers to port 1625 on host ? Communication consists between a pair of sockets. 通信有一對 sockets組成 ? Type of socket: ? connectionoriented(TCP,面向連接 ):可靠 ? connectionless(UDP,無連接) :可靠性較差,但方便 ? multicast(多播 ):可以連接至多個節(jié)點) 2020年 9月 26日 12時 27分 Operating System Concepts Fig Communication using Socket利用 套接字通信 2020年 9月 26日 12時 27分 Operating System Concepts A typical C/S munication using sockets Client side: gethostbyname getprotobyname socket connect recv close Server side: getprotobyname socket bind listen accept send close 2020年 9月 26日 12時 27分 Operating System Concepts Service side: int sd,sd2。 int port = 1280。 sd=socket(AF_INET, SOCK_STREAM,0)。 BindSocket( sd , nPort ) 。 ListenSocket( sd )。 while(1){ sd2=AcceptSocket( sd )。 SendData(sd2,databuf)。 closesocket(sd2)。 } Client side: int sd。 int port = 1280。 sd=socket(AF_INET, SOCK_STREAM,0)。 ConnectSocket(sd,port)。 RecvData(sd,databuf)。 closesocket(sd)。 2020年 9月 26日 12時 27分 Operating System Concepts Remote Procedure Calls 遠程過程調用 ? Remote procedure call (RPC) abstracts procedure calls between processes on worked systems. 遠過程調用 ( RPC ) 在網(wǎng)絡系統(tǒng)進程之間的抽象化進程調用。 ? 操作系統(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在服務器上客戶端真正程序的代理。 ? The clientside stub locates the server and marshalls the parameters. 客戶端的 stub查找服務器和 marshalls 參數(shù)。 ? The serverside stub receives this message, unpacks the marshalled parameters, and performs the procedure on the server. 客戶端 stub接受這條消息,解包 marshalls 參數(shù)。在服務器上完成這程序。 ? 一個 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 機制。 ? RMI allows a Java program on one machine to invoke a method on a remote object. RMI允許在一臺機器上一個 Java 程序調用在遠程對象上的一個方法。 2020年 9月 26日 12時 27分 Operating System Concepts Fig Marshalling Parameters 2020年 9月 26日 12時 27分 Operating System Concepts Exercises ? ? ?
點擊復制文檔內容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1