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

正文內(nèi)容

[工學]西安交通大學操作系統(tǒng)原理課件第三章-資料下載頁

2025-02-17 14:27本頁面
  

【正文】 shared memory, hardware bus) – logical (., logical properties) Message Passing ? Direct Communication ? Indirect Communication Message Passing Direct Communication ? Processes must name each other explicitly: – send (P, message) – send a message to process P – receive(Q, message) – receive a message from process Q ? Properties of munication link – Links are established automatically – A link is associated with exactly one pair of municating processes – Between each pair there exists exactly one link – The link may be unidirectional, but is usually bidirectional Message Passing Indirect Communication ? Messages are directed and received from mailboxes (also referred to as ports) – Each mailbox has a unique id – Processes can municate only if they share a mailbox ? Properties of munication link – Link established only if processes share a mon mailbox – A link may be associated with many processes – Each pair of processes may share several munication links – Link may be unidirectional or bidirectional Message Passing Indirect Communication ? Operations – create a new mailbox – send and receive messages through mailbox – destroy a mailbox ? Primitives are defined as: send(A, message) – send a message to mailbox A receive(A, message) – receive a message from mailbox A Indirect Communication ? Mailbox sharing – P1, P2, and P3 share mailbox A – P1, sends。 P2 and P3 receive – Who gets the message? ? Solutions – Allow a link to be associated with at most two processes – Allow only one process at a time to execute a receive operation – Allow the system to select arbitrarily the receiver. Sender is notified who the receiver was. Message Passing Synchronization ? Message passing may be either blocking or nonblocking ? Blocking is considered synchronous – Blocking send has the sender block until the message is received – Blocking receive has the receiver block until a message is available ? Nonblocking is considered asynchronous – Nonblocking send has the sender send the message and continue – Nonblocking receive has the receiver receive a valid message or null Message Passing Buffering ? Queue of messages attached to the link。 implemented in one of three ways: 1. Zero capacity – 0 messages Sender must wait for receiver 2. Bounded capacity – finite length of n messages Sender must wait if link full 3. Unbounded capacity – infinite length Sender never waits Examples of IPC Systems POSIX ? POSIX Shared Memory – Process first creates shared memory segment segment id = shmget(IPC PRIVATE, size, S IRUSR | S IWUSR)。 – Process wanting access to that shared memory must attach to it shared memory = (char *) shmat(id, NULL, 0)。 – Now the process could write to the shared memory sprintf(shared memory, Writing to shared memory)。 – When done a process can detach the shared memory from its address space shmdt(shared memory)。 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客戶機打開子系統(tǒng)連接端口對象的句柄 ? The client sends a connection request客戶機發(fā)送連接請求 ? 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存根是遠程服務(wù)器上的過程在客戶端的代理 ? 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 remote object Marshalling Parameters 作 業(yè) ? P116 – –
點擊復制文檔內(nèi)容
教學課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1