Games: Processes and Inter-Process Communication

Last time: Games: Events and Input

Prof. Brian D. Davison

Computer Science & Engineering, Lehigh University

Additional Credits

Announcements

Processes

Processes

Running a program

Running a program

Example: execdemo.c

Getting a new process

Getting a new process

Example: forkdemo3.c

The Parent wait()s

Interprocess communication

Interprocess communication

Communication Using Files

Race conditions arise in software when separate computer processes or threads of execution depend on some shared state. Operations upon shared states are critical sections that must be mutually exclusive. Failure to obey this rule opens up the possibility of corrupting the shared state.

Communication Using Shared Memory

Communication Using Shared Memory

IPC Using Named Pipes

Example: Named Pipes