IP Library Granted Patent US 9,448,864
Granted Patent B2
US 9,448,864 · App. 14/420,713 · Granted Sep 20, 2016

Method and apparatus for processing message between processors

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,448,864
App. No.
14/420,713
Granted
Sep 20, 2016
Kind
B2
Abstract

A message processing apparatus that processes a message between processors according to an embodiment of the present invention solves a problem that occurs when a message is processed by using interrupt or polling processing by processing messages having priorities that are transmitted between transmission and receiving processors that use a shared memory by using a polling thread and a kernel module, thereby providing a priority-based message processing method without applying a load to a system.

Claims (33)

1. A message processing apparatus that processes a message between processors, the apparatus comprising:

a message waiting queue implemented in a shared memory and temporarily storing messages, wherein each of the messages comprises priority information indicating a task processing order;

a message polling thread for receiving the messages in order of high priorities by monitoring the message waiting queue by using a polling thread in an idle time of a receiving processor that uses the shared memory; and

a priority message processing unit for monitoring the message waiting queue instead of the message polling thread when a kernel is called, and, if a message having a higher priority than that of a thread having the highest priority among executable threads is on the receiving processor, processing the having the higher priority, wherein at least one of the message waiting queue, the message polling thread, and the priority message processing unit is implemented by a hardware processor message.

2. The message processing apparatus of claim 1 , further comprising: a message handling thread for, if a message processing request is received from the message polling thread or the priority message processing unit, receiving and processing messages from the message polling thread or the priority message processing unit based on priorities of messages, if message processing is complete, returning to a thread pool, and awaiting until a next message processing request is received.

3. The message processing apparatus of claim 2 , wherein if the messages stored in the message waiting queue are non-blocking messages, the message polling thread processes the non-blocking messages.

4. The message processing apparatus of claim 2 , wherein the message handling thread inherits priority of received message when receiving a message from the message polling thread or the priority message processing unit.

5. The message processing apparatus of claim 1 , wherein the message polling thread is executed in the idle time of the receiving processor, wherein no executable thread is present in the idle time.

6. The message processing apparatus of claim 1 , wherein the calling of the kernel includes cases in which a thread changes a state from waiting to ready, a thread changes a state from running to finishing, a thread changes a state from running to waiting, a new thread arrives, and an interrupt occurs.

7. The message processing apparatus of claim 1 , wherein the message polling thread processes the messages by using polling processing.

8. The message processing apparatus of claim 1 , wherein a receiving processor performs input and output processing, and a transmission processor performs image processing.

9. A message processing method performed on a receiving processor, the method comprising:

receiving and processing messages stored in a message waiting queue of a shared memory according to priorities of the messages through a message polling thread;

when a kernel is called, searching the message waiting queue by a priority message processing unit, instead of for the message polling thread;

comparing a priority of a message having the highest priority stored in the message waiting queue and a priority of a thread having the highest priority among executable threads by the priority message processing unit; and

if the priority of the message having the highest priority stored in the message waiting queue is higher than the priority of the thread having the highest priority, processing the message having the highest priority in the priority message processing unit.

10. The message processing method of claim 9 , further comprising:

receiving a message processing request from the message polling thread or the priority message processing unit in a message handling thread;

receiving and processing messages from the message polling thread or the priority message processing unit according to priorities of the messages in the message handling thread; and

if message handling is completed by the message handling thread, returning to a thread pool and awaiting until a next message processing request is received.

11. The message processing method of claim 9 , wherein the message polling thread processes the messages by using polling method.

12. The message processing method of claim 9 , wherein the message polling thread periodically monitors the shared memory by using a polling thread in an idle time of a receiving processor that uses the shared memory in communication between processors.

13. The message processing method of claim 9 , wherein the messages comprise message type information, priority information of jobs that are to be processed, and location information of data stored in the shared memory.

14. A message processing apparatus that processes a message between processors, the apparatus comprising:

a message waiting queue implemented in a shared memory accessible by a transmission processor and a receiving processor and temporarily storing messages that are to be transmitted to the transmission processor, wherein each of the messages comprises priority information indicating a task processing order;

a message polling thread for receiving the messages in order of high priorities by monitoring the message waiting queue; and

a priority message processing unit for monitoring the message waiting queue instead of the message polling thread when a kernel is called, and, if a message having a higher priority than that of a thread having the highest priority among executable threads is stored in the message waiting queue, processing the having the higher priority, wherein at least one of the message waiting queue, the message polling thread, and the priority message processing unit is implemented by a hardware processor message.

15. A message processing apparatus that processes a message between processors, the apparatus comprising:

a message waiting queue for temporarily storing messages having priorities that are transmitted between a transmission processor and a receiving processor that use a shared memory;

a message polling thread for receiving the messages according to the priorities by monitoring the message waiting queue by using polling method in an idle time of the receiving processor;

a priority message processing unit for monitoring the message waiting queue instead of the message polling thread when a kernel is called, and, if a priority of a message having the highest priority stored in the message waiting queue is higher than that of a thread having the highest priority among executable threads of the receiving processor, receiving the message having the highest priority; and

a message handling thread for processing the messages received from the message polling thread or the priority message processing unit based on the priorities, if message processing is complete, returning to a thread pool, and awaiting until a next message processing request is received, wherein at least one of the message waiting queue, the message polling thread, and the priority message processing unit is implemented by a hardware processor.

16. The message processing apparatus of claim 15 , wherein if the messages stored in the message waiting queue are non-blocking messages, the message polling thread processes the non-blocking messages.

Assignments (6)
CHANGE OF NAME Recorded Aug 10, 2023
From: HANWHA TECHWIN CO., LTD.
To: HANWHA VISION CO., LTD.
Reel/Frame 064549/0075 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 26, 2019
From: HANWHA AEROSPACE CO., LTD.
To: HANWHA TECHWIN CO., LTD.
Reel/Frame 049013/0723 →
CORRECTIVE ASSIGNMENT TO CORRECT THE APPLICATION NUMBER 10/853,669. IN ADDITION PLEASE SEE EXHIBIT A PREVIOUSLY RECORDED ON REEL 046927 FRAME 0019. ASSIGNOR(S) HEREBY CONFIRMS THE CHANGE OF NAME. Recorded Jan 17, 2019
From: HANWHA TECHWIN CO., LTD.
To: HANWHA AEROSPACE CO., LTD.
Reel/Frame 048496/0596 →
CHANGE OF NAME Recorded Aug 24, 2018
From: HANWHA TECHWIN CO., LTD
To: HANWHA AEROSPACE CO., LTD.
Reel/Frame 046927/0019 →
CHANGE OF NAME Recorded Aug 21, 2015
From: SAMSUNG TECHWIN CO., LTD.
To: HANWHA TECHWIN CO., LTD.
Reel/Frame 036419/0653 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 10, 2015
From: KIM, JIMIN
To: SAMSUNG TECHWIN CO., LTD.
Reel/Frame 034927/0429 →