JPH04168532A - Multi-task device - Google Patents
Multi-task deviceInfo
- Publication number
- JPH04168532A JPH04168532A JP29359190A JP29359190A JPH04168532A JP H04168532 A JPH04168532 A JP H04168532A JP 29359190 A JP29359190 A JP 29359190A JP 29359190 A JP29359190 A JP 29359190A JP H04168532 A JPH04168532 A JP H04168532A
- Authority
- JP
- Japan
- Prior art keywords
- task
- flag memory
- memory
- file
- flag
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
Description
【発明の詳細な説明】
[産業上の利用分野]
本発明は、複数のタスクを互いに独立して時分割で実行
するマルチタスク装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a multitasking device that executes a plurality of tasks independently of each other in a time-sharing manner.
[従来の技術]
パーソナルコンピュータにおいて、複数のタスクを互い
に独立して時分割で実行できるという市販されているア
プリケーションソフトを使用してマルチタスクシステム
を構築することが考えられるが、市販されているアプリ
ケーションソフトではタスク間共有エリアが無いためそ
のままではマルチタスクシステムとしては不十分であっ
た。[Prior Art] It is conceivable to build a multitasking system on a personal computer using commercially available application software that can execute multiple tasks independently of each other in a time-sharing manner. Since the software does not have a shared area between tasks, it was insufficient as a multitasking system as it was.
[発明が解決しようとする課題]
このように従来においては、市販されているアプリケー
ションソフトを使用して十分なマルチタスフシステムを
構築することができなかった。[Problems to be Solved by the Invention] As described above, in the past, it has not been possible to construct a sufficient multitasking system using commercially available application software.
そこで本発明は、複数のタスクを互いに独立して時分割
で実行できるアプリケーションソフトを使用して十分な
マルチタスクシステムを構築することができるマルチタ
スク装置を提供しようとするものである。Therefore, the present invention aims to provide a multitasking device that can construct a sufficient multitasking system using application software that can execute a plurality of tasks independently and in a time-sharing manner.
[課題を解決するための手段]
請求項(1)対応の発明は、複数のタスクを互いに独立
して時分割で実行するマルチタスク装置において、各タ
スクが共有するファイルメモリと、各タスクに対応して
それぞれ設けられ、タスク実行中セットされるフラグメ
モリと、タスク実行開始時に他のタスクに対応して設け
られたフラグメモリのセット、非セット状態を判断する
手段と、この手段によりフラグメモリの非セット状態が
判断されたとき対応するフラグメモリをセットしてファ
イルメモリをアクセスする手段を設けたものである。[Means for Solving the Problem] The invention corresponding to claim (1) provides a multitasking device that executes a plurality of tasks independently and in a time-sharing manner, including a file memory shared by each task and a memory corresponding to each task. a flag memory set during task execution; a flag memory set corresponding to another task at the start of task execution; A means is provided for setting a corresponding flag memory and accessing the file memory when a non-set state is determined.
請求項(2)対応の発明は、複数のタスクを互いに独立
して時分割で実行するマルチタスク装置において、各タ
スクが共有するファイルメモリと、各タスクに共通に設
けられファイルメモリをアクセスする共通ドライバーと
、タスク実行開始時に共通ドライバーを使用中か否かを
判断する手段と、この手段により共通ドライバーが未使
用であることが判断されたときその共通ドライバーを駆
動してファイルメモリをアクセスさせる手段を設けたも
のである。The invention corresponding to claim (2) is a multitasking device that executes a plurality of tasks independently of each other in a time-sharing manner, including a file memory shared by each task, and a common device commonly provided for each task that accesses the file memory. a driver, a means for determining whether or not the common driver is in use at the start of task execution, and a means for driving the common driver to access file memory when it is determined by this means that the common driver is not in use. It has been established.
[作 用]
このような構成の本発明においては、タスク実行開始時
に他のタスクに対応して設けられたフラグメモリのセッ
ト、非セット状態を判断し、このフラグメモリの非セッ
ト状態が判断されたとき実行するタスクに対応するフラ
グメモリをセットしてファイルメモリをアクセスする。[Operation] In the present invention having such a configuration, at the start of task execution, it is determined whether a flag memory provided corresponding to another task is set or not set, and the unset state of this flag memory is determined. Set the flag memory corresponding to the task to be executed when the file memory is accessed.
これによりファイルメモリを各タスク間で共有すること
ができる。This allows file memory to be shared between tasks.
またタスク実行開始時に共通ドライバーを使用中か否か
を判断し、この共通ドライバーが未使用であることが判
断されたときその共通ドライバーを駆動してファイルメ
モリをアクセスする。これによりファイルメモリを各タ
スク間で共有することができる。Also, at the start of task execution, it is determined whether or not the common driver is in use, and when it is determined that the common driver is not in use, the common driver is driven to access the file memory. This allows file memory to be shared between tasks.
[実施fPJE 以下、本発明の一実施例を図面を参照して説明する。[Implementation fPJE Hereinafter, one embodiment of the present invention will be described with reference to the drawings.
第1図において、1は制御部本体を構成するマイクロプ
ロセッサ、2はRAM (ランダム・アクセス・メモリ
)、3はデイスプレィ4を制御するデイスプレィコント
ローラ、5は外部接続されたハンディターミナル6と情
報の通信制御を行う通信インターフェース、7はキーボ
ード8を制御するキーボードコントローラ、9はプリン
タ10を接続したI10ポート、11はノ\−ドディス
ク12を接続したI10ポートである。In FIG. 1, 1 is a microprocessor that constitutes the main body of the control unit, 2 is a RAM (random access memory), 3 is a display controller that controls a display 4, and 5 is an externally connected handy terminal 6 and information controller. 7 is a keyboard controller for controlling the keyboard 8; 9 is an I10 port to which a printer 10 is connected; and 11 is an I10 port to which a node disk 12 is connected.
前記マイクロプロセッサ1とRAM2、デイスプレィコ
ントローラ3、通信インターフェース5、キーボードコ
ントローラ7及び各I10ポート9゜11とはパスライ
ン13によって接続されている。The microprocessor 1, RAM 2, display controller 3, communication interface 5, keyboard controller 7, and each I10 port 9-11 are connected by a path line 13.
前記ハードディスク12には各種の管理データをインデ
ックスを付して格納したマスターファイル14、送信デ
ータファイル15及びコントロールファイル16が形成
されている。そして前記コントロールファイル16には
フラグメモリ(1)16a及びフラグメモリ(2)16
bが設けられている。The hard disk 12 has a master file 14 storing various management data with indexes, a transmission data file 15, and a control file 16. The control file 16 includes a flag memory (1) 16a and a flag memory (2) 16.
b is provided.
前記マイクロプロセッサ1はプログラムに基づいて各部
を制御するが、プログラムとしては例えば互いに独立し
て時分割で実行する2つのタスク(1)とタスク(2)
を使用してその各タスク(1)。The microprocessor 1 controls each part based on a program, and the program includes, for example, two tasks (1) and (2) that are executed independently and in a time-sharing manner.
Each task using (1).
(2)が共有するファイルメモリである前記送信データ
ファイル15を制御するようになっている。(2) controls the transmission data file 15 which is a shared file memory.
この制御を機能ブロックで示せば第2図に示すようにな
っており、各タスク(1)、(2)は第3図及び第4図
に示す処理を行うようになっている。This control is shown in functional blocks as shown in FIG. 2, and each task (1) and (2) performs the processing shown in FIGS. 3 and 4.
すなわちハンディターミナル6からのデータをタスク(
1)により送信データファイル15に送信し、その送信
データファイル15からデータをタスク(2)によりマ
スクファイル14に登録する場合に、タスク(1)は第
3図に示すように先ずフラグメモリ(2)をチエツクす
る。そしてフラグメモリ(2)−0、すなわち非セット
状態であればフラグメモリ(1)−1にする。In other words, the data from Handy Terminal 6 is transferred to the task (
When data is transmitted to the transmission data file 15 by task (1) and data from the transmission data file 15 is registered in the mask file 14 by task (2), task (1) first stores the flag memory (2) as shown in FIG. ). Then, if the flag memory (2) is in the non-set state, it is set to the flag memory (1)-1.
続いて再度フラグメモリ(2)をチエツクする。Subsequently, the flag memory (2) is checked again.
そしてフラグメモリ(2)−0であればノ1ンデイター
ミナル6からのデータを送信データファイル15に書込
む。そしてフラグメモリ(1)を非セット状態、すなわ
ち0にする。またフラグメモリ(2)−1であればタス
ク(2)が送信データファイル15を使用していると判
断し直ちにフラグメモリ(1)を0にして処理を終了す
る。If the flag memory (2) is -0, the data from the 1st day terminal 6 is written into the transmission data file 15. Then, the flag memory (1) is set to a non-set state, that is, to 0. If the flag memory (2) is -1, it is determined that the task (2) is using the transmission data file 15, and the flag memory (1) is immediately set to 0 to end the process.
また最初のフラグメモリ(2)のチエツクにおいてフラ
グメモリ(2)−1であればタスク(2)が送信データ
ファイル15を使用していると判断し処理を直ちに終了
させる。Further, in the first check of the flag memory (2), if the flag memory (2) is -1, it is determined that the task (2) is using the transmission data file 15, and the process is immediately terminated.
またタスク(2)は第4図に示すように先ずフラグメモ
リ(1)をチエツクする。そしてフラグメモリ(1)−
0、すなわち非セット状態であればフラグメモリ(2)
−1にする。Also, task (2) first checks flag memory (1) as shown in FIG. And flag memory (1) -
0, that is, if it is in a non-set state, the flag memory (2)
-1.
続いて再度フラグメモリ(1)をチエツクする。Subsequently, the flag memory (1) is checked again.
そしてフラグメモリ(1)−〇であれば送信データファ
イル15からのデータを呼出してマスターファイル14
に登録する。そしてフラグメモリ(2)を非セット状態
、すなわち0にする。またフラグメモリ(1)−1であ
ればタスク(1)が送信データファイル15を使用して
いると判断し直ちにフラグメモリ(2)をOにして処理
を終了する。Then, if the flag memory (1) is -0, the data from the transmission data file 15 is called and the data is stored in the master file 14.
Register. Then, the flag memory (2) is set to a non-set state, that is, to 0. If the flag memory (1) is -1, it is determined that the task (1) is using the transmission data file 15, and the flag memory (2) is immediately set to O to terminate the process.
また最初のフラグメモリ(1)のチエツクにおいてフラ
グメモリ(1)−1であればタスク(1)が送信データ
ファイル15を使用していると判断し処理を直ちに終了
させる。Further, in the first check of the flag memory (1), if the flag memory (1) is -1, it is determined that the task (1) is using the transmission data file 15, and the process is immediately terminated.
このような構成の本実施例においては、ハンディターミ
ナル6からデータを受信し、この状態でタスク(1)が
起動されると先ずフラグメモリ(2)がチエツクされる
。そしてフラグメモリ(2)−0であれば送信データフ
ァイル15はタスク(2)によって使用されていないと
判断しフラグメモリ(1)を「1」にして受信したデー
タを送信データファイル15に書込む。このデータ書込
みか終了するとフラグメモリ(1)を「0」にする。In this embodiment having such a configuration, when data is received from the handy terminal 6 and the task (1) is activated in this state, the flag memory (2) is first checked. If flag memory (2) is -0, it is determined that the transmission data file 15 is not used by task (2), and the flag memory (1) is set to "1" and the received data is written to the transmission data file 15. . When this data writing is completed, the flag memory (1) is set to "0".
またタスク(2)が起動されると先ずフラグメモリ(1
)がチエツクされる。そしてフラグメモリ(1)−0で
あれば送信データファイル15はタスク(1)によって
使用されていないと判断しフラグメモリ(2)を「1」
にして送信データファイル15からデータを呼出しマス
ターファイル14に登録する。このデータ登録が終了す
るとフラグメモリ(2)を「0」にする。Also, when task (2) is started, first the flag memory (1
) is checked. If flag memory (1) is -0, it is determined that the transmission data file 15 is not used by task (1), and flag memory (2) is set to "1".
The data is retrieved from the transmission data file 15 and registered in the master file 14. When this data registration is completed, the flag memory (2) is set to "0".
ところでタスク(1)とタスク(2)は互いに独立して
時分割で実行するタスクとなっているので、例えばタス
ク(1)の実行時にタスク(2)か起動される場合が生
しる。このような状態が生じてもタスク(1)の実行中
にはフラグメモリ(1)が「1」となっているのでタス
ク(2)が送信データファイル15をアクセスすること
は無い。また逆にタスク(2〉の実行時にタスク(1)
が起動される場合が生じる。このような状態が生じても
タスク(2)の実行中にはフラグメモリ(2)が「1」
となっているのでタスク(1)が送信データファイル1
5をアクセスすることは無い。By the way, since task (1) and task (2) are tasks that are executed independently of each other in a time-sharing manner, for example, task (2) may be activated when task (1) is executed. Even if such a state occurs, task (2) will never access the transmission data file 15 because flag memory (1) is set to "1" while task (1) is being executed. Conversely, when task (2) is executed, task (1)
may be activated. Even if such a state occurs, the flag memory (2) remains "1" while task (2) is being executed.
Therefore, task (1) is the send data file 1.
5 is never accessed.
このように共有ファイルである送信データファイル15
に対してタスク(1)とタスク(2)を排他的に制御す
ることができ、十分なマルチタスクシステムを構築する
ことができる。In this way, the transmission data file 15 which is a shared file
Task (1) and task (2) can be exclusively controlled, and a sufficient multitasking system can be constructed.
なお、前記マスターファイル14、送信データファイル
15及びコントロールファイル16は必ずしもハードデ
ィスク上に設ける必要はなく、例えばRAM上に設けた
ものであってもよい。Note that the master file 14, transmission data file 15, and control file 16 do not necessarily need to be provided on a hard disk, and may be provided on, for example, a RAM.
次に本発明の他の実施例を図面を参照して説明する。Next, other embodiments of the present invention will be described with reference to the drawings.
これは第5図に機能ブロックを示すように、タスク(1
)及びタスク(2)がシステムメモリ18を共有ファイ
ルとして使用する場合で、これは各タスクの共通ドライ
バーとしてルーチンコール部19を設けている。As shown in the functional block in Figure 5, this task (1
) and task (2) use the system memory 18 as a shared file, in which a routine call unit 19 is provided as a common driver for each task.
そしてこのルーチンコール部19においては第6図に示
す割込みルーチンを実行するようになっている。This routine call section 19 is designed to execute an interrupt routine shown in FIG.
すなわち先ず割込み禁止をかけ、レジスタ退避を行う。That is, first, interrupts are disabled and registers are saved.
続いてコントロールファイル16に設けられた使用中フ
ラグメモリをチエツクし、使用中フラグメモリー1であ
れば相手側タスクがシステムメモリ18を使用中である
と判断し直ちにレジスタ復帰を行って割込みを許可し処
理を終了する。Next, the in-use flag memory provided in the control file 16 is checked, and if the in-use flag memory is 1, it is determined that the other task is using the system memory 18, and the register is immediately restored to enable interrupts. Finish the process.
また使用中フラグメモリー〇であれば使用中フラグメモ
リを「1」にして割込みを許可し、モードチエツクを行
う。タスク(1)の場合はモードがライトとなっている
のでシステムメモリ18の指定エリアであるデータN(
LXにハンディターミナル6からのデータを書込む。ま
たタスク(2)の場合はモードがリードとなっているの
でシステムメモリ18の指定エリアであるデータ臘Xか
らデータを呼出しマスターファイル14に登録する。If the in-use flag memory is 0, the in-use flag memory is set to "1" to permit interrupts and a mode check is performed. In the case of task (1), the mode is write, so data N(
Write the data from the handy terminal 6 to the LX. Further, in the case of task (2), since the mode is read, data is retrieved from the designated area of the system memory 18, ie, the data area X, and is registered in the master file 14.
そしてこの処理が終了すると割込み禁止をかけ使用中フ
ラグメモリを「0」にし、レジスタ復帰を行って割込み
を許可し処理を終了する。When this process is completed, interrupts are disabled, the in-use flag memory is set to "0", registers are restored, interrupts are enabled, and the process ends.
このような構成の本実施例においては、例えばタスク(
1)がルーチンコール部19を起動したときタスク(2
)がルーチンコール部19を起動していなければ使用中
フラグメモリー〇となっているのでこのときにはタスク
(1)によりハンディターミナル6からのデータをシス
テムメモリ18のデータNO,Xに書込むことができる
。In this embodiment with such a configuration, for example, a task (
When task (1) starts the routine call section 19, task (2)
) has not activated the routine call unit 19, the in-use flag memory is set to 0, and in this case, the data from the handy terminal 6 can be written to the data No. and X of the system memory 18 by task (1). .
またタスク(2〉がルーチンコール部19を起動したと
きタスク(1)がルーチンコール部1つを起動していな
ければ使用中フラグメモリー〇となっているのでこのと
きにはタスク(2)によりシステムメモリ18のデータ
NO,Xからデータを呼出してマスターファイル14に
登録することができる。Also, when task (2) starts the routine call section 19, if task (1) has not started one routine call section, the in-use flag memory is set to 〇. The data can be read from the data NO, X and registered in the master file 14.
またタスク(2)かシステムメモリ18のデータNCL
xからデータを呼出してマスターファイル14に登録し
ている最中にタスク(1)がルーチンコール部19を起
動したときには使用中フラグメモリー1となっているの
でこのときにはタスク(1)によるシステムメモリ18
のアクセスは禁止される。Also, task (2) or data NCL of system memory 18
When task (1) starts the routine call section 19 while calling data from x and registering it in the master file 14, the in-use flag memory 1 is set, so at this time, the system memory 18 by task (1)
access is prohibited.
このように本実施例においても共有ファイルであるシス
テムメモリ18に対してタスク(1)とタスク(2)を
排他的に制御することができ、十分なマルチタスクシス
テムを構築することができる。In this way, also in this embodiment, task (1) and task (2) can be exclusively controlled with respect to the system memory 18, which is a shared file, and a sufficient multitasking system can be constructed.
なお、前記実施例においては互いに独立して時分割で実
行する2つのタスクを使用した場合について述べたが必
ずしもこれに限定されるものではなく、3つ以上のタス
クを使用したものであっても同様の作用効果が得られる
ものである。In addition, in the above embodiment, a case was described in which two tasks are executed independently of each other in a time-sharing manner, but the invention is not necessarily limited to this, and even if three or more tasks are used. Similar effects can be obtained.
[発明の効果]
以上詳述したように本発明によれば、複数のタスクを互
いに独立して時分割で実行できるアプリケーションソフ
トを使用して十分なマルチタスクシステムを構築するこ
とができるマルチタスク装置を提供できるものである。[Effects of the Invention] As detailed above, according to the present invention, there is provided a multitasking device that can construct a sufficient multitasking system using application software that can execute multiple tasks independently and time-sharingly. It is possible to provide
第1図乃至第4図は本発明の一実施例を示すもので、第
1図はブロック図、第2図は要部制御を説明するための
機能ブロック図、第3図及び第4図はタスク処理を示す
流れ図、第5図及び第6図は本発明の他の実施例を示す
もので、第5図は要部制御を説明するための機能ブロッ
ク図、第6図は割込みルーチンを示す流れ図である。
1・・・マイクロプロセッサ、
14・・・マスターファイル、
15・・・送信データファイル、
16a、16b−フラグ、
18・・・システムメモリ、
19・・・ルーチンコール部。
出願人代理人 弁理士 鈴江武彦
第1@
第2図
第5@1 to 4 show one embodiment of the present invention, FIG. 1 is a block diagram, FIG. 2 is a functional block diagram for explaining main part control, and FIGS. 3 and 4 are Flowcharts showing task processing, FIGS. 5 and 6 show other embodiments of the present invention, FIG. 5 is a functional block diagram for explaining main part control, and FIG. 6 shows an interrupt routine. This is a flowchart. DESCRIPTION OF SYMBOLS 1... Microprocessor, 14... Master file, 15... Transmission data file, 16a, 16b-flag, 18... System memory, 19... Routine call section. Applicant's agent Patent attorney Takehiko Suzue No. 1 @ Figure 2 Figure 5 @
Claims (2)
マルチタスク装置において、各タスクが共有するファイ
ルメモリと、各タスクに対応してそれぞれ設けられ、タ
スク実行中セットされるフラグメモリと、タスク実行開
始時に他のタスクに対応して設けられたフラグメモリの
セット、非セット状態を判断する手段と、この手段によ
りフラグメモリの非セット状態が判断されたとき対応す
るフラグメモリをセットして前記ファイルメモリをアク
セスする手段を設けたことを特徴とするマルチタスク装
置。(1) In a multitasking device that executes multiple tasks independently of each other in a time-sharing manner, a file memory shared by each task, a flag memory provided corresponding to each task and set during task execution, Means for determining whether a flag memory provided corresponding to another task is set or not set at the start of task execution, and setting the corresponding flag memory when the unset state of the flag memory is determined by this means. A multitasking device comprising means for accessing the file memory.
マルチタスク装置において、各タスクが共有するファイ
ルメモリと、各タスクに共通に設けられ前記ファイルメ
モリをアクセスする共通ドライバーと、タスク実行開始
時に前記共通ドライバーを使用中か否かを判断する手段
と、この手段により前記共通ドライバーが未使用である
ことが判断されたときその共通ドライバーを駆動して前
記ファイルメモリをアクセスさせる手段を設けたことを
特徴とするマルチタスク装置。(2) In a multitasking device that executes multiple tasks independently of each other in a time-sharing manner, a file memory shared by each task, a common driver provided in common to each task that accesses the file memory, and task execution start means for determining whether or not the common driver is currently in use, and means for driving the common driver to access the file memory when it is determined by this means that the common driver is not in use. A multitasking device characterized by:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP29359190A JPH04168532A (en) | 1990-11-01 | 1990-11-01 | Multi-task device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP29359190A JPH04168532A (en) | 1990-11-01 | 1990-11-01 | Multi-task device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH04168532A true JPH04168532A (en) | 1992-06-16 |
Family
ID=17796704
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP29359190A Pending JPH04168532A (en) | 1990-11-01 | 1990-11-01 | Multi-task device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH04168532A (en) |
-
1990
- 1990-11-01 JP JP29359190A patent/JPH04168532A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0464615B1 (en) | Microcomputer equipped with DMA controller | |
| JPH05282260A (en) | Computer network and its operation method | |
| JPH0496163A (en) | Dma controller | |
| JPH0425957A (en) | Data transfer controller | |
| JPH0798663A (en) | Asynchronous I / O control method | |
| US5640598A (en) | Data transfer processing system | |
| JP3043881B2 (en) | Data processing system using shared files | |
| JPH03260838A (en) | Limiting system for cpu using time | |
| JP4535663B2 (en) | State machine control method and state machine | |
| JP3139310B2 (en) | Digital signal processor | |
| JPS6378253A (en) | Program loading system | |
| JPH02211575A (en) | Multi-processor type information processor | |
| JP3228575B2 (en) | Data communication method | |
| JPH11353193A (en) | Multiprogramming execution control method | |
| JP2002196938A (en) | Device for exception handling flow and its handling execution method | |
| JP2003067190A (en) | Program transfer control device | |
| JPH0376499B2 (en) | ||
| JPS638506B2 (en) | ||
| JP2000010899A (en) | Input/output processing system and its peripheral device control method, and recording medium where its control program is recorded | |
| KR20030035668A (en) | Method of Managing Common Memory Between Device | |
| JPH04342011A (en) | Asynchronous input/output controlling system | |
| JPH02310606A (en) | Method for setting data of positioning controller | |
| JPH01281531A (en) | Program loading system | |
| JPH0424733B2 (en) | ||
| JPH0667903A (en) | Pseudo task swapping system |