8.1 Overview

I l @ ve RuBoard

OS support for multiprocessing is important for networked applications because it helps to

  • Enable concurrency by allowing the OS to schedule and run separate processes on different CPUs

  • Increase robust ness by using MMU hardware to protect separate process address spaces from accidental or malicious corruption by other active processes in the system

  • Enhance security by allowing each process to verify or control peruser or per-session security and authentication information

This chapter describes the following ACE classes that networked applications can use to spawn and manage one or more processes:

ACE Class Description
ACE Process Creates and synchronizes processes portably.
ACE_Process_Options Specifies both platform-independent and platform - specific options.
ACE_Process_Manager Creates and synchronizes the completion of groups of processes portably.

Figure 8.1 shows the relationships among these classes. These wrapper facades provide the following benefits:

  • Enhance portability across heterogeneous OS platforms. Process management capabilities vary widely among OS platforms. ACE's multiprocessing wrapper facades offer portable access to a common subset of these capabilities. For example, the ACE_Process and ACE_Process_Options classes can spawn, manage, and synchronize processes consistently, regardless of the underlying OS multiprocessing mechanisms.

  • Easy-to-use access to OS-specific mechanisms. Certain platforms offer powerful process creation mechanisms, such as POSIX fork() . The ACE wrapper facades described in this chapter allow developers to access these mechanisms without changing their application code for different projects.

  • Manage a group of processes as a cohesive collection. Networked applications that make use of multiprocessing often require multiple processes to begin and end as a group. The ACE_Process_Manager class adds this capability to the individual process management offered by ACE_Process .

Figure 8.1. The ACE Process Management Class Relationships

This chapter motivates and describes the capabilities of the ACE multiprocessing classes. We present examples of each class to illustrate how they can simplify and ruggedize various aspects of our networked logging service.

I l @ ve RuBoard


C++ Network Programming
C++ Network Programming, Volume I: Mastering Complexity with ACE and Patterns
ISBN: 0201604647
EAN: 2147483647
Year: 2001
Pages: 101

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net