A buffer asynchronous output apparatus for carrying out a buffer output processing for a file device concurrently renewed by a plurality of renewal processing programs, the buffer asynchronous output apparatus comprising:
- a system shared buffer unit which said renewal processing programs can use in common, said system shared buffer unit including
- a plurality of buffer areas, each of said renewal processing programs using a predefined one of said buffer areas as a renewed buffer area;
- and
- a buffer control table for controlling said renewed buffer area and a copied buffer area into which contents of said renewed buffer area should be copied, said buffer control table comprising a renewed buffer information field for storing renewed buffer information for said renewed buffer area and a copied buffer information field for storing copied buffer information for said copied buffer area, said copied buffer information field comprising an area information field for said copied buffer area, an output status field for storing an output status, a file output result status field for storing a file output result status, and a renewal processing program identifier field for storing a renewal processing program identifier identifying one of said renewal processing programs;
- each of said renewal processing programs including
- a copied buffer area securing section for checking said renewed buffer information field and said copied buffer information field on said buffer control table to determine whether or not the copied buffer area corresponding to said renewed buffer area in question is already secured, said copied buffer area securing section securing said copied buffer area and storing said copied buffer information in said copied buffer information field of said buffer control table when said copied buffer area is not still secured, and
- a renewed buffer area copying section for copying contents of said renewed buffer area into said copied buffer area, said renewed buffer area copying section storing said renewal processing program identifier in said renewal processing program identifier field of said copied buffer information field on said buffer control table that corresponds to said copied buffer area, said copying contents of said renewed buffer area into said copied buffer area allowing access to said renewed buffer area by another renewal processing program prior to completion of file output for contents of said renewed buffer area;
- an output request waiting queue for storing an output request which request to output contents of said copied buffer area in to said file device, each of said renewal processing programs further including an output request enqueuing section for storing an output request status as said output status in said output status field of said copied buffer information field on said buffer control table and enqueuing said output request into said output request waiting queue when said output request status is not still stored in said output status field of said copied buffer information on said buffer control table;
- and
- an output processing program which is performed asynchronously with said renewal processing programs, said output processing program including
- a file outputting section for storing an output execution status as said output status in said output status field of said copied buffer information field on said buffer control table and outputting contents of said copies buffer area into said filed device when said output processing program receives said output request dequeued from said output request waiting queue, and
- an output completion information section for storing an output completion status as said output status in said output status field of said copies buffer information field on said buffer control table and for storing said file output result status in said file output result status field of said copies buffer information field on said buffer control table after completion of a file output processing by means of said file outputting section,
- wherein said buffer control table further controls an alternate copied buffer area into which contents of said renewed buffer are should be copied in place of said copied buffer areas, said buffer control table further including an alternate copied buffer information field for storing alternate copied buffer information for said alternate copied buffer area, said alternate copied buffer information field including another area information field for said alternate copied buffer area, another output status field for storing another output status, another file output result status field for storing another file output result status, and another renewal processing program identifier field for storing another renewal processing program identifier identifying one of said renewal processing programs, each of said renewal processing programs further including an alternate copied buffer area securing section for checking said buffer control table to determine whether or not said alternate copied buffer area information field is secured in said buffer control table when said output execution status is stored in said output status field of said copied buffer information field on said buffer control table, said alternate copied buffer area securing section securing said alternate copied buffer area and storing said alternate copied buffer information in said alternate copied buffer information field of said buffer control table when said alternate copied buffer area is not secured in said system shared buffer unit, said alternate copied buffer area securing section checking said output status field of said alternate copied buffer information field when said alternate copied buffer area is already secured in said system shared buffer unit, said alternate copied buffer area securing section securing said alternate copied buffer area and storing said alternate copied buffer information in said alternate copied buffer information field of said buffer control table when said output execution status is stored in said output status field of said alternate copied buffer information field on said buffer control table.