Message handler
First Claim
1. A computer system comprising:
- (a) means for running a plurality of processes;
(b) a message queue, having a head and a tail;
(c) a process queue, having a head and a tail; and
(d) a message handler comprising;
(i) means responsive to a request from a source process having a message to send, for adding said message to the tail of the message queue along with a destination process identity for said message;
(ii) means responsive to a request from a destination process, indicating that said destination process is ready to receive a message, for adding an entry identifying said destination process to the tail of said process queue and then suspending said destination process;
(iii) means for performing a scan of the process queue, starting from the head of the process queue and, for each process in the process queue, performing a scan of the message queue, starting from the head of the message queue, until a message/process pair is found comprising a particular process and a particular message that is destined for said particular process; and
(iv) means for activating said particular process and for passing said particular message to said particular process.
0 Assignments
0 Petitions
Accused Products
Abstract
A computer system has a message handler for passing messages between processes. The message handler makes use of a message queue and a process queue. The message queue holds a list of messages between the processes, arranged in chronological order according to the length of time each message has been waiting for delivery. The process queue holds a list of processes that have requested messages, arranged in chronological order according to the length of time each process has been waiting for a message. The message handler searches the queues to find the earliest process in the process queue that currently has a message queued for it, and to find the earliest message in the message queue currently queued for that process, and then passes that message to that process. The message handler may be implemented as a TSR (Terminate and Stay Resident) process, running under a single-thread operating system.
-
Citations
2 Claims
-
1. A computer system comprising:
-
(a) means for running a plurality of processes; (b) a message queue, having a head and a tail; (c) a process queue, having a head and a tail; and (d) a message handler comprising; (i) means responsive to a request from a source process having a message to send, for adding said message to the tail of the message queue along with a destination process identity for said message; (ii) means responsive to a request from a destination process, indicating that said destination process is ready to receive a message, for adding an entry identifying said destination process to the tail of said process queue and then suspending said destination process; (iii) means for performing a scan of the process queue, starting from the head of the process queue and, for each process in the process queue, performing a scan of the message queue, starting from the head of the message queue, until a message/process pair is found comprising a particular process and a particular message that is destined for said particular process; and (iv) means for activating said particular process and for passing said particular message to said particular process.
-
-
2. A method of passing messages between processes in a computer system, the method comprising steps as follows:
-
(a) maintaining a message queue, having a head and a tail; (b) maintaining a process queue, having a head and a tail; and (c) adding messages from source processes to the tail of the message queue along with destination process identities for said messages; (d) when a destination process is ready to receive a message, adding an entry identifying said destination process to the tail of said process queue and then suspending said destination process; (e) performing a scan of the process queue, starting from the head of the process queue and, for each process in the process queue, performing a scan of the message queue, starting from the head of the message queue, until a message/process pair is found comprising a particular process and a particular message that is destined for said particular process; (f) activating said particular process; and (g) passing said particular message to said particular process.
-
Specification