JP5324188B2 - Electronics - Google Patents

Electronics Download PDF

Info

Publication number
JP5324188B2
JP5324188B2 JP2008278700A JP2008278700A JP5324188B2 JP 5324188 B2 JP5324188 B2 JP 5324188B2 JP 2008278700 A JP2008278700 A JP 2008278700A JP 2008278700 A JP2008278700 A JP 2008278700A JP 5324188 B2 JP5324188 B2 JP 5324188B2
Authority
JP
Japan
Prior art keywords
task
processing unit
exclusive
processing
interrupt
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
Application number
JP2008278700A
Other languages
Japanese (ja)
Other versions
JP2010108179A (en
Inventor
裕介 鈴木
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.)
Kyocera Corp
Original Assignee
Kyocera Corp
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 Kyocera Corp filed Critical Kyocera Corp
Priority to JP2008278700A priority Critical patent/JP5324188B2/en
Publication of JP2010108179A publication Critical patent/JP2010108179A/en
Application granted granted Critical
Publication of JP5324188B2 publication Critical patent/JP5324188B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephone Function (AREA)

Description

本発明は、複数のタスクを実行する電子機器に関する。   The present invention relates to an electronic device that executes a plurality of tasks.

従来、複数のタスクを実行する電子機器において、それぞれのタスクの競合を回避しつつ、共通のリソースにアクセス可能にするためには、排他処理を実装する必要がある。   Conventionally, in an electronic device that executes a plurality of tasks, in order to make it possible to access a common resource while avoiding competition between the tasks, it is necessary to implement an exclusive process.

排他処理は、電子機器内の複数のタスクを実行するソフトウェアにクリティカルセクションやセマフォを実装することで実現できる。また、特許文献1〜3に提案された技術を用いて排他処理を実行させることによっても実現することできる。   Exclusive processing can be realized by implementing critical sections and semaphores in software that executes multiple tasks in an electronic device. Moreover, it is realizable also by performing an exclusive process using the technique proposed by patent documents 1-3.

特許文献1には、複数のタスクを実行するときの優先度を可変にし、一のタスクがリソースにアクセスしている間は、この一のタスクの優先度を他のタスクより高くすることにより、他のタスクによる割り込み処理を防ぐ事によって排他処理を実行する技術が提案されている。   In Patent Document 1, the priority when executing a plurality of tasks is made variable, and while one task is accessing a resource, the priority of this one task is higher than the other tasks, Techniques have been proposed for executing exclusive processing by preventing interrupt processing by other tasks.

特許文献2及び3には、一のタスクがハードウェアからの割り込み処理を契機としてリソースにアクセスする場合、一のタスクがリソースにアクセスしている間は他のタスクによる割り込み処理を禁止し、リソースへのアクセスが終了した後に他のタスクの割り込み処理を有効にする技術が提案されている。
特開平9−160790号公報 特開平9−81526号公報 特開平11−203149号公報
In Patent Documents 2 and 3, when one task accesses a resource triggered by hardware interrupt processing, interrupt processing by another task is prohibited while the one task is accessing the resource. There has been proposed a technique for enabling interrupt processing of another task after access to the task is completed.
JP-A-9-160790 JP-A-9-81526 JP-A-11-203149

しかしながら、上述した特許文献1〜3の技術では、以下に示すような問題がある。図7及び図8は、従来の電子機器における処理の流れを示すシーケンス図である。図7に示すように、タスク120の書き込み処理と、タスク110の読み込み処理とを一対の処理Dとする。そして、処理D及びタスク120の書き込み処理を排他するために一の排他処理を実装すると、図8に示すように、タスク120はタスク110からの読み込み処理終了待ち、タスク110はタスク120の排他処理終了待ちとなる。このとき、タスク110とタスク120とは互いの処理の終了待ち状態となり、タスク110とタスク120とが動作しない状態(デッドロック)が発生してしまうことが想定される。   However, the techniques disclosed in Patent Documents 1 to 3 have the following problems. 7 and 8 are sequence diagrams showing the flow of processing in a conventional electronic device. As illustrated in FIG. 7, the writing process of the task 120 and the reading process of the task 110 are a pair of processes D. When one exclusive process is implemented to exclude the process D and the write process of the task 120, as shown in FIG. 8, the task 120 waits for the completion of the read process from the task 110, and the task 110 excludes the task 120. Wait for completion. At this time, it is assumed that the task 110 and the task 120 are in a state of waiting for each other to finish, and a state where the task 110 and the task 120 do not operate (deadlock) occurs.

そこで、本発明は、複数のタスクに排他処理を実装しても、それぞれのタスクの処理の競合、及びデッドロックの発生を回避することができる電子機器を提供することを目的とする。   Accordingly, an object of the present invention is to provide an electronic device that can avoid the competition of processing of each task and the occurrence of deadlock even if exclusive processing is implemented in a plurality of tasks.

本発明に係る電子機器の制御方法は、上記課題を解決するために、第1のCPUにおいて、第1のタスク実行部により第1のタスク、及び前記第1のタスクよりも優先度が低い第2のタスクが実行され、第2のCPUにおいて、第2のタスク実行部により第3のタスクが実行される電子機器の制御方法において、ステップS1において、排他処理部は、前記第2のタスクにおける第1の排他処理の実行を開始し、ステップS2において、前記排他処理部は、前記第2のタスクにおける書き込み処理部による書き込み処理の開始前に、2回目の第1の排他処理の実行を開始し、ステップS3において、前記書き込み処理部は、第2のCPUの第3のタスクに対して書き込み処理を実行し、ステップS4において、前記排他処理部は、前記ステップS3における書き込み処理の終了に応じて、前記2回目の第1の排他処理を終了し、ステップS5において、待機処理部は、前記第1のタスクにおける読み込み処理の終了を待機する待機処理を実行し、ステップS6において、割り込み処理部は、前記第1のタスクに対して割り込み処理を実行し、ステップS7において、前記排他処理部は、前記ステップS6における割り込み処理に応じて、前記第1のタスクにおける読み込み処理部による読み込み処理の開始前に、前記第1の排他処理とは互いに干渉しない第2の排他処理の実行を開始し、ステップS8において、前記読み込み処理部は、第3のタスクからの読み込み処理を実行し、ステップS9において、前記読み込み処理部は、前記第1のタスクにおける読み込み処理の終了を前記第2のタスクへ通知し、ステップS10において、前記排他処理部は、前記第1のタスクにおける前記第2の排他処理を終了し、ステップS11において、前記排他処理部は、前記第2のタスクにおける前記第1の排他処理を終了することを特徴とする。 In order to solve the above-described problem, the electronic device control method according to the present invention has a first CPU that has a lower priority than the first task and the first task by the first task execution unit. In the electronic device control method in which the second task is executed by the second CPU and the third task is executed by the second task execution unit in the second CPU, the exclusive processing unit in the second task The execution of the first exclusive process is started, and in step S2, the exclusive process unit starts executing the second exclusive process before the start of the write process by the write process unit in the second task In step S3, the write processing unit executes write processing on the third task of the second CPU. In step S4, the exclusive processing unit executes the step. In response to the end of the write process in S3, the second first exclusive process ends, and in step S5, the standby processing unit executes a standby process that waits for the end of the read process in the first task. In step S6, the interrupt processing unit executes interrupt processing for the first task. In step S7, the exclusive processing unit determines whether the first task in the first task corresponds to the interrupt processing in step S6. Before starting the reading process by the reading processing unit, the execution of the second exclusive process that does not interfere with the first exclusive process is started. In step S8, the reading processing unit reads from the third task. In step S9, the read processing unit performs the end of the read process in the first task. In step S10, the exclusive processing unit terminates the second exclusive processing in the first task, and in step S11, the exclusive processing unit performs processing in the second task. The first exclusive process is terminated .

本発明に係る電子機器の制御方法は、上記課題を解決するために、第1のCPUにおいて、第1のタスク実行部により第1のタスク及び前記第1のタスクよりも優先度の低い第2のタスクが実行され、第2のCPUにおいて、第2のタスク実行部により第3のタスクが実行される電子機器の制御方法において、ステップS1において、排他処理部は、前記第2のタスクにおける第1の排他処理の実行を開始し、ステップS2において、前記排他処理部は、前記第2のタスクにおける書き込み処理部による書き込み処理の開始前に、第1の排他処理の実行を開始し、ステップS3において、前記書き込み処理部は、前記第2のCPUの第3のタスクに対して書き込み処理を実行し、同時に割り込み禁止処理部は、前記第1のタスクよりも優先度の低い第2のタスクにおいて、割り込み禁止処理を実行し、ステップS4において、前記排他処理部は、前記ステップS3における書き込み処理の終了に応じて、第1の排他処理を終了し、同時に前記割り込み禁止処理部は、前記第2のタスクにおける割り込み禁止処理を終了し、ステップS5において、待機処理部は、第1のタスクにおける読み込み処理の終了を待機する待機処理を実行し、ステップS6において、割り込み処理部は、前記第1のタスクに対して前記ステップS3の書き込み処理の終了後に、割り込み処理を実行し、ステップS7において、前記排他処理部は、前記ステップS6における割り込み処理に応じて、前記第1のタスクにおける読み込み処理部による読み込み処理の開始前に、前記第1の排他処理とは干渉しない第2の排他処理の実行を開始し、ステップS8において、前記読み込み処理部は、前記第3のタスクからの読み込み処理を実行し、ステップS9において、前記読み込み処理部は、前記第1のタスクにおける読み込み処理の終了を前記第2のタスクへ通知し、ステップS10において、前記排他処理部は、前記第1のタスクにおける第2の排他処理を終了し、ステップS11において、前記排他処理部は、前記第2のタスクにおける前記第1の排他処理を終了することを特徴とする。In order to solve the above-described problem, the electronic device control method according to the present invention uses the first task execution unit to lower the first task and the second lower priority than the first task in the first CPU. In the electronic device control method in which the second task is executed by the second CPU and the third task is executed by the second task execution unit in the second CPU, in step S1, the exclusive processing unit executes the second task in the second task. In step S2, the exclusive processing unit starts executing the first exclusive processing before starting the write processing by the write processing unit in the second task, and in step S3 The write processing unit executes a write process for the third task of the second CPU, and at the same time, the interrupt prohibition processing unit has a higher priority than the first task. In the second task that is low, interrupt prohibition processing is executed. In step S4, the exclusive processing unit ends the first exclusive processing in response to completion of the write processing in step S3, and at the same time the interrupt prohibition processing The unit ends the interrupt prohibition process in the second task, and in step S5, the standby processing unit executes a standby process waiting for the end of the reading process in the first task. In step S6, the interrupt processing unit Executes an interrupt process for the first task after the completion of the write process in step S3. In step S7, the exclusive processing unit performs the first task according to the interrupt process in step S6. Before starting the reading process by the reading processing unit in the task, it does not interfere with the first exclusive process. The execution of the second exclusive process is started. In step S8, the read processing unit executes the read process from the third task. In step S9, the read processing unit executes the read process in the first task. The end of the reading process is notified to the second task. In step S10, the exclusive processing unit ends the second exclusive process in the first task. In step S11, the exclusive processing unit The first exclusive process in the second task is terminated.

本発明に係る電子機器の制御方法は、上記課題を解決するために、第1のCPUにおいて、第1のタスク実行部により、第1のタスク、及び前記第1のタスクよりも優先度の低い第2のタスク、並びに前記第2のタスクよりもさらに優先度が低い第4のタスクが実行され、第2のCPUにおいて、第2のタスク実行部により第3のタスクが実行される電子機器の制御方法において、ステップS1において、排他処理部は、第2のタスクにおける書き込み処理部による書き込み処理の開始前に、第1の排他処理の実行を開始し、ステップS2において、前記書き込み処理部は、前記第2のタスクにおいて前記第2のCPUの前記第3のタスクに対して書き込み処理を実行し、同時に割り込み禁止処理部は、前記第1のタスクよりも優先度の低い前記第2のタスクにおいて割り込み禁止処理を実行し、ステップS3において、前記排他処理部は、前記第4のタスクにおいて第1の排他処理を開始し、ステップS4において、前記排他処理部は、前記第4のタスクにおいて、前記第1の排他処理とは互いに干渉しない第2の排他処理を開始し、ステップS5において、待機処理部は、前記第4のタスクにおいて待機処理を実行することにより、前記第2のタスクにおいて実行される前記第2の排他処理の終了を待機し、ステップS6において、前記排他処理部は、前記第2のタスクにおける前記第1の排他処理を終了し、待機処理部へ通知し、ステップS7において、描画処理部は、前記第2のタスクにおける前記第1の排他処理の終了通知に応じて、LCD制御部の第5のタスクに対して描画処理を実行し、ステップS8において、割り込み処理部は、前記第1のタスクに対して割り込み処理を実行し、ステップS9において、前記排他処理部は、前記第2の排他処理の実行を開始し、ステップS10において、前記待機処理部は、第1のタスクにおいて待機処理を実行することにより、第4のタスクにおける第2の排他処理の終了を待機し、ステップS11において、描画受信処理部は、前記ステップS7における描画処理に応じて、前記第5のタスクからの描画処理が終了したことの通知を受信し、ステップS12において、前記排他処理部は、前記第4のタスクにおける前記第2の排他処理を終了し、ステップS13において、前記排他処理部は、前記第4のタスクにおける前記第1の排他処理を終了し、ステップS14において、読み込み処理部は、前記第1のタスクにおける読み込み処理を実行することにより、前記第3のタスクからデータの読み込み処理を実行し、ステップS15において、前記排他処理部は、前記第1のタスクにおける前記第1の排他処理を終了する電子機器の制御方法。In order to solve the above problems, the electronic device control method according to the present invention has a lower priority than the first task and the first task by the first task execution unit in the first CPU. An electronic device in which a second task and a fourth task having a lower priority than the second task are executed, and in the second CPU, the third task is executed by the second task execution unit. In the control method, in step S1, the exclusive processing unit starts execution of the first exclusive processing before the start of the write processing by the write processing unit in the second task, and in step S2, the write processing unit In the second task, write processing is executed for the third task of the second CPU, and at the same time, the interrupt prohibition processing unit has a lower priority than the first task The interrupt prohibition process is executed in the second task. In step S3, the exclusive processing unit starts the first exclusive process in the fourth task. In step S4, the exclusive processing unit In task 4, the second exclusive process that does not interfere with the first exclusive process is started, and in step S5, the standby processing unit executes the standby process in the fourth task, thereby The exclusive processing unit waits for the end of the second exclusive process executed in the second task, and in step S6, the exclusive processing unit ends the first exclusive process in the second task and notifies the standby processing unit In step S7, the drawing processing unit responds to the fifth task of the LCD control unit in response to the end notification of the first exclusive processing in the second task. In step S8, the interrupt processing unit executes interrupt processing for the first task. In step S9, the exclusive processing unit starts executing the second exclusive processing. In step S10, the standby processing unit waits for the end of the second exclusive process in the fourth task by executing the standby process in the first task. In step S11, the drawing reception processing unit In response to the drawing process in step S7, a notification that the drawing process from the fifth task has been completed is received, and in step S12, the exclusion processing unit performs the second exclusion in the fourth task. In step S13, the exclusive processing unit ends the first exclusive process in the fourth task, and in step S14 In step S15, the read processing unit executes data read processing from the third task by executing read processing in the first task. In step S15, the exclusive processing unit executes the first task. A method of controlling an electronic device that ends the first exclusive process in FIG.

本発明によれば、複数のタスクに排他処理を実装しても、それぞれのタスクの処理の競合、及びデッドロックの発生を回避することができる電子機器を提供することができる。   According to the present invention, it is possible to provide an electronic device capable of avoiding contention of processing of each task and occurrence of deadlock even if exclusive processing is implemented in a plurality of tasks.

以下、本発明の実施の形態について説明する。図1は、本発明に係る携帯電子機器の一例である携帯電話機1の外観斜視図を示す。なお、図1は、いわゆる折り畳み型の携帯電話機の形態を示しているが、本発明に係る携帯電話機の形態としては特にこれに限られない。例えば、両筐体を重ね合わせた状態から一方の筐体を一方向にスライドさせるようにしたスライド式や、重ね合せ方向に沿う軸線を中心に一方の筐体を回転させるようにした回転式(ターンタイプ)や、操作部と表示部とが一つの筐体に配置され、連結部を有さない形式(ストレートタイプ)でもよい。   Embodiments of the present invention will be described below. FIG. 1 is an external perspective view of a mobile phone 1 which is an example of a mobile electronic device according to the present invention. FIG. 1 shows a so-called foldable mobile phone, but the mobile phone according to the present invention is not limited to this. For example, a sliding type in which one casing is slid in one direction from a state in which both casings are overlapped, or a rotary type in which one casing is rotated around an axis along the overlapping direction ( Turn type), or a type (straight type) in which the operation unit and the display unit are arranged in one housing and does not have a connecting unit.

携帯電話機1は、操作部側筐体部2と、表示部側筐体部3と、を備えて構成される。操作部側筐体部2は、表面部に、操作部11と、携帯電話機1の使用者が通話時に発した音声が入力されるマイク12と、を備える。操作部11は、各種設定や電話帳機能やメール機能等の各種機能を作動させるための機能設定操作キー13と、電話番号の数字やメール等の文字等を入力するための入力操作キー14と、各種操作における決定やスクロール等を行う決定操作キー15と、から構成されている。   The cellular phone 1 includes an operation unit side body unit 2 and a display unit side body unit 3. The operation unit side body unit 2 includes an operation unit 11 and a microphone 12 into which a voice uttered by a user of the mobile phone 1 is input. The operation unit 11 includes a function setting operation key 13 for operating various functions such as various settings, a telephone book function, a mail function, and the like, and an input operation key 14 for inputting a telephone number and characters such as mail. , And a determination operation key 15 for performing determination and scrolling in various operations.

また、表示部側筐体部3は、表面部に、各種情報を表示するためのLCD(Liquid Crystal Display)表示部21と、通話の相手側の音声を出力するスピーカ22と、を備える。   Further, the display unit side body unit 3 includes an LCD (Liquid Crystal Display) display unit 21 for displaying various types of information and a speaker 22 for outputting the voice of the other party on the call.

また、操作部側筐体部2の上端部と表示部側筐体部3の下端部とは、ヒンジ機構4を介して連結されている。また、携帯電話機1は、ヒンジ機構4を介して連結された操作部側筐体部2と表示部側筐体部3とを相対的に回転することにより、操作部側筐体部2と表示部側筐体部3とが互いに開いた状態(開放状態)にしたり、操作部側筐体部2と表示部側筐体部3とを折り畳んだ状態(折畳み状態)にしたりできる。   Further, the upper end of the operation unit side body 2 and the lower end of the display unit side body 3 are connected via a hinge mechanism 4. In addition, the cellular phone 1 relatively rotates the operation unit side body 2 and the display unit side body 3 connected via the hinge mechanism 4, thereby displaying the operation unit side body 2 and the display. It can be in a state where the unit side body 3 is open to each other (open state), or the operation unit side body 2 and the display unit side body 3 are folded (folded state).

また、操作部側筐体部2は、外平面部に、時計やメールの着信等が表示されるサブLCD表示部30が備えられている。   Further, the operation unit side body unit 2 is provided with a sub LCD display unit 30 on the outer plane portion for displaying a clock, incoming mail, or the like.

図2は、携帯電話機1の機能を示す機能ブロック図である。携帯電話機1は、図2に示すように、操作部11(入力部)と、マイク12と、メインアンテナ40と、RF回路部41と、LCD制御部42と、音声処理部43と、メモリ44(記憶部)と、制御部45と、が操作部側筐体部2に備えられ、LCD表示部21(表示部)と、スピーカ22と、ドライバIC23と、サブLCD表示部30とが表示部側筐体部3に備えられている。   FIG. 2 is a functional block diagram showing functions of the mobile phone 1. As shown in FIG. 2, the mobile phone 1 includes an operation unit 11 (input unit), a microphone 12, a main antenna 40, an RF circuit unit 41, an LCD control unit 42, an audio processing unit 43, and a memory 44. (Storage unit) and a control unit 45 are provided in the operation unit side body unit 2, and an LCD display unit 21 (display unit), a speaker 22, a driver IC 23, and a sub LCD display unit 30 are provided as display units. The side housing unit 3 is provided.

メインアンテナ40は、第1の使用周波数帯(例えば、800MHz)で基地局等と通信を行い、GPS通信のための第2の使用周波数帯(例えば、1.5GHz)に対応できるデュアルバンド対応構成である。なお、本実施の形態では、第1の使用周波数帯として、800MHzとしたが、これ以外の周波数帯であってもよい。また、メインアンテナ40は、第1の使用周波数帯で外部装置と通信を行い、GPS通信のための第2の使用周波数帯に対応できるアンテナを別途設けてもよい。   The main antenna 40 communicates with a base station or the like in a first use frequency band (for example, 800 MHz), and can support a second use frequency band (for example, 1.5 GHz) for GPS communication. It is. In the present embodiment, the first frequency band used is 800 MHz, but other frequency bands may be used. Further, the main antenna 40 may be separately provided with an antenna that communicates with an external device in the first use frequency band and can correspond to the second use frequency band for GPS communication.

RF回路部41は、メインアンテナ40によって受信した信号を復調処理し、処理後の信号を制御部45に供給する。そして、制御部45から供給された信号を変調処理し、メインアンテナ40を介して外部装置(基地局)に送信する。また、その一方で、メインアンテナ40によって受信している信号の強度を制御部45に通知する。   The RF circuit unit 41 demodulates the signal received by the main antenna 40 and supplies the processed signal to the control unit 45. Then, the signal supplied from the control unit 45 is modulated and transmitted to an external device (base station) via the main antenna 40. On the other hand, the control unit 45 is notified of the strength of the signal received by the main antenna 40.

LCD制御部42は、制御部45の制御にしたがって、所定の画像処理を行い、処理後の画像データをドライバIC23に出力する。ドライバIC23は、LCD制御部42から供給された画像データをフレームメモリに蓄え、所定のタイミングでLCD表示部21又はサブLCD表示部30に出力する。   The LCD control unit 42 performs predetermined image processing according to the control of the control unit 45, and outputs the processed image data to the driver IC 23. The driver IC 23 stores the image data supplied from the LCD control unit 42 in the frame memory and outputs it to the LCD display unit 21 or the sub LCD display unit 30 at a predetermined timing.

音声処理部43は、制御部45の制御にしたがって、RF回路部41から供給された信号に対して所定の音声処理を行い、処理後の信号をスピーカ22に出力する。スピーカ22は、音声処理部43から供給された信号を外部に出力する。   The sound processing unit 43 performs predetermined sound processing on the signal supplied from the RF circuit unit 41 under the control of the control unit 45, and outputs the processed signal to the speaker 22. The speaker 22 outputs the signal supplied from the sound processing unit 43 to the outside.

また、音声処理部43は、制御部45の制御にしたがって、マイク12から入力された信号を処理し、処理後の信号をRF回路部41に出力する。RF回路部41は、音声処理部43から供給された信号に所定の処理を行い、処理後の信号をメインアンテナ40に出力する。   In addition, the audio processing unit 43 processes the signal input from the microphone 12 according to the control of the control unit 45 and outputs the processed signal to the RF circuit unit 41. The RF circuit unit 41 performs a predetermined process on the signal supplied from the sound processing unit 43 and outputs the processed signal to the main antenna 40.

メモリ44は、例えば、ワーキングメモリを含み、制御部45による演算処理に利用される。また、メモリ44には、複数のアプリケーションや当該アプリケーションが必要とする各種のテーブルや各種情報等が記憶されている。また、メモリ44は、着脱可能な外部メモリを兼ねていてもよい。   The memory 44 includes, for example, a working memory and is used for arithmetic processing by the control unit 45. The memory 44 stores a plurality of applications, various tables necessary for the applications, various information, and the like. The memory 44 may also serve as a removable external memory.

制御部45は、携帯電話機1の全体を制御しており、中央処理装置(CPU)等を用いて構成される。   The control unit 45 controls the entire mobile phone 1 and is configured using a central processing unit (CPU) or the like.

図3は、制御部45及びLCD制御部42の機能及び動作について示す機能ブロック図である。図3に示すように、制御部45は、少なくとも、ベースバンド用のCPUであるCPU451と、ワンセグデータのデコード機能や画像処理、表示処理、カメラ機能に関する処理等を実行するコプロセッサであるCPU452とを含んで構成される。   FIG. 3 is a functional block diagram showing functions and operations of the control unit 45 and the LCD control unit 42. As shown in FIG. 3, the control unit 45 includes at least a CPU 451 that is a baseband CPU, and a CPU 452 that is a coprocessor that executes a one-segment data decoding function, image processing, display processing, processing related to a camera function, and the like. It is comprised including.

LCD制御部42は、CPU452を基準としてCPU451とは反対側に配置され、CPU451とCPU452とは、共通のデータバス50を用いて通信を行い、また、CPU452と、LCD制御部42とは、共通のデータバス51を用いて通信を行う。   The LCD control unit 42 is disposed on the opposite side of the CPU 451 with respect to the CPU 452, and the CPU 451 and the CPU 452 communicate using the common data bus 50, and the CPU 452 and the LCD control unit 42 are common. The data bus 51 is used for communication.

すなわち、CPU451に対するCPU452及びLCD制御部42は、CPU451から共通にアクセスし、CPU451へ共通にアクセスされるリソースであるといえる。以下、リソースとしてのCPU452及びLCD制御部42をリソース60という。 That is, it can be said that the CPU 452 and the LCD control unit 42 for the CPU 451 are resources that are commonly accessed from the CPU 451 and are commonly accessed by the CPU 451. Hereinafter, the CPU 452 and the LCD control unit 42 as resources are referred to as resources 60.

このように、本実施形態の制御部45により実行される複数のタスクには、これら複数のタスクからのリソース60への同時アクセスによる競合の発生を防ぐために、各々のタスクに排他処理を実行させることが必要となる。   As described above, the plurality of tasks executed by the control unit 45 of the present embodiment cause each task to execute exclusive processing in order to prevent occurrence of contention due to simultaneous access to the resource 60 from the plurality of tasks. It will be necessary.

CPU451は、複数のタスクを並行して実行するタスク実行部461と、複数のタスクに所定の処理を実行する処理部462と、複数のタスクに排他処理を実行する排他処理部463と、複数のタスクに割り込み禁止処理を実行する割り込み禁止処理部464とを備える。   The CPU 451 includes a task execution unit 461 that executes a plurality of tasks in parallel, a processing unit 462 that executes predetermined processing on a plurality of tasks, an exclusive processing unit 463 that executes exclusive processing on a plurality of tasks, The task includes an interrupt prohibition processing unit 464 that executes interrupt prohibition processing on the task.

CPU452は、タスクを実行するタスク実行部481と、所定の処理を実行する処理部491とを備える。また、処理部491は、CPU451へ割り込み処理を実行する割り込み処理部491を備える。   The CPU 452 includes a task execution unit 481 that executes a task and a processing unit 491 that executes a predetermined process. Further, the processing unit 491 includes an interrupt processing unit 491 that executes interrupt processing for the CPU 451.

タスク実行部461は、複数のタスクの実行を管理し、これら複数のタスクを並行して実行する。また、複数のタスクのそれぞれには、タスク実行部461により実行される際の優先度が予め設定され、メモリ44に記憶されている。   The task execution unit 461 manages execution of a plurality of tasks and executes the plurality of tasks in parallel. Also, priorities for execution by the task execution unit 461 are preset for each of the plurality of tasks and stored in the memory 44.

処理部462は、タスク実行部461により複数のタスクが実行される際、これら複数のタスクに共通なリソース60へデータの送受信を実行する。   When a plurality of tasks are executed by the task execution unit 461, the processing unit 462 executes transmission / reception of data to / from the resource 60 common to the plurality of tasks.

また、処理部462は、一のタスクからリソース60へデータの書き込み処理を実行する書き込み処理部471と、リソース60からのデータの読み込み処理を実行する読み込み処理部472と、リソース60による処理の終了を待機するための待機処理を実行する待機処理部473と、一のタスクにおいてリソース60へデータを送信する送信処理を実行する送信処理部474と、送信処理部474によるデータの送信に応じて、リソース60からデータを受信する受信処理を実行する受信処理部475と、リソース60に対して描画処理を実行する描画処理部476と、描画処理部476による描画処理に応じて、リソース60からデータを受信する受信処理を実行する描画受信処理部477と備える。   Further, the processing unit 462 includes a write processing unit 471 that executes data write processing from one task to the resource 60, a read processing unit 472 that executes data read processing from the resource 60, and an end of processing by the resource 60. In response to the transmission of data by the standby processing unit 473 that executes standby processing for waiting for transmission, the transmission processing unit 474 that executes transmission processing for transmitting data to the resource 60 in one task, Data is received from the resource 60 in accordance with the reception processing unit 475 that performs reception processing for receiving data from the resource 60, the rendering processing unit 476 that performs rendering processing on the resource 60, and the rendering processing performed by the rendering processing unit 476. It is provided with a drawing reception processing unit 477 that executes reception processing for reception.

排他処理部463は、処理部462により複数のタスクがリソース60データの送受信を行う場合、これら複数のタスクのそれぞれに互いに異なる排他処理を実行する。   When a plurality of tasks perform transmission / reception of the resource 60 data by the processing unit 462, the exclusive processing unit 463 executes different mutually exclusive processing on the plurality of tasks.

そして、割り込み禁止処理部464は、タスク実行部461により実行される際の優先度が、複数のタスクのうちの他のタスクより一のタスクが低い(以降、「他のタスク>一のタスク」と表現することがある)場合、一のタスクにおいて、割り込み処理部491によるリソース60からの割り込み処理を禁止する割り込み禁止処理を実行する。   Then, the interrupt prohibition processing unit 464 has a lower priority when executed by the task execution unit 461 than the other tasks among the plurality of tasks (hereinafter, “other tasks> one task”). In one task, interrupt prohibition processing for prohibiting interrupt processing from the resource 60 by the interrupt processing unit 491 is executed in one task.

そして、排他処理部463は、一のタスクにおいて送信処理部474によるリソース60への送信処理と、受信処理部475によるリソース60からの受信処理とが実行される場合、一のタスクにおいて実行される排他処理に加えて、更に異なる排他処理を一のタスクにおいて実行する。   The exclusive processing unit 463 is executed in one task when the transmission processing to the resource 60 by the transmission processing unit 474 and the reception processing from the resource 60 by the reception processing unit 475 are executed in one task. In addition to the exclusion process, a different exclusion process is executed in one task.

また、排他処理部463は、書き込み処理部471による書き込み処理と待機処理部473による待機処理とが実行される第1のタスクと、割り込み処理部491による割り込み処理に応じて、読み込み処理部472による読み込み処理を実行する第2のタスクとのそれぞれに互いに異なる排他処理を実行する。   In addition, the exclusive processing unit 463 is operated by the read processing unit 472 according to the first task in which the write processing by the write processing unit 471 and the standby processing by the standby processing unit 473 are executed and the interrupt processing by the interrupt processing unit 491. Different exclusion processes are executed for each of the second tasks that execute the reading process.

そして、割り込み禁止処理部464は、タスク実行部461により実行される際の優先度が第2のタスクよりも第1のタスクが低い(第2のタスク>第1のタスク)場合、第1のタスクにおいて割り込み禁止処理を実行する。   Then, the interrupt prohibition processing unit 464 has a first priority lower than that of the second task when executed by the task execution unit 461 (second task> first task). Interrupt disable processing is executed in the task.

そして、排他処理部463は、複数のタスクのうちの第3のタスクにおいて描画処理部476による描画処理と、描画受信処理部477による受信処理とが実行される場合、第3のタスクにおいて実行される排他処理に加えて、更に異なる排他処理を実行する。   The exclusive processing unit 463 is executed in the third task when the drawing processing by the drawing processing unit 476 and the reception processing by the drawing reception processing unit 477 are executed in the third task among the plurality of tasks. In addition to the exclusive process, a different exclusive process is executed.

次に、本発明に係る第1実施形態〜第3実施形態について説明する。   Next, the first to third embodiments according to the present invention will be described.

<第1実施形態>
図4は、本発明の第1実施形態に係る制御部45の処理の流れを示すシーケンス図である。第1実施形態では、CPU451において、タスク実行部461によりタスク100及びタスク110が実行され、CPU452において、タスク実行部481によりタスク200が実行される。また、タスク実行部461によりタスクが実行される際の優先度は、「タスク100>タスク110」と設定されている。
<First Embodiment>
FIG. 4 is a sequence diagram showing a process flow of the control unit 45 according to the first embodiment of the present invention. In the first embodiment, in the CPU 451, the task execution unit 461 executes the task 100 and the task 110, and in the CPU 452, the task execution unit 481 executes the task 200. The priority when the task is executed by the task execution unit 461 is set as “task 100> task 110”.

ステップS1において、排他処理部463は、タスク110における排他処理Aの実行を開始する。   In step S <b> 1, the exclusive processing unit 463 starts execution of the exclusive processing A in the task 110.

ステップS2において、排他処理部463は、タスク110における書き込み処理部471による書き込み処理の開始前に、排他処理Aの実行を開始する。このとき、ステップS1での排他処理Aの開始と重複するが、同一タスク上での処理であるため、無視される。   In step S <b> 2, the exclusion processing unit 463 starts the execution of the exclusion processing A before the writing processing by the writing processing unit 471 in the task 110 is started. At this time, it overlaps with the start of exclusive processing A in step S1, but is ignored because it is processing on the same task.

ステップS3において、書き込み処理部471は、CPU452のタスク200に対して書き込み処理を実行する。   In step S <b> 3, the write processing unit 471 executes write processing for the task 200 of the CPU 452.

ステップS4において、排他処理部463は、ステップS3における書き込み処理の終了に応じて、排他処理Aを終了する。   In step S4, the exclusion processing unit 463 terminates the exclusion process A in response to the end of the writing process in step S3.

ステップS5において、待機処理部473は、タスク100における読み込み処理の終了を待機する待機処理を実行する。   In step S <b> 5, the standby processing unit 473 executes a standby process that waits for the end of the reading process in the task 100.

ステップS6において、割り込み処理部491は、タスク100に対して割り込み処理を実行する。   In step S <b> 6, the interrupt processing unit 491 executes interrupt processing for the task 100.

ステップS7において、排他処理部463は、ステップS6における割り込み処理に応じて、タスク100における読み込み処理部472による読み込み処理の開始前に、排他処理Bの実行を開始する。   In step S7, the exclusion processing unit 463 starts execution of the exclusion processing B before the reading processing by the reading processing unit 472 in the task 100 is started in response to the interrupt processing in step S6.

ステップS8において、読み込み処理部472は、タスク200からの読み込み処理を実行する。   In step S <b> 8, the read processing unit 472 executes read processing from the task 200.

ステップS9において、読み込み処理部472は、タスク100における読み込み処理の終了をタスク110へ通知する。   In step S <b> 9, the reading processing unit 472 notifies the task 110 of the end of the reading process in the task 100.

ステップS10において、排他処理部463は、タスク100における排他処理Bを終了する。   In step S <b> 10, the exclusion processing unit 463 ends the exclusion processing B in the task 100.

ステップS11において、排他処理部463は、タスク110における排他処理Aを終了する。   In step S <b> 11, the exclusion processing unit 463 ends the exclusion processing A in the task 110.

このように第1実施形態の携帯電話機1によれば、排他処理部463は、割り込み処理に応じて読み込み処理が実行されるタスク100と、書き込み処理と待機処理とが実行されるタスク110とで互いに異なる排他処理を実行する。   As described above, according to the mobile phone 1 of the first embodiment, the exclusive processing unit 463 includes the task 100 in which the read process is executed in response to the interrupt process and the task 110 in which the write process and the standby process are executed. Execute different exclusion processes.

これにより、排他処理Aと排他処理Bとは互いに干渉しないため、タスク110において排他処理Aを開始した後に、タスク110よりも優先度の高いタスク100において排他処理Bを開始した場合であっても、タスク100の処理が停止することなく、タスク100における読み込み処理が実行される。そして、タスク100における読み込み処理の終了によりタスク110の待機処理を終了させることが可能となり、デッドロックの発生を回避することができる。   Thus, the exclusion process A and the exclusion process B do not interfere with each other. Therefore, even after the exclusion process A is started in the task 110, the exclusion process B is started in the task 100 having a higher priority than the task 110. The reading process in the task 100 is executed without stopping the process in the task 100. Then, the waiting process of the task 110 can be ended by the end of the reading process in the task 100, and the occurrence of a deadlock can be avoided.

<第2実施形態>
図5は、第2実施形態に係る制御部45の処理の流れを示すシーケンス図である。第2実施形態も第1実施形態と同様に、CPU451において、タスク実行部461によりタスク100及びタスク110が実行され、CPU452において、タスク実行部481によりタスク200が実行される。また、タスク実行部461によりタスクが実行される際の優先度は、「タスク100>タスク110」と設定されている。
Second Embodiment
FIG. 5 is a sequence diagram showing a flow of processing of the control unit 45 according to the second embodiment. Similarly to the first embodiment, in the second embodiment, the task execution unit 461 executes the task 100 and the task 110 in the CPU 451, and the task execution unit 481 executes the task 200 in the CPU 452. The priority when the task is executed by the task execution unit 461 is set as “task 100> task 110”.

ステップS21において、排他処理部463は、タスク110における排他処理Aの実行を開始する。   In step S <b> 21, the exclusive processing unit 463 starts executing the exclusive process A in the task 110.

ステップS22において、排他処理部463は、タスク110における書き込み処理部471による書き込み処理の開始前に、排他処理Aの実行を開始する。このとき、ステップS21での排他処理Aの開始と重複するが、同一タスク上での処理であるため、無視される。   In step S <b> 22, the exclusion processing unit 463 starts execution of the exclusion processing A before starting the writing processing by the writing processing unit 471 in the task 110. At this time, it overlaps with the start of exclusive processing A in step S21, but is ignored because it is processing on the same task.

ステップS23において、書き込み処理部471は、CPU452のタスク200に対して書き込み処理を実行する。また、同時に割り込み禁止処理部464は、タスク100よりも優先度の低いタスク110において、割り込み禁止処理を実行する。   In step S <b> 23, the write processing unit 471 executes write processing for the task 200 of the CPU 452. At the same time, the interrupt prohibition processing unit 464 executes interrupt prohibition processing in the task 110 having a lower priority than the task 100.

ステップS24において、排他処理部463は、ステップS23における書き込み処理の終了に応じて、排他処理Aを終了する。また、同時に割り込み禁止処理部464は、タスク110における割り込み禁止処理を終了する。   In step S24, the exclusion processing unit 463 terminates the exclusion process A in response to the termination of the writing process in step S23. At the same time, the interrupt prohibition processing unit 464 ends the interrupt prohibition process in the task 110.

ステップS25において、待機処理部473は、タスク100における読み込み処理の終了を待機する待機処理を実行する。   In step S <b> 25, the standby processing unit 473 executes a standby process that waits for the end of the reading process in the task 100.

ステップS26において、割り込み処理部491は、タスク100に対して割り込み処理を実行する。ここで、割り込み処理部491は、ステップS23の書き込み処理中には、タスク110に割り込み禁止処理が実行されているため、ステップS23の書き込み処理の終了後に、割り込み処理を実行する。   In step S <b> 26, the interrupt processing unit 491 executes interrupt processing for the task 100. Here, since the interrupt prohibition process is executed for the task 110 during the write process of step S23, the interrupt processing unit 491 executes the interrupt process after the write process of step S23 is completed.

ステップS27において、排他処理部463は、ステップS26における割り込み処理に応じて、タスク100における読み込み処理部472による読み込み処理の開始前に、排他処理Bの実行を開始する。   In step S27, the exclusion processing unit 463 starts execution of the exclusion processing B before the reading processing by the reading processing unit 472 in the task 100 is started in response to the interrupt processing in step S26.

ステップS28において、読み込み処理部472は、タスク200からの読み込み処理を実行する。   In step S <b> 28, the read processing unit 472 executes read processing from the task 200.

ステップS29において、読み込み処理部472は、タスク100における読み込み処理の終了をタスク110へ通知する。   In step S <b> 29, the read processing unit 472 notifies the task 110 of the end of the read processing in the task 100.

ステップS30において、排他処理部463は、タスク100における排他処理Bを終了する。   In step S <b> 30, the exclusion processing unit 463 ends the exclusion processing B in the task 100.

ステップS31において、排他処理部463は、タスク110における排他処理Aを終了する。   In step S <b> 31, the exclusion processing unit 463 ends the exclusion processing A in the task 110.

このように第2実施形態の携帯電話機1によれば、排他処理部463により、タスク100と、タスク110とで互いに異なる排他処理を実行することに加え、割り込み禁止処理部464は、タスク100よりも優先度の低いタスク110において、タスク200からの割り込みを禁止する割り込み禁止処理を実行する。   As described above, according to the mobile phone 1 of the second embodiment, the exclusion processing unit 463 performs different exclusion processing between the task 100 and the task 110, and the interrupt prohibition processing unit 464 includes In the task 110 having a low priority, interrupt prohibition processing for prohibiting an interrupt from the task 200 is executed.

これにより、タスク110における書き込み処理中は、タスク200からの割り込み処理が禁止されるため、タスク110におけるタスク200への書き込み処理中に、タスク100におけるタスク200からの読み込み処理を排他することができ、タスク100とタスク110とで処理が競合することを回避することができる。   As a result, interrupt processing from the task 200 is prohibited during the write processing in the task 110, so that the read processing from the task 200 in the task 100 can be excluded during the write processing to the task 200 in the task 110. Thus, it is possible to avoid a process conflict between the task 100 and the task 110.

<第3実施形態>
図6は、第3実施形態に係る制御部45の処理の流れを示すシーケンス図である。第3実施形態は、第1及び第2実施形態に加えて、タスク実行部461によりタスク120が実行される点が第1及び第2実施形態とは異なる。また、タスク実行部461によりタスクが実行される際の優先度は、「タスク100>タスク110>タスク120」と設定されている。
<Third Embodiment>
FIG. 6 is a sequence diagram showing a flow of processing of the control unit 45 according to the third embodiment. The third embodiment is different from the first and second embodiments in that the task 120 is executed by the task execution unit 461 in addition to the first and second embodiments. The priority when the task is executed by the task execution unit 461 is set as “task 100> task 110> task 120”.

ステップS41において、排他処理部463は、タスク110における書き込み処理部471による書き込み処理の開始前に、排他処理Aの実行を開始する。   In step S <b> 41, the exclusion processing unit 463 starts execution of the exclusion processing A before the writing processing by the writing processing unit 471 in the task 110 is started.

ステップS42において、書き込み処理部471は、タスク110においてCPU452のタスク200に対して書き込み処理を実行する。また、同時に割り込み禁止処理部464は、タスク100よりも優先度の低いタスク110において割り込み禁止処理を実行する。   In step S <b> 42, the write processing unit 471 executes a write process on the task 200 of the CPU 452 in the task 110. At the same time, the interrupt prohibition processing unit 464 executes interrupt prohibition processing in the task 110 having a lower priority than the task 100.

ステップS43において、排他処理部463は、タスク120において排他処理Aを開始する。   In step S 43, the exclusive processing unit 463 starts the exclusive processing A in the task 120.

ステップS44において、排他処理部463は、タスク120において排他処理Bを開始する。   In step S <b> 44, the exclusion processing unit 463 starts the exclusion processing B in the task 120.

ステップS45において、待機処理部473は、タスク120において待機処理を実行する。このとき、待機処理部473は、タスク110において実行される排他処理Bの終了を待機する。   In step S <b> 45, the standby processing unit 473 executes standby processing in the task 120. At this time, the standby processing unit 473 waits for the end of the exclusive process B executed in the task 110.

ステップS46において、排他処理部463は、タスク110における排他処理Aを終了し、待機処理部473へ通知する。   In step S <b> 46, the exclusive processing unit 463 ends the exclusive processing A in the task 110 and notifies the standby processing unit 473.

ステップS47において、描画処理部476は、タスク110における排他処理Aの終了通知に応じて、LCD制御部42のタスク300に対して描画処理を実行する。   In step S <b> 47, the drawing processing unit 476 executes drawing processing for the task 300 of the LCD control unit 42 in response to the notification of completion of the exclusive processing A in the task 110.

ステップS48において、割り込み処理部491は、タスク100に対して割り込み処理を実行する。   In step S <b> 48, the interrupt processing unit 491 executes interrupt processing for the task 100.

ステップS49において、排他処理部463は、排他処理Bの実行を開始する。   In step S49, the exclusive processing unit 463 starts the execution of the exclusive process B.

ステップS50において、待機処理部473は、タスク100において待機処理を実行する。このとき、待機処理部473は、タスク120における排他処理Bの終了を待機する。   In step S50, the standby processing unit 473 executes standby processing in the task 100. At this time, the standby processing unit 473 waits for the end of the exclusive process B in the task 120.

ステップS51において、描画受信処理部477は、ステップS47における描画処理に応じて、タスク300からの描画処理が終了したことの通知を受信する。   In step S51, the drawing reception processing unit 477 receives a notification from the task 300 that the drawing process has ended in response to the drawing process in step S47.

ステップS52において、排他処理部463は、タスク120における排他処理Bを終了する。   In step S <b> 52, the exclusion processing unit 463 ends the exclusion process B in the task 120.

ステップS53において、排他処理部463は、タスク120における排他処理Aを終了する。   In step S53, the exclusion processing unit 463 ends the exclusion processing A in the task 120.

ステップS54において、読み込み処理部472は、タスク100における読み込み処理を実行する。このとき、読み込み処理部472は、タスク200からデータの読み込み処理を実行する。   In step S <b> 54, the read processing unit 472 executes read processing in the task 100. At this time, the read processing unit 472 executes data read processing from the task 200.

ステップS55において、排他処理部463は、タスク100における排他処理Aを終了する。   In step S <b> 55, the exclusion processing unit 463 ends the exclusion processing A in the task 100.

このように第3実施形態の携帯電話機1によれば、排他処理部463は、タスク120において描画処理部476による描画処理と、描画受信処理部477による受信処理とが実行される場合、タスク120において、排他処理Aに加えて排他処理Bを実行する。   As described above, according to the mobile phone 1 of the third embodiment, when the drawing process by the drawing processing unit 476 and the reception process by the drawing reception processing unit 477 are executed in the task 120, the exclusive processing unit 463 performs the task 120. In FIG. 5, the exclusive process B is executed in addition to the exclusive process A.

これにより、タスク110における書き込み処理中には、排他処理Aと、割り込み禁止処理が実行される。また、タスク100における読み込み処理中には、排他処理Bが実行される。また、タスク120における描画処理中には、排他処理Aと排他処理Bとが実行される。   Thereby, during the writing process in the task 110, the exclusion process A and the interrupt prohibition process are executed. Further, during the reading process in the task 100, the exclusive process B is executed. Further, during the drawing process in the task 120, the exclusive process A and the exclusive process B are executed.

したがって、これらのタスク100における読み込み処理、タスク110における書き込み処理、及びタスク120における描画処理が同時に実行されて、処理が競合することを回避できる。   Therefore, it is possible to avoid conflicting processing by simultaneously executing the reading process in the task 100, the writing process in the task 110, and the drawing process in the task 120.

以上、好適な実施形態について説明したが、本発明は上述した実施形態に限定されることなく種々の形態で実施することができる。例えば、本実施形態において、携帯電子機器として携帯電話機1について説明しているが、これに限定されず、PHS(登録商標;Personal Handy phone System)、PDA(Personal Digital Assistant)、ポータブルナビゲーション装置、ノートパソコン等であってもよい。   As mentioned above, although preferred embodiment was described, this invention can be implemented with a various form, without being limited to embodiment mentioned above. For example, in the present embodiment, the mobile phone 1 is described as a mobile electronic device. However, the present invention is not limited to this, but is not limited to this, but a PHS (registered trademark), a personal digital assistant (PDA), a portable navigation device, a notebook. A personal computer etc. may be sufficient.

また、上述の実施形態では、CPU451は、ベースバンド用のCPUであり、CPU452は、コプロセッサであり、また、リソース60は、CPU452とLCD制御部42とで構成されたが、これに限らず、他の機能及び動作を行うCPUを用いて構成してもよい。   In the above-described embodiment, the CPU 451 is a baseband CPU, the CPU 452 is a coprocessor, and the resource 60 includes the CPU 452 and the LCD control unit 42. However, the present invention is not limited to this. A CPU that performs other functions and operations may be used.

本発明に係る携帯電子機器の一例である携帯電話機の外観斜視図である。1 is an external perspective view of a mobile phone that is an example of a mobile electronic device according to the present invention. 携帯電話機の機能を示す機能ブロック図である。It is a functional block diagram which shows the function of a mobile telephone. 制御部及びLCD制御部の機能及び動作について示す機能ブロック図である。It is a functional block diagram shown about the function and operation | movement of a control part and a LCD control part. 第1実施形態に係る制御部の処理の流れを示すシーケンス図である。It is a sequence diagram which shows the flow of a process of the control part which concerns on 1st Embodiment. 第2実施形態に係る制御部の処理の流れを示すシーケンス図である。It is a sequence diagram which shows the flow of a process of the control part which concerns on 2nd Embodiment. 第3実施形態に係る制御部の処理の流れを示すシーケンス図である。It is a sequence diagram which shows the flow of a process of the control part which concerns on 3rd Embodiment. 従来の電子機器における処理の流れを示すシーケンス図である。It is a sequence diagram which shows the flow of the process in the conventional electronic device. 従来の電子機器における処理の流れを示すシーケンス図である。It is a sequence diagram which shows the flow of the process in the conventional electronic device.

符号の説明Explanation of symbols

1 携帯電話機
42 LCD制御部
45 制御部
60 リソース
461 タスク実行部
462 処理部462
463 排他処理部
DESCRIPTION OF SYMBOLS 1 Cellular phone 42 LCD control part 45 Control part 60 Resource 461 Task execution part 462 Processing part 462
463 Exclusive processing part

Claims (3)

第1のCPUにおいて、第1のタスク実行部により第1のタスク、及び前記第1のタスクよりも優先度が低い第2のタスクが実行され、In the first CPU, the first task execution unit executes the first task and the second task having a lower priority than the first task,
第2のCPUにおいて、第2のタスク実行部により第3のタスクが実行される電子機器の制御方法において、In the second CPU, in the control method of the electronic device in which the third task is executed by the second task execution unit,
ステップS1において、排他処理部は、前記第2のタスクにおける第1の排他処理の実行を開始し、In step S1, the exclusive processing unit starts execution of the first exclusive process in the second task,
ステップS2において、前記排他処理部は、前記第2のタスクにおける書き込み処理部による書き込み処理の開始前に、2回目の第1の排他処理の実行を開始し、In step S2, the exclusive processing unit starts executing the first exclusive processing for the second time before the write processing by the write processing unit in the second task is started,
ステップS3において、前記書き込み処理部は、第2のCPUの第3のタスクに対して書き込み処理を実行し、In step S3, the write processing unit executes a write process for the third task of the second CPU,
ステップS4において、前記排他処理部は、前記ステップS3における書き込み処理の終了に応じて、前記2回目の第1の排他処理を終了し、In step S4, the exclusive processing unit ends the second first exclusive process in response to the end of the writing process in step S3,
ステップS5において、待機処理部は、前記第1のタスクにおける読み込み処理の終了を待機する待機処理を実行し、In step S5, the standby processing unit executes a standby process for waiting for the end of the reading process in the first task,
ステップS6において、割り込み処理部は、前記第1のタスクに対して割り込み処理を実行し、In step S6, the interrupt processing unit executes interrupt processing for the first task,
ステップS7において、前記排他処理部は、前記ステップS6における割り込み処理に応じて、前記第1のタスクにおける読み込み処理部による読み込み処理の開始前に、前記第1の排他処理とは互いに干渉しない第2の排他処理の実行を開始し、In step S7, in response to the interrupt processing in step S6, the exclusion processing unit does not interfere with the first exclusion processing before the reading processing by the reading processing unit in the first task is started. Start exclusive processing of
ステップS8において、前記読み込み処理部は、第3のタスクからの読み込み処理を実行し、In step S8, the read processing unit executes a read process from the third task,
ステップS9において、前記読み込み処理部は、前記第1のタスクにおける読み込み処理の終了を前記第2のタスクへ通知し、In step S9, the reading processing unit notifies the second task of the end of the reading process in the first task,
ステップS10において、前記排他処理部は、前記第1のタスクにおける前記第2の排他処理を終了し、In step S10, the exclusive processing unit ends the second exclusive processing in the first task,
ステップS11において、前記排他処理部は、前記第2のタスクにおける前記第1の排他処理を終了する電子機器の制御方法。In step S11, the exclusive processing unit controls the electronic device to end the first exclusive processing in the second task.
第1のCPUにおいて、第1のタスク実行部により第1のタスク及び前記第1のタスクよりも優先度の低い第2のタスクが実行され、In the first CPU, the first task execution unit executes the first task and the second task having a lower priority than the first task,
第2のCPUにおいて、第2のタスク実行部により第3のタスクが実行される電子機器の制御方法において、In the second CPU, in the control method of the electronic device in which the third task is executed by the second task execution unit,
ステップS1において、排他処理部は、前記第2のタスクにおける第1の排他処理の実行を開始し、In step S1, the exclusive processing unit starts execution of the first exclusive process in the second task,
ステップS2において、前記排他処理部は、前記第2のタスクにおける書き込み処理部による書き込み処理の開始前に、第1の排他処理の実行を開始し、In step S2, the exclusive processing unit starts executing the first exclusive process before the start of the write process by the write processing unit in the second task,
ステップS3において、前記書き込み処理部は、前記第2のCPUの第3のタスクに対して書き込み処理を実行し、同時に割り込み禁止処理部は、前記第1のタスクよりも優先度の低い第2のタスクにおいて、割り込み禁止処理を実行し、In step S3, the write processing unit executes a write process for the third task of the second CPU, and at the same time, the interrupt prohibition processing unit executes a second process having a lower priority than the first task. In the task, execute the interrupt disable process,
ステップS4において、前記排他処理部は、前記ステップS3における書き込み処理の終了に応じて、第1の排他処理を終了し、同時に前記割り込み禁止処理部は、前記第2のタスクにおける割り込み禁止処理を終了し、In step S4, the exclusion processing unit terminates the first exclusion processing in response to the completion of the writing processing in step S3, and at the same time, the interrupt inhibition processing unit terminates the interrupt inhibition processing in the second task. And
ステップS5において、待機処理部は、第1のタスクにおける読み込み処理の終了を待機する待機処理を実行し、In step S5, the standby processing unit executes a standby process for waiting for the end of the reading process in the first task,
ステップS6において、割り込み処理部は、前記第1のタスクに対して前記ステップS3の書き込み処理の終了後に、割り込み処理を実行し、In step S6, the interrupt processing unit executes interrupt processing for the first task after completion of the write processing in step S3,
ステップS7において、前記排他処理部は、前記ステップS6における割り込み処理に応じて、前記第1のタスクにおける読み込み処理部による読み込み処理の開始前に、前記第1の排他処理とは干渉しない第2の排他処理の実行を開始し、In step S7, in response to the interrupt processing in step S6, the exclusion processing unit does not interfere with the first exclusion processing before the reading processing by the reading processing unit in the first task is started. Start exclusive processing,
ステップS8において、前記読み込み処理部は、前記第3のタスクからの読み込み処理を実行し、In step S8, the read processing unit executes read processing from the third task,
ステップS9において、前記読み込み処理部は、前記第1のタスクにおける読み込み処理の終了を前記第2のタスクへ通知し、In step S9, the reading processing unit notifies the second task of the end of the reading process in the first task,
ステップS10において、前記排他処理部は、前記第1のタスクにおける第2の排他処理を終了し、In step S10, the exclusive processing unit ends the second exclusive processing in the first task,
ステップS11において、前記排他処理部は、前記第2のタスクにおける前記第1の排他処理を終了する電子機器の制御方法。In step S11, the exclusive processing unit controls the electronic device to end the first exclusive processing in the second task.
第1のCPUにおいて、第1のタスク実行部により、第1のタスク、及び前記第1のタスクよりも優先度の低い第2のタスク、並びに前記第2のタスクよりもさらに優先度が低い第4のタスクが実行され、In the first CPU, the first task execution unit has the first task, the second task having a lower priority than the first task, and the second task having a lower priority than the second task. 4 tasks are executed,
第2のCPUにおいて、第2のタスク実行部により第3のタスクが実行される電子機器の制御方法において、In the second CPU, in the control method of the electronic device in which the third task is executed by the second task execution unit,
ステップS1において、排他処理部は、第2のタスクにおける書き込み処理部による書き込み処理の開始前に、第1の排他処理の実行を開始し、In step S1, the exclusive processing unit starts executing the first exclusive process before the start of the write process by the write processing unit in the second task,
ステップS2において、前記書き込み処理部は、前記第2のタスクにおいて前記第2のCPUの前記第3のタスクに対して書き込み処理を実行し、同時に割り込み禁止処理部は、前記第1のタスクよりも優先度の低い前記第2のタスクにおいて割り込み禁止処理を実行し、In step S2, the write processing unit performs a write process on the third task of the second CPU in the second task, and at the same time, the interrupt prohibition processing unit is more than the first task. The interrupt prohibition process is executed in the second task having a low priority,
ステップS3において、前記排他処理部は、前記第4のタスクにおいて第1の排他処理を開始し、In step S3, the exclusive processing unit starts the first exclusive processing in the fourth task,
ステップS4において、前記排他処理部は、前記第4のタスクにおいて、前記第1の排他処理とは互いに干渉しない第2の排他処理を開始し、In step S4, the exclusion processing unit starts a second exclusion process that does not interfere with the first exclusion process in the fourth task,
ステップS5において、待機処理部は、前記第4のタスクにおいて待機処理を実行することにより、前記第2のタスクにおいて実行される前記第2の排他処理の終了を待機し、In step S5, the standby processing unit waits for the end of the second exclusive process executed in the second task by executing the standby process in the fourth task,
ステップS6において、前記排他処理部は、前記第2のタスクにおける前記第1の排他処理を終了し、待機処理部へ通知し、In step S6, the exclusive processing unit ends the first exclusive processing in the second task and notifies the standby processing unit,
ステップS7において、描画処理部は、前記第2のタスクにおける前記第1の排他処理の終了通知に応じて、LCD制御部の第5のタスクに対して描画処理を実行し、In step S7, the drawing processing unit executes a drawing process on the fifth task of the LCD control unit in response to the end notification of the first exclusive process in the second task,
ステップS8において、割り込み処理部は、前記第1のタスクに対して割り込み処理を実行し、In step S8, the interrupt processing unit executes interrupt processing for the first task,
ステップS9において、前記排他処理部は、前記第2の排他処理の実行を開始し、In step S9, the exclusive processing unit starts executing the second exclusive process,
ステップS10において、前記待機処理部は、第1のタスクにおいて待機処理を実行することにより、第4のタスクにおける第2の排他処理の終了を待機し、In step S10, the standby processing unit waits for the end of the second exclusive process in the fourth task by executing the standby process in the first task,
ステップS11において、描画受信処理部は、前記ステップS7における描画処理に応じて、前記第5のタスクからの描画処理が終了したことの通知を受信し、In step S11, the drawing reception processing unit receives a notification that the drawing process from the fifth task has ended in response to the drawing process in step S7,
ステップS12において、前記排他処理部は、前記第4のタスクにおける前記第2の排他処理を終了し、In step S12, the exclusive processing unit ends the second exclusive processing in the fourth task,
ステップS13において、前記排他処理部は、前記第4のタスクにおける前記第1の排他処理を終了し、In step S13, the exclusive processing unit ends the first exclusive processing in the fourth task,
ステップS14において、読み込み処理部は、前記第1のタスクにおける読み込み処理を実行することにより、前記第3のタスクからデータの読み込み処理を実行し、In step S14, the read processing unit executes the read process in the first task, thereby executing the data read process from the third task,
ステップS15において、前記排他処理部は、前記第1のタスクにおける前記第1の排他処理を終了する電子機器の制御方法。In step S15, the exclusive processing unit controls the electronic device to end the first exclusive processing in the first task.
JP2008278700A 2008-10-29 2008-10-29 Electronics Expired - Fee Related JP5324188B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008278700A JP5324188B2 (en) 2008-10-29 2008-10-29 Electronics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008278700A JP5324188B2 (en) 2008-10-29 2008-10-29 Electronics

Publications (2)

Publication Number Publication Date
JP2010108179A JP2010108179A (en) 2010-05-13
JP5324188B2 true JP5324188B2 (en) 2013-10-23

Family

ID=42297581

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008278700A Expired - Fee Related JP5324188B2 (en) 2008-10-29 2008-10-29 Electronics

Country Status (1)

Country Link
JP (1) JP5324188B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6962717B2 (en) * 2017-06-15 2021-11-05 日本電気株式会社 Information processing equipment, information processing methods and information processing programs

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3256387B2 (en) * 1994-11-04 2002-02-12 株式会社日立製作所 Exclusive control method, processor and computer system

Also Published As

Publication number Publication date
JP2010108179A (en) 2010-05-13

Similar Documents

Publication Publication Date Title
EP1453286B1 (en) Mobile communication terminal, method for controlling execution state of application program, application program, and recording medium wherein application program has been recorded
KR20130008424A (en) Apparatus and method for executing a shortcut function in a portable terminal
JP2008154004A (en) Portable terminal and information communicating method
JP2001222363A (en) Method for extending key function in mobile communication terminal
US9734829B2 (en) Electronic device, control method, and control program
JP5097680B2 (en) Portable electronic devices
JP5324188B2 (en) Electronics
US8723802B2 (en) Mobile electronic device
JP4988663B2 (en) Portable electronic devices
JP5337441B2 (en) Portable electronic devices
JP5537198B2 (en) Portable electronic devices
JP5751881B2 (en) Electronic device, application determination method, and application determination program
US9052822B2 (en) Portable electronic device, and control method and control program for the same
US20150222411A1 (en) Electronic device and method for providing communication service
JP5826999B2 (en) Electronic device and control method
JP2005252386A (en) Information terminal
JP5473657B2 (en) Portable electronic device and display control method thereof
JP2011010060A (en) Communication system
JP2010026909A (en) Portable terminal device and program
JP5244544B2 (en) Mobile device
JP5216464B2 (en) Portable electronic devices
JP4986947B2 (en) Portable electronic devices
JP5364690B2 (en) Portable electronic devices
JP5398865B2 (en) Portable electronic devices
AU2003213198B2 (en) Method and apparatus for emulating a mobile device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110929

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20120803

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130215

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130226

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130425

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: 20130625

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130718

R150 Certificate of patent or registration of utility model

Ref document number: 5324188

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees