munication (IPC).ppt


文档分类:管理/人力资源 | 页数:约36页 举报非法文档有奖
1/36
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/36
文档列表 文档介绍
munication (IPC)
CS-502 Operating Systems Fall 2006
(Slides include materials from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne and from Modern Operating Systems, 2nd ed., by Tanenbaum)
CS-502 Fall 2006
1
Inter-munication
munication
Wide Variety of munication (IPC) mechanisms – .,
Pipes & streams
Sockets & Messages
Remote Procedure Call
Shared memory techniques
OS dependent
Depends on whether municating processes share all, part, or none of an address space
CS-502 Fall 2006
2
Inter-munication
Common IPC mechanisms
Shared memory – read/write to shared region
., shmget(), shmctl() in Unix
Memory mapped files in WinNT/2000
Need critical section management
Semaphores – post_s() notifies waiting process
Shared memory or not, but semaphores need to be shared
Software interrupts - process notified asynchronously
signal ()
Pipes - unidirectional munication
Message passing - processes send and receive messages
Across address spaces
Remote procedure call – processes call functions in other address spaces
Same or different machines
CS-502 Fall 2006
3
Inter-munication
Shared Memory
Straightforward if processes already share entire address space
., threads of one processes
., all processes of some operating systems
eCos, Pilot
Critical section management
Semaphores (or equivalent)
Monitors (see later)
CS-502 Fall 2006
4
Inter-munication
Shared Memory (continued)
More difficult if processes inherently have independent address spaces
., Unix, Linux, Windows
Special mechanisms to share a portion of virtual memory
., shmget(), shmctl() in Unix
Memory mapped files in Windows XP/2000, Apollo DOMAIN, etc.
Very, very hard to program!
Need critical section management among processes
Pointers are an issue
CS-502 Fall 2006
5
Inter-munication
IPC – Software Interrupts
Similar to hardware interrupt.
Processes interrupt each other
Non-process activities interrupt processes
Asynchronous! Stops execution then restarts
Keyb

munication (IPC) 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数36
  • 收藏数0 收藏
  • 顶次数0
  • 上传人静雨蓝梦
  • 文件大小0 KB
  • 时间2015-04-28