WO2019038834A1 - 情報処理装置及びリソース使用調停方法 - Google Patents

情報処理装置及びリソース使用調停方法 Download PDF

Info

Publication number
WO2019038834A1
WO2019038834A1 PCT/JP2017/029956 JP2017029956W WO2019038834A1 WO 2019038834 A1 WO2019038834 A1 WO 2019038834A1 JP 2017029956 W JP2017029956 W JP 2017029956W WO 2019038834 A1 WO2019038834 A1 WO 2019038834A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
resource
time
management unit
priority
Prior art date
Application number
PCT/JP2017/029956
Other languages
English (en)
French (fr)
Inventor
山田 貴光
Original Assignee
三菱電機株式会社
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 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to PCT/JP2017/029956 priority Critical patent/WO2019038834A1/ja
Publication of WO2019038834A1 publication Critical patent/WO2019038834A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present invention relates to techniques for managing the use of resources by tasks.
  • the resource management device disclosed in Patent Literature 1 has priorities set in advance for the applications 1 and 2 when there is an acquisition request for the resource from the application 2.
  • the priority of the application 2 is high, the application 1 is requested to release the resource, and when the resource is released, the application 2 is permitted to use the resource.
  • an application in other words, a task
  • a task that has been requested to release a resource as described above has to immediately interrupt processing on the resource.
  • the task needs to execute the process associated with the transfer of the usage right, that is, the request for using the resource again and execute the interrupted process after the use is permitted.
  • the present invention has been made to solve the above problems, and an information processing apparatus and the like that can reduce overhead due to processing accompanying the transition of resource usage authority while ensuring exclusive use of resources by one task. Intended to provide.
  • an information processing apparatus is: Resource management means for permitting use of resources for one of a plurality of tasks; A management table in which task information including a priority for use of the resource and an allowable time for waiting for permission to use the resource is set for each of the plurality of tasks;
  • the resource management means is configured to receive the resource use request from a second task of the plurality of tasks while the first task of the plurality of tasks is using the resource, when the resource management means receives the resource use request of the second task.
  • the resource by the first task Permit the use of the resource to the second task when the processing for the second task is completed, and if the remaining processing time exceeds the allowable time of the second task, Allow the use of resources.
  • the remaining processing time for the resource by the first task is the second If within the allowable time of the task, the second task is permitted to use the resource when the processing for the resource by the first task is completed, and the remaining processing time exceeds the allowable time of the second task, Allow immediate use of resources for the second task. Therefore, it is possible to reduce the occurrence of processing associated with the transition of resource usage authority, and it is possible to expect a reduction in overhead.
  • Block diagram showing a hardware configuration of an information processing apparatus according to an embodiment of the present invention A block diagram showing a functional configuration of an information processing apparatus according to an embodiment of the present invention Diagram for explaining the management table in the present embodiment Flow chart showing procedure of resource use arbitration process in the present embodiment In the present embodiment, a sequence diagram showing an example of the operation relationship between the first task, the second task, and the resource management unit
  • FIG. 1 is a block diagram showing the hardware configuration of the information processing apparatus 1 according to the embodiment of the present invention.
  • the information processing apparatus 1 is a computer that executes a specific process, and is, for example, a system controller for centrally managing a plurality of electrical devices installed in a general home or a plurality of facility devices installed in a building. is there.
  • the information processing apparatus 1 includes a central processing unit (CPU) 10, a read only memory (ROM) 11, a random access memory (RAM) 12, a secondary storage device 13, and a plurality of resources A, B,. . These components are connected to one another via a bus 14.
  • the CPU 10 controls the information processing apparatus 1 in an integrated manner. Details of the functions of the information processing apparatus 1 realized by the CPU 10 will be described later.
  • the ROM 11 stores a plurality of firmware and data used when executing the firmware.
  • the RAM 12 is used as a work area of the CPU 10.
  • the secondary storage device 13 has an EEPROM (Electrically Erasable Programmable Read-Only Memory), a readable / writable nonvolatile semiconductor memory such as a flash memory, an HDD (Hard Disk Drive), and the like.
  • the secondary storage device 13 is not shown, but is a program for arbitrating conflicts between a plurality of tasks in using the operating system (OS) and a program specific to the present invention, ie, resources A, B,.
  • OS operating system
  • a program specific to the present invention ie, resources A, B,.
  • resources A, B ie, resources A, B
  • a resource use arbitration program various application programs, an OS, and data used when executing each program.
  • the resources A, B,... are hardware such as, for example, an interface for a display, an interface for a printer, an interface for communication, and an interface for an external memory.
  • the information processing apparatus 1 functionally includes, as shown in FIG. 2, a first task 100, a second task 101, and a resource management unit 102. These functional units are realized by the CPU 10 executing the OS and each program stored in the secondary storage device 13.
  • the first task 100 is a task that is realized by the CPU 10 executing the first application program among the plurality of application programs under the control of the OS.
  • the second task 101 is a task that is realized by the CPU 10 executing the second application program among the plurality of application programs under the control of the OS.
  • the first task 100 and the second task 101 use resources A and B as needed during startup.
  • the first task 100 designates the resource to be used (resource A or B) and requests the resource management unit 102 to use the resource.
  • the first task 100 uses the resource to be used (resource A or B) via the resource management unit 102.
  • the second task 101 requests the resource management unit 102 to use the resource to be used, and when the request is permitted by the resource management unit 102, the resource to be used (resource A or B) Is used via the resource management unit 102.
  • the resource management unit 102 arbitrates the contention for the use of the first task 100 and the second task 101 for the resource A or B. More specifically, when the first task 100 or the second task 101 is using the resource A, and receives a request for using the resource A from the other task, the other task is referred to with reference to the management table 103 described later. It is determined whether to permit the use of resource A. Then, in the case of permitting, the resource management unit 102 accesses the resource A according to the instruction from the other task, and supports the use of the resource A by the other task.
  • the resource management unit 102 accesses the resource B according to the instruction from the other task, and supports the use of the resource B by the other task.
  • the management table 103 is an average of the task ID, the priority, the allowable time, the usage status of the resource A, the usage status of the resource B, the average usage time of the resource A, and the resource B.
  • a plurality of pieces of task information including a usage time, a cumulative usage time of resource A, a cumulative usage time of resource B, a usage count of resource A, and a usage count of resource B are registered in advance.
  • the management table 103 is expanded in the RAM 12 or the secondary storage device 13.
  • the priority and the allowable time are set in advance for each application program corresponding to each task.
  • Each task (the first task 100 and the second task 101), when started, registers, in the management table 103 via the resource management unit 102, its own priority and task information for which an allowable time is set.
  • the task ID is an ID (identification) for identifying a task (the first task 100 or the second task 101), and is assigned by the OS or the resource management unit 102.
  • the task IDs of the first task 100 and the second task 101 are “T001” and “T002”, respectively.
  • the priority is an index indicating the degree to which priority is given to resource usage, and is indicated by “high” or “low” in this embodiment.
  • the priority "high” indicates that in the task (the first task 100 or the second task 101), the degree of prioritization regarding the use of the resources (resource A and resource B) is high, while the priority is high.
  • “Low” indicates that the task has a low priority for resource use.
  • the priority is set to "low", and in the second task 101, the priority is set to "high".
  • the permission time is the permission of the resource management unit 102 after the task (the first task 100 or the second task 101) requests the resource management unit 102 to use the resources (resource A and resource B). Indicates the time allowed to wait until receiving
  • the allowable time of the first task 100 is set to "100 ms”
  • the allowable time of the second task 101 is set to "10 ms”.
  • Information on whether or not the resource is in use by the task is set by the resource management unit 102 as the usage status of the resource A and the resource B, respectively. If in use, the remaining processing time is set.
  • the remaining processing time can be obtained by subtracting the elapsed time since the task started using the resource from the average usage time of the resource in the task. For example, when the first task 100 uses the resource A, the resource management unit 102 measures an elapsed time after the first task 100 starts using the resource A, and the resource of the first task 100 is measured. The remaining processing time for resource A of the first task 100 is calculated by subtracting the measured elapsed time from the average use time of A.
  • the average usage time of the resource (resource A or resource B) in the task (the first task 100 or the second task 101) is set by the resource management unit 102 for the average usage time of the resource A and the resource B, respectively. .
  • the average use time can be obtained by dividing the cumulative use time of the resource in the task by the number of uses of the resource in the task.
  • the accumulated use time of the resource (resource A or resource B) in the task (the first task 100 or the second task 101) is set by the resource management unit 102 in the accumulated use time of the resource A and the resource B, respectively. Ru.
  • the resource management unit 102 sets the number of times the task (the first task 100 or the second task 101) has used the resource (the resource A or the resource B) as the number of uses of the resource A and the resource B, respectively.
  • the resource management unit 102 increments the number of times of use of the resource in the task each time the processing on the resource by the task is completed.
  • a time that largely exceeds the assumed allowable time is set by default for the average use time of the resources A and B. For example, when the size of the setting area of each of the average usage time of the resource A and the resource B in the management table 103 is 1 byte, 255 (ms) is set.
  • FIG. 4 is a flowchart showing the procedure of the resource usage arbitration process executed by the information processing device 1.
  • the resource management unit 102 determines that the requested resource is another task ( It is determined whether it is in use by the first task 100 or the second task 101) (step S102).
  • step S102 When the requested resource is not in use by another task (step S102; NO), the resource management unit 102 requests the requested resource (the first task 100 or the second task 101) for the requested task (the first task 100 or the second task 101). The use of resource A or B) is immediately permitted (step S106). Thereafter, the process of the information processing device 1 returns to step S101.
  • step S102 When the requested resource is in use by another task (step S102; YES), the resource management unit 102 determines whether the priority of the task of the request source is higher than the priority of the task using the resource. Is determined (step S103). As a result, when the priority of the task of the request source is not higher than the priority of the task using the resource (step S103; NO), the process of the information processing device 1 returns to step S101.
  • the resource management unit 102 determines the remaining processing time of the task in use as the request source. It is determined whether or not it is within the permissible time of the task (step S104). If the remaining processing time of the task in use exceeds the allowable time of the request source task (step S104; NO), the resource management unit 102 determines that the request source task (first task 100 or second task 101). ), The use of the requested resource (resource A or B) is immediately permitted (step S106). Thereafter, the process of the information processing device 1 returns to step S101.
  • step S104 determines that the request source is not processed after the processing of the task in use is completed.
  • the task is permitted to use the resource (step S105). Thereafter, the process of the information processing device 1 returns to step S101.
  • FIG. 5 is a sequence diagram showing an operation relationship between the first task 100 and the second task 101 and the resource management unit 102 in using the resource A.
  • the first task 100 requests the resource management unit 102 to use the resource A (step S201).
  • the resource management unit 102 that has received the request immediately permits the first task 100 to use the resource A because the resource A is not in use.
  • the first task 100 starts using the resource A via the resource management unit 102 (step S202), and the resource A is in use by the first task 100.
  • the second task 101 requests the resource managing unit 102 to use the resource A (step S203). Since the priority of the second task 101 is higher than the priority of the first task 100, the resource management unit 102 determines whether the remaining processing time of the first task 100 is within the allowable time of the second task 101 or not. To determine
  • the resource management unit 102 immediately permits the second task 101 to use the resource A. That is, the resource management unit 102 releases the resource A from the use of the first task 100 (step S204), and notifies the first task 100 of the release of the resource A (step S205). When such notification is received, the first task 100 suspends the processing for the resource A.
  • the second task 101 starts using the resource A via the resource management unit 102 (step S206), and the resource A is in use by the second task 101.
  • the second task 101 requests the resource management unit 102 to release the resource A (step S207).
  • the resource management unit 102 releases the resource A from the use of the second task 101 (step S208), and notifies the first task 100 of the release of the resource A (step S209).
  • the first task 100 requests the resource management unit 102 to use the resource A to resume the processing for the resource A interrupted earlier (step S210).
  • the resource management unit 102 that has received the request immediately permits the first task 100 to use the resource A because the resource A is not in use. Accordingly, the first task 100 starts using the resource A via the resource management unit 102 (step S211), and the resource A is in use by the first task 100.
  • the second task 101 requests the resource management unit 102 to use the resource A (step S212). Since the priority of the second task 101 is higher than the priority of the first task 100, the resource management unit 102 determines whether the remaining processing time of the first task 100 is within the allowable time of the second task 101 or not. To determine
  • the remaining processing time of the first task 100 at this time is 8 ms.
  • the resource management unit 102 suspends the request for use of the resource A from the second task 101, and Prioritize the use of resource A by task 100. Therefore, the second task 101 is in a standby state.
  • the first task 100 requests the resource management unit 102 to release the resource A (step S213).
  • the resource management unit 102 releases the resource A from the use of the first task 100 (step S214), and permits the second task 101 to use the resource A.
  • the second task 101 starts using the resource A via the resource management unit 102 (step S215), and the resource A is in use by the second task 101. Thereafter, when the processing for the resource A is completed, the second task 101 requests the resource management unit 102 to release the resource A (step S216). When receiving such a request, the resource management unit 102 releases the resource A from the use of the second task 101 (step S217).
  • a task for example, a task having a higher priority than a task using a resource (for example, the resource A) (for example, the first task 100)
  • a resource for example, the resource A
  • the first task 100 When there is a use request of the resource A from the second task 101), it is determined whether the remaining processing time for the resource A by the first task 100 is within the allowable time of the second task 101 or not. Then, if the remaining processing time for resource A by the first task 100 is within the allowable time for the second task 101, the processing for the resource A by the first task 100 is completed for the second task 101 when the processing for the resource A is completed. Permit use. On the other hand, if the remaining processing time exceeds the allowable time of the second task 101, the second task 101 is immediately permitted to use the resource A.
  • the first task 100 can continue processing until completion. As a result, it is expected that the number of cases in which the first task 100 interrupts the process for the resource A can be reduced, so that the reduction in overhead due to the transfer of the usage authority of the resource A can be expected.
  • the secondary storage device 13 may be included in the resource to be arbitrated.
  • two tasks are exemplified as tasks to be arbitrated, but naturally, in the present invention, the number of tasks to be arbitrated is three or more. It does not matter.
  • the resource management unit 102 may be realized by dedicated hardware.
  • the dedicated hardware is, for example, a single circuit, a complex circuit, a programmed processor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a combination thereof.
  • ASIC application specific integrated circuit
  • FPGA field-programmable gate array
  • the resource use arbitration program and the plurality of application programs used in the above embodiment may be a compact disc read only memory (CD-ROM), a digital versatile disc (DVD), a magneto-optical disc (Magneto-Optical Disc), and a USB. (Universal Serial Bus) It is also possible to store and distribute in a computer readable recording medium such as a memory, a memory card, and an HDD. Then, by installing the above-described program distributed as described above in a specific or general-purpose computer, it is also possible to cause the computer to function as the information processing apparatus 1 in the above-described embodiment.
  • a computer readable recording medium such as a memory, a memory card, and an HDD.
  • these programs may be stored in a disk device or the like included in another server on the Internet, and downloaded from the server to the information processing apparatus 1.
  • the present invention can be suitably adopted in an information processing apparatus.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

リソース管理部(102)は、第1タスク(100)がリソース(A)を使用中に、第2タスク(101)からリソース(A)の使用要求を受けると、第2タスク(101)の優先度が第1タスク(100)の優先度よりも高い場合において、第1タスク(100)によるリソース(A)に対する残りの処理時間が第2タスク(101)の許容時間以内であれば、第1タスク(100)によるリソース(A)に対する処理が完了した時に第2タスク(101)に対してリソース(A)の使用を許可し、残りの処理時間が第2タスク(101)の許容時間を超えていれば、第2タスク(101)に対して直ちにリソース(A)の使用を許可する。

Description

情報処理装置及びリソース使用調停方法
 本発明は、タスクによるリソースの使用を管理する技術に関する。
 従来、情報処理装置を構成するハードウェア、即ち、リソースの使用における複数のタスク間の競合を調停する種々の技術が提案されている。
 例えば、特許文献1に開示されるリソース管理装置は、アプリケーション1がリソースを使用しているとき、アプリケーション2から当該リソースに対する取得要求があると、アプリケーション1及び2にそれぞれ予め設定されている優先度を比較して、アプリケーション2の優先度が高い場合は、アプリケーション1に対してリソースの開放を要求し、リソースが開放されると、アプリケーション2にリソースの使用を許可する。
特開2005-4350号公報
 ところで、上記のようにリソースの開放を要求されたアプリケーション(換言すると、タスク)は、当該リソースに対する処理を直ちに中断せざるを得ない。この場合、当該タスクは、使用権限の移行に伴う処理、即ち、再度、リソースを使用するための要求を出し、使用が許可された後、中断した処理を実行する必要がある。
 このため、上記の従来技術のように、優先度の高いタスクからリソースの使用要求が発生した際、リソースを使用中の優先度の低いタスクに対して直ちにリソースの開放を要求してしまうと、上記の使用権限の移行に伴う処理によるオーバヘッドが増加してしまうという懸念がある。
 本発明は、上記課題を解決するためになされたものであり、1つのタスクによる排他的なリソースの使用を保証しつつ、リソースの使用権限の移行に伴う処理によるオーバヘッドを低減できる情報処理装置等を提供することを目的とする。
 上記目的を達成するため、本発明に係る情報処理装置は、
 複数のタスクのうちの1つのタスクに対してリソースの使用を許可するリソース管理手段と、
 前記複数のタスクの各々について、前記リソースの使用に関する優先度と、前記リソースの使用の許可を待つ際の許容時間と、を含むタスク情報が設定された管理テーブルと、を備え、
 前記リソース管理手段は、前記複数のタスクのうちの第1タスクが前記リソースを使用中に、前記複数のタスクのうちの第2タスクから前記リソースの使用要求を受けると、前記第2タスクの前記優先度が前記第1タスクの前記優先度よりも高い場合において、前記第1タスクによる前記リソースに対する残りの処理時間が前記第2タスクの前記許容時間以内であれば、前記第1タスクによる前記リソースに対する処理が完了した時に前記第2タスクに対して前記リソースの使用を許可し、前記残りの処理時間が前記第2タスクの前記許容時間を超えていれば、前記第2タスクに対して直ちに前記リソースの使用を許可する。
 本発明によれば、第1タスクがリソースを使用中に、第1タスクよりも優先度の高い第2タスクからリソースの使用要求を受けると、第1タスクによるリソースに対する残りの処理時間が第2タスクの許容時間以内であれば、第1タスクによるリソースに対する処理が完了した時に第2タスクに対してリソースの使用を許可し、残りの処理時間が第2タスクの許容時間を超えていれば、第2タスクに対して直ちにリソースの使用を許可する。このため、リソースの使用権限の移行に伴う処理の発生を低減させることができ、オーバヘッドの低減が期待できる。
本発明の実施形態に係る情報処理装置のハードウェア構成を示すブロック図 本発明の実施形態に係る情報処理装置の機能構成を示すブロック図 本実施形態における管理テーブルについて説明するための図 本実施形態におけるリソース使用調停処理の手順を示すフローチャート 本実施形態において、第1タスク、第2タスク及びリソース管理部の動作関係の一例を示すシーケンス図
 以下、本発明の実施形態について図面を参照して詳細に説明する。
 図1は、本発明の実施形態に係る情報処理装置1のハードウェア構成を示すブロック図である。情報処理装置1は、特定の処理を実行するコンピュータであり、例えば、一般の家庭に設置される複数の電気機器、あるいは、ビルに設置される複数の設備機器を集中管理するためのシステムコントローラである。
 情報処理装置1は、CPU(Central Processing Unit)10と、ROM(Read Only Memory)11と、RAM(Random Access Memory)12と、二次記憶装置13と、複数のリソースA,B,…を備える。これらの構成部は、バス14を介して相互に接続される。CPU10は、情報処理装置1を統括的に制御する。CPU10によって実現される情報処理装置1の機能の詳細については後述する。
 ROM11は、複数のファームウェア及びこれらのファームウェアの実行時に使用されるデータ等を記憶する。RAM12は、CPU10の作業領域として使用される。
 二次記憶装置13は、EEPROM(Electrically Erasable Programmable Read-Only Memory)、フラッシュメモリ等の読み書き可能な不揮発性の半導体メモリ、HDD(Hard Disk Drive)等を有する。二次記憶装置13は、何れも図示しないが、OS(Operating System)と、本発明特有のプログラム、即ち、リソースA,B,…の使用における複数のタスク間の競合を調停するためのプログラム(以下、リソース使用調停プログラムと称する。)と、様々なアプリケーションプログラムと、OS及び各プログラムの実行時に使用されるデータを記憶する。
 リソースA,B,…は、例えば、ディスプレイ用のインタフェース、プリンタ用のインタフェース、通信用のインタフェース、外部メモリ用のインタフェース等のハードウェアである。
 続いて、この情報処理装置1の機能構成について説明する。情報処理装置1は、機能的には、図2に示すように、第1タスク100と、第2タスク101と、リソース管理部102を備える。これらの機能部は、CPU10が二次記憶装置13に記憶されているOS及び各プログラムを実行することで実現される。
 第1タスク100は、OSの制御下で、CPU10が、上記の複数のアプリケーションプログラムのうちの第1アプリケーションプログラムを実行することで実現されるタスクである。第2タスク101は、OSの制御下で、CPU10が、上記の複数のアプリケーションプログラムのうちの第2アプリケーションプログラムを実行することで実現されるタスクである。
 第1タスク100及び第2タスク101は、起動中、必要に応じてリソースA,Bを使用する。その際、第1タスク100は、リソース管理部102に対して、使用対象のリソース(リソースA又はB)を指定し、当該リソースの使用を要求する。かかる要求が、リソース管理部102により許可されると、第1タスク100は、当該使用対象のリソース(リソースA又はB)をリソース管理部102を介して使用する。第2タスク101についても同様である。即ち、第2タスク101は、リソース管理部102に対して、使用対象のリソースの使用を要求し、かかる要求がリソース管理部102により許可されると、当該使用対象のリソース(リソースA又はB)をリソース管理部102を介して使用する。
 リソース管理部102は、リソースA又はBに対する第1タスク100及び第2タスク101の使用の競合を調停する。より詳細には、第1タスク100又は第2タスク101がリソースAを使用中に、他方のタスクからリソースAの使用要求を受けると、後述する管理テーブル103を参照して、当該他方のタスクにリソースAの使用を許可するか否かを判別する。そして、許可する場合、リソース管理部102は、当該他方のタスクからの指示に従ってリソースAにアクセスして、当該他方のタスクによるリソースAの使用を支援する。
 同様に、第1タスク100又は第2タスク101がリソースBを使用中に、他方のタスクからリソースBの使用要求を受けると、管理テーブル103を参照して、当該他方のタスクにリソースBの使用を許可するか否かを判別する。そして、許可する場合、リソース管理部102は、当該他方のタスクからの指示に従ってリソースBにアクセスして、当該他方のタスクによるリソースBの使用を支援する。
 管理テーブル103は、図3に示すように、タスクIDと、優先度と、許容時間と、リソースAの使用状況と、リソースBの使用状況と、リソースAの平均使用時間と、リソースBの平均使用時間と、リソースAの累計使用時間と、リソースBの累計使用時間と、リソースAの使用回数と、リソースBの使用回数とを含むタスク情報が予め複数登録されたデータテーブルである。管理テーブル103は、RAM12又は二次記憶装置13に展開される。タスク情報の内、優先度と、許容時間については、各タスクに対応するアプリケーションプログラム毎に予め設定されている。各タスク(第1タスク100、第2タスク101)は、起動すると、リソース管理部102を介して管理テーブル103に自己の優先度と、許容時間が設定されたタスク情報を登録する。
 タスクIDは、タスク(第1タスク100又は第2タスク101)を識別するためのID(identification)であり、OS又はリソース管理部102によって割り振られる。本実施形態では、第1タスク100及び第2タスク101のタスクIDは、それぞれ“T001”及び“T002”である。
 また、優先度は、リソースの使用に関して優先される程度を示す指標であり、本実施形態では、“高”又は“低”で示される。優先度が“高”とは、当該タスク(第1タスク100又は第2タスク101)において、リソース(リソースA及びリソースB)の使用に関して優先される程度が高いことを示し、一方、優先度が“低”とは、当該タスクにおいて、リソースの使用に関して優先される程度が低いことを示している。
 本実施形態では、図3に示すように、第1タスク100において、優先度が“低”に設定されており、第2タスク101においては、優先度が“高”に設定されている。
 許容時間とは、当該タスク(第1タスク100又は第2タスク101)が、リソース管理部102に対して、リソース(リソースA及びリソースB)の使用要求を行ってから、リソース管理部102の許可を受けるまで待つ際の許容時間を示す。本実施形態では、図3に示すように、第1タスク100の許容時間が“100ms”に設定されており、また、第2タスク101の許容時間が“10ms”に設定されている。
 リソースA及びリソースBの使用状況には、それぞれ、当該タスクにより当該リソースが使用中であるか否かに関する情報がリソース管理部102によって設定される。使用中である場合には、残りの処理時間が設定される。残りの処理時間は、当該タスクにおける当該リソースの平均使用時間から、当該タスクが当該リソースの使用を開始してからの経過時間を差し引くことで得られる。例えば、第1タスク100がリソースAを使用している場合では、リソース管理部102は、第1タスク100がリソースAの使用を開始してからの経過時間を計測し、第1タスク100のリソースAの平均使用時間から、計測した経過時間を差し引くことで、第1タスク100のリソースAに対する残りの処理時間を算出する。
 リソースA及びリソースBの平均使用時間には、それぞれ、当該タスク(第1タスク100又は第2タスク101)における当該リソース(リソースA又はリソースB)の平均使用時間がリソース管理部102によって設定される。平均使用時間は、当該タスクにおける当該リソースの累計使用時間を、当該タスクにおける当該リソースの使用回数で除算することで得られる。
 リソースA及びリソースBの累計使用時間には、それぞれ、当該タスク(第1タスク100又は第2タスク101)における当該リソース(リソースA又はリソースB)の使用時間の累計がリソース管理部102によって設定される。
 リソースA及びリソースBの使用回数には、それぞれ、当該タスク(第1タスク100又は第2タスク101)が当該リソース(リソースA又はリソースB)を使用した回数がリソース管理部102によって設定される。リソース管理部102は、当該タスクによる当該リソースに対する処理が完了する度に、当該タスクにおける当該リソースの使用回数をインクリメントする。
 なお、管理テーブル103の各タスク情報において、初期状態では、リソースA及リソースBの平均使用時間には、想定される許容時間を大きく超える時間がデフォルトで設定される。例えば、管理テーブル103におけるリソースA及びリソースBの平均使用時間それぞれの設定領域のサイズが1バイトである場合、それぞれ、255(ms)が設定される。
 図4は、情報処理装置1によって実行されるリソース使用調停処理の手順を示すフローチャートである。
 第1タスク100又は第2タスク101の何れかから、リソース(リソースA又はB)の使用要求を受けると(ステップS101;YES)、リソース管理部102は、要求されたリソースが、他のタスク(第1タスク100又は第2タスク101)によって使用中であるか否かを判別する(ステップS102)。
 要求されたリソースが他のタスクによって使用中でない場合(ステップS102;NO)、リソース管理部102は、要求元のタスク(第1タスク100又は第2タスク101)に対して、要求されたリソース(リソースA又はB)の使用を直ちに許可する(ステップS106)。その後、情報処理装置1の処理は、ステップS101に戻る。
 要求されたリソースが他のタスクによって使用中の場合(ステップS102;YES)、リソース管理部102は、要求元のタスクの優先度が、当該リソースを使用中のタスクの優先度より高いか否かを判別する(ステップS103)。その結果、要求元のタスクの優先度が、当該リソースを使用中のタスクの優先度より高くない場合(ステップS103;NO)、情報処理装置1の処理は、ステップS101に戻る。
 一方、要求元のタスクの優先度が、当該リソースを使用中のタスクの優先度より高い場合(ステップS103;YES)、リソース管理部102は、使用中のタスクの残りの処理時間が、要求元のタスクの許容時間以内であるか否かを判別する(ステップS104)。使用中のタスクの残りの処理時間が、要求元のタスクの許容時間を超えている場合(ステップS104;NO)、リソース管理部102は、要求元のタスク(第1タスク100又は第2タスク101)に対して、要求されたリソース(リソースA又はB)の使用を直ちに許可する(ステップS106)。その後、情報処理装置1の処理は、ステップS101に戻る。
 一方、使用中のタスクの残りの処理時間が、要求元のタスクの許容時間以内である場合(ステップS104;YES)、リソース管理部102は、使用中のタスクの処理の完了後に、要求元のタスクに対してリソースの使用を許可する(ステップS105)。その後、情報処理装置1の処理は、ステップS101に戻る。
 図5を参照し、第1タスク100、第2タスク101及びリソース管理部102の動作関係について具体的に説明する。図5は、リソースAの使用における第1タスク100、第2タスク101及びリソース管理部102の動作関係を示すシーケンス図である。図5において、第1タスク100は、リソースAの使用が必要になると、リソース管理部102に対して、リソースAの使用を要求する(ステップS201)。かかる要求を受けたリソース管理部102は、リソースAが使用中でないため、第1タスク100に対して、直ちにリソースAの使用を許可する。
 これにより、第1タスク100は、リソース管理部102を介して、リソースAの使用を開始し(ステップS202)、リソースAは第1タスク100により使用中の状態となる。
 その後、第2タスク101は、リソースAの使用が必要になると、リソース管理部102に対して、リソースAの使用を要求する(ステップS203)。第2タスク101の優先度は、第1タスク100の優先度より高いため、リソース管理部102は、第1タスク100の残りの処理時間が、第2タスク101の許容時間以内であるか否かを判別する。
 例えば、この時点での第1タスク100の残りの処理時間が50msであるとする。この場合、第1タスク100の残りの処理時間が、第2タスク101の許容時間を超えているため、リソース管理部102は、第2タスク101に対して、直ちにリソースAの使用を許可する。即ち、リソース管理部102は、リソースAを第1タスク100の使用から開放し(ステップS204)、第1タスク100に対して、リソースAの開放を通知する(ステップS205)。かかる通知を受けると、第1タスク100は、リソースAに対する処理を中断する。
 これにより、第2タスク101は、リソース管理部102を介して、リソースAの使用を開始し(ステップS206)、リソースAは第2タスク101により使用中の状態となる。
 その後、第2タスク101は、リソースAに対する処理が完了すると、リソース管理部102に対して、リソースAの開放を要求する(ステップS207)。かかる要求を受けると、リソース管理部102は、リソースAを第2タスク101の使用から解放し(ステップS208)、第1タスク100に対して、リソースAの開放を通知する(ステップS209)。かかる通知を受けると、第1タスク100は、先に中断したリソースAに対する処理を再開するべく、リソース管理部102に対して、リソースAの使用を要求する(ステップS210)。かかる要求を受けたリソース管理部102は、リソースAが使用中でないため、第1タスク100に対して、直ちにリソースAの使用を許可する。これにより、第1タスク100は、リソース管理部102を介して、リソースAの使用を開始し(ステップS211)、リソースAは第1タスク100により使用中の状態となる。
 その後、第2タスク101は、リソースAの使用が必要になると、リソース管理部102に対して、リソースAの使用を要求する(ステップS212)。第2タスク101の優先度は、第1タスク100の優先度より高いため、リソース管理部102は、第1タスク100の残りの処理時間が、第2タスク101の許容時間以内であるか否かを判別する。
 例えば、この時点での第1タスク100の残りの処理時間が8msであるとする。この場合、第1タスク100の残りの処理時間が、第2タスク101の許容時間以内であるため、リソース管理部102は、第2タスク101からのリソースAの使用に対する要求を保留し、第1タスク100によるリソースAの使用を優先する。したがって、第2タスク101は、待機状態となる。その後、第1タスク100は、リソースAに対する処理が完了すると、リソース管理部102に対して、リソースAの開放を要求する(ステップS213)。かかる要求を受けると、リソース管理部102は、リソースAを第1タスク100の使用から解放し(ステップS214)、第2タスク101に対してリソースAの使用を許可する。
 これにより、第2タスク101は、リソース管理部102を介して、リソースAの使用を開始し(ステップS215)、リソースAは第2タスク101により使用中の状態となる。その後、第2タスク101は、リソースAに対する処理が完了すると、リソース管理部102に対して、リソースAの開放を要求する(ステップS216)。かかる要求を受けると、リソース管理部102は、リソースAを第2タスク101の使用から解放する(ステップS217)。
 以上説明したように、本発明の実施形態に係る情報処理装置1では、リソース(例えば、リソースA)を使用中のタスク(例えば、第1タスク100)よりも、優先度が高いタスク(例えば、第2タスク101)からリソースAの使用要求があると、第1タスク100によるリソースAに対する残りの処理時間が第2タスク101の許容時間以内であるか否かが判別される。そして、第1タスク100によるリソースAに対する残りの処理時間が第2タスク101の許容時間以内であれば、第1タスク100によるリソースAに対する処理が完了した時に第2タスク101に対してリソースAの使用を許可する。一方、残りの処理時間が第2タスク101の許容時間を超えていれば、第2タスク101に対して直ちにリソースAの使用を許可する。
 これにより、第1タスク100は、残りの処理時間が、第2タスク101に設定された許容時間(10ms)以内であれば、完了まで処理を続行することができる。その結果、第1タスク100がリソースAに対する処理を中断するケースの減少が見込まれるため、リソースAの使用権限の移行に起因したオーバヘッドの低減が期待できる。
 また、許容時間は、タスク毎に適切な時間が設定されるため、リアルタイム性が確保され得る。
 また、新たなアプリケーションプログラムがインストールされた場合、あるいは、アプリケーションプログラムが更新された場合であっても、管理テーブル103に適切なタスク情報が設定されるため、リソース(リソースA,B,…)の使用における複数のタスク間の競合を適切に調停することが可能となる。
 なお、本発明は、上記の実施形態に限定されず、本発明の要旨を逸脱しない範囲での種々の変更は勿論可能である。
 例えば、二次記憶装置13が、調停対象のリソースに含まれていてもよい。
 また、上記の各実施形態では、調停対象のタスクとして、第1タスク100と第2タスク101の2つを例示したが、当然ながら、本発明において、調停対象のタスクの数が3つ以上であっても構わない。
 また、リソース管理部102が、専用のハードウェアで実現されるようにしてもよい。専用のハードウェアとは、例えば、単一回路、複合回路、プログラム化されたプロセッサ、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)、又は、これらの組み合わせ等である。
 また、上記の実施形態で使用されるリソース使用調停プログラム及び複数のアプリケーションプログラムは、CD-ROM(Compact Disc Read Only Memory)、DVD(Digital Versatile Disc)、光磁気ディスク(Magneto-Optical Disc)、USB(Universal Serial Bus)メモリ、メモリカード、HDD等のコンピュータ読み取り可能な記録媒体に格納して配布することも可能である。そして、このように配布した上記のプログラムを特定の又は汎用のコンピュータにインストールすることによって、当該コンピュータを上記の実施形態における情報処理装置1として機能させることも可能である。
 また、これらのプログラムをインターネット上の他のサーバが有するディスク装置等に格納しておき、当該サーバから情報処理装置1にダウンロードされるようにしてもよい。
 本発明は、広義の精神と範囲を逸脱することなく、様々な実施形態及び変形が可能である。また、上述した実施形態は、本発明を説明するためのものであり、本発明の範囲を限定するものではない。つまり、本発明の範囲は、実施形態ではなく、請求の範囲によって示される。そして、請求の範囲内及びそれと同等の発明の意義の範囲内で施される様々な変形が、本発明の範囲内とみなされる。
 本発明は、情報処理装置に好適に採用され得る。
 1 情報処理装置、10 CPU、11 ROM、12 RAM、13 二次記憶装置、14 バス、100 第1タスク、101 第2タスク、102 リソース管理部、103 管理テーブル

Claims (3)

  1.  複数のタスクのうちの1つのタスクに対してリソースの使用を許可するリソース管理手段と、
     前記複数のタスクの各々について、前記リソースの使用に関する優先度と、前記リソースの使用の許可を待つ際の許容時間と、を含むタスク情報が設定された管理テーブルと、を備え、
     前記リソース管理手段は、前記複数のタスクのうちの第1タスクが前記リソースを使用中に、前記複数のタスクのうちの第2タスクから前記リソースの使用要求を受けると、前記第2タスクの前記優先度が前記第1タスクの前記優先度よりも高い場合において、前記第1タスクによる前記リソースに対する残りの処理時間が前記第2タスクの前記許容時間以内であれば、前記第1タスクによる前記リソースに対する処理が完了した時に前記第2タスクに対して前記リソースの使用を許可し、前記残りの処理時間が前記第2タスクの前記許容時間を超えていれば、前記第2タスクに対して直ちに前記リソースの使用を許可する、情報処理装置。
  2.  前記タスク情報には、前記リソースの使用状況が含まれ、前記複数のタスクのうちの何れかのタスクが前記リソースを使用中の場合、前記リソース管理手段により、当該タスクに対応する前記使用状況として、当該タスクの前記リソースに対する残りの処理時間が設定される、請求項1に記載の情報処理装置。
  3.  複数のタスクのうちの第1タスクがリソースを使用中に、前記複数のタスクのうちの第2タスクから前記リソースの使用要求を受けると、前記複数のタスクの各々について、前記リソースの使用に関する優先度と、前記リソースの使用の許可を待つ際の許容時間と、を含むタスク情報が設定された管理テーブルを参照し、前記第2タスクの前記優先度が前記第1タスクの前記優先度よりも高い場合において、前記第1タスクによる前記リソースに対する残りの処理時間が前記第2タスクの前記許容時間以内であれば、前記第1タスクによる前記リソースに対する処理が完了した時に前記第2タスクに対して前記リソースの使用を許可し、前記残りの処理時間が前記第2タスクの前記許容時間を超えていれば、前記第2タスクに対して直ちに前記リソースの使用を許可する、リソース使用調停方法。
PCT/JP2017/029956 2017-08-22 2017-08-22 情報処理装置及びリソース使用調停方法 WO2019038834A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2017/029956 WO2019038834A1 (ja) 2017-08-22 2017-08-22 情報処理装置及びリソース使用調停方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2017/029956 WO2019038834A1 (ja) 2017-08-22 2017-08-22 情報処理装置及びリソース使用調停方法

Publications (1)

Publication Number Publication Date
WO2019038834A1 true WO2019038834A1 (ja) 2019-02-28

Family

ID=65438497

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/029956 WO2019038834A1 (ja) 2017-08-22 2017-08-22 情報処理装置及びリソース使用調停方法

Country Status (1)

Country Link
WO (1) WO2019038834A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111222124A (zh) * 2020-01-16 2020-06-02 北京梧桐车联科技有限责任公司 使用权限分配的方法、装置、设备以及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5171039A (en) * 1974-12-16 1976-06-19 Yokogawa Electric Works Ltd Puroguramujitsukono tekiojusenseigyohoshiki
JPS56166558A (en) * 1980-05-28 1981-12-21 Toshiba Corp Method and device for interruption priority determination
JP2002312302A (ja) * 2001-04-09 2002-10-25 Denso Corp 周辺装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5171039A (en) * 1974-12-16 1976-06-19 Yokogawa Electric Works Ltd Puroguramujitsukono tekiojusenseigyohoshiki
JPS56166558A (en) * 1980-05-28 1981-12-21 Toshiba Corp Method and device for interruption priority determination
JP2002312302A (ja) * 2001-04-09 2002-10-25 Denso Corp 周辺装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111222124A (zh) * 2020-01-16 2020-06-02 北京梧桐车联科技有限责任公司 使用权限分配的方法、装置、设备以及存储介质
CN111222124B (zh) * 2020-01-16 2022-05-24 北京梧桐车联科技有限责任公司 使用权限分配的方法、装置、设备以及存储介质

Similar Documents

Publication Publication Date Title
US8806511B2 (en) Executing a kernel device driver as a user space process
JP6126311B2 (ja) 待ち時間の影響を受けやすい仮想マシンをサポートするように構成されるcpuスケジューラ
US10372376B2 (en) System and method of orchestrating execution of commands in a non-volatile memory express (NVMe) device
US8424007B1 (en) Prioritizing tasks from virtual machines
JP6486485B2 (ja) 車載制御装置
JPS5812611B2 (ja) デ−タテンソウセイギヨホウシキ
US10229077B2 (en) Method for data transfer between real-time tasks using a DMA memory controller
US20140143465A1 (en) Offloading Input/Output (I/O) Completion Operations
JP2006099331A (ja) 情報処理装置、割り込み処理制御方法、並びにコンピュータ・プログラム
US10534563B2 (en) Method and system for handling an asynchronous event request command in a solid-state drive
US10013288B2 (en) Data staging management system
US20120303850A1 (en) Systems and methods for advanced interrupt scheduling and priority processing in a storage system environment
US7886095B2 (en) I/O space request suppressing method for PCI device
US10437623B2 (en) Fast switching between virtual machines without interrupt virtualization for high-performance, secure trusted-execution environment
JP2017162522A (ja) マルチコアシステムのインターラプト割り当て方法及び装置
WO2019038834A1 (ja) 情報処理装置及びリソース使用調停方法
US20150220361A1 (en) Parallel computer system, control method of parallel computer system, and computer-readable storage medium
EP2833261A2 (en) Device driver installation method and computer system
WO2016196549A1 (en) Method and apparatus for split burst bandwidth arbitration
US9218211B2 (en) Priority promotion for service requests
US20170168867A1 (en) Information processing system and control method
JP2015014962A (ja) 演算装置、演算方法、及びプログラム
JP2014164635A (ja) リソース管理装置、リソースの管理方法、及びプログラム
EP4213055A1 (en) Encryption processing system, encryption processing program, and encryption processing method
US20230305872A1 (en) Efficient central processing unit overcommit for virtual machines with symmetric multi-processing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17922743

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: JP

122 Ep: pct application non-entry in european phase

Ref document number: 17922743

Country of ref document: EP

Kind code of ref document: A1