Presentation is loading. Please wait.

Presentation is loading. Please wait.

Group 1 Members: SMU CSE 8343 Wael Faheem Professor:Dr.M.KHALIL. Hazem Morsy Date:11-08-03 Poramate Ongsakorn Payal H Patel Samatha Devi Malka.

Similar presentations


Presentation on theme: "Group 1 Members: SMU CSE 8343 Wael Faheem Professor:Dr.M.KHALIL. Hazem Morsy Date:11-08-03 Poramate Ongsakorn Payal H Patel Samatha Devi Malka."— Presentation transcript:

1 Group 1 Members: SMU CSE 8343 Wael Faheem Professor:Dr.M.KHALIL. Hazem Morsy Date:11-08-03 Poramate Ongsakorn Payal H Patel Samatha Devi Malka

2 INTERPROCESS COMMUNICATION IN A WINDOWS MULTIPROCESSOR O.S VS SUN SOLARIS O.S BY: SAMATHA DEVI MALKA SAMATHA DEVI MALKA

3 Outline: Introduction Introduction Definition of IPC Definition of IPC Types of IPC Types of IPC Definition of UNIX/SUN SOLARIS O.S Definition of UNIX/SUN SOLARIS O.S IPC Mechanisms for UNIX IPC Mechanisms for UNIX Definition of Windows O.S Definition of Windows O.S IPC Mechanisms for Windows IPC Mechanisms for Windows Synchronization Synchronization Details of IPC Mechanisms Details of IPC Mechanisms Message Queues Message Queues Shared Memory Shared Memory Pipes Pipes Conclusion Conclusion References References Thank you Thank you

4 Introduction: Introduction: In order to make a coherent system, processes usually have to pass information back and forth, and that's where IPC comes in. In order to make a coherent system, processes usually have to pass information back and forth, and that's where IPC comes in. However, it turns out that the models of IPC available are very similar, in both Windows Multiprocessor and Sun Solaris though the implementations differ greatly. However, it turns out that the models of IPC available are very similar, in both Windows Multiprocessor and Sun Solaris though the implementations differ greatly.

5 Definition of IPC: A set of programming interfaces that enables a process to communicate data or information to another process. A set of programming interfaces that enables a process to communicate data or information to another process. Mechanisms for IPC exist in the different layers of the system, from Mach messaging in the kernel to distributed notifications and Apple events in the application environments. Mechanisms for IPC exist in the different layers of the system, from Mach messaging in the kernel to distributed notifications and Apple events in the application environments.

6 Types of IPC: IPC mechanisms include :- pipes, pipes, named pipes, named pipes, signals, signals, message queueing, message queueing, semaphores, semaphores, shared memory, shared memory, sockets, sockets, the Clipboard, and the Clipboard, and application services. application services.

7 Outline: Introduction Introduction Definition of IPC Definition of IPC Types of IPC Types of IPC Definition of UNIX/SUN SOLARIS O.S Definition of UNIX/SUN SOLARIS O.S IPC Mechanisms for UNIX IPC Mechanisms for UNIX Definition of Windows O.S Definition of Windows O.S IPC Mechanisms for Windows IPC Mechanisms for Windows Synchronization Synchronization Details of IPC Mechanisms Details of IPC Mechanisms Message Queues Message Queues Shared Memory Shared Memory Pipes Pipes Conclusion Conclusion References References Thank you Thank you

8 Definition of UNIX/SUN SOLARIS O.S UNIX: is a multiuser, multitasking operating system that is widely used as the master control program in workstations and especially servers. UNIX: is a multiuser, multitasking operating system that is widely used as the master control program in workstations and especially servers. Solaris: Solaris is a multitasking, multiprocessing operating system and distributed computing environment for Sun's SPARC computers from SunSoft. It provides an enterprise-wide UNIX environment Solaris: Solaris is a multitasking, multiprocessing operating system and distributed computing environment for Sun's SPARC computers from SunSoft. It provides an enterprise-wide UNIX environment

9

10 IPC Mechanisms for UNIX: Shared memory, pipes, and message queues are all suitable for processes running on a single computer. Shared memory, pipes, and message queues are all suitable for processes running on a single computer. sockets are usually the chosen technique for communicating across the network. sockets are usually the chosen technique for communicating across the network.

11 Outline: Introduction Introduction Definition of IPC Definition of IPC Types of IPC Types of IPC Definition of UNIX/SUN SOLARIS O.S Definition of UNIX/SUN SOLARIS O.S IPC Mechanisms for UNIX IPC Mechanisms for UNIX Definition of Windows O.S Definition of Windows O.S IPC Mechanisms for Windows IPC Mechanisms for Windows Synchronization Synchronization Details of IPC Mechanisms Details of IPC Mechanisms Message Queues Message Queues Shared Memory Shared Memory Pipes Pipes Conclusion Conclusion References References Thank you Thank you

12 Definition of Windows O.S: A family of operating systems for personal computers, Windows dominates the personal computer world. A family of operating systems for personal computers, Windows dominates the personal computer world. Windows provides a graphical user interface (GUI), virtual memory management, multitasking, and support for many peripheral devices. Windows provides a graphical user interface (GUI), virtual memory management, multitasking, and support for many peripheral devices.

13

14 IPC Mechanisms for Windows: Shared memory, pipes, and events (equivalent to signals). Shared memory, pipes, and events (equivalent to signals). The clipboard/Dynamic Data Exchange (DDE), Component Object Model (COM), and send message. The clipboard/Dynamic Data Exchange (DDE), Component Object Model (COM), and send message. Windows sockets and Message Queuing (also known as MSMQ). Windows sockets and Message Queuing (also known as MSMQ). Remote procedure call (RPC) and mailslots. Remote procedure call (RPC) and mailslots.

15 Synchronization: In serial data transmission, a method of ensuring that the receiving end can recognize characters in the order in which the transmitting end sent them, and can know where one character ends and the next begins. In serial data transmission, a method of ensuring that the receiving end can recognize characters in the order in which the transmitting end sent them, and can know where one character ends and the next begins.

16 Both UNIX and Windows have an extensive set of process and thread synchronization techniques. Both operating systems use semaphores, which are synchronization primitives used to control access to a resource that can support a limited number of users. Both UNIX and Windows also use mutex objects to control mutually exclusive access to a resource.

17 Outline: Introduction Introduction Definition of IPC Definition of IPC Types of IPC Types of IPC Definition of UNIX/SUN SOLARIS O.S Definition of UNIX/SUN SOLARIS O.S IPC Mechanisms for UNIX IPC Mechanisms for UNIX Definition of Windows O.S Definition of Windows O.S IPC Mechanisms for Windows IPC Mechanisms for Windows Synchronization Synchronization Details of IPC Mechanisms Details of IPC Mechanisms Message Queues Message Queues Shared Memory Shared Memory Pipes Pipes Conclusion Conclusion References References Thank you Thank you

18 Details of IPC Mechanisms

19 Message Queues(MQs): In programming, message queueing is a method by which process (or program instances) can exchange or pass data using an interface to a system-managed queue of messages. In programming, message queueing is a method by which process (or program instances) can exchange or pass data using an interface to a system-managed queue of messages.

20 MQs MQs IN UNIX: One application sends messages to the queue; another application reads messages from the queue. The queues are memory based and are very fast as a result. Message queues were introduced in AT&T System V.2 UNIX.

21 MQs MQs IN Windows:  Messaging system is called Message Queuing (MSMQ).  Message Queuing provides guaranteed message delivery, efficient routing, security, and priority- based messaging.  In essence, a Message Queuing message is guaranteed to be delivered, but there is no specific guarantee about exactly when it will be received. The operation is the same as on UNIX

22 Shared Memory: Hardware architecture in which multiple processors operate independently but share the same memory resources. Hardware architecture in which multiple processors operate independently but share the same memory resources. In computer programming, shared memory is a method by which program process can exchange data more quickly than by reading and writing using the regular operating system services. In computer programming, shared memory is a method by which program process can exchange data more quickly than by reading and writing using the regular operating system services.

23 Shared memory IN UNIX:  The program must first call a function to get a shared memory identifier, shm_id, for the amount of shared memory. The identifier is then used in calls to attach the shared memory to the process.  Shared memory in UNIX can be done based on the concept of file mapping.

24 Shared memory IN Windows:  Implementation of shared memory is based entirely on the concept of file mapping.  As in the UNIX implementation, which uses an identifier, Windows uses a handle identifier to identify the memory that is mapped into the process at the requested address.

25 Pipes: A pipe is a technique for passing information from one program process to another. Unlike other forms of interprocess communication (IPC). A pipe is a technique for passing information from one program process to another. Unlike other forms of interprocess communication (IPC). A pipe is usually a one-way communication only. A pipe is usually a one-way communication only. For two-way communication between processes, two pipes can be set up, one for each direction. For two-way communication between processes, two pipes can be set up, one for each direction.

26 Pipes in UNIX:  can be named or unnamed. They also have separate read and write file descriptors, which are created through a single function call.  Two unrelated processes can use named pipes to communicate.  With unnamed pipes, a parent process that must communicate with a child process creates a pipe that the child process will inherit and use.

27 Pipes in Windows:  can also be named or unnamed. A parent process and a child process typically use unnamed pipes to communicate.  The processes must create two unnamed pipes for bidirectional communication  Two unrelated processes can use named pipes, even across the network on different computers.

28 Conclusion: Like most everything else, IPC is not portable between Windows Multiprocessor OS and Sun Solaris OS. Like most everything else, IPC is not portable between Windows Multiprocessor OS and Sun Solaris OS. However, though the implementation details differ greatly, the two systems do share certain ways of thinking about IPC. However, though the implementation details differ greatly, the two systems do share certain ways of thinking about IPC. They try to cover the same functionality, and almost any style of IPC you implement in one can usually be replicated in the other. They try to cover the same functionality, and almost any style of IPC you implement in one can usually be replicated in the other.

29 References: [1] R.W. Stevens, Advanced Programming in the UNIX Environment, Addison-Wesley (Books) [1] R.W. Stevens, Advanced Programming in the UNIX Environment, Addison-Wesley (Books) [2] Robert Orfali and Dan Harkey, Client/Server Programming with OS/2 2.0, Van Nostrand Reinhold. (Books) [2] Robert Orfali and Dan Harkey, Client/Server Programming with OS/2 2.0, Van Nostrand Reinhold. (Books) [3] A short introduction to operating systems, Mark Burgess, October 3, 2001 [3] A short introduction to operating systems, Mark Burgess, October 3, 2001 http://www.iu.hio.no/%7Emark/os/os.html (URL). http://www.iu.hio.no/%7Emark/os/os.html (URL). http://www.iu.hio.no/%7Emark/os/os.html Definaitons: http://www.course.com/careers/glossary/operating.cfm (URL) Definaitons: http://www.course.com/careers/glossary/operating.cfm (URL)http://www.course.com/careers/glossary/operating.cfm UNIX: http://www.course.com/careers/glossary/operating.cfm#unix (URL) UNIX: http://www.course.com/careers/glossary/operating.cfm#unix (URL)http://www.course.com/careers/glossary/operating.cfm#unix IPC: iroi.seu.edu.cn/books/ee_dic/whatis/ipc.htm IPC: iroi.seu.edu.cn/books/ee_dic/whatis/ipc.htm (URL) (URL) Pipes: dictdie.net/pipes/ Pipes: dictdie.net/pipes/ (URL) (URL)

30 Any Questions ? THANK YOU


Download ppt "Group 1 Members: SMU CSE 8343 Wael Faheem Professor:Dr.M.KHALIL. Hazem Morsy Date:11-08-03 Poramate Ongsakorn Payal H Patel Samatha Devi Malka."

Similar presentations


Ads by Google