[go: up one dir, main page]

JP2009151472A - Task management device and task management method - Google Patents

Task management device and task management method Download PDF

Info

Publication number
JP2009151472A
JP2009151472A JP2007327648A JP2007327648A JP2009151472A JP 2009151472 A JP2009151472 A JP 2009151472A JP 2007327648 A JP2007327648 A JP 2007327648A JP 2007327648 A JP2007327648 A JP 2007327648A JP 2009151472 A JP2009151472 A JP 2009151472A
Authority
JP
Japan
Prior art keywords
task
program
response
processing unit
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007327648A
Other languages
Japanese (ja)
Inventor
Minoru Noda
穣 野田
Takahiro Katayama
貴寛 片山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Funai Electric Co Ltd
Original Assignee
Funai Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Funai Electric Co Ltd filed Critical Funai Electric Co Ltd
Priority to JP2007327648A priority Critical patent/JP2009151472A/en
Publication of JP2009151472A publication Critical patent/JP2009151472A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To prevent a termination notice of a canceled task from being erroneously processed when a high-order program receives a termination notice of task processing from a low-order program in a task management device. <P>SOLUTION: A CPU executes an event manager EM and receives predetermined operation or the like to generate an application task AT for a task of the event manager EM to carry out an application, and a driver task DT of a device driver. EM, AT, DT are hierarchically structured in sequential order of high order. EM generates AT, and AT generates DT. When the task is terminated, it responds to the high-order task. A message management task MM is interposed between these generation and response, and the generation and response are carried out through MM, and information on the communication is stored. This information is retrieved, and when there is a task deleted in EM, MM intercepts a response to the high-order task or does not notify this response. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、アプリケーションタスクの生成、削除の指示を受けたアプリケーションタスクとドライバタスク間のメッセージ交換に関する。   The present invention relates to message exchange between an application task that has been instructed to generate and delete an application task and a driver task.

従来、電子機器、パソコンに指示された種々の命令を処理するために、内部のCPU(またはMPU)は、種々のプログラムを実行する。このプログラムは、呼び出し元のメインルーチンが、呼び出し先のサブルーチンを呼び出して、各種の機能を実行する階層構造になっている。このようにプログラムを実行するCPUの処理の実行単位をタスクという。   Conventionally, an internal CPU (or MPU) executes various programs in order to process various commands instructed to an electronic device or a personal computer. This program has a hierarchical structure in which a caller main routine calls a callee subroutine to execute various functions. An execution unit of CPU processing for executing a program is called a task.

タスクの管理方法としては、例えば、これらのプログラムの構成をイベントマネージャ、アプリケーション、ドライバという階層構造にすることができる。この場合には、イベントマネージャがこれらアプリケーション、ドライバのタスクを管理して実行させる。ここで、これらのタスクをそれぞれ、アプリケーションタスク、ドライバタスクと称する。イベントマネージャは、所定のキー操作、例えばテレビのチャンネル切り替え等の入力を受けたとき、所定の状態になったとき、即ち、所定のイベントが生じたときに、アプリケーションタスクを生成(spawn)するものである。アプリケーションタスクは、記憶装置内に記憶されたプログラムを実行するタスクである。これを実行することにより、CPUは、ドライバタスクに種々の命令を送って、上記入力に対応する一連の動作を行う。   As a task management method, for example, the configuration of these programs can be a hierarchical structure of an event manager, an application, and a driver. In this case, the event manager manages and executes these application and driver tasks. Here, these tasks are referred to as an application task and a driver task, respectively. The event manager generates an application task (spawn) when it receives a predetermined key operation, for example, an input such as TV channel switching, or when a predetermined state occurs, that is, when a predetermined event occurs. It is. The application task is a task for executing a program stored in the storage device. By executing this, the CPU sends various instructions to the driver task, and performs a series of operations corresponding to the input.

例えば、テレビであれば、所定のチャンネル操作を受けて、画面を消去して、選局して、チャンネルのOSD(On Screen Display)を表示して・・といった一連の作業を行うため、それぞれのデバイスを制御するドライバに指示する。ドライバタスクは、デバイスを制御するドライバのプログラムである。例えば、ディスプレイドライバ、テレビのチューナの受信を制御するチューナドライバ、周辺機器を制御するドライバなどである。   For example, in the case of a television, in order to perform a series of operations such as receiving a predetermined channel operation, erasing the screen, selecting a channel, displaying a channel OSD (On Screen Display), etc. Instructs the driver to control the device. The driver task is a driver program that controls the device. For example, a display driver, a tuner driver that controls reception of a TV tuner, and a driver that controls peripheral devices.

図1のフロー図を用いて、このようなタスクを管理する方法について説明する。このフローは、下方向へ時間が流れている。このフローの例では、タスク1を指示する操作の後、タスク1が終了しないうちにタスク2を指示する操作を行った場合の処理を示している。例えば、チャンネル処理を想定して、タスク1がテレビの外部入力に移動するタスクであり、タスク2がチャンネル8に移動するタスクを想定することができる。   A method for managing such a task will be described with reference to the flowchart of FIG. In this flow, time flows downward. This example of the flow shows processing when an operation for instructing the task 2 is performed after the operation for instructing the task 1 and before the task 1 is completed. For example, assuming channel processing, it can be assumed that task 1 is a task that moves to an external input of a television and task 2 moves to channel 8.

イベントマネージャEMは、リモコンの操作を受けて、タスク1を生成する(ST1)。ここでは簡単のために、アプリケーションタスクATがドライバタスクに指示する(図中の「要求1」に対応する。)プロセスをまとめて1つのプロセス(「プロセス1」に対応する。)とする。   The event manager EM generates task 1 in response to the operation of the remote controller (ST1). Here, for the sake of simplicity, the application task AT instructs the driver task (corresponding to “request 1” in the figure) to be one process (corresponding to “process 1”).

アプリケーションタスクATを実行する過程で、ドライバタスクDTに動作の要求1を出す(ST2)。ドライバタスクDTでは、プロセス1(process1)を実行する(ST3)。ST3を実行中に、タスク2の操作を受けて、イベントマネージャEMは、タスク1の消去(ST4)および、タスク2の生成(ST5)を行う。   In the process of executing the application task AT, an operation request 1 is issued to the driver task DT (ST2). In the driver task DT, process 1 (process1) is executed (ST3). In response to the operation of task 2 during execution of ST3, event manager EM deletes task 1 (ST4) and generates task 2 (ST5).

アプリケーションタスクATは、タスク1の消去をドライバタスクDTに指示すべきところであるが、ドライバタスクDTがすでにプロセス1の実行中であることを理由に、この指示は行われない。ST5を受けて、要求2をドライバタスクDTに出力する(ST6)。ドライバタスクDTは、これを受けて、プロセス2を実行させる(ST7)。   The application task AT should instruct the driver task DT to erase the task 1, but this instruction is not performed because the driver task DT is already executing the process 1. In response to ST5, request 2 is output to the driver task DT (ST6). In response to this, the driver task DT executes the process 2 (ST7).

その後、プロセス1の処理が終了すると、ドライバタスクDTは、アプリケーションタスクATに返答を行う(ST8)。アプリケーションタスクATは、この返答を受けて、イベントマネージャEMへ終了通知(END)を行う(ST8)。その後、別のタスクの指示を受けると、前の処理が終わっていない場合には、ST4と同様にタスクを消去する(ST9)。そして、その指示を受けたタスクの生成を行う(図示省略)。   After that, when the process 1 is completed, the driver task DT returns a response to the application task AT (ST8). Upon receiving this response, the application task AT sends an end notification (END) to the event manager EM (ST8). Thereafter, when an instruction for another task is received, if the previous process has not been completed, the task is erased as in ST4 (ST9). Then, a task that receives the instruction is generated (not shown).

また、特許文献1、2には、タスク間でデータの授受を行うシステムにおいて、アドレスまたはメッセージ番号、情報の送信元、送信先等を記述した電文またはメッセージを送受信するメッセージ通信部を設けた構成が開示されている。
特開平2−297633号公報 特開平6−95896号公報
Patent Documents 1 and 2 are provided with a message communication unit that transmits and receives a message or message that describes an address or message number, an information transmission source, a transmission destination, etc. in a system that exchanges data between tasks. Is disclosed.
JP-A-2-297633 JP-A-6-95896

しかしながら、従来は、図2の例のように、アプリケーションタスクATがプロセス2を要求してこれが終了していない間にプロセス1の返答を受けると、プロセス1の実行がST4で取り消されている(削除されている)がゆえに、アプリケーションタスクATは、プロセス2が終了したものと誤認してしまう虞があった。   However, conventionally, if the application task AT receives the response of the process 1 while the application task AT requests the process 2 and is not finished as in the example of FIG. 2, the execution of the process 1 is canceled in ST4 ( Therefore, the application task AT may be mistaken for the process 2 being completed.

その結果、なんらの返答をイベントマネージャEMに返すことなく、プロセス2の実行がされない虞があった。例えば、プロセス2が、プロセス2を直接実行する場合には可能な処理であるがプロセス1の実行を経由した後ではプロセス2を実行できない処理であるとすれば、プロセス1を取り消していない以上、プロセス2の実行は失敗に終わる。そして、ATはプロセス2が終了したものと勘違いしているから、ATは、EMにはなんらの通知もしない。仮に、プロセス2が終了したとATが誤認していなければ、プロセス1を取り消した元の状態に戻したり、ユーザに通知したりすることが出来たはずであるが、それができない。その結果、ユーザが装置からなんらの通知を受けることなく、ユーザの操作が無視される虞があった。また、その後、ATは、意図しないドライバタスクDTからのタスクの終了の応答を受けて、ATの処理が不安定になる虞もあった。   As a result, the process 2 may not be executed without returning any response to the event manager EM. For example, if the process 2 is a process that can be executed when the process 2 is directly executed, but the process 2 cannot be executed after passing through the execution of the process 1, the process 1 is not canceled. Execution of process 2 will fail. Since the AT misunderstands that the process 2 has been completed, the AT does not notify the EM at all. If the AT does not mistakenly indicate that the process 2 has ended, it should have been possible to return the process 1 to its original state or notify the user, but this is not possible. As a result, the user's operation may be ignored without receiving any notification from the apparatus. In addition, after that, the AT may receive an answer to the end of the task from the unintended driver task DT, and the AT processing may become unstable.

さらに、特許文献1、2の構成では,確かに、プログラム間でのメッセージの授受を記録するものの、将来、下位装置から応答する予定のタスクを記憶することについては開示されていない。また、これらの特許文献では、イベントマネージャEMから、プロセスのキャンセルの通知を受けた場合についての処理については、開示されていない。   Further, in the configurations of Patent Documents 1 and 2, although the exchange of messages between programs is certainly recorded, there is no disclosure about storing a task scheduled to be responded from a lower-level device in the future. In addition, these patent documents do not disclose the processing when a notification of process cancellation is received from the event manager EM.

例えば、特許文献1では、タスクを集中管理するLU管理タスクを設けるとしている。しかし、このタスク管理方法は、電文を付して、単にそのまま相手タスクに送受信するよう管理しているものである。その方法の目的は、個別の相互のタスク管理でなく、3以上の装置が存在することを前提としたタスク管理をするため、論理ユニット番号(Logical Unit Number、論理装置(LU)に割り振られた番号。(「オンライン・コンピュータ用語辞典」http://www2.nsknet.or.jp/~azuma/menu.htm))等を送信するものである。したがって、この構成は、論理ユニット番号を区別するものであって、タスク間を区別するものではなかった。タスク間を区別できず、タスクの電文をそのまま送信するので、特許文献1の装置を適用した場合に、タスク1をキャンセルしたときは、ATは、プロセス1の終了がDTから応答を受けた場合に、プロセス2が終了したものと誤認する虞があった。   For example, in Patent Document 1, an LU management task for centrally managing tasks is provided. However, in this task management method, a message is attached and management is performed so that the message is simply transmitted to and received from the other task. The purpose of the method is not the management of individual mutual tasks, but the task management based on the assumption that there are three or more devices. Therefore, the logical unit number (Logical Unit Number) is assigned to the logical unit (LU). No. ("Online Computer Glossary of Terms" http://www2.nsknet.or.jp/~azuma/menu.htm)) etc. Therefore, this configuration distinguishes logical unit numbers and does not distinguish between tasks. Since tasks cannot be distinguished and the message of the task is transmitted as it is, when the device of Patent Document 1 is applied and the task 1 is canceled, the AT receives a response from the DT for the end of the process 1 In addition, there is a possibility of misunderstanding that the process 2 is completed.

そこで、本発明は、タスク管理装置において、上位のプログラムが下位のプログラムからタスク処理の終了の通知を受ける場合に、キャンセルしたタスクの終了通知を誤って処理することを防ぐこと、およびこれに適した装置、方法を提供することを目的とする。   Therefore, the present invention prevents, in a task management device, that a higher-level program receives a task processing end notification from a lower-level program and erroneously processes a canceled task end notification, and is suitable for this. It is an object to provide an apparatus and a method.

上記課題を解決するために、以下の構成を備える。   In order to solve the above problems, the following configuration is provided.

(1) 主従関係を有する上位、下位のプログラム群、および、所定のイベントに応じてこれらのプログラムを呼び出して実行するイベントマネージャのプログラムを記憶する記憶部と、
前記プログラム群を実行するタスク処理部と、を備え、前記タスク処理部は、前記上位のプログラムの実行に伴って行う呼び出しまたは要求に基づいて、下位のプログラムのタスク処理を行い、その下位のプログラムのタスクの完了の応答を上位のプログラムで取得するタスク管理装置において、
前記タスク処理部は、前記上位、下位のプログラムおよび前記イベントマネージャの間で、前記呼び出し、要求、または応答を行う時に、これらのプログラム間に介在して、前記呼び出し、応答の受け渡しを伝達すると共に、その受け渡しの通信情報であって、前記下位プログラムの応答をタスクごとに識別する応答名を含む通信情報を記憶させるメッセージ記憶プログラムを実行し、
前記タスク処理部は、すでに下位のプログラムで実行中のタスクのキャンセルの指示を前記イベントマネージャから受けているかどうか判断し、当該キャンセルの指示を受けているタスクから応答を受けた場合には、上位のプログラムへ応答を通知しないか、または当該応答を遮断するメッセージ遮断プログラムを実行する。
(1) A storage unit for storing upper and lower program groups having a master-slave relationship and an event manager program that calls and executes these programs according to a predetermined event;
A task processing unit that executes the program group, and the task processing unit performs task processing of a lower-level program based on a call or a request that is performed in accordance with execution of the higher-level program, and the lower-level program In the task management device that obtains the completion response of the task by the upper program,
When the task processing unit performs the call, request, or response between the upper and lower programs and the event manager, the task processing unit intervenes between these programs to transmit the call and response delivery. Executing a message storage program for storing communication information including the response name for identifying the response of the lower-order program for each task.
The task processing unit determines whether or not an instruction for canceling a task already being executed by a lower-level program is received from the event manager, and if a response is received from a task receiving the cancellation instruction, Execute a message blocking program that does not notify the program of the response or blocks the response.

この構成では、タスク処理部は、前記上位、下位のプログラム間および前記イベントマネージャ間で、前記呼び出し、要求、または応答を行う時に、メッセージ記憶プログラムを実行して、その受け渡しの通信情報を記憶させる。この通信情報には、応答を識別しているので、どの下位プログラムのタスクを実行したかを識別できる。これにより、メッセージ遮断プログラムの実行により、すでにキャンセルの指示を受けている、下位のプログラムのタスクについては、上位のプログラムへの応答を通知しないか遮断する。したがって、すでにキャンセルの指示がされた下位のプログラムのタスクから応答を受けることがないから、上位のプログラムが他のタスクの処理が終了したものと、誤認することがない。また、誤って認識した後、意図しない応答を受けて上位のプログラムの処理が混乱する虞も防ぐことが出来る。
なお、主従関係にあるとは、上位プログラムの指示または要求に応じて下位プログラムが処理を行うことをいうものとする。
In this configuration, the task processing unit executes the message storage program and stores the communication information of the delivery when performing the call, request, or response between the upper and lower programs and between the event managers. . Since this communication information identifies a response, it is possible to identify which lower program task has been executed. As a result, the execution of the message blocking program blocks or blocks the notification of the response to the higher-level program for the task of the lower-level program that has already received a cancellation instruction. Therefore, since no response is received from the task of the lower-level program that has already been instructed to cancel, the higher-level program does not misunderstand that the processing of the other task has been completed. Moreover, it is possible to prevent the possibility that the processing of the higher-level program will be confused due to an unintended response after erroneous recognition.
Note that the master-slave relationship means that the lower-level program performs processing in response to an instruction or request from the higher-level program.

(2) 前記タスク処理部は、前記メッセージ記録プログラムの実行により、前記通信情報として、通信情報の内容をリスト化したリストと、複数のリストをリンクして配列構造にまとめるポインタと、を記述したリスト形式で前記記憶部に記憶させる。   (2) By executing the message recording program, the task processing unit describes, as the communication information, a list in which the contents of communication information are listed, and a pointer that links a plurality of lists into an array structure. The list is stored in the storage unit.

この構成では、リストを、ポインタによりリンクして、配列構造とすることにより、1まとまりのデータセットにして記憶している。したがって、すでに下位のプログラムで実行中のタスクのキャンセルの指示を前記イベントマネージャから受けているかどうか判断をするときに、容易にこれに該当するかを検索できる。   In this configuration, the list is stored as a single data set by linking with a pointer to form an array structure. Therefore, when it is determined whether or not the event manager has received an instruction to cancel a task already executed by a lower-level program, it can be easily searched whether this is the case.

(3) 前記タスク処理部は、前記メッセージ記録プログラムの実行により、前記通信情報として、前記応答名のほかに、上位のプログラムが下位のプログラムへ送る指示を記述したAPI(Application Programming Interface)メッセージ名と、アプリケーションを識別するアプリケーションID(identification)と、を含むデータセットで前記記憶部に記憶させる。   (3) By executing the message recording program, the task processing unit, as the communication information, in addition to the response name, an API (Application Programming Interface) message name describing an instruction to be sent from the upper program to the lower program And a data set including an application ID (identification) for identifying the application.

この構成では、APIメッセージ名、アプリケーションIDを記述しているので、下位のプログラムへの指示を前記メッセージ記録プログラムで管理できる。また、下位プログラムのタスクからタスクの終了を返答する場合に、すでにタスクのキャンセルの指示が出されているかを、より容易に検索できる。   In this configuration, since the API message name and application ID are described, the instruction to the lower program can be managed by the message recording program. In addition, when a task end response is returned from a lower-level program task, it can be more easily searched whether an instruction to cancel the task has already been issued.

なお、この構成は、(2)の構成に適用することが出来るが、この場合の本構成のデータセットは、(2)のリストに相当する。   This configuration can be applied to the configuration of (2), but the data set of this configuration in this case corresponds to the list of (2).

(4) 前記タスク処理部は、前記上位のプログラムのタスクのキャンセルの指示を前記イベントマネージャから受けた場合には、メッセージ記憶プログラムを用いて、キャンセルの指示を受けたタスクに対応するリストを削除すると共に、前記リストの前後のポインタを修正する。   (4) When the task processing unit receives an instruction to cancel the task of the higher-level program from the event manager, the task processing unit deletes the list corresponding to the task that has received the cancellation instruction using a message storage program At the same time, the pointers before and after the list are corrected.

この構成では、タスクのキャンセルを受けると、メッセージ記憶プログラムを用いて、キャンセルの指示を受けたタスクに対応するリストを削除する。したがって不要になったリストのデータ領域を節約できる。このとき、リストの前後のポインタを修正するから、前後のリストは分断されずに、タスク処理部は、1まとまりの配列として把握できる。また、そのタスクのリストの不存在により、キャンセルされたことを記憶できる。   In this configuration, when a task cancellation is received, a list corresponding to the task for which the cancellation instruction has been received is deleted using a message storage program. Therefore, the data area of the list that has become unnecessary can be saved. At this time, since the pointers before and after the list are corrected, the task processing unit can grasp the list as one unit without dividing the list before and after. Further, it is possible to memorize that the task is canceled due to the absence of the task list.

(5) 前記記憶部は、前記上位のプログラムとして、アプリケーションを記憶すると共に、前記下位のプログラムとしてデバイスドライバを記憶し、
前記タスク処理部は、アプリケーションとデバイスドライバとの間で前記呼び出し、応答時に前記メッセージ記憶プログラムを実行するとしてもよい。
(5) The storage unit stores an application as the upper program and a device driver as the lower program.
The task processing unit may execute the message storage program when calling and responding between the application and the device driver.

(6) 放送を受信して映像信号を出力する受信部と、
前記映像信号の処理を行う映像処理部とを備え、
前記記憶部は、デバイスドライバとして、前記受信部を制御する受信ドライバと、前記映像処理部を制御する映像処理ドライバを記憶し、前記アプリケーションとして、チャンネル切換の一連の動作が記述されたチャンネル切換アプリケーションを記憶し、
前記タスク処理部は、チャンネル切換アプリケーションの実行時に、前記受信ドライバおよび映像処理ドライバのタスクを生成するようにしてもよい。
(6) a receiving unit that receives a broadcast and outputs a video signal;
A video processing unit for processing the video signal,
The storage unit stores, as a device driver, a reception driver that controls the reception unit and a video processing driver that controls the video processing unit, and a channel switching application that describes a series of channel switching operations as the application. Remember
The task processing unit may generate tasks for the reception driver and the video processing driver when the channel switching application is executed.

この構成では、テレビの構成を備え、タスクを管理することができる。   In this configuration, a television configuration is provided and tasks can be managed.

(7) 主従関係を有する上位、下位のプログラム群、および、イベントマネージャのプログラムを記憶する記憶部と、前記プログラム群を実行するタスク処理部と、を用いて、
前記タスク処理部が、イベントマネージャを実行することにより、所定のイベントに応じてこれらのプログラムを呼び出して実行するタスク生成ステップと、
前記タスク処理部が、前記上位のプログラムの実行に伴って、下位のプログラムに対し呼び出しまたは要求を行う要求ステップと、
前記要求ステップによる呼び出しまたは要求に基づいて、下位のプログラムのタスク処理を行う下位プログラムタスクステップと、
前記下位プログラムタスクステップで処理したタスクの完了の応答を上位のプログラムで取得する応答ステップを実行するタスク管理方法において、
前記タスク処理部により、前記タスク生成ステップまたは前記下位プログラムタスクステップまたは前記応答ステップにおいて、前記上位、下位のプログラムおよび前記イベントマネージャの間に介在して、前記呼び出し、応答の受け渡しを伝達する伝達ステップと、
伝達ステップにおける受け渡しの通信情報であって、前記下位プログラムの応答をタスクごとに識別する応答名を含む通信情報を記憶させるメッセージ記憶ステップと、
前記タスク処理部は、すでに下位のプログラムで実行中のタスクのキャンセルの指示を前記イベントマネージャから受けているかどうか判断し、当該キャンセルの指示を受けているタスクから応答を受けた場合には、上位のプログラムへ応答を通知しないか、または当該応答を遮断する遮断ステップと、を実行するようにしてもよい。
(7) Using a storage unit that stores the upper and lower program groups having a master-slave relationship, and an event manager program, and a task processing unit that executes the program group,
The task processing unit executes an event manager to call and execute these programs according to a predetermined event, and a task generation step,
The task processing unit is a request step for calling or requesting a lower-order program as the higher-order program is executed,
A lower-level program task step for performing task processing of a lower-level program based on a call or request by the request step;
In a task management method for executing a response step of acquiring a response of completion of a task processed in the lower program task step by an upper program,
In the task generating step or the lower program task step or the response step, the task processing unit is interposed between the upper and lower programs and the event manager to transmit the call and response delivery. When,
A message storage step of storing communication information including a response name for identifying the response of the lower-order program for each task, which is communication information for transfer in the transmission step;
The task processing unit determines whether or not an instruction for canceling a task already being executed by a lower-level program is received from the event manager, and if a response is received from a task receiving the cancellation instruction, It is also possible to execute a blocking step of not reporting the response to the program or blocking the response.

本発明によれば、タスク管理装置において、上位のタスクが呼び出し先のタスク処理の終了の通知を受ける場合に、中断させたいタスクについて、タスクの終了通知を誤って処理することを防ぐことができる。   ADVANTAGE OF THE INVENTION According to this invention, when a high-order task receives the notification of the completion | finish of a task process of a call destination in a task management apparatus, it can prevent processing a task completion notification about a task to interrupt being mistaken. .

図2の構成図を用いて、本発明の一実施形態であるテレビについて説明する。このテレビは、メインプロセッサ1と、受信部41、画像処理部および表示器42、音声処理部43、操作部9を備えている。   A television which is an embodiment of the present invention will be described with reference to the configuration diagram of FIG. The television includes a main processor 1, a receiving unit 41, an image processing unit and display 42, an audio processing unit 43, and an operation unit 9.

メインプロセッサ1は、パソコンのCPUまたはマイコンの構成を備えており、CPU10、RAM11、ROM12を備えている。ROM12には、各種のプログラムが記録されている。RAM11は、一時記憶するメモリである。CPU10は、ROM12から、種々のプログラムをRAM11に呼び出して、RAM11のプログラムを実行する。   The main processor 1 has a personal computer CPU or microcomputer configuration, and includes a CPU 10, a RAM 11, and a ROM 12. Various programs are recorded in the ROM 12. The RAM 11 is a memory for temporarily storing. The CPU 10 calls various programs from the ROM 12 to the RAM 11 and executes the programs in the RAM 11.

ROM12には、プログラムとして、イベントマネージャ13、アプリケーションA16、アプリケーションB17、アプリケーションC18、受信ドライバ21、画像制御ドライバ22、音声ドライバ23、メッセージマネジメントプログラム3が記録されている。これらのプログラムは、階層構造になっている。詳細は図3の説明で後述する。   In the ROM 12, an event manager 13, an application A16, an application B17, an application C18, a reception driver 21, an image control driver 22, an audio driver 23, and a message management program 3 are recorded as programs. These programs have a hierarchical structure. Details will be described later with reference to FIG.

メインプロセッサ1を起動すると、CPU10は、RAM11にイベントマネージャ13を呼び出す。CPU10には、操作部9の操作に応じて、割り込み入力が入り、メインプロセッサ1は、イベントマネージャ13を実行させる。これにより、CPU10は、操作部9の操作の内容を把握して、必要なアプリケーションをROM12からRAM11に呼び出して実行する。   When the main processor 1 is activated, the CPU 10 calls the event manager 13 in the RAM 11. An interrupt input is input to the CPU 10 according to the operation of the operation unit 9, and the main processor 1 causes the event manager 13 to be executed. As a result, the CPU 10 grasps the content of the operation of the operation unit 9 and calls a necessary application from the ROM 12 to the RAM 11 for execution.

なお、これらのプログラム(イベントマネージャ13、アプリケーション16〜18、ドライバ21〜23)を実行する処理の単位をタスクといい、イベントマネージャ13によるプログラムの呼び出しをタスクの生成と称することにする。例えば、アプリケーションを実行するタスクを、以下では、アプリケーションタスクと称し、これらのプログラムの呼び出しをアプリケーションタスクの生成と称する。タスクの大きさは、プログラムによって異なる。例えば、上位の階層のプログラムは下位階層の1以上のプログラムを呼び出して実行するから、1つのタスクの大きさは下位階層のそれより大きくなる。   Note that a unit of processing for executing these programs (event manager 13, applications 16 to 18, drivers 21 to 23) is referred to as a task, and calling the program by the event manager 13 is referred to as task generation. For example, a task for executing an application is hereinafter referred to as an application task, and calling of these programs is referred to as generation of an application task. The task size varies depending on the program. For example, since the upper layer program calls and executes one or more programs in the lower layer, the size of one task is larger than that of the lower layer.

受信部41は、放送信号を受信する。この放送信号はデジタル形式でもアナログ形式でもよい。画像処理部および表示器42は、映像信号をデコードしたり、アスペクト比を調整したりする画像処理部と、表示器を備える。表示器には、各ドットに映像信号のデータを出力するドライバを備える。   The receiving unit 41 receives a broadcast signal. This broadcast signal may be digital or analog. The image processing unit and display unit 42 includes an image processing unit that decodes a video signal and adjusts an aspect ratio, and a display unit. The display device includes a driver that outputs video signal data to each dot.

次に、図3を用いて、メインプロセッサ1内のプログラムの呼び出しについて、より詳しく説明する。前述のとおり、これらのプログラムは、階層構造になっている。イベントマネージャ13が最上位階層で、16〜18が中位の階層、各ドライバ21〜23は、下位階層である。下位階層のプログラムは、上位階層のプログラムのサブルーチンまたは関数となっている。CPU10は、上位のプログラムの実行に伴って、下位階層のプログラムをRAM11に呼び出して実行する(図中の破線矢印参照)。また、上位階層のプログラムの実行中に下位階層のプログラムの実行が終了した場合には、上位階層のプログラムは、その終了の応答を下位階層のプログラムから受ける(図中の点線矢印参照)。   Next, referring to FIG. 3, the calling of the program in the main processor 1 will be described in more detail. As described above, these programs have a hierarchical structure. The event manager 13 is the highest layer, 16 to 18 are middle layers, and the drivers 21 to 23 are lower layers. The lower layer program is a subroutine or function of the upper layer program. In accordance with the execution of the upper program, the CPU 10 calls the lower layer program to the RAM 11 and executes it (see the broken line arrow in the figure). In addition, when the execution of the lower layer program is completed during the execution of the upper layer program, the upper layer program receives a response of the completion from the lower layer program (see the dotted arrow in the figure).

また、メインプロセッサ1は、アプリケーション16〜18、各種ドライバ21〜23の間の呼び出し時、および、下位プログラムの終了の応答時には、メッセージマネジメントプログラム3を呼び出す。例えば、イベントマネージャ13がこれを起動してもよい。そして、これらアプリケーション、各種ドライバの呼び出し時、および、下位プログラムの終了の応答は、プログラム3の実行を介して行う。   Further, the main processor 1 calls the message management program 3 when calling between the applications 16 to 18 and the various drivers 21 to 23 and when responding to the end of the lower-level program. For example, the event manager 13 may activate it. Then, the response of the end of the lower-level program and the calling of these applications and various drivers are performed through the execution of the program 3.

プログラム3は、これらの呼び出し時、または、下位階層のプログラムの終了時に応答するメッセージの内容を記述した応答処理用情報31(response message information)をRAM11に記憶する。プログラム3は、このように、プログラム間のデータの授受を管理している。プログラム3は、また、プログラムのプロセスの処理をキャンセルしたような場合には、不要となった情報や、送信すると混乱を招く情報の送信を遮断する。詳細は図5で後述する。   The program 3 stores, in the RAM 11, response processing information 31 (response message information) describing the content of a message that responds at the time of calling or at the end of the lower-level program. As described above, the program 3 manages the exchange of data between programs. The program 3 also blocks transmission of information that is no longer needed or information that would be confusing if transmitted if the process of the program process is cancelled. Details will be described later with reference to FIG.

なお、メッセージマネジメントプログラム3の応答処理用情報31を記憶するステップは、本発明のメッセージ記憶プログラムに相当する。プログラム3、応答処理用情報31は、RAM11内に常駐していてもよい。   Note that the step of storing the response processing information 31 of the message management program 3 corresponds to the message storage program of the present invention. The program 3 and the response processing information 31 may reside in the RAM 11.

アプリケーションA16、アプリケーションB17、アプリケーションC18は、プログラム3を介して、各ドライバ21〜23を呼び出して、種々の一連の動作を行う。例えば、アプリケーションA16は、チャンネル切換のアプリケーションである。アプリケーションB17は、初期設定のプログラムである。アプリケーションC18は、音声、音量を制御するプログラムである。   Application A16, application B17, and application C18 call each driver 21-23 via the program 3, and perform various series of operation | movement. For example, the application A16 is a channel switching application. The application B17 is an initial setting program. The application C18 is a program for controlling sound and volume.

アプリケーションA16を実行するためには、画面消去、物理チャンネル切換、チャンネルのOSD(On Screen Display)表示をする。そのために、放送信号を受信するデバイスに指示を送る受信ドライバ21、画像や映像信号、画面を制御する画像制御ドライバ22に必要な情報を伝達して、これらのデバイスドライバを起動させる。また、受信ドライバ21は、受信部41を駆動する。画像制御ドライバ22は、画像処理部および表示器42を駆動する(実線矢印参照)。   In order to execute the application A16, screen deletion, physical channel switching, and channel OSD (On Screen Display) display are performed. For this purpose, necessary information is transmitted to the receiving driver 21 that sends an instruction to the device that receives the broadcast signal, the image and video signal, and the image control driver 22 that controls the screen, and these device drivers are activated. The reception driver 21 drives the reception unit 41. The image control driver 22 drives the image processing unit and the display 42 (see solid line arrows).

アプリケーションB17を実行させるためには、OSDを表示する必要があり、画像制御ドライバ22を起動する。アプリケーションC18を実行するためには、音声信号を処理する音声ドライバ23のサブルーチンを呼び出す。音声ドライバ23は、音声処理部43を駆動する。   In order to execute the application B17, it is necessary to display the OSD, and the image control driver 22 is activated. In order to execute the application C18, a subroutine of the audio driver 23 for processing the audio signal is called. The audio driver 23 drives the audio processing unit 43.

次に、図4を用いて、メッセージマネジメントプログラム3が生成する応答処理用情報31のデータ構造の例について説明する。応答処理用情報31としては、図4(A)のようなデータセットを有するリスト形式で記憶することができる。図4(A)の左側は、変数名称の例であり、右側はその内容である。図4(A)のとおり、情報31には、API(Application Programming Interface)メッセージ名apiMsg(API Message)と、ドライバ応答名drvMsg(driver response Message)と、アプリケーションID(identification)AP_IDと、を含むデータセットである。   Next, an example of the data structure of the response processing information 31 generated by the message management program 3 will be described with reference to FIG. The response processing information 31 can be stored in a list format having a data set as shown in FIG. The left side of FIG. 4A is an example of a variable name, and the right side is its contents. As shown in FIG. 4A, the information 31 includes data including an API (Application Programming Interface) message name apiMsg (API Message), a driver response name drvMsg (driver response Message), and an application ID (identification) AP_ID. Is a set.

AP_IDは、上位のプログラムが下位のプログラムへ送る指示を記述したものである。ここで、図2、図3では、図示を省略しているが、APIは、プログラムの記述を容易にするためのライブラリ関数等であり、本実施形態では、アプリケーションとデバイスドライバの間に介在している。より正確には、APIは、メッセージマネジメントタスクMMとドライバタスクDTとの間、またはATとMMとの間のいずれかに介在していればよいが、MMをATと同じプログラム言語で作成する場合には、プログラムの作成の容易さからすれば、前者のほうが望ましい。   AP_ID describes an instruction sent from the upper program to the lower program. Here, although not shown in FIGS. 2 and 3, the API is a library function or the like for facilitating the description of the program. In this embodiment, the API is interposed between the application and the device driver. ing. More precisely, the API only needs to be interposed between the message management task MM and the driver task DT, or between the AT and MM, but when the MM is created in the same programming language as the AT. For the sake of ease, the former is preferable in terms of ease of program creation.

ドライバ応答名(driver response Message)は、ドライバタスクの応答をタスクごとに識別するコードである。アプリケーションID(identification)は、アプリケーションを識別するのに用いる。このように、APIメッセージ名、アプリケーションIDを記述しているので、下位のプログラムへの指示を前記メッセージ記録プログラムで管理できる。また、下位プログラムのタスクからタスクの終了を返答する場合に、すでにアプリケーションタスクのキャンセルの指示がイベントマネージャ13から出されているか否かを、より容易に検索できる。   The driver response name is a code for identifying the response of the driver task for each task. The application ID (identification) is used to identify the application. Thus, since the API message name and application ID are described, the instruction to the lower program can be managed by the message recording program. In addition, when a task completion response is returned from a lower-level program task, it is possible to more easily search whether or not an instruction to cancel the application task has already been issued from the event manager 13.

なお、ドライバ応答名drvMsgは、本発明の応答名に相当する。また、apiMsg、drvMsgは、例えば、unsignedlong型のデータとすることができる。   The driver response name drvMsg corresponds to the response name of the present invention. Further, apiMsg and drvMsg can be, for example, unsignedlong type data.

図4(B)を用いて、応答処理用情報31のフォーマットについて説明する。応答処理用情報31は、双方向リスト形式となっている。双方向リスト形式は、リストにアドレス(ポインタ)が記述されている。例えばn+1番目のリストについては、n番目のリストが記憶されているアドレスと、n+2番目のリストが記憶されているアドレスが記述されている。したがって、これをたどれば、n、n+1、n+2・・・という風に昇順にリストの情報を取得できる。また、逆にn、n−1、n−2・・・という風に降順にリストの情報を取得できる。デバイスドライバ21〜23から応答がメッセージマネジメントプログラム3に返ってきたときは、メインプロセッサ1は、これらをたどりながら、順番にどのアプリケーションに対する応答かをアプリケーションID、APIメッセージ名を検索することができる。   The format of the response processing information 31 will be described with reference to FIG. The response processing information 31 is in a bidirectional list format. In the bidirectional list format, an address (pointer) is described in the list. For example, for the (n + 1) th list, the address where the nth list is stored and the address where the (n + 2) th list is stored are described. Therefore, if this is followed, the information of the list can be acquired in ascending order of n, n + 1, n + 2,. Conversely, the list information can be acquired in descending order of n, n-1, n-2,. When responses are returned from the device drivers 21 to 23 to the message management program 3, the main processor 1 can search for an application ID and an API message name as to which application the response is in order while following these.

次に、図5を用いて、メインプロセッサ1のタスクのフローについて説明する。各縦の列は、上の欄に記載したイベントマネージャEM、アプリケーションタスクAT、メッセージマネジメントタスクMM、ドライバタスクDTの各タスクの実行を表わしている。そして、このフローは、下方向へ時間が流れている。   Next, the task flow of the main processor 1 will be described with reference to FIG. Each vertical column represents execution of each task of event manager EM, application task AT, message management task MM, and driver task DT described in the above column. In this flow, time flows downward.

図5に対し図2、図3との関係について説明すると、イベントマネージャEMは、イベントマネージャ13を実行するタスクである。アプリケーションタスクATは、アプリケーション16〜18のいずれかを実行するタスクである。ドライバ21〜23の実行がドライバタスクDTである。また、横方向の矢印は、プログラムの呼び出し、要求、応答を表わしている。なお、図5では、アプリケーションが、デバイスドライバを呼び出して処理をさせることを要求ということにする。また、ここでは簡単のために、アプリケーションタスクATがドライバタスクに指示する(図中の「要求AT1」に対応する。)プロセスをまとめて1つのプロセス(例えば「プロセス1」)とする。   The relationship between FIGS. 2 and 3 will be described with respect to FIG. 5. The event manager EM is a task for executing the event manager 13. The application task AT is a task for executing any one of the applications 16 to 18. The execution of the drivers 21 to 23 is a driver task DT. In addition, horizontal arrows represent program calls, requests, and responses. In FIG. 5, it is assumed that the application calls a device driver to perform processing. Further, here, for the sake of simplicity, the application task AT instructs the driver task (corresponding to “request AT1” in the drawing) to be one process (for example, “process 1”).

(ST11)イベントマネージャEMは、所定のイベントを受けてアプリケーションタスクAP1を生成する指示をメッセージマネジメントタスクMMに出す。例えば、このイベントは、操作部9のリモコンから受けたチャンネル切換の入力とすることができる。
(ST12)MMは、これを受けて、アプリケーションタスクAT1を生成する。
(ST13)AT1の実行に伴い、ドライバタスクDT1を実行するため、MMに要求_AT1を出す。
(ST14)MMは、要求_M1をDTに送る。このとき、タスクAT1がDTからの返答を待っていることをRAM11に記憶させる。
(ST15)要求_M1に基づいて、DTは、プロセス1(process1)の実行を開始する。
(ST11) The event manager EM issues an instruction to receive the predetermined event to generate the application task AP1 to the message management task MM. For example, this event can be an input of channel switching received from the remote controller of the operation unit 9.
(ST12) MM receives this and generates application task AT1.
(ST13) A request_AT1 is issued to the MM to execute the driver task DT1 with the execution of AT1.
(ST14) The MM sends a request_M1 to the DT. At this time, the fact that the task AT1 is waiting for a response from the DT is stored in the RAM 11.
(ST15) Based on the request_M1, the DT starts executing the process 1 (process1).

ST15の後、プロセス1の終了の通知が来る前に、AT1とは、別のイベント、例えばチャンネル切換が入ったものとする。   Assume that another event, such as channel switching, has entered from AT1 before the notification of the end of process 1 comes after ST15.

(ST16)このとき、ST1で指示していたチャンネル切換を取りやめて、アプリケーションタスクAT2を実行するため、AT1の消去の通知をMMへ行う(ST16)。
(ST17)AT1の消去の通知をAT1に伝達する。AT1は、すでにプロセス1を実行を指示した後であるから、すでに消去できない状態であり、なんらの指示を行わない。
(ST18)その後、プロセス1は、MMに応答する。
(ST19)AT1消去の通知の後、EMは、AT2を生成するよう、MMに通知する。
(ST20)MMは、AT2の生成の通知を受けて、AT2のタスクを生成する。
(ST16) At this time, in order to cancel the channel switching instructed in ST1 and execute the application task AT2, notification of the deletion of AT1 is made to the MM (ST16).
(ST17) Notification of AT1 deletion is transmitted to AT1. Since AT1 has already instructed execution of process 1, it is in a state where it cannot be erased and does not give any instruction.
(ST18) Thereafter, the process 1 responds to the MM.
(ST19) After notification of AT1 deletion, EM notifies MM to generate AT2.
(ST20) Upon receiving the notification of generation of AT2, MM generates a task of AT2.

(ST21)AT1は、ドライバタスクDT2を実行するため、MMに要求_AT1を出す。
(ST22)MMは、要求_MM2をDTに送る。このとき、タスクAT2がDTからの返答を待っていることをRAM11に記憶させる。
(ST23)要求_MM2に基づいて、DTは、プロセス2(process2)の実行を開始する。
(ST21) AT1 issues a request_AT1 to the MM to execute the driver task DT2.
(ST22) The MM sends a request_MM2 to the DT. At this time, the fact that task AT2 is waiting for a response from DT is stored in RAM 11.
(ST23) Based on request_MM2, DT starts execution of process 2 (process2).

プロセス2の実行の後、MMは、プロセス1の実行の終了の応答を受ける。このとき、MMは、応答処理用情報31を検索し、プロセス1について、すでに削除の要求が出ていることを検出する。そして、この要求がでていることを検出すると、MMは、プロセス1の実行の終了の応答を受けても、この情報をアプリケーションタスクAT2に伝達しない。これにより、AT2は、プロセス1の終了をプロセス2の終了と誤認することがない。したがって、その後、プロセス2の終了の応答を受けたときに、AT2は、確実にそのプロセス2の実行の結果を検出できる。   After execution of process 2, the MM receives a response to end execution of process 1. At this time, the MM searches the response processing information 31 and detects that a deletion request has already been issued for the process 1. When it is detected that this request is issued, the MM does not transmit this information to the application task AT2 even if it receives a response to the completion of the execution of the process 1. Thereby, the AT 2 does not mistake the end of the process 1 as the end of the process 2. Therefore, when receiving a response to end the process 2, the AT 2 can reliably detect the execution result of the process 2.

(ST24)その後、MMは、プロセス2の終了の応答をドライバタスクDTから受ける。この場合において、たとえ、プロセス2が異常終了になったとしても、上述のとおり、確実にプロセス2の実行の結果を検出できる。したがって、例えば、プロセス2が、プロセス1の実行がされた後は出来ない処理であっても、プロセス1を実行する前の状態に戻して、その後改めて、プロセス2を実行することが可能になる。したがって、操作部9からのユーザの操作に対し、なんら返答をすることや是正措置をせず、無視してしまうといったことを防ぐことができる。   (ST24) Thereafter, the MM receives a response of the end of the process 2 from the driver task DT. In this case, even if the process 2 is abnormally terminated, the result of the execution of the process 2 can be reliably detected as described above. Therefore, for example, even if the process 2 cannot be performed after the process 1 is executed, the process 2 can be returned to the state before the process 1 is executed, and then the process 2 can be executed again. . Therefore, it is possible to prevent the user from making any response to the user's operation from the operation unit 9 or ignoring it without taking corrective action.

ST24の後は、メッセージマネジメントタスクMMは、直接、イベントマネージャEMに、ST24の状態を応答してもよいし、AT2が、プロセス2の終了をMMから受けて、イベントマネージャEMに返してもよい。   After ST24, the message management task MM may respond directly to the event manager EM with the status of ST24, or AT2 may receive the end of process 2 from the MM and return it to the event manager EM. .

次に、図6を用いて、図5のフローのST16でタスクが消去された場合の応答処理用情報31の修正処理について説明する。図6は、情報31のリストを表わしている。図6(A)のように、ST16により、リストn+1が消去されたとすると、図6(B)のように、リストnとリストn+2のアドレスをリンクさせる。そのために、リストnに記述されたリストn+1のアドレス311をリストn+2のアドレス313にすると共に、リストn+2に記述されたリストn+1のアドレス312をリストnのアドレス314にする。このようにリンクしているので、応答処理用情報31を一連の配列構造とすることができ、リストn+1が消去されたことを容易に検索できる。   Next, the correction processing of the response processing information 31 when the task is deleted in ST16 of the flow of FIG. 5 will be described using FIG. FIG. 6 shows a list of information 31. As shown in FIG. 6A, if the list n + 1 is deleted in ST16, the addresses of the list n and the list n + 2 are linked as shown in FIG. 6B. For this purpose, the address 311 of the list n + 1 described in the list n is changed to the address 313 of the list n + 2, and the address 312 of the list n + 1 described in the list n + 2 is changed to the address 314 of the list n. Since they are linked in this way, the response processing information 31 can have a series of array structures, and it can be easily retrieved that the list n + 1 has been deleted.

なお、以上の図4、図6で説明した添え字のn、n+1は、説明の便宜的なものであり、実装上は、単に、各リストが互いに隣のリストのアドレスを示してつながっていればよく、添え字を用いて応答処理用情報31やM2のプログラムを記述することを要しない。また、リストはアドレスが連続していることを要しない。以上では、情報31のリストとして、双方向リストを用いたが、昇順、または降順のいずれかでアドレスをリンクする片方向リスト形式でもよい。また、リスト形式は本発明を実施する上では必須ではなく、応答処理用情報31を検索できればよい。ただし、リスト形式でデータを記述すれば、情報31を容易に検索できるので、リスト形式で情報31を記述するのが望ましい。   The subscripts n and n + 1 described above with reference to FIGS. 4 and 6 are for convenience of explanation, and in the implementation, each list is simply connected by indicating the addresses of the adjacent lists. There is no need to describe the response processing information 31 or the M2 program using subscripts. Also, the list does not require that the addresses are continuous. In the above, a bidirectional list is used as the list of information 31, but a one-way list format in which addresses are linked in either ascending order or descending order may be used. Further, the list format is not essential for carrying out the present invention, and it is sufficient that the response processing information 31 can be searched. However, it is desirable to describe the information 31 in the list format because the information 31 can be easily searched if the data is described in the list format.

本実施形態のRAM11と、ROM12をあわせたものは、本発明の記憶部に相当する。本実施形態のアプリケーション、デバイスドライバは、本発明のそれぞれ上位のプログラム、下位のプログラムに相当する。メッセージマネジメントプログラム3により、記憶させることは、メッセージマネジメントプログラム3により、リストを検索して、合致するものを検索し、AT2への応答を通知しないまたは遮断することは、本発明のメッセージ遮断プログラムに相当する。   A combination of the RAM 11 and the ROM 12 of this embodiment corresponds to a storage unit of the present invention. The application and device driver of the present embodiment correspond to the upper program and the lower program of the present invention, respectively. The message management program 3 stores the message, the message management program 3 searches the list, searches for a match, and does not notify or blocks the response to the AT 2. Equivalent to.

図2、図3の構成およびプログラムの構成は例示であり、別のドライバ、アプリケーション、外部装置を備えていてもよいし、そのすべてを備えなくてもよい。ROM、RAMは、マイコンコアに含まれていなくてもよいし、外部に接続するメモリでもよい。その装置が機能するように、プロセッサ、プログラムを構成できればよい。以上の図2の説明では、テレビを例にとり説明したが、テレビでなくても、デバイスドライバを用いてアプリケーションを実行する電子機器であれば、本実施形態をこれに適用できる。さらには、必ずしもデバイスドライバ、アプリケーションを有する電子機器でなくても、主従関係にある上位プログラム、下位プログラム間でのメッセージの授受についても、本実施形態を応用できる。   The configuration of FIG. 2 and FIG. 3 and the configuration of the program are examples, and may include another driver, application, and external device, or may not include all of them. The ROM and RAM may not be included in the microcomputer core, or may be a memory connected to the outside. It suffices if the processor and the program can be configured so that the device functions. In the above description of FIG. 2, the television has been described as an example. However, the present embodiment can be applied to any electronic device that executes an application using a device driver, even if it is not a television. Furthermore, the present embodiment can also be applied to the exchange of messages between the upper-level program and the lower-level program that are in a master-slave relationship, even if the electronic device does not necessarily have a device driver or an application.

以上では、機能ごとに分離したブロックで説明したが、実装上は、これらの機能のうち、いずれかが複数の機能が一体となったシステムICで構成してもよいし、一つのブロックを複数に分離して構成してもよい。例えば、デバイスドライバまたは下位のプログラムが、メインプロセッサ1の外にあるサブプロセッサ内部に記憶されている場合でも応用できる。具体的には、受信部41にサブプロセッサやマイコンを設け、その内部でデバイスドライバを実行してもよい。この場合は、サブプロセッサと通信してデバイスドライバまたは下位プログラムを実行する。そして、メインプロセッサ内部で、メッセージマネジメントタスクMMを設けて、サブプロセッサとの通信を図4のフォーマットで記憶することができる。また、サブプロセッサから応答が入ってきても、図5の説明のとおり、すでに取り消したデバイスドライバのタスクについては、アプリケーションに通知しない。このような場合には、メインプロセッサとサブプロセッサを合わせたものが本発明のタスク処理部に相当する。   In the above description, the blocks separated for each function have been described. However, in the implementation, any of these functions may be configured by a system IC in which a plurality of functions are integrated, or one block may be divided into a plurality of blocks. You may comprise separately. For example, the present invention can be applied even when a device driver or a lower-level program is stored inside a sub processor outside the main processor 1. Specifically, a sub processor or a microcomputer may be provided in the receiving unit 41 and a device driver may be executed therein. In this case, the device driver or the lower program is executed by communicating with the sub processor. Then, a message management task MM can be provided inside the main processor, and communication with the sub processor can be stored in the format of FIG. Even if a response is received from the sub-processor, the device driver task that has already been canceled is not notified to the application as described in FIG. In such a case, the combination of the main processor and the sub processor corresponds to the task processing unit of the present invention.

以上の実施形態では、プログラムが階層構造になり、イベントマネージャが、アプリケーションを呼び出し、アプリケーションがデバイスドライバを呼び出し、これらの間にメッセージマネジメントタスクMMが介在する構成とした。しかし、下位のデバイスドライバがRAM11に常駐して、上位のアプリケーションから要求があった場合に、その要求というイベントを契機にしてタスクを実行してもよい。特に、上記サブプロセッサ内にデバイスドライバを記憶しておくときは、デバイスドライバを常時、稼動状態にして、アプリケーションからの要求を契機にタスクを実行してもよい。この要求は本発明の要求に相当する。   In the above embodiment, the program has a hierarchical structure, the event manager calls the application, the application calls the device driver, and the message management task MM is interposed between them. However, when a lower-level device driver resides in the RAM 11 and a request is received from a higher-level application, the task may be executed in response to an event of the request. In particular, when a device driver is stored in the sub-processor, the device driver may be always in an operating state and a task may be executed in response to a request from an application. This requirement corresponds to the requirement of the present invention.

従来のタスク処理のフローを示す。The flow of the conventional task processing is shown. 本実施形態のテレビのブロック構成を示す。The block configuration of the television of this embodiment is shown. 本実施形態のテレビがタスクを処理するためにプログラムを呼び出す手順を示す。The procedure in which the television of this embodiment calls a program in order to process a task is shown. 本実施形態のテレビのタスク処理で用いる応答処理用情報のデータ構造の1例を示す。An example of the data structure of the information for response processing used by the task processing of the television of this embodiment is shown. 本実施形態のタスク処理のフローを示す。The flow of the task processing of this embodiment is shown. 本実施形態のタスクが削除された場合のリストの修正方法を示す。A method for correcting a list when a task of this embodiment is deleted will be described.

符号の説明Explanation of symbols

1−メインプロセッサ、 10−CPU、11−RAM、 12−ROM、
13−イベントマネージャ、 16−アプリケーションA、
17−アプリケーションB、 18−アプリケーションC、
21−受信ドライバ、 22−画像制御ドライバ、 23−音声ドライバ、
3−メッセージマネジメントプログラム、 31−応答処理用情報、
41−受信部、 42−画像処理部および表示器、 43−音声処理部、
9−操作部、 EM−イベントマネージャ、 AT−アプリケーションタスク、
DT−ドライバタスク、 EOS−エンドオブシーケンス、
MM−メッセージマネジメントタスク
1-main processor, 10-CPU, 11-RAM, 12-ROM,
13-Event manager, 16-Application A,
17-Application B, 18-Application C,
21-Reception driver, 22-Image control driver, 23-Audio driver,
3-message management program, 31-information for response processing,
41-receiving unit, 42-image processing unit and display unit, 43-audio processing unit,
9-Operation part, EM-Event manager, AT-Application task,
DT-Driver Task, EOS-End of Sequence,
MM-Message management task

Claims (7)

主従関係を有する上位、下位のプログラム群、および、所定のイベントに応じてこれらのプログラムを呼び出して実行するイベントマネージャのプログラムを記憶する記憶部と、
前記プログラム群を実行するタスク処理部と、を備え、前記タスク処理部は、前記上位のプログラムの実行に伴って行う呼び出しまたは要求に基づいて、下位のプログラムのタスク処理を行い、その下位のプログラムのタスクの完了の応答を上位のプログラムで取得するタスク管理装置において、
前記タスク処理部は、前記上位、下位のプログラムおよび前記イベントマネージャの間で、前記呼び出し、要求、または応答を行う時に、これらのプログラム間に介在して、前記呼び出し、応答の受け渡しを伝達すると共に、その受け渡しの通信情報であって、前記下位プログラムの応答をタスクごとに識別する応答名を含む通信情報を記憶させるメッセージ記憶プログラムを実行し、
前記タスク処理部は、すでに下位のプログラムで実行中のタスクのキャンセルの指示を前記イベントマネージャから受けているかどうか判断し、当該キャンセルの指示を受けているタスクから応答を受けた場合には、上位のプログラムへ応答を通知しないか、または当該応答を遮断するメッセージ遮断プログラムを実行するタスク管理装置。
A storage unit that stores an upper and lower program group having a master-slave relationship, and an event manager program that calls and executes these programs in response to a predetermined event;
A task processing unit that executes the program group, and the task processing unit performs task processing of a lower-level program based on a call or a request that is performed in accordance with execution of the higher-level program, and the lower-level program In the task management device that obtains the completion response of the task by the upper program,
When the task processing unit performs the call, request, or response between the upper and lower programs and the event manager, the task processing unit intervenes between these programs to transmit the call and response delivery. Executing a message storage program for storing communication information including the response name for identifying the response of the lower-order program for each task.
The task processing unit determines whether or not an instruction for canceling a task already being executed by a lower-level program is received from the event manager, and if a response is received from a task receiving the cancellation instruction, A task management device that executes a message blocking program that does not notify a response to the program or blocks the response.
前記タスク処理部は、前記メッセージ記録プログラムの実行により、前記通信情報として、通信情報の内容をリスト化したリストと、複数のリストをリンクして配列構造にまとめるポインタと、を記述したリスト形式で前記記憶部に記憶させる請求項1に記載のタスク管理装置。   The task processing unit has a list format in which, as the communication information, a list that lists the contents of communication information and a pointer that links a plurality of lists into an array structure by executing the message recording program are described. The task management apparatus according to claim 1, which is stored in the storage unit. 前記タスク処理部は、前記メッセージ記録プログラムの実行により、前記通信情報として、前記応答名のほかに、上位のプログラムが下位のプログラムへ送る指示を記述したAPI(Application Programming Interface)メッセージ名と、アプリケーションを識別するアプリケーションID(identification)と、を含むデータセットで前記記憶部に記憶させる請求項1または請求項2に記載のタスク管理装置。   The task processing unit includes an API (Application Programming Interface) message name describing an instruction to be sent from a higher-level program to a lower-level program in addition to the response name as the communication information by executing the message recording program, and an application The task management apparatus according to claim 1, wherein the storage unit stores the data set including an application ID (identification) for identifying the application ID. 前記タスク処理部は、前記上位のプログラムのタスクのキャンセルの指示を前記イベントマネージャから受けた場合には、メッセージ記憶プログラムを用いて、キャンセルの指示を受けたタスクに対応するリストを削除すると共に、前記リストの前後のポインタを修正する請求項2に記載のタスク管理装置。   When the task processing unit receives an instruction to cancel the task of the higher-level program from the event manager, the message processing program uses the message storage program to delete the list corresponding to the task that has received the cancellation instruction, The task management device according to claim 2, wherein pointers before and after the list are corrected. 前記記憶部は、前記上位のプログラムとして、アプリケーションを記憶すると共に、前記下位のプログラムとしてデバイスドライバを記憶し、
前記タスク処理部は、アプリケーションとデバイスドライバとの間で前記呼び出し、応答時に前記メッセージ記憶プログラムを実行する請求項1〜請求項4のいずれかに記載のタスク管理装置。
The storage unit stores an application as the upper program and a device driver as the lower program,
The task management device according to claim 1, wherein the task processing unit executes the message storage program when calling and responding between an application and a device driver.
放送を受信して映像信号を出力する受信部と、
前記映像信号の処理を行う映像処理部とを備え、
前記記憶部は、デバイスドライバとして、前記受信部を制御する受信ドライバと、前記映像処理部を制御する映像処理ドライバを記憶し、前記アプリケーションとして、チャンネル切換の一連の動作が記述されたチャンネル切換アプリケーションを記憶し、
前記タスク処理部は、チャンネル切換アプリケーションの実行時に、前記受信ドライバおよび映像処理ドライバのタスクを生成する請求項5に記載のタスク管理装置。
A receiver that receives the broadcast and outputs a video signal;
A video processing unit for processing the video signal,
The storage unit stores, as a device driver, a reception driver that controls the reception unit and a video processing driver that controls the video processing unit, and a channel switching application that describes a series of channel switching operations as the application. Remember
The task management device according to claim 5, wherein the task processing unit generates tasks for the reception driver and the video processing driver when a channel switching application is executed.
主従関係を有する上位、下位のプログラム群、および、イベントマネージャのプログラムを記憶する記憶部と、前記プログラム群を実行するタスク処理部と、を用いて、
前記タスク処理部が、イベントマネージャを実行することにより、所定のイベントに応じてこれらのプログラムを呼び出して実行するタスク生成ステップと、
前記タスク処理部が、前記上位のプログラムの実行に伴って、呼び出しまたは要求を行う要求ステップと、
前記要求ステップによる呼び出しまたは要求に基づいて、下位のプログラムのタスク処理を行う下位プログラムタスクステップと、
前記下位プログラムタスクステップで処理したタスクの完了の応答を上位のプログラムで取得する応答ステップを実行するタスク管理方法において、
前記タスク処理部により、前記タスク生成ステップまたは前記下位プログラムタスクステップまたは前記応答ステップにおいて、前記上位、下位のプログラムおよび前記イベントマネージャの間に介在して、前記呼び出し、応答の受け渡しを伝達する伝達ステップと、
伝達ステップにおける受け渡しの通信情報であって、前記下位プログラムの応答をタスクごとに識別する応答名を含む通信情報を記憶させるメッセージ記憶ステップと、
前記タスク処理部は、すでに下位のプログラムで実行中のタスクのキャンセルの指示を前記イベントマネージャから受けているかどうか判断し、当該キャンセルの指示を受けているタスクから応答を受けた場合には、上位のプログラムへ応答を通知しないか、または当該応答を遮断する遮断ステップと、を実行するタスク管理方法。
Using upper and lower program groups having a master-slave relationship, a storage unit that stores the program of the event manager, and a task processing unit that executes the program group,
The task processing unit executes an event manager to call and execute these programs according to a predetermined event, and a task generation step,
The task processing unit, a request step for calling or requesting in accordance with the execution of the upper program,
A lower-level program task step for performing task processing of a lower-level program based on a call or request by the request step;
In a task management method for executing a response step of acquiring a response of completion of a task processed in the lower program task step by an upper program,
In the task generating step or the lower program task step or the response step, the task processing unit is interposed between the upper and lower programs and the event manager to transmit the call and response delivery. When,
A message storage step of storing communication information including a response name for identifying the response of the lower-order program for each task, which is communication information for transfer in the transmission step;
The task processing unit determines whether or not an instruction for canceling a task already being executed by a lower-level program is received from the event manager, and if a response is received from a task receiving the cancellation instruction, A task management method for executing a blocking step of not reporting a response to the program or blocking the response.
JP2007327648A 2007-12-19 2007-12-19 Task management device and task management method Pending JP2009151472A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007327648A JP2009151472A (en) 2007-12-19 2007-12-19 Task management device and task management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007327648A JP2009151472A (en) 2007-12-19 2007-12-19 Task management device and task management method

Publications (1)

Publication Number Publication Date
JP2009151472A true JP2009151472A (en) 2009-07-09

Family

ID=40920584

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007327648A Pending JP2009151472A (en) 2007-12-19 2007-12-19 Task management device and task management method

Country Status (1)

Country Link
JP (1) JP2009151472A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013152706A (en) * 2011-12-26 2013-08-08 Ricoh Co Ltd Information processing apparatus, information processing method, and program
US8942727B1 (en) 2014-04-11 2015-01-27 ACR Development, Inc. User Location Tracking
US9413707B2 (en) 2014-04-11 2016-08-09 ACR Development, Inc. Automated user task management
CN113971049A (en) * 2020-07-23 2022-01-25 海信视像科技股份有限公司 Background service management method and display device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013152706A (en) * 2011-12-26 2013-08-08 Ricoh Co Ltd Information processing apparatus, information processing method, and program
US8942727B1 (en) 2014-04-11 2015-01-27 ACR Development, Inc. User Location Tracking
US9313618B2 (en) 2014-04-11 2016-04-12 ACR Development, Inc. User location tracking
US9413707B2 (en) 2014-04-11 2016-08-09 ACR Development, Inc. Automated user task management
US9818075B2 (en) 2014-04-11 2017-11-14 ACR Development, Inc. Automated user task management
CN113971049A (en) * 2020-07-23 2022-01-25 海信视像科技股份有限公司 Background service management method and display device

Similar Documents

Publication Publication Date Title
JP4806445B2 (en) CONTROL DEVICE, CONTROL PROGRAM, AND CONTROL METHOD FOR CONTROLLING DISPLAY OF DISPLAY DEVICE DISPLAYING OVERLAYED WINDOW
CN106133698A (en) Framework for user model collapse report
JP7334445B2 (en) Device control program and mobile terminal device
US9172935B2 (en) Terminal device capable of managing storage capacity and management method thereof
KR101205034B1 (en) Program generation device, program generation method, and computer-readable storage medium
JP6520404B2 (en) Mobile terminal and output program
US20150180943A1 (en) Displaying an application in a window in a graphical user interface environment on a computer system
CN100419688C (en) Interrupt control device and control method
JP2009151472A (en) Task management device and task management method
GB2387927A (en) User interface control apparatus
JP2008129954A (en) Server device and client device
CN106445286A (en) Focus determination method and device for terminal screen based on split screens and terminal equipment
CN111930678A (en) Data transmission method and device, electronic equipment and storage medium
KR20140102339A (en) Method and terminal of calling application using mapping information of preferred function
CN113141530A (en) Remote control interaction based method and device, electronic equipment and storage medium
JP7314716B2 (en) Information processing device and information processing program
US9948798B2 (en) Method of managing a facsimile transmission
CN106203160A (en) A kind of control method and electronic equipment
JP2006085291A (en) Information processor and application program
CN106897057A (en) The method and device on plug-in unit call notification column
US10091379B2 (en) Information processing device and storage medium
JP7044633B2 (en) Operation support device, operation support system, and operation support method
CN112714344A (en) Control method and device for intelligent equipment and intelligent television
JP6492149B1 (en) Electronic device, control method and control program
JP2009076090A (en) Information processing system, host device, and program for causing computer to execute information processing method