US5179665AExpiredUtility

Microprocessor information exchange with updating of messages by asynchronous processors using assigned and/or available buffers in dual port memory

72
Assignee: WESTINGHOUSE ELECTRIC CORPPriority: Jun 24, 1987Filed: Nov 13, 1989Granted: Jan 12, 1993
Est. expiryJun 24, 2007(expired)· nominal 20-yr term from priority
G06F 15/167
72
PatentIndex Score
52
Cited by
17
References
17
Claims

Abstract

Updated images of messages are passed between asynchronous digital processors using dual port shared memory. In the basic form of the invention, three buffers in shared memory are assigned to each message. Where one of the processors is a controller for a data link channel carrying n messages, 2n+1 buffers are provided in free shared memory space with 2 buffers assigned to each message at all times and a common buffer serving as the third buffer for all of the messages. Where linked buffers in local memory of a controller processor receive message updates from a data highway, two buffers in shared memory are assigned to each message and a linked buffer in the controller local memory serves as the third buffer. The buffers containing the message updates are passed between processors by use of a buffer status array in shared memory. A semaphore lock in the array permits only one processor at a time to assign or release buffers.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A method of transferring updated images of a message between asynchronous sender and receiver digital processors using dual port shared memory comprising the steps of: providing two buffers in said dual port shared memory and one local buffer in a said sender digital processor;   operating the sender digital processor asynchronously of the sender digital processor to send updated message images to a receiver processor by receiving the newest updated message image in said local memory, assigning an available one of the shared memory buffers to itself, filling the assigned buffer with the newest updated message image in the local buffer, and then releasing the buffer in shared memory assigned to it as the buffer with the newest updated message image to make the newest updated message image available for the receiver processor;   operating the receiver digital processor to receive updated message images from the first processor by assigning to itself the shared memory buffer with the newest updated message image, reading the newest updated message image, and releasing such buffer to make it available for the sender processor; and   permitting only one processor at a time to assign or release buffers in said shared memory; or to fill a shared memory buffer with an updated message image.   
     
     
       2. The method of claim 1 for transferring a plurality of messages from the sender processor to the receiver processor including: providing a set of two buffers in said dual port shared memory and local buffers in the sender processor for receiving the messages;   operating the sender processor to receive each updated message image in a local memory buffer, to determine the set of buffers in shared memory associated with that message, and to perform the steps of claim 1 for each message, and   operating the receiver processor to perform the steps of claim 1 sequentially for each message.   
     
     
       3. In combination, a sender digital processor having a local memory;   a receiver digital processor which operates asynchronously from the sender processor;   dual port shared memory connected to the sender and receiver processors and having two buffers, said sender processor being programmed to receive a newest updated message image in said local memory, to assign an available one of the shared memory buffers to itself to fill the assigned buffer with the newest updated message image data in the local memory, and to release the buffer in shared memory assigned to it as the buffer with the newest updated message image and said receiver processor being programmed to asynchronously of the sender processor assign to itself the shared memory buffer with the newest updated message image, to read the newest updated message and to release such buffer to make it available for the sender processor; and   means permitting only one processor at a time to assign, release shared memory buffers or to fill a shared memory buffer with an updated message image.   
     
     
       4. The combination of claim 3 including a data highway connected to said sender processor to successively transmit to said sender processor updated images of a plurality of messages, wherein said local memory includes a plurality of linked buffers which successively receive updated message images from said data highway and wherein said dual port shared memory includes a set of two buffers assigned to each of said plurality of messages, said sender processor being further programed to successively assign to itself an available buffer from the set of buffers in shared memory assigned to each successive message to be passed to the receiver processor. 
     
     
       5. A method of transferring updated images of n messages between asynchronous digital processors using buffers in dual port shared memory comprising the steps of: maintaining for each message an assigned status table for selectively assigning to associated buffers a status indicating that a buffer is assigned to a sender processor, assigned to a receiver processor, idle, or contains the newest updated message image;   initially allocating two buffers with an idle status to each message and assigning one buffer as a common buffer for all of the messages and indicating in each of the status tables that it is assigned to the sender processor.   limiting access to the status table to only one processor at a time;   operating the sender processor to:   receive one of the n messages in the common buffer assigned to it;   determine the status table associated with the message from the content of the message;   acquire access to the associated status table;   search the associated status table for a buffer assigned a status indicating it contains the newest updated message image and if such a buffer is found change its status to the idle status;   search the associated status table for a buffer assigned a status of assigned to the sender processor and change its status to a status indicating it contains the newest updated message image;   search the associated status table for a buffer with an idle status and change it to a status of assigned to the sender processor; and   release access to the associated status table; and   operating the receiver processor to:   acquire access to the associated status table;   search the associated status table for a buffer assigned a status indicating it contains the newest updated message image and change its status to a status of assigned to the receiver processor;   release access to the associated status table;   copy the updated image of the message from the buffer assign the status of the assigned to the receiver processor;   reacquire access to the associated status table;   search the associated status table for a buffer assigned a status indicating it contains the newest updated message image and if such a buffer is found then change the status of the buffer with a status of assigned to the receiver processor to a status of idle, and if no buffer is found with a status indicating it contains the newest updated message image, change the status of the buffer with a status of assigned to the receiver processor to a status indicating it contains the newest updated message image.   
     
     
       6. A method of transferring updated images of n messages between asynchronous digital processors using buffers in dual port shared memory comprising the steps of: maintaining for each message an assigned status table for selectively assigning to associated buffers a status indicating that a buffer is assigned to a sender processor, assigned to a receiver processor, idle, or contains the newest updated message image;   initially assigning in the status tables for each message two buffers with a status of idle and assigning a common buffer as assigned to the receiver processor in each buffer status table;   limiting access to each of the buffer status tables to only one processor at a time;   operating the sender processor to:   locate the status table associated with the message to be passed to the receiver processor;   acquire access to the associated status table;   search the associated status table for a buffer assigned the idle status and change its status to a status of assigned to the sender processor;   release access to the associated status table;   enter an updated image of the message to be passed into the buffer assigned to the sender processor;   reacquire access to the associated status table;   search the associated status table for a buffer assigned a status indicating it contains the newest updated message image and change its status to the idle status; and   change the status of the buffer assigned a status of assigned to the sender processor to a status indicating it contains the newest updated message image;   release access to the associated status table; and operating the receiver processor to:   locate the status table with the message to be passed;   acquire access to the associated status table;   search the associated status table for a buffer assigned a status indicating it contains the newest updated message image and swap the assigned status of this buffer with the status of the buffer with a status of assigned to the receiver processor by changing the status of the buffer with a status of assigned to the receiver processor to a status of idle and changing the status of the buffer with a status of indicating it contains the newest updated message image to a status of assigned to receiver;   release access to the associated status table;   copy the updated image of the message from the buffer assigned the status of assigned to the receiver processor;   reacquire access to the associated status table; and   search the associated status table for a buffer with a status indicating it contains the newest updated message image and if such a buffer is not found then change the status of the buffer with a status of assigned to receiver to a status indicating it contains the newest updated message image and search the associated status array for a buffer with a status of idle and change status to a status of assigned to receiver; and release access to the associated status table.   
     
     
       7. A method of transferring updated images of a message between asynchronous digital processors using dual port shared memory comprising the steps of: providing three buffers in said dual port shared memory, and initially assigning one buffer to a sender processor;   operating the sender processor to enter the updated image of the message int he assigned buffer, to release the assigned buffer as the buffer with a newest updated message image to make the updated message image available to a receiver processor, and to assign to itself an available one of said three buffers for the next updated message image;   further operating the sender processor to, prior to releasing the buffer with the newest updated message image, determine if there is another buffer which has been previously released with an indication that it is the buffer with the newest updated message image, and if there is, removing the indication from said previously released buffer that it is the buffer with the newest updated message image;   operating the receiver processor asynchronously of the sender processor to assign the buffer with the newest updated message image to itself, to copy the newest updated message image and to then release such buffer to make it available for the sender processor;   further operating the receiver processor after copying the updated message image from the buffer assigned to it, to determine if there is another buffer released by the sender processor having a newer updated image of the message than the image in the buffer assigned to the receiver processor, and if not, to release said buffer assigned to the receiver processor as a buffer containing the newest update of the message image, which buffer can be reassigned to the receiver processor if no other buffer with a newer updated message image has been released by the sender processor when the receiver processor again is operated to receive a message image;   permitting only one processor at a time to assign to itself and release buffers; and   transmitting updated message images from the sender processor to a plurality of receiver processors, by maintaining a reader index for tracking the number of receiver processors reading an updated message image, and operating each receiver processor to assign a buffer to the receiver processors only if no other buffer is already assigned to a receiver processor, to increment the reader index to copy the updated message image from the buffer assigned to the receiver processors, to decrement the reader index prior to releasing a buffer assigned to the receiver processors and to release a buffer assigned to the receiver processors only if the reader index is zero.   
     
     
       8. A method of transferring updated images of a message between asynchronous digital processors using dual port shared memory comprising the steps of: providing three buffers in said dual port shared memory, and initially assigning one buffer to a sender processor;   operating the sender processor to enter the updated image of the message in the assigned buffer, to release the assigned buffer as the buffer with a newest updated message image to make the updated message image available to a receiver processor, and to assign to itself an available one of said three buffers for the next updated message image;   operating the receiver processor asynchronously of the sender processor to assign the buffer with the newest updated message image to itself, to copy the newest updated message image and to then release such buffer to make it available for the sender processor;   permitting only one processor at a time to assign to itself and release buffers; and   transmitting updated message images from a sender processor to a plurality of asynchronously operated receiver processors by operating each of said receiver processors to only assign a buffer to the receiver processors if no buffer is already assigned to the receiver processors, and to otherwise read the updated message image in the buffer already assigned to the receiver processors; and to not release the buffer assigned to the receiver processors when any other receiver processor is copying an updated message image from the buffer assigned to the receiver processors.   
     
     
       9. A method of transferring n serially transmitted updated images of n messages between asynchronous digital processors using dual port shared memory comprising the steps of: providing 2n+1 buffers in said dual port shared memory;   initially assigning a set of 2 buffers selected from said 2n+1 buffers to each message and assigning the remaining buffer to each message as a common buffer assigned to a sender processor;   operating the sender processor to receive an updated one of said messages in said common buffer assigned to it, to determine the set of buffers assigned to the received message, to release the assigned buffer as the buffer with a newest updated message image to make the updated message image available to a receiver processor by swapping the common buffer with an available buffer assigned to that message which then becomes the common buffer assigned to the sender processor;   operating the receiver processor asynchronously of the sender processor to serially assign buffers with the newest updated message image associated with each message to itself, to copy the newest updated message images and to then release such buffers to make them available for the sender processor;   permitting only one processor at a time to assign to itself and release buffers; and   operating the receiver processor to acquire the message updates by serially assigning to itself buffers with message updates associated with each message.   
     
     
       10. The method of claim 9 wherein said sender processor is a communications processor for controlling messages on a plurality of physical communication channels each of which carries n messages, wherein n is a variable having an independent value for each channel, said method including: providing 2n+1 buffers in said dual port shared memory for each channel, and operating said sender processor and receiver processor to perform the steps of claim 6 for each channel. 
     
     
       11. A method of transferring updated images of n messages between asynchronous digital processors using dual port shared memory comprising the steps of: providing 2n+1 buffers in said dual port shared memory;   initially assigning a set of two buffers to each of said n messages and assigning the remaining buffer to each message as a common buffer assigned to a receiver processor;   operating the sender processor to determine the set of buffers assigned to a message to be transmitted and assigning to itself an available buffer in such set of buffers and to release the assigned buffer as the buffer with a newest updated message image to make the updated message image available to a receiver processor;   operating the receiver processor asynchronously of the sender processor to locate the set of buffers assigned to a message to be received, assigning to itself the buffer from the located set with the newest updated message image by swapping the common buffer assigned to the receiver processor with the buffer with the newest updated message image to copy the newest updated message image and to then release such buffer to make it available for the sender processor; and   permitting only one processor at a time to assign to itself and release buffers.   
     
     
       12. The method of claim 11 further including: operating said receiver processor to, after extracting the message update from the buffer assigned to it, determine if one of the two buffers assigned to the associated message has a newer update than the update in the buffer assigned to it and if not, to swap the buffer assigned to it with an available buffer assigned to the associated message to retain as a latest update for the associated message the update in the buffer which had been the buffer assigned to the receiver processor.   
     
     
       13. The method of claim 12 wherein said receiver processor is a communications processor for controlling messages on a plurality of physical communication channels each of which carries n messages, wherein n is a variable having an independent value for each channel, said method including: providing 2n+1 buffers in said dual port shared memory for each channel, and operating said sender processor and receiver processor to perform the steps of claim 9 for each channel. 
     
     
       14. In combination: a sender digital processor;   a receiver digital processor which operates asynchronously from the sender processor;   a datalink channel which serially provides updates of n different messages to the sender processor to pass to the receiver processor;   a dual port shared memory connected to the sender and receiver processors and having 2n+1 buffers with a set of two buffers initially assigned to each message and the remaining buffer assigned as a common buffer to the datalink channel, said sender processor being programmed: to, when a message is to be passed to the receiver processor, enter an updated message image in said common buffer, to determine the set of buffers assigned to the updated message, and to release the buffer with the updated message image as the buffer with the newest updated message image to make the updated message image available to the receiver processor by swapping the common buffer with an available buffer assigned to that message which then becomes the common buffer assigned to the datalink channel, said receiver processor being programmed to asynchronously of the sender digital processor serially assign the buffer with the newest updated message associated with each message to itself, to copy the newest updated message images, and to release such buffers to make them available for the sender processor; and   means within the dual port shared memory for permitting only one of said processors at a time to assign or release buffers.   
     
     
       15. The combination of claim 14 wherein said datalink comprises a plurality of channels each of which provides n messages to the sender processor to be passed to the receiver processor wherein n is a variable having an independent value for each channel, wherein 2n+1 buffers are provided in said dual port shared memory for each channel with the common buffer being assigned to the associated channel, and wherein said sender and receiver processors are programmed to serially pass updates of said n messages for each channel through the assigned buffers in the dual port shared memory. 
     
     
       16. In combination: a sender digital processor;   a receiver digital processor which operates asynchronously from the sender processor;   a datalink channel which serially transmits n different messages provided by the receiver processor;   a dual port shared memory connected to the sender and receiver processors and having 2n+1 buffers with a set of two buffers initially assigned to each message and the remaining buffer assigned as a common buffer to the datalink channel, said sender processor being programmed: to, when a message is to be passed to the receiver processor, determine the set of buffers assigned to the message to be transmitted, and to then assign to itself an available buffer in such set of buffers, to release the assigned buffer as the buffer with the newest updated message image to make the updated message image available to the receiver processor, said receiver processor being programmed to asynchronously of the sender digital processor locate the buffers assigned to a message to be received, to assign to itself the buffer with the newest updated message image by swapping the common buffer assigned to the datalink channel with the buffer with the newest updated message image, and to transmit the updated message image on the datalink channel; and   means within the dual port shared memory for permitting only one of said processors at a time to assign or release buffers.   
     
     
       17. The combination of claim 16 wherein said datalink comprises a plurality of channels each of which transmits n messages provided by the receiver processor wherein n is a variable having an independent value for each channel, wherein 2n+1 buffers in said dual port shared memory are assigned to each channel, and wherein said sender and receiver processors are further programmed to serially pass the updates of the n messages through the dual port shared memory for transmission on said plurality of datalinks.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.