New Proactor implementation for POSIX

 

Alexander Libman

 

libman@terabit.com.au, alibman@optusnet.com.au


 

1.     The objective of this development 3

2.     New features of POSIX Proactor 3

3.        Motivation for the leader-follower pattern. 5

4.        Modification of the leader-follower pattern for Proactor 6

4.1.      A follower can do useful job. 6

4.2.      A leader only waits for AIO events  7

4.3.            Dispatcher 7

4.4.            Locking model 8

5.        Asynchronous results and collections of results. 8

5.1.            Asynchronous result - stateful object 8

5.2.            Collections of results. 9

5.3.            Cashed Results Allocator 9

6.        AIO_Dispatcher 10

6.1.            Post_Completion  11

6.2.            Handle_Events  11

7.        AIO_Processor 12

7.1.            Shared AIO_Processor 14

7.2.            Dedicated AIO_Processor 14

7.3.            Team-work of two AIO_Processors  14

7.4.            Start_aio  15

7.5.            Cancel_aio. 16

7.6.            Handle_aio_events  16

8.        AIO_Provider interface. 17

8.1.            Information pure virtual methods  17

8.2.            Executive pure virtual methods  18

8.3.            Factory pure virtual methods of AIO_Wait_Strategy interface. 18

9.        AIO_Wait_Strategy interface. 18

9.1.            Executive pure virtual methods  19

9.2.            Notification pure virtual methods  19

9.3.            Factory pure virtual methods of AIO_Interrupt_Strategy interface. 19

10.            AIO_Interrupt_Strategy interface. 19

10.1.                Executive pure virtual methods  20

10.2.                Notification pure virtual methods  20

10.3.                Interrupt_Pipe_Strategy  20

10.4.                Interrupt_Signal_Strategy  20

11.            Implementations of AIO_Provider and Wait_Strategies. 21

11.1.                POSIX_STD_Provider