JP5862722B2 - Multi-core processor system, multi-core processor system control method, and multi-core processor system control program - Google Patents
Multi-core processor system, multi-core processor system control method, and multi-core processor system control program Download PDFInfo
- Publication number
- JP5862722B2 JP5862722B2 JP2014156495A JP2014156495A JP5862722B2 JP 5862722 B2 JP5862722 B2 JP 5862722B2 JP 2014156495 A JP2014156495 A JP 2014156495A JP 2014156495 A JP2014156495 A JP 2014156495A JP 5862722 B2 JP5862722 B2 JP 5862722B2
- Authority
- JP
- Japan
- Prior art keywords
- software
- core
- cpu
- processor system
- cores
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Stored Programmes (AREA)
Description
本発明は、ソフトウェアを制御するマルチコアプロセッサシステム、マルチコアプロセッサシステムの制御方法、およびマルチコアプロセッサシステムの制御プログラムに関する。 The present invention relates to a multicore processor system for controlling software, a control method for a multicore processor system, and a control program for a multicore processor system.
従来から、ソフトウェアを高速に起動する技術が開発されてきた。ソフトウェアの起動中は、ユーザの操作を受け付けることができないため、ユーザがフラストレーションを募らせる原因となる。ソフトウェアを高速に起動する技術として、たとえば、CPU(Central Processing Unit)の割り当てルールを格納するテーブルを持ち、特定のCPUまたはCPUグループに対して優先的に処理を行わせるという技術が開示されている(たとえば、下記特許文献1を参照。)。
Conventionally, techniques for starting software at high speed have been developed. Since the user's operation cannot be accepted while the software is running, it causes the user to be frustrated. As a technique for starting software at high speed, for example, a technique is disclosed in which a table for storing a CPU (Central Processing Unit) assignment rule is stored and processing is performed preferentially for a specific CPU or CPU group. (For example, refer to
また、各CPUに命令を送る技術として、キャッシュコヒーレンス要求を各CPUへブロードキャスト送信するという技術が開示されている(たとえば、下記特許文献2を参照。)。また、優先度の高い新規ソフトウェアを起動する場合、特許文献1の技術以外に、再キューイング、スワップ・退避、マイグレートという3つの技術が開示されている。
Further, as a technique for sending an instruction to each CPU, a technique for broadcasting a cache coherence request to each CPU is disclosed (for example, see
再キューイングとは、新規ソフトウェアの優先度が高い場合、ソフトウェアの割り当てを管理するOS(operating system)などが、動作していたソフトウェアをソフトウェアの実行キューに戻す技術である。CPU資源に空きができた状態で、OSが実行キューに戻したソフトウェアを再び実行する。 Re-queuing is a technique in which, when new software has a high priority, an operating system (OS) that manages software allocation returns operating software to the software execution queue. The software returned to the execution queue by the OS is executed again while the CPU resource is free.
スワップ・退避とは、新規ソフトウェアの優先度が高い場合、OSが動作していたソフトウェアをストレージに退避する技術である。退避する内容としては、ソフトウェアが確保していたメモリコンテキスト情報、レジスタ情報など、ソフトウェアの動作に必要なあらゆる情報を退避する。再キューイングと同様に、CPU資源に空きができた状態で、OSが退避させていたソフトウェアを再び実行する。 The swap / save is a technique for saving the software in which the OS was operating to the storage when the priority of the new software is high. As contents to be saved, all information necessary for the operation of the software such as memory context information and register information secured by the software is saved. Similar to the re-queuing, the software saved by the OS is executed again while the CPU resource is free.
マイグレートとは、新規ソフトウェアが投入されることにより、CPU全体の負荷バランスが変わるため、各CPUのスケジューラによってCPUに割り当てられているソフトウェアの再配置を行う技術である。 Migrating is a technique for rearranging software assigned to a CPU by the scheduler of each CPU because the load balance of the entire CPU changes when new software is introduced.
しかしながら、上述した従来技術において、特許文献1に特許文献2の技術を組み合わせ、特定のCPUの処理を優先的に行うように他のCPUにブロードキャスト送信したとしても、制御する必要のないソフトウェアまで制御を受けてしまうという問題があった。具体的には、新規ソフトウェアの実行優先度を高くさせるため、新規ソフトウェアと実行中のソフトウェアの相関性がなく制御する必要のないソフトウェアも、相対的に実行優先度が低くなってしまうという問題があった。また、再キューイング、スワップ・退避、マイグレートは、処理が重く、組み込み環境等のCPUの処理能力が高くない環境では不適当であるという問題があった。
However, in the above-described conventional technology, even if the technology of Patent Literature 2 is combined with
本発明は、上述した従来技術による問題点を解消するため、必要なソフトウェアの起動時間を短縮できるマルチコアプロセッサシステム、マルチコアプロセッサシステムの制御方法、およびマルチコアプロセッサシステムの制御プログラムを提供することを目的とする。 An object of the present invention is to provide a multi-core processor system, a control method for a multi-core processor system, and a control program for a multi-core processor system that can shorten the startup time of necessary software in order to solve the above-described problems caused by the prior art. To do.
上述した課題を解決し、目的を達成するため、開示のマルチコアプロセッサシステムは、ソフトウェアを実行する複数のコアと、複数のコアが共通にアクセスする共用メモリとを有するマルチコアプロセッサシステムであって、複数のコアのうち第1のコアは、複数のコアのいずれかが起動中のソフトウェアと複数のコアのいずれかが実行中のソフトウェアとが共用メモリにアクセスしている場合に、実行中のソフトウェアの実行優先度を下げることを要件とする。 In order to solve the above-described problems and achieve the object, a disclosed multi-core processor system is a multi-core processor system having a plurality of cores that execute software and a shared memory that the plurality of cores commonly access. The first core of the cores of the plurality of cores is the software that is being executed when the software being started by any of the plurality of cores and the software being executed by any of the plurality of cores are accessing the shared memory. The requirement is to lower the execution priority.
本マルチコアプロセッサシステム、マルチコアプロセッサシステムの制御方法、およびマルチコアプロセッサシステムの制御プログラムによれば、起動中のソフトウェアが共用リソースにアクセスする割合を相対的に増やし、ソフトウェアの起動時間を短縮できるという効果を奏する。 According to the multi-core processor system, the control method for the multi-core processor system, and the control program for the multi-core processor system, it is possible to relatively increase the rate at which the running software accesses the shared resource and to shorten the startup time of the software. Play.
以下に添付図面を参照して、本発明にかかるマルチコアプロセッサシステム、マルチコアプロセッサシステムの制御方法、およびマルチコアプロセッサシステムの制御プログラムの好適な実施の形態を詳細に説明する。 Exemplary embodiments of a multi-core processor system, a multi-core processor system control method, and a multi-core processor system control program according to the present invention will be explained below in detail with reference to the accompanying drawings.
(ソフトウェア制御装置のハードウェア構成)
図1は、実施の形態にかかるソフトウェア制御装置のハードウェア構成を示すブロック図である。図1において、ソフトウェア制御装置100は、CPUを複数搭載するCPUs101と、ROM(Read‐Only Memory)102と、RAM(Random Access Memory)103と、を備えている。また、ソフトウェア制御装置100は、フラッシュROM104と、フラッシュROMコントローラ105と、フラッシュROM106と、を備えている。また、ソフトウェア制御装置100は、ユーザやその他の機器との入出力装置として、ディスプレイ107と、I/F(Interface)108と、キーボード109と、を備えている。また、各構成部はバス110によってそれぞれ接続されている。
(Hardware configuration of software controller)
FIG. 1 is a block diagram of a hardware configuration of the software control apparatus according to the embodiment. In FIG. 1, the
ここで、CPUs101は、ソフトウェア制御装置100の全体の制御を司る。CPUs101は、シングルコアのプロセッサを並列して接続したすべてのCPUを指している。CPUs101の詳細は、図2にて後述する。前述のように、本実施の形態にかかるハードウェア構成は、複数のコアを搭載するマルチコアプロセッサシステムである。
Here, the
マルチコアプロセッサシステムとは、コアが複数搭載されたプロセッサを含むコンピュータのシステムである。コアが複数搭載されていれば、複数のコアが搭載された単一のプロセッサでもよく、シングルコアのプロセッサが並列されているプロセッサ群でもよい。なお、本実施の形態では、説明を単純化するため、シングルコアのプロセッサであるCPUが並列されているプロセッサ群を例にあげて説明する。また、本実施の形態ではマルチコアプロセッサシステムにて説明を行うが、複数のソフトウェアが平行して実行されるマルチプログラミングの機能を持つシングルコアプロセッサであってもよい。 A multi-core processor system is a computer system including a processor having a plurality of cores. If a plurality of cores are mounted, a single processor having a plurality of cores may be used, or a processor group in which single core processors are arranged in parallel may be used. In this embodiment, in order to simplify the description, a processor group in which CPUs that are single-core processors are arranged in parallel will be described as an example. In this embodiment, a multi-core processor system is described. However, a single-core processor having a multi-programming function in which a plurality of software programs are executed in parallel may be used.
ROM102は、ブートプログラムなどのプログラムを記憶している。RAM103は、CPUs101のワークエリアとして使用される。フラッシュROM104は、OSなどのシステムソフトウェアやアプリケーションソフトウェアなどを記憶している。たとえば、OSを更新する場合、ソフトウェア制御装置100は、I/F108によって新しいOSを受信し、フラッシュROM104に格納されている古いOSを受信した新しいOSに更新する。
The
フラッシュROMコントローラ105は、CPUs101の制御に従ってフラッシュROM106に対するデータのリード/ライトを制御する。フラッシュROM106は、フラッシュROMコントローラ105の制御で書き込まれたデータを記憶する。データの具体例としては、ソフトウェア制御装置100のユーザがI/F108を通して取得した画像データ、映像データなどである。フラッシュROM106は、たとえば、メモリカード、SDカードなどを採用することができる。
The
ディスプレイ107は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。このディスプレイ107は、たとえば、TFT液晶ディスプレイなどを採用することができる。
A
I/F108は、通信回線を通じてLAN(Local Area Network)、WAN(Wide Area Network)、インターネットなどのネットワーク111に接続され、ネットワーク111を介して他の装置に接続される。そして、I/F108は、ネットワーク111と内部のインターフェースを司り、外部装置からのデータの入出力を制御する。I/F108には、たとえばモデムやLANアダプタなどを採用することができる。
The I /
キーボード109は、数字、各種指示などの入力のためのキーを備え、データの入力を行う。また、キーボード109は、タッチパネル式の入力パッドやテンキーなどであってもよい。
The
図2は、ソフトウェア制御装置100のハードウェア構成の一部とソフトウェア構成を示すブロック図である。図2では、後述するソフトウェア構成を説明するために必要なハードウェア構成として、CPUs101とメモリ201を図示している。本実施の形態にかかるCPUs101は、複数のCPUとしてCPU#0、CPU#1、CPU#2、CPU#3で構成される。CPUs101は1つのCPUで構成してもよいし、2つ以上のCPUで構成してもよい。各CPUとメモリ201はバス110によってそれぞれ接続されている。メモリ201は、CPUs101から直接アクセスするアクセス速度が高速な主記憶装置であり、ROM102とRAM103とフラッシュROM104に相当する。
FIG. 2 is a block diagram showing a part of the hardware configuration of the
各CPUは、前述のハードウェア構成により、共用リソースデータベース202を参照し、後述するソフトウェアA〜ソフトウェアGを実行する。共用リソースデータベース202は、ソフトウェアがアクセスする共用リソースの使用情報を記述する。共用リソースとは、ソフトウェアがアクセスするデバイスや、メモリ201である。共用リソースデータベース202の詳細は、図4にて後述する。
Each CPU refers to the shared
デバイスとはフラッシュROM106などのアクセス速度が低速な補助記憶装置である。また、図1には図示していないが、その他の記憶装置があればそれらの記憶装置もデバイスに含める。また、I/F108によってスキャナ、印刷機などの入出力機能を有する装置が存在する場合も、デバイスに含める。ソフトウェア制御装置100は、I/F108に接続された装置に搭載されたRAMなどにアクセスする。
A device is an auxiliary storage device such as the
各CPUは、OSの機能であるスケジューラを実行することで、複数のソフトウェアを順次実行する。具体的には、CPU#0は、スケジューラ#0によってソフトウェアFを実行している。同様に、CPU#1は、スケジューラ#1によってソフトウェアBを実行している。CPU#2は、スケジューラ#2によってソフトウェアCとソフトウェアGを実行している。CPU#3は、スケジューラ#3によってソフトウェアDとソフトウェアEを実行している。
Each CPU executes a plurality of software sequentially by executing a scheduler which is a function of the OS. Specifically,
この状態で、新規にソフトウェアAを実行する場合、CPU#0は、ソフトウェアAの起動を開始するとともに、CPU#0〜CPU#3に対してソフトウェアAが起動された旨を示すメッセージをブロードキャスト送信する。
When software A is newly executed in this state,
(ソフトウェア制御装置100の機能的構成)
次に、ソフトウェア制御装置100の機能的構成について説明する。図3は、ソフトウェア制御装置100の機能的構成を示すブロック図である。ソフトウェア制御装置100は、制御指示部303と、検出部304と、解除指示部305と、判断部306と、制御部307と、解除部308と、抽出部309と、算出部310と、検出部311と、を含む構成である。この制御部となる機能(制御指示部303〜検出部311)は、具体的には、たとえば、図1に示したROM102、RAM103、フラッシュROM104などの記憶装置に記憶されたプログラムをCPUs101が実行することにより、その機能を実現する。または、I/F108を経由して他のCPUが実行することにより、その機能を実現してもよい。
(Functional configuration of software control apparatus 100)
Next, a functional configuration of the
また、ソフトウェア制御装置100は、共用リソースデータベース202、競合特性テーブル301、起動応答時間テーブル302にアクセス可能である。共用リソースデータベース202は、共用リソースの使用状況を格納する。共用リソースとは、前述したようにメモリ201やデバイスのことである。共用リソースデータベース202の詳細は、図4にて後述する。
In addition, the
また、共用リソースデータベース202、競合特性テーブル301、起動応答時間テーブル302は、メモリ201内に図示されているが、メモリ201に格納されていてもよい。または、メモリ201以外の記憶装置として、たとえば、フラッシュROM106に格納されており、ソフトウェア制御装置100は、必要となった情報のみをメモリ201に転送してもよい。
Further, although the shared
競合特性テーブル301は、任意のソフトウェアどうしの競合状態における性能劣化を示す係数である競合特性σを格納するテーブルである。競合特性テーブル301の詳細は、図5にて後述する。起動応答時間テーブル302は、各ソフトウェアにおける仕様上のワーストケースの起動時間を格納するテーブルである。起動応答時間テーブル302の詳細は、図6にて後述する。 The competition characteristic table 301 is a table that stores a competition characteristic σ that is a coefficient indicating performance degradation in a competition state between arbitrary software. Details of the competitive property table 301 will be described later with reference to FIG. The activation response time table 302 is a table for storing worst-case activation times in the specifications of each software. Details of the activation response time table 302 will be described later with reference to FIG.
また、図3に示す制御指示部303〜解除指示部305は、マスタカーネルとなるCPU#0にて実行される。同様に、判断部306〜検出部311は、スレーブカーネルとなるCPU#1〜CPU#3で実行されるほか、CPU#0でも実行される。したがって、CPU#0は制御指示部303〜検出部311の機能を含む。
Further, the
制御指示部303は、実行中のソフトウェアを一時停止するようにスレーブカーネルへデバイス抑止制御要求を送信することで制御指示をする機能を有する。また、制御指示部303は、実行中のソフトウェアの実行優先度を低下させるように実行優先度低下制御要求を送信することで制御指示してもよい。また、制御指示部303は、検出部304によって起動中のソフトウェアが起動を完了していないことが検出され、起動中のソフトウェアがアクセス中の共用リソースが特定の共用リソースであった場合に、実行優先度低下の制御指示をしてもよい。ここでの特定の共用リソースは、メモリ201を示す。また、デバイス抑止制御要求と実行優先度低下制御要求には、起動中のソフトウェアがアクセスする共用リソースの識別情報が含まれる。
The
具体的には、たとえば、ソフトウェア制御装置100が、制御指示部303によって、実行中のソフトウェアを一時停止するようスレーブカーネルに制御指示を通知する。なお、通知されたデータは、RAM103、フラッシュROM104などの記憶領域に記憶されてもよい。
Specifically, for example, the
検出部304は、起動中のソフトウェアが、起動開始から所定の起動時間を経過しても起動を完了していないことを検出する機能を有する。ここでの所定の起動時間とは、起動応答時間テーブル302に格納されている仕様の起動時間Tとなる。具体的には、たとえば、ソフトウェア制御装置100は、起動中のソフトウェアの仕様の起動時間Tが1[秒]であって、起動開始から1[秒]たっても起動を完了していないソフトウェアを検出する。なお、検出したソフトウェアの情報は、制御指示部303へ送信されるほか、RAM103、フラッシュROM104などの記憶領域に記憶されてもよい。
The
解除指示部305は、起動中のソフトウェアが起動完了した後に、制御指示部303によって制御指示された実行中のソフトウェアに対して制御解除要求を送信することで解除指示する機能を有する。具体的には、たとえば、ソフトウェア制御装置100は、解除指示部305によって、一時停止した実行中のソフトウェアの停止を解除する制御解除要求を送信する。なお、送信した制御解除要求は、解除部308に送信されるほか、RAM103、フラッシュROM104などの記憶領域に記憶されてもよい。
The
判断部306は、制御指示部303によって通知された起動中のソフトウェアの識別情報を用いて、起動中のソフトウェアと実行中のソフトウェアとが同一の共用リソースにアクセス中であるか否かを判断する機能を有する。
The
具体的には、たとえば、ソフトウェア制御装置100は、制御指示部303によって起動中のソフトウェアによってアクセスされるフラッシュROM106の識別情報を送信した場合を想定する。この時、実行中のソフトウェアもフラッシュROM106にアクセスしている場合、ソフトウェア制御装置100は、判断部306によって、同一の共用リソースにアクセス中であると判断する。なお、判断結果は、制御部307へ送信されるほか、RAM103、フラッシュROM104などの記憶領域に記憶されてもよい。
Specifically, for example, it is assumed that the
制御部307は、制御指示部303からデバイス抑止制御要求を受信し、判断部306によってアクセス中であると判断された場合、実行中のソフトウェアを一時停止するように制御する機能を有する。また、制御部307は、制御指示部303から実行優先度低下制御要求を受信した場合には、実行中のソフトウェアの実行優先度を低下させるよう制御してもよい。また、制御部307は、実行優先度低下制御要求を受信し、検出部311によって起動中のソフトウェアの起動予測時間が所定の起動時間を超えたことが検出された場合に、実行中のソフトウェアの実行優先度を低下させるように制御してもよい。
The
具体的には、たとえば、ソフトウェア制御装置100は、制御指示部303からデバイス抑止制御要求を受信し、判断部306によってアクセス中であると判断された場合に、実行中のソフトウェアを一時停止するように制御する。なお、一時停止したソフトウェア、または、実行優先度を低下させたソフトウェアの情報は、RAM103、フラッシュROM104などの記憶領域に記憶される。
Specifically, for example, when the
解除部308は、起動中のソフトウェアが起動完了したことを示す解除指示部305からの制御解除要求を受信した後に、制御部307によって制御された実行中のソフトウェアの制御を解除する機能を有する。具体的には、たとえば、ソフトウェア制御装置100は、解除指示部305からの制御解除要求を受信し、一時停止したソフトウェア、または、実行優先度を低下させたソフトウェアの情報に基づいて、制御を解除する。なお、解除したソフトウェアの情報は、RAM103、フラッシュROM104などの記憶領域に記憶されてもよい。
The
抽出部309は、起動中のソフトウェアの非競合状態における起動時間と起動中のソフトウェアと実行中のソフトウェアとの競合状態における性能劣化を示す係数を抽出する機能を有する。起動中のソフトウェアの非競合状態における起動時間に関しては、任意のソフトウェアの非競合状態における起動時間を含めて記憶している共用リソースデータベース202に格納されている。任意のソフトウェアどうしの競合状態における性能劣化を示す係数に関しては、競合特性テーブル301に格納されている。
The
具体的には、たとえば、ソフトウェア制御装置100は、起動中のソフトウェアAについて、共用リソースデータベース202から、非競合状態における起動時間tを抽出する。続けて、ソフトウェア制御装置100は、起動中のソフトウェアAとスレーブカーネル上にて実行中のソフトウェアとの競合状態における性能劣化を示す競合特性σを、競合特性テーブル301から抽出する。なお、抽出されたデータは、RAM103、フラッシュROM104などの記憶領域に記憶される。
Specifically, for example, the
算出部310は、抽出部309によって抽出された起動時間と抽出部309によって抽出された係数に基づいて、起動中のソフトウェアの競合状態における起動予測時間を算出する機能を有する。抽出された起動時間とは、非競合状態における起動時間tであり、抽出された係数とは起動中のソフトウェアと実行中のソフトウェアとの競合状態における性能劣化を示す競合特性σである。
The
具体的には、たとえば、起動時間が10[ミリ秒]で、抽出された係数が120であった場合、ソフトウェア制御装置100は、起動中のソフトウェアの競合状態における起動予測時間を、起動時間×係数=10×120=1.2[秒]と算出する。なお算出されたデータは、RAM103、フラッシュROM104などの記憶領域に記憶される。
Specifically, for example, when the activation time is 10 [milliseconds] and the extracted coefficient is 120, the
検出部311は、起動中のソフトウェアが、算出部310によって算出された競合状態における起動予測時間が所定の起動時間を超えることを検出する機能を有する。所定の起動時間とは、起動応答時間テーブル302に格納されている仕様の起動時間Tとなる。また、検出部311は、検出部304によって起動を完了していないことが検出され、制御指示部303から制御部307に処理が移行してきた際に実行される。
The
具体的には、たとえば、ソフトウェア制御装置100は、算出部310によって起動中のソフトウェアの競合状態における起動予測時間σtが1.2[秒]で、仕様の起動時間Tが1[秒]であった場合、T<σtとなり、制御部307に検出結果を通知する。なお、検出された結果は、RAM103、フラッシュROM104などの記憶領域に記憶される。
Specifically, for example, in the
前述したように、各機能部はマスタカーネルとスレーブカーネルにて分担されており、おもに起動中のソフトウェアについて処理を行うのがマスタカーネル、実行中のソフトウェアについて処理を行うのがスレーブカーネルとなっている。ここで、ソフトウェア制御装置100は、スレーブカーネルにて、起動中のソフトウェアの情報を取得し、すべての機能をスレーブカーネルで行ってもよい。
As described above, each functional unit is shared by the master kernel and slave kernel, and the master kernel processes mainly the running software, and the slave kernel processes the running software. Yes. Here, the
図4は、共用リソースデータベース202の記憶内容の一例を示す説明図である。符号401に示す図は、共用リソースデータベース202の記憶内容の一例であり、符号402で示す図は、共用リソースデータベース202の記憶内容をブロック化して表したブロック図である。符号403で示す領域では、ソフトウェアの名称と、実行優先度、初期化するデバイス名が記述されている。符号404で示す領域では、各スレッドの情報が記述されている。符号405で示す領域では、メインスレッドの情報が記述されており、符号406で示す領域では、サブスレッドであるFuncAスレッドの情報が記述されている。
FIG. 4 is an explanatory diagram showing an example of the contents stored in the shared
次に、符号405にて示す領域に存在する各プロパティについて説明する。Tagプロパティは、対象となるスレッドの名称を示している。Context_allocateプロパティは、対象となるスレッドによってメモリ201から確保されたメモリコンテキストである。確保されたメモリコンテキストは、たとえば、スレッド実行に必要なスタック領域として使用される。スタック領域には、関数の呼び出し情報や、関数のローカル変数の値などが格納される。
Next, each property existing in the area indicated by
IOprofile_write_accessプロパティとIOprofile_read_accessプロパティは、対象となるスレッドがメモリ201にアクセスするサイズを示している。IOprofile_write_accessプロパティは対象となるスレッドが書き込みを行ったサイズ、IOprofile_read_accessプロパティは対象となるスレッドが読み込みを行うサイズを示している。
The IOprofile_write_access property and the IOprofile_read_access property indicate the size with which the target thread accesses the
elapse_timeプロパティは、対象となるスレッドが起動開始時点からContext_allocateプロパティで示したメモリコンテキストの確保時刻を示している。elapse_timeプロパティで示した値が、非競合状態における起動時間tとなる。Sys_resourceプロパティは、対象となるスレッドが呼び出したシステムコールを示している。 The “elapse_time” property indicates the memory context allocation time indicated by the Context_allocate property from the start time of the target thread. The value indicated by the “elapse_time” property is the activation time t in the non-contention state. The Sys_resource property indicates a system call called by the target thread.
符号402で示すブロック図は、共用リソースデータベース202の記憶内容をブロック化して表したブロック図である。ソフトウェアAは、デバイスAとデバイスBにアクセスし、メモリ201に対して128[キロバイト]のメモリコンテキスト407を確保し、1024[キロバイト]の書き出しと、512[キロバイト]の読み込みを行う。ソフトウェアA子スレッドは、メモリ201に対して256[キロバイト]のメモリコンテキスト408を確保し、128[キロバイト]の書き出しと、128[キロバイト]の読み込みを行う。
A block diagram denoted by
デバイスA、デバイスBの具体例としては、フラッシュROM106である。また、図1には図示していないが、I/F108によって外部記憶装置に接続している場合は、その装置も含まれる。また、記憶装置以外にも、たとえば、ソフトウェア制御装置100が印刷装置に接続されており、あるスレッドが印刷を行う場合、印刷装置内部にあるRAMに書き込む結果となるため、記憶装置に含める。
A specific example of the devices A and B is the
図5は、競合特性テーブル301の記憶内容の一例を示す説明図である。競合特性テーブル301は、ソフトウェアどうしの競合状態における性能劣化を示す係数である競合特性σを記憶する。競合特性テーブル301の競合特性σは、符号501で示す実行中のソフトウェアに対して、符号502で示すソフトウェアが起動した場合の性能劣化の数値を示している。
FIG. 5 is an explanatory diagram showing an example of the contents stored in the competitive property table 301. The competition characteristic table 301 stores a competition characteristic σ that is a coefficient indicating performance degradation in a competition state between software. The competition characteristic σ of the competition characteristic table 301 indicates a numerical value of performance degradation when the software indicated by
競合特性σは、非競合状態における処理時間を1とした時の、競合状態における処理時間となり、値が大きいほどより性能劣化することを示している。競合特性σは、ソフトウェア制御装置100をシミュレートできる装置にて、ソフトウェアごとに繰り返し実行することで求められる。また、ソフトウェア制御装置100にて競合特性σを求められる環境があれば、ソフトウェア制御装置100にて競合特性を求めてもよい。
The competition characteristic σ is the processing time in the competition state when the processing time in the non-competition state is 1, and indicates that the larger the value, the more the performance deteriorates. The competition characteristic σ is obtained by repeatedly executing each software on a device that can simulate the
具体的には、たとえば、ソフトウェアAをWebブラウザ、ソフトウェアBをメールソフトウェア、ソフトウェアDを電話帳呼び出しであると想定する。ここで、ソフトウェア制御装置100が、ソフトウェアAを実行中にソフトウェアBを起動した場合の競合特性σは、図6で示すように“120”となる。同様に、ソフトウェア制御装置100が、ソフトウェアAを実行中にソフトウェアDを起動した場合の競合特性σは、“1.1”となる。
Specifically, for example, it is assumed that software A is a Web browser, software B is mail software, and software D is a phone book call. Here, the competition characteristic σ when the
前述のように競合特性σが大きく異なる理由として、Webブラウザとメールソフトウェアは、I/F108を通して、たとえば、同一のNIC(Network Interface Card)にアクセスしネットワーク111から情報を取得する。結果、両ソフトウェアは、同一のデバイスにアクセスすることになり、競合を起こしやすい。さらに両ソフトウェアは、取得されたデータをTCP/IP(Transmission Control Protocol/Internet Protocol)に従って処理をする。したがって、両ソフトウェアは、TCP/IPを処理するシステムリソースを使用することになり、競合を起こしやすい。
As described above, the reason why the competition characteristic σ is greatly different is that the Web browser and the mail software access the same NIC (Network Interface Card) through the I /
それに対しWebブラウザと電話帳呼び出しは、競合を起こす可能性として、メモリ201へのアクセスのみであり、競合を起こしにくい。以上より、ソフトウェアどうしが使用する共用リソースによって競合特性σは大きく異なることになる。
On the other hand, the Web browser and the phone book call are only accessed to the
また、ソフトウェアAのように、ソフトウェアの同時起動を仕様上許す場合、シミュレーション装置は、図5で示すように競合特性σを計測する。同様に、ソフトウェアB、ソフトウェアDのように、ソフトウェアの同時起動を仕様上許さないのであれば、シミュレーション装置は、特に計測しなくてもよい。 Further, when the specification allows the simultaneous activation of software as in the software A, the simulation apparatus measures the competition characteristic σ as shown in FIG. Similarly, as long as software B and software D do not allow simultaneous activation of software in the specification, the simulation apparatus does not need to perform measurement.
また、計測した結果、ほとんどのソフトウェアどうしの競合特性σが等しい値になる場合、ソフトウェア制御装置100は、その項目を用意してもよい。たとえば、符号503、符号504で示す“デフォルト”を用意する。そして、ソフトウェア制御装置100が、ソフトウェアAを実行中に、符号502で示す列に記載のないソフトウェアを起動した場合を想定する。この場合の競合特性σは、符号504で示す“デフォルト”列から、符号505で示すセルを参照し、“1.1”となる。
Further, when the competition characteristic σ of most software becomes equal as a result of the measurement, the
図6は、起動応答時間テーブル302の記憶内容の一例を示す説明図である。起動応答時間テーブル302は、ソフトウェア名称と、仕様の起動時間Tという2つのフィールドで構成される。ソフトウェア名称フィールドは、対象となるソフトウェアの名称を格納する。仕様の起動時間Tフィールドは、各ソフトウェアにおける仕様上のワーストケースの起動時間を格納する。 FIG. 6 is an explanatory diagram showing an example of the contents stored in the activation response time table 302. The activation response time table 302 includes two fields: a software name and a specification activation time T. The software name field stores the name of the target software. The specification start time T field stores the worst case start time in the specifications of each software.
具体的には、図6にて示すようにソフトウェアAの起動時間が3秒、ソフトウェアDの起動時間が0.5秒といったように設定をする。すべてのソフトウェアについて設定を行ってもよいが、ほとんどのソフトウェアの起動時間が等しいのであれば、その項目を用意してもよい。具体的な設定方法としては、ソフトウェア制御装置100は、符号601で示す“デフォルト”行を用意し、起動時間の設定がされていないすべてのソフトウェアの起動時間とする。
Specifically, as shown in FIG. 6, the activation time of software A is set to 3 seconds, and the activation time of software D is set to 0.5 seconds. Settings may be made for all software, but if most of the software startup times are equal, the items may be prepared. As a specific setting method, the
設定方法として、たとえば、ソフトウェアAがWebブラウザである場合を想定すると、Webブラウザは一般的にプログラム量が多いソフトウェアであり、起動開始を行う頻度が少ないため、デフォルトの値である1秒より長い3秒に設定する。同様に、ソフトウェアDが電話帳呼び出しである場合を想定すると、電話帳呼び出しは頻繁に呼び出され、ユーザが待たされる時間を短くしたいため、デフォルトの値である1秒より短い0.5秒に設定する。 As a setting method, for example, assuming that the software A is a Web browser, the Web browser is generally software with a large amount of program, and since the frequency of starting activation is low, it is longer than the default value of 1 second. Set to 3 seconds. Similarly, assuming that the software D is a phone book call, the phone book call is called frequently, and the user has to wait for a shorter time. Therefore, the time is set to 0.5 seconds shorter than the default value of 1 second. To do.
図7−1、図7−2は、ソフトウェア起動時の制御の様子を示す説明図である。図7−1での符号701で示した状態は、ソフトウェア制御装置100が、新規に起動するソフトウェアとしてソフトウェアAを起動する直前の状態である。ソフトウェア制御装置100は、メッセージ707にて、各CPUの負荷情報を集約し、最適なCPUへの負荷分散割り当てを行う。本実施の形態にかかるソフトウェア制御装置100は、ソフトウェアAのメインスレッドをCPU#0に割り当て、ソフトウェアAから起動される子スレッドをCPU#1に割り当てることとする。
FIGS. 7A and 7B are explanatory diagrams illustrating a state of control at the time of software activation. The state indicated by
次に、図7−1での符号702で示した状態は、ソフトウェア制御装置100が、ソフトウェアAのメインスレッドをCPU#0に割り当てた状態である。割り当て後、ソフトウェア制御装置100は、ソフトウェアAがデバイスAとデバイスBにアクセスするため、デバイスAとデバイスBにアクセスする旨のメッセージ708をCPU#0〜CPU#3へブロードキャスト送信する。
Next, the state indicated by
CPU#0〜CPU#3はメッセージ708を受信する。CPU#0とCPU#1は、デバイスAとデバイスBにアクセスしているソフトウェアが存在しないため、特に処理を行わない。CPU#2は、アクセス経路709で示した通り、ソフトウェアCによってデバイスAにアクセスしているため、ソフトウェアCの実行を一時停止する。CPU#3も同様に、アクセス経路710で示した通り、ソフトウェアDによってデバイスBにアクセスしているため、ソフトウェアDの実行を一時停止する。
図7−1での符号703で示した状態は、ソフトウェア制御装置100が、デバイスにアクセスするソフトウェアの一時停止を行った状態である。続けて、ソフトウェア制御装置100は、ソフトウェアAがシステムリソースまたはライブラリリソースにアクセスするため、前述したリソースにアクセスする旨のメッセージ711をCPU#0〜CPU#3へブロードキャスト送信する。
The state indicated by
CPU#0〜CPU#3はメッセージ711を受信する。CPU#0は、アクセス経路712で示した通り、ソフトウェアFによってシステムリソースにアクセスしているため、ソフトウェアFの実行優先度を低下させる。CPU#1とCPU#2は、システムリソースまたはライブラリリソースにアクセスしているソフトウェアが存在しないため、特に処理を行わない。CPU#3は、アクセス経路713で示した通り、ソフトウェアEによってシステムリソースにアクセスしているため、ソフトウェアEの実行優先度を低下させる。
なお、デバイスが競合せず、システムリソースが競合する具体例として、たとえば、ソフトウェアAがWebブラウザで、ソフトウェアEがブックマーク編集ソフトウェアである場合を想定する。また、ブックマークのファイル形式がxml(Extensible Markup Language)形式であることを想定する。 As a specific example in which devices do not compete and system resources compete, for example, assume that software A is a Web browser and software E is bookmark editing software. Further, it is assumed that the file format of the bookmark is an xml (Extensible Markup Language) format.
このとき、ソフトウェアEはネットワーク111を使用しないため、デバイスの競合は発生しない。しかし、ソフトウェアEはブックマークを読み取るためにxmlをパースする必要があり、xmlパースを行えるシステムリソースにアクセスする。同様にソフトウェアAも、xml形式のWebページを読み込むことがありえるため、xmlパースを行えるシステムリソースにアクセスする。結果、ソフトウェアAとソフトウェアEは、デバイスでは競合しないが、システムリソースにて競合を起こす。 At this time, since the software E does not use the network 111, device conflict does not occur. However, software E needs to parse xml to read bookmarks and has access to system resources that can parse xml. Similarly, since software A can also read a web page in xml format, it accesses system resources that can perform xml parsing. As a result, the software A and the software E do not compete with each other, but cause a competition with system resources.
図7−2での符号704で示した状態は、ソフトウェア制御装置100が、システムリソースまたはライブラリリソースにアクセスするソフトウェアの実行優先度を低下させた状態である。続けて、ソフトウェア制御装置100は、ソフトウェアAがメモリ201にアクセスするため、メモリ201にアクセスする旨のメッセージ714をCPU#0〜CPU#3へブロードキャスト送信する。
The state indicated by
CPU#0〜CPU#3はメッセージ714を受信する。CPU#0は、アクセス経路715で示した通り、ソフトウェアFによってメモリ201にアクセスしているため、ソフトウェアFの実行優先度を低下させる。CPU#1とCPU#2は、メモリ201にアクセスしているソフトウェアが存在しないため、特に処理を行わない。CPU#3は、アクセス経路716で示した通り、ソフトウェアEによってメモリ201にアクセスしているため、ソフトウェアEの実行優先度を低下させる。
図7−2での符号705で示した状態は、ソフトウェア制御装置100が、メモリ201にアクセスするソフトウェアの実行優先度を低下させた後、ソフトウェアAの初期化処理を行い、子スレッドを起動した状態である。ソフトウェアAの処理としては、アクセス経路717で示すデバイスA、デバイスBへの初期化処理と、メモリコンテキスト407の確保である。また、ソフトウェアAによって、ソフトウェアA子スレッドが起動され、CPU#1に割り当てられる。CPU#0は、ソフトウェアA子スレッドが起動される旨のメッセージ718をCPU#0〜CPU#3へブロードキャスト送信する。
In the state indicated by
CPU#0〜CPU#3はメッセージ718を受信する。CPU#0とCPU#1とCPU#3は、ソフトウェアA子スレッドによってアクセスされる共用リソースにアクセスしているソフトウェアが存在しないため、特に処理を行わない。CPU#2は、アクセス経路719で示した通り、ソフトウェアGによってメモリ201にアクセスしているため、ソフトウェアGの実行優先度を低下させる。また、ソフトウェアA子スレッドは、メモリコンテキスト408を確保する。
ここまでで、ソフトウェアAが起動するまでは、ソフトウェアAが最優先で実行されることになる。ソフトウェアBのように、ソフトウェアAによってアクセスされる共用リソースへアクセスせず、競合しないソフトウェアについては、一時停止もされないし、実行優先度も低下させられることもなく、通常通りに実行される。 Up to this point, the software A is executed with the highest priority until the software A is activated. For software B that does not access the shared resource accessed by software A and does not compete, the software is not paused and the execution priority is not lowered, and is executed as usual.
図7−2での符号706で示した状態は、ソフトウェア制御装置100がソフトウェアAの起動を完了した状態を示している。起動を完了した時点は、ソフトウェアAによるデバイスの初期化とメモリコンテキストの確保が終了した時点である。ソフトウェアAの起動を完了すると、CPU#0は、ソフトウェアAの起動を完了した旨のメッセージ720をブロードキャスト送信する。
The state indicated by
CPU#0〜CPU#3はメッセージ720を受信する。各CPUは、一時停止中のソフトウェアと、実行優先度を低下させられたソフトウェアに対し、制御を解除する。具体的には、CPU#0は、ソフトウェアFの実行優先度を初期値に戻させる。CPU#1では、一時停止中のソフトウェア、または、実行優先度を低下させられたソフトウェアが存在しないため、何も処理をしない。CPU#2は、ソフトウェアCの一時停止を解除し、ソフトウェアGの実行優先度を初期値に戻させる。CPU#3は、ソフトウェアDの一時停止を解除し、ソフトウェアEの実行優先度を初期値に戻させる。
図8は、共用リソースデータベース202の生成処理のフローチャートである。本実施の形態にかかる生成処理は、ソフトウェア制御装置100にて実行されることとして説明を行うが、ソフトウェア制御装置100をシミュレートできる装置にて実行してもよい。生成処理の準備として、生成処理の対象となるソフトウェアは、プロファイルタグ付きの実行コードにてコンパイルされていることとする。
FIG. 8 is a flowchart of the generation process of the shared
ソフトウェア制御装置100は、試験対象となるソフトウェアを実行し、実行ログを取得する(ステップS801)。以降の処理は、実行ログを先頭から参照して処理を行う。したがって、以降の処理を行う装置は、実行ログを参照するためのデータ入出力が行える、汎用的な演算装置であってもよい。次にソフトウェア制御装置100は、実行ログを参照し、デバイスを起動していたかを確認する(ステップS802)。デバイスを起動していた場合(ステップS802:Yes)、ソフトウェア制御装置100は、初期化デバイス情報を取得し(ステップS808)、共用リソースデータベース202に格納する。格納される箇所は、符号403で示した領域のUseDeviceプロパティである。
The
格納後、ソフトウェア制御装置100は、UIにかかわるシステムコールを利用していたかを確認する(ステップS810)。利用していた場合(ステップS810:Yes)、ソフトウェア制御装置100は、処理を終了する。また、実行ログを最後まで読み取り終えた場合にも、ソフトウェア制御装置100は処理を終了する。または、実行ログ上にて、割り込みハンドラによるユーザ入力待ちである状態に遷移したことが判断できれば、ソフトウェア制御装置100はその時点でも終了してもよい。
After the storage, the
UIにかかわるシステムコールとは、ディスプレイ107上でのユーザによるマウス入力情報や、キーボード109によるキーボード入力情報を取得するシステムコールである。ステップS810の処理では、システムコールが呼ばれた場合に試験対象となるソフトウェアの起動を完了し、ユーザからの指示に対処する状態に遷移していることを示しているため、ソフトウェアの起動を完了したと判断している。UIにかかわるシステムコールを利用していない場合(ステップS810:No)、ソフトウェア制御装置100は、再びステップS802の処理に移行する。
The system call related to the UI is a system call for acquiring mouse input information by the user on the
デバイスを起動していない場合(ステップS802:No)、ソフトウェア制御装置100は、スレッド処理であったかを確認する(ステップS803)。ステップS803の処理により、ソフトウェア制御装置100は、スレッドごとに処理を行うことになる。スレッド処理でない場合(ステップS803:No)、ソフトウェア制御装置100は、ステップS802の処理に移行する。スレッド処理である場合(ステップS803:Yes)、ソフトウェア制御装置100は続けて、システムリソースを利用していたかを確認する(ステップS804)。
When the device is not activated (step S802: No), the
ステップS804の処理は、システムリソースの代わりにライブラリリソースを使用していたとしても、ステップS804:Yesとして処理をしてもよい。図8、図9−1、図9−2で示すフローチャートでは、ライブラリリソースもシステムリソースの一部とする。システムリソースを利用していた場合(ステップS804:Yes)、ソフトウェア制御装置100は、システムリソース利用情報を取得し(ステップS809)、共用リソースデータベース202に格納する。設定される箇所は、図4で示したSys_resourceプロパティとなる。その後、ソフトウェア制御装置100は、ステップS810の処理に移行する。
The process of step S804 may be processed as step S804: Yes even if library resources are used instead of system resources. In the flowcharts shown in FIGS. 8, 9-1, and 9-2, the library resource is also a part of the system resource. When the system resource is used (step S804: Yes), the
システムリソースを利用していない場合(ステップS804:No)、ソフトウェア制御装置100は、メモリコンテキストを初期化していたかを確認する(ステップS805)。メモリコンテキストを初期化していた場合(ステップS805:Yes)、ソフトウェア制御装置100は、メモリコンテキスト初期化時刻情報tを取得し(ステップS806)、共用リソースデータベース202に格納する。設定される箇所は、図4で示したelapse_timeプロパティとなる。その後、ソフトウェア制御装置100は、ステップS810の処理に移行する。
When the system resource is not used (step S804: No), the
メモリコンテキストを初期化していない場合(ステップS805:No)、ソフトウェア制御装置100は、メモリ201へのアクセスであるI/O情報を取得し(ステップS807)、共用リソースデータベース202に格納する。設定される箇所は、図4で示したIOprofile_write_accessプロパティとIOprofile_read_accessプロパティとなる。
If the memory context has not been initialized (step S805: No), the
その後、ソフトウェア制御装置100は、ステップS810の処理に移行する。ステップS810の終了後、ソフトウェア制御装置100は、すべてのスレッドのelapse_timeプロパティから、最大の値をメインスレッドのelapse_timeプロパティに設定する。メインスレッドのelapse_timeがソフトウェアの非競合状態における起動時間tとなる。
Thereafter, the
図9−1、図9−2は、ソフトウェア制御処理のフローチャートである。図9−1は、マスタカーネルにて、メッセージ送信を行う処理を示している。本実施の形態では、マスタカーネルはCPU#0とする。CPU#0は、スケジューラを起動する(ステップS901)。具体的には、たとえば、CPU#0はスケジューラ#0を起動する。また、CPU#0は、CPU#1〜CPU#3からメッセージを受信し、CPUの負荷情報を集約する。
9A and 9B are flowcharts of the software control process. FIG. 9A illustrates a process for transmitting a message in the master kernel. In the present embodiment, the master kernel is
続けて、CPU#0は、集約された負荷情報を基に、新規ソフトウェアの割り当てを行うCPUを確定する(ステップS902)。確定されたCPUは、新規ソフトウェアに対して起動を開始する(ステップS903)とともに、CPU#0は、共用リソースデータベース202の新規ソフトウェアに関するレコードを読み込む(ステップS904)。
Subsequently,
読み込み後、CPU#0は、共用リソースデータベース202を参照して、新規ソフトウェアが起動するデバイスが存在するかを確認する(ステップS905)。存在する場合(ステップS905:Yes)、CPU#0は、デバイス抑止制御要求をCPU#0〜CPU#3に対してブロードキャスト送信する(ステップS906)。起動デバイスが存在しない場合(ステップS905:No)、または、ステップS906の処理後、CPU#0は、新規ソフトウェアが起動を完了したかを確認する(ステップS907)。
After reading, the
起動が完了していない場合(ステップS907:No)、CPU#0は続けて、新規ソフトウェアの起動開始から仕様の起動時間Tを経過したかを確認する(ステップS908)。経過していない場合(ステップS908:No)、CPU#0は、一定時間待機し(ステップS909)、ステップS907の処理に移行する。
If the activation has not been completed (step S907: No), the
経過している場合(ステップS908:Yes)、CPU#0は続けて、起動中のソフトウェアがシステムリソース、またはメモリ201にアクセスするかを確認する(ステップS910)。システムリソース、またはメモリ201にアクセスする場合(ステップS910:Yes)、CPU#0は、実行優先度低下制御要求をCPU#0〜CPU#3に対してブロードキャスト送信する(ステップS911)。
If it has elapsed (step S908: Yes), the
また、実行優先度低下制御要求には、起動中のソフトウェアの情報か、または、仕様の起動時間Tと非競合状態における起動時間tかが含まれる。なお、一般的なソフトウェア、特にアプリケーションソフトウェアなどのソフトウェアは、システムリソースまたはメモリ201にアクセスすることが一般的である。したがって、ソフトウェア制御装置100は、ステップS910の処理を常にYesとして、ステップS910の処理を省くことにより処理を簡略化してもよい。
In addition, the execution priority lowering control request includes information on the software being activated, or the activation time T in the non-contention state with the activation time T in the specification. Note that general software, especially software such as application software, generally accesses system resources or the
ブロードキャスト送信後、または、システムリソース、またはメモリ201を利用しない場合(ステップS910:No)、CPU#0は再び、新規ソフトウェアが起動を完了したかを確認する(ステップS912)。起動を完了していない場合(ステップS912:No)、CPU#0は、一定時間待機し(ステップS913)、再度ステップS912の処理に移行する。新規ソフトウェアが起動を完了した場合(ステップS907:Yes、ステップS912:Yes)、CPU#0は、制御解除要求をCPU#0〜CPU#3に対してブロードキャスト送信する(ステップS914)。
After the broadcast transmission or when the system resource or the
図9−2は、メッセージ受信処理を示している。メッセージ受信処理は、メッセージを受信したスレーブカーネルとなるすべてのCPU、本実施の形態ではCPU#0〜CPU#3にて実行される。下記記述では、実行主体をCPU#1として説明を行う。
FIG. 9-2 shows message reception processing. The message reception process is executed by all CPUs that are slave kernels that have received the message, in this embodiment,
CPU#1は、マスタカーネルからメッセージを受信したかを確認する(ステップS915)。メッセージは、ステップS906、ステップS911、ステップS914にて、マスタカーネルより送信されたメッセージである。メッセージを受信していない場合(ステップS915:No)、CPU#1は、一定時間待機をし(ステップS916)、再びステップS915の処理に移行する。
メッセージを受信した場合(ステップS915:Yes)、CPU#1は、デバイス抑止制御要求を受信したかを確認する(ステップS917)。デバイス抑止制御要求を受信した場合(ステップS917:Yes)、CPU#1は、デバイスにアクセスするソフトウェアを一時停止するように制御する(ステップS918)。
When the message is received (step S915: Yes), the
デバイス抑止制御要求を受信していない場合(ステップS917:No)、CPU#1は続けて、実行優先度低下制御要求を受信したかを確認する(ステップS919)。受信していた場合(ステップS919:Yes)、CPU#1は、システムリソース、またはメモリ201にアクセスするソフトウェアを取得する(ステップS920)。実行優先度低下制御要求のメッセージの中には、起動中のソフトウェアの情報か、または、仕様の起動時間Tと非競合状態における起動時間tかが含まれてもよい。起動中のソフトウェアの情報であれば、CPU#1は、起動中のソフトウェアの情報に基づいて、仕様の起動時間Tと非競合状態における起動時間tをそれぞれ取得する。
When the device suppression control request has not been received (step S917: No), the
取得後、CPU#1は、新規ソフトウェアと取得したソフトウェアとの競合特性σを、競合特性テーブル301より取得する(ステップS921)。取得後、CPU#1は、仕様の起動時間Tが競合状態における起動予測時間σtより小さいかを確認する(ステップS922)。小さい場合(ステップS922:Yes)、CPU#1は、取得したソフトウェアの実行優先度を低下させるように制御する(ステップS923)。
After acquisition, the
なお、ステップS922の処理では、Tとσtを用いて判断を行ったが、共用リソースデータベース202にある、他のプロパティを使用して判断を行ってもよい。たとえば、ソフトウェア制御装置100は、IOprofile_write_accessプロパティとIOprofile_read_accessプロパティの合計値を求める。続けて、ソフトウェア制御装置100は、合計値と非競合状態における起動時間tで除法を行うことで、メモリ201に対するアクセス速度を求めることができる。ソフトウェア制御装置100は、取得したアクセス速度と、スレーブカーネルの現在のメモリアクセス速度を比較し、取得したアクセス速度が大きい場合、スレーブカーネルにて競合が起きているとし、実行優先度を低下させるよう制御してもよい。
In the process of step S922, the determination is performed using T and σt. However, the determination may be performed using other properties in the shared
ステップS923の処理後、または、Tがσt以上の場合(ステップS922:No)、CPU#1は、取得したソフトウェアがシステムリソース、またはメモリ201にアクセスする末尾のソフトウェアかを確認する(ステップS924)。末尾のソフトウェアでない場合(ステップS924:No)、CPU#1は、システムリソース、またはメモリ201にアクセスする次のソフトウェアを取得し(ステップS925)、ステップS921の処理へ移行する。末尾のソフトウェアである場合(ステップS924:Yes)、CPU#1は、ステップS915の処理に移行する。
After the processing of step S923 or when T is greater than or equal to σt (step S922: No), the
実行優先度低下制御要求を受信していない場合(ステップS919:No)、制御解除要求を受信したことになるため、CPU#1は、一時停止したソフトウェア、また、実行優先度を低下させたソフトウェアの制御を解除する(ステップS926)。解除後、CPU#1は、ステップS915の処理に移行する。
When the execution priority lowering control request has not been received (step S919: No), since the control release request has been received, the
以上説明したように、本実施の形態にかかるマルチコアプロセッサシステム、マルチコアプロセッサシステムの制御方法、およびマルチコアプロセッサシステムの制御プログラムによれば、起動中のソフトウェアによってアクセスされる共用リソースにアクセス中であるソフトウェアを一定期間停止する。これにより、起動中のソフトウェアが共用リソースにアクセスする割合を増やし、起動中のソフトウェアの起動時間を短縮することができる。 As described above, according to the multi-core processor system, the control method for the multi-core processor system, and the control program for the multi-core processor system according to the present embodiment, the software that is accessing the shared resource accessed by the running software Is stopped for a certain period. As a result, it is possible to increase the rate at which the activated software accesses the shared resource, and to shorten the activation time of the activated software.
また、本実施の形態にかかるマルチコアプロセッサシステムは、共用リソースにアクセス中である実行中のソフトウェアの実行優先度を低下させてもよい。これにより、起動中のソフトウェアの起動時間を短縮することができ、実行中のソフトウェアも処理を行うことができる。 In addition, the multi-core processor system according to the present embodiment may reduce the execution priority of the software being executed that is accessing the shared resource. Thereby, the starting time of the running software can be shortened, and the running software can also perform processing.
また、本実施の形態にかかるマルチコアプロセッサシステムは、起動中のソフトウェアが起動開始から所定の起動時間を経過しても起動を完了していないことを検出する。続けて、起動中のソフトウェアと実行中のソフトウェアがアクセス中の同一の共用リソースが特定の共用リソースであった場合に、実行中のソフトウェアの実行優先度を低下させるように制御してもよい。これにより、起動中のソフトウェアの起動時間を短縮することができ、また、より競合特性の小さいソフトウェアを所定の起動時間後に制御することになるため、競合への影響の少ないソフトウェアに関しては、そのまま処理を続けさせることができる。 In addition, the multi-core processor system according to the present embodiment detects that the activated software has not completed activation even after a predetermined activation time has elapsed from the activation start. Subsequently, when the same shared resource being accessed by the running software and the running software is a specific shared resource, the execution priority of the running software may be controlled to be lowered. As a result, the startup time of the running software can be shortened, and software with less competitive characteristics is controlled after a predetermined startup time, so software that has little impact on competition is processed as it is. Can be continued.
また、本実施の形態にかかるマルチコアプロセッサシステムは、実行中のソフトウェアと起動中のソフトウェアの競合状態の起動予測時間を算出し、所定の起動時間を超えた場合に、実行中のソフトウェアの実行優先度を低下させるように制御してもよい。これにより、起動中のソフトウェアの起動時間を短縮することができる。また、より競合特性の小さいソフトウェアの中から、起動中のソフトウェアに大きく影響を与えるソフトウェアのみ制御することになるため、大きく影響を与えないソフトウェアに関しては、そのまま処理を続けさせることができる。 In addition, the multi-core processor system according to the present embodiment calculates the predicted start time of the competition state between the running software and the running software, and when the predetermined starting time is exceeded, the execution priority of the running software is calculated. You may control so that a degree may be reduced. As a result, the activation time of the running software can be shortened. In addition, since only software that has a large influence on the activated software is controlled from among the software having a smaller competitive characteristic, the software that does not have a large influence can be processed as it is.
また、携帯端末ではディスプレイの表示領域が狭く、たとえば、320×240ピクセルであるQVGA(Quarter Video Graphics Array)という構成の場合もある。このように狭い画面では、新しいソフトウェアが起動すると今まで実行されていたソフトウェアはバックグラウンドとなり、すべて隠れてしまうことがある。すべて隠れてしまったソフトウェアはユーザから見えなくなるため処理量を減らし、その分起動中のソフトウェアに処理能力を回すことができる。 In addition, the display area of the display is narrow in the mobile terminal, and there is a case where the display is a QVGA (Quarter Video Graphics Array) having 320 × 240 pixels, for example. In such a narrow screen, when new software is activated, the software that has been executed until now becomes the background, and may be hidden. Since all hidden software is invisible to the user, the processing amount can be reduced, and the processing capacity can be turned to the running software.
具体的には、たとえば、動画再生ソフトウェアを起動中に、メールソフトウェアが起動した場合を想定する。動画再生ソフトウェアはバックグラウンドになり、処理量を減らした結果、動画がスムーズに再生できずコマ落ちとなるが、ユーザから見えないため問題ない。本実施の形態にかかるマルチコアプロセッサシステムは、動画再生ソフトウェアの処理量を減らした分、メールソフトウェアの起動に処理能力を回すことができ、メールソフトウェアの起動を高速に行うことができる。 Specifically, for example, it is assumed that mail software is activated while moving image playback software is activated. The video playback software is in the background, and as a result of reducing the processing amount, the video cannot be played back smoothly and frames are dropped. The multi-core processor system according to the present embodiment can reduce the processing amount of the moving image playback software and can turn processing power to start up the mail software, and can start up the mail software at high speed.
なお、本実施の形態で説明したマルチコアプロセッサシステムの制御方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。本マルチコアプロセッサシステムの制御プログラムは、ハードディスク、フレキシブルディスク、CD−ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また本マルチコアプロセッサシステムの制御プログラムは、インターネット等のネットワークを介して配布してもよい。 Note that the control method of the multi-core processor system described in this embodiment can be realized by executing a prepared program on a computer such as a personal computer or a workstation. The control program of the multi-core processor system is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer. The control program for the multi-core processor system may be distributed via a network such as the Internet.
201 メモリ
202 共用リソースデータベース
301 競合特性テーブル
302 起動応答時間テーブル
303 制御指示部
304 検出部
305 解除指示部
306 判断部
307 制御部
308 解除部
309 抽出部
310 算出部
311 検出部
DESCRIPTION OF
Claims (5)
前記複数のコアが共通にアクセスする共用メモリと
を有するマルチコアプロセッサシステムであって、前記複数のコアのうち第1のコアは、
前記第1のコアが起動中のソフトウェアと前記複数のコアのうち前記第1のコアを除く第2のコアが実行中のソフトウェアとが前記共用メモリにアクセスしている場合に、前記第2のコアが実行中のソフトウェアの実行優先度を下げる
マルチコアプロセッサシステム。 Multiple cores running software,
A multi-core processor system having a shared memory that is accessed in common by the plurality of cores, wherein the first core of the plurality of cores is:
If the first core there is a second core software in execution except for the first core of the plurality of cores and running software accessing the shared memory, the second A multi-core processor system that lowers the execution priority of software that is running on the core .
前記第1のコアは、前記第1のコアが起動中のソフトウェアと前記第2のコアが実行中のソフトウェアに対応して前記データベースから抽出した前記起動時間および前記係数に基づき、前記第1のコアが起動中のソフトウェアの競合状態における起動予測時間を算出し、算出した起動予測時間が前記所定の起動時間を超える場合に、前記第2のコアが実行中のソフトウェアの実行優先度を下げる
請求項2に記載のマルチコアプロセッサシステム。 The shared memory stores a database having information on coefficients indicating performance degradation in a case where the start time in the non-competing state of the software and any software are competing with each other,
The first core is based on the startup time and the coefficient extracted from the database corresponding to software being started by the first core and software being executed by the second core . A predicted startup time in a competitive state of software running on the core is calculated, and when the calculated predicted startup time exceeds the predetermined startup time, the execution priority of the software being executed by the second core is lowered. Item 3. The multi-core processor system according to Item 2.
前記第1のコアが起動中のソフトウェアと、前記複数のコアのうち前記第1のコアを除く第2のコアが実行中のソフトウェアとが前記共用メモリにアクセスしていることを検出し、
検出した前記第2のコアが実行中のソフトウェアの実行優先度を下げる
処理を実行するマルチコアプロセッサシステムの制御方法。 A control method of a multi-core processor system having a plurality of cores that execute software and a shared memory that is accessed in common by the plurality of cores, wherein a first core of the plurality of cores includes:
Said first core is running software detects that the second core excluding the first core of the plurality of cores and software in execution is accessing the shared memory,
A control method of a multi-core processor system, which executes a process of lowering the execution priority of software being executed by the detected second core .
前記第1のコアが起動中のソフトウェアと、前記複数のコアのうち前記第1のコアを除く第2のコアが実行中のソフトウェアとが前記共用メモリにアクセスしていることを検出し、
検出した前記第2のコアが実行中のソフトウェアの実行優先度を下げる
処理を実行させるマルチコアプロセッサシステムの制御プログラム。
A control program for a multi-core processor system having a plurality of cores that execute software and a shared memory that is accessed in common by the plurality of cores, wherein a first core of the plurality of cores includes:
Said first core is running software detects that the second core excluding the first core of the plurality of cores and software in execution is accessing the shared memory,
A control program for a multi-core processor system that executes processing for lowering the execution priority of software being executed by the detected second core .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014156495A JP5862722B2 (en) | 2014-07-31 | 2014-07-31 | Multi-core processor system, multi-core processor system control method, and multi-core processor system control program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014156495A JP5862722B2 (en) | 2014-07-31 | 2014-07-31 | Multi-core processor system, multi-core processor system control method, and multi-core processor system control program |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012504241A Division JP5590114B2 (en) | 2010-03-11 | 2010-03-11 | Software control apparatus, software control method, and software control program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014199682A JP2014199682A (en) | 2014-10-23 |
JP5862722B2 true JP5862722B2 (en) | 2016-02-16 |
Family
ID=52356487
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014156495A Expired - Fee Related JP5862722B2 (en) | 2014-07-31 | 2014-07-31 | Multi-core processor system, multi-core processor system control method, and multi-core processor system control program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5862722B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104407924B (en) * | 2014-10-31 | 2017-11-21 | 小米科技有限责任公司 | Memory Optimize Method and device |
US9678868B2 (en) | 2014-10-31 | 2017-06-13 | Xiaomi Inc. | Method and device for optimizing memory |
JP6863043B2 (en) * | 2017-04-25 | 2021-04-21 | セイコーエプソン株式会社 | Printing equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070143768A1 (en) * | 2004-07-28 | 2007-06-21 | Satoshi Inami | Conflict resolution apparatus |
US7500091B2 (en) * | 2005-11-30 | 2009-03-03 | Microsoft Corporation | Delay start-up of applications |
JP2007323181A (en) * | 2006-05-30 | 2007-12-13 | Canon Inc | Starting method and device |
-
2014
- 2014-07-31 JP JP2014156495A patent/JP5862722B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2014199682A (en) | 2014-10-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113835895B (en) | Thread and/or virtual machine scheduling for cores with different capabilities | |
JP5673672B2 (en) | Multi-core processor system, control program, and control method | |
CN112882832B (en) | Memory management method, device, terminal and storage medium applied to browser | |
JP2015503784A (en) | Migration between virtual machines in the graphics processor | |
JP5590114B2 (en) | Software control apparatus, software control method, and software control program | |
JP5862722B2 (en) | Multi-core processor system, multi-core processor system control method, and multi-core processor system control program | |
JP5672311B2 (en) | Synchronous processing method | |
US9690619B2 (en) | Thread processing method and thread processing system for setting for each thread priority level of access right to access shared memory | |
JP2014038651A (en) | Multiprocessor system, control method, and control program | |
CN113032154B (en) | Scheduling method and device for virtual CPU, electronic equipment and storage medium | |
US9734104B2 (en) | Data transfer control apparatus, data transfer control method, and computer product | |
JP5376042B2 (en) | Multi-core processor system, thread switching control method, and thread switching control program | |
US20130239113A1 (en) | Information processing apparatus, computer product, and information processing method | |
JP5582241B2 (en) | Multi-core processor system, multi-core processor system control method, and multi-core processor system control program | |
JP6163795B2 (en) | Information processing apparatus, apparatus evaluation system, apparatus evaluation method, and computer program | |
CN115826857A (en) | NVMe instruction processing method, device, equipment and medium | |
KR20190027460A (en) | Apparatus and method for processing image by using multi-processor | |
JP2012003478A (en) | Interruption control unit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140901 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150420 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150428 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150629 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20151201 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20151214 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5862722 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |