JPH08297580A - Input/output control method - Google Patents

Input/output control method

Info

Publication number
JPH08297580A
JPH08297580A JP10361395A JP10361395A JPH08297580A JP H08297580 A JPH08297580 A JP H08297580A JP 10361395 A JP10361395 A JP 10361395A JP 10361395 A JP10361395 A JP 10361395A JP H08297580 A JPH08297580 A JP H08297580A
Authority
JP
Japan
Prior art keywords
input
user program
specific user
output device
processing
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.)
Withdrawn
Application number
JP10361395A
Other languages
Japanese (ja)
Inventor
Takeshi Miyamoto
宮本  剛
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP10361395A priority Critical patent/JPH08297580A/en
Publication of JPH08297580A publication Critical patent/JPH08297580A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE: To enable a program of user level to handle data that need to be inputted or outputted in real time in case of emergency by resetting privilege protection according to mode transition, allocating a CPU resource preferentially to a specific user program, and making the specific user program have an input/output device directly under its control. CONSTITUTION: If an emergent event which requires real-time processing is generated, an OS 15 freezes and saves a program which currently runs in a memory or secondary storage, and releases the input/output device where the event occurs from being protected. Further, the specific user program 19 is given priority which is high enough to process the event, and the control is passed to the specific user program 19. Requests to other lower-speed input/ output devices are held thereafter by the OS 15. Then, the user program 19 accesses the input/output device directly to perform processing preferentially. After the processing ends, the specific user program 19 returns the control to the OS 15.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はワークステーションやパ
ーソナルコンピュータ等の高性能電子機器における入出
力装置の制御方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of controlling an input / output device in a high performance electronic device such as a workstation or a personal computer.

【0002】[0002]

【従来の技術】マルチユーザ/マルチタスクを提供して
いるシステムにおいて、(1)入出力処理はOS(オペ
レーティングシステム)が行なうものであり、OSは特
権モードで動作するプログラムなので、非特権モードで
動作するユーザプログラムは直接入出力装置からデータ
を読み込んだり、データを書き出すことができなかっ
た。そのためユーザプログラムが入出力を行なう場合
は、OSに対してSVC(スーパバイザコール)を発行
する必要があった。SVCは動作モードを切替えなけれ
ばならないため、現在のユーザプログラムの動作環境
(コンテクスト)をメモリにセーブする必要があり、コ
ンテクスト情報が多い場合やたびたびSVCを実行する
と、その処理に大変な時間を取られていた。
2. Description of the Related Art In a system providing multi-user / multi-task, (1) I / O processing is performed by an OS (operating system), and since the OS operates in privileged mode, The operating user program could not directly read or write data from the input / output device. Therefore, when the user program inputs and outputs, it is necessary to issue an SVC (supervisor call) to the OS. Since the SVC has to switch the operation mode, it is necessary to save the current operating environment (context) of the user program in the memory. If there is a lot of context information or if the SVC is executed frequently, it takes a lot of time to process it. It was being done.

【0003】(2)SVCを発光したユーザプログラム
は、OSが実際に入出力装置を制御し、データを読み込
んで、読み込んだデータをユーザプログラムに渡してく
れるまで、またはユーザプログラムがOSに渡したデー
タを実際に入出力装置に書き出し、書き出しが完了した
ことをOSから通知されるまで待機するというのが常で
あり、入出力処理時間がシステムの環境または負荷状況
によって異なっていた。という問題点を持っていた。
(2) Until the OS actually controls the input / output device and reads the data and passes the read data to the user program, or the user program passed the OS to the user program that emitted the SVC. It is usual to actually write data to an I / O device and wait until the OS notifies that the writing is completed, and the I / O processing time was different depending on the system environment or load condition. I had the problem.

【0004】[0004]

【発明が解決しようとしている課題】しかしながら、上
記従来例では、ユーザプログラムが直接入出力装置にア
クセスできないことやユーザレベルの高速な割り込み処
理を既存のCPUアーキテクチャ上で実現するのは不可
能であることなどから、確実にある時間までにある特定
のユーザプログラムが入出力処理を完了していることを
決定することができず、音声データや画像データのよう
な時間に依存した入出力データを実時間に沿って処理す
ることができないという欠点があった。
However, in the above-mentioned conventional example, it is impossible for the user program to directly access the input / output device and to realize high-speed interrupt processing at the user level on the existing CPU architecture. Therefore, it is not possible to reliably determine that a specific user program has completed input / output processing by a certain time, and execute time-dependent input / output data such as audio data or image data. It has the drawback that it cannot be processed in time.

【0005】本発明の目的は以上のような問題を解消し
た入出力制御を提供することにある。
An object of the present invention is to provide input / output control that solves the above problems.

【0006】[0006]

【課題を解決するための手段(及び作用)】本発明は、
実時間処理の必要となる入力装置に対してモード遷移を
起こさせる手段および、特定のユーザプログラムから実
時間処理の必要となった入出力装置をOSに通知し、モ
ード遷移を起こさせる手段と、モード遷移によって、入
出力装置を特定のユーザプログラムがアクセスできるよ
うに特権保護を外し、CPU資源を優先的に特定ユーザ
プログラムに割り当て、かつ特定のユーザプログラムが
直接入出力装置を支配下に置けるようにする手段と、実
時間処理が終了した場合に、CPU資源および入出力装
置を解放し、入出力装置を元の保護モードに戻す手段、
を備えたことにより実現する。
Means (and Action) for Solving the Problems
Means for causing a mode transition to an input device requiring real-time processing, and means for notifying the OS of an input / output device requiring a real-time processing from a specific user program and causing a mode transition, Mode transition removes privilege protection so that a specific user program can access the I / O device, preferentially allocates CPU resources to the specific user program, and allows the specific user program to directly control the I / O device. Means for releasing the CPU resources and the I / O device and returning the I / O device to the original protection mode when the real-time processing is completed,
It is realized by having.

【0007】[0007]

【実施例】図1は本発明の特徴を最もよく表わす図面で
ある。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a drawing which best represents the features of the present invention.

【0008】図1の上部に示されているのが通常の入出
力モードであり、オペレーティングシステム以下OSと
呼ぶOSが全ての入出力装置を管理しており、全て特権
モードでアクセスされるようにOSによって保護されて
おり、これらの装置を直接アクセスするユーザプログラ
ムはOSによって、強制終了させられる。
A normal input / output mode is shown in the upper part of FIG. 1, and an operating system (hereinafter referred to as an OS) manages all input / output devices so that all are accessed in a privileged mode. User programs that are protected by the OS and that directly access these devices are forcibly terminated by the OS.

【0009】実時間の沿った処理が必要な入出力装置か
らの入力イベントの通知や、特定のユーザプログラムか
らの特定の入出力装置の支配依頼がOSに通知される
と、OSは図1の下部に示されている緊急の入出力モー
ドに遷移し、指定された入出力装置の特権保護を解除
し、ユーザプログラムが直接入出力装置を扱える状態に
なる。
When a notification of an input event from an input / output device that requires real-time processing or a request for control of a specific input / output device from a specific user program is sent to the OS, the OS displays the information shown in FIG. The system transits to the emergency I / O mode shown at the bottom, removes the privilege protection of the specified I / O device, and the user program can directly handle the I / O device.

【0010】しかも、OSは特定のユーザプログラムに
高いプライオリティを与えて、ユーザプログラムに制御
を渡すので、優先的にCPUを使用でき、実時間に沿っ
た処理が可能になる。
Moreover, since the OS gives a high priority to a specific user program and passes control to the user program, the CPU can be preferentially used and the processing in real time becomes possible.

【0011】さらに、処理が終了した場合、緊急処理モ
ードの前に状態に復帰することによって、より柔軟なマ
ルチユーザ/マルチタスク環境もまた提供できることに
なる。
Furthermore, by returning to the state before the emergency processing mode when the processing is completed, a more flexible multi-user / multi-task environment can also be provided.

【0012】図2は緊急入力処理の場合、制御および入
出力データの流れを示している。
FIG. 2 shows the flow of control and input / output data in the case of emergency input processing.

【0013】図2において、実時間処理を必要とする緊
急のイベントが発生すると、OSは現在まで動作してい
たプログラムを凍結し、メモリ中または2次記憶に退避
し、イベントが発生した入出力装置に対する保護を外
す。
In FIG. 2, when an urgent event requiring real-time processing occurs, the OS freezes the program that has been operating up to now and saves it in the memory or the secondary storage, and the input / output at which the event occurred. Remove protection from equipment.

【0014】さらに、イベントを処理するに必要なだけ
のプライオリティを特定ユーザプログラムに設定し、制
御を特定ユーザプログラムに渡す。
Further, the priority required for processing the event is set in the specific user program, and control is passed to the specific user program.

【0015】これ以降はその他の低速な入出力装置への
要求はOSで保留にする。
Thereafter, the OS suspends requests for other low-speed I / O devices.

【0016】その後、そのユーザプログラムは直接入出
力装置にアクセスして、優先的に処理を行なう。処理が
完了すると、特定ユーザプログラムはOSに制御を戻
す。
After that, the user program directly accesses the input / output device and preferentially performs the processing. When the processing is completed, the specific user program returns control to the OS.

【0017】その後OSは入出力装置の保護を元に戻
し、必要なら、凍結させられたプログラムにCPU資源
を割り当てて制御を移すか、保留状態の低速入出力処理
を行なうなどして、通常のOSの処理に戻る。
After that, the OS restores the protection of the input / output device to its original state, and if necessary, allocates CPU resources to the frozen program to transfer control, or performs a low-speed input / output processing in a suspended state, thereby performing normal operation. Return to the processing of the OS.

【0018】図3は緊急出力処理の場合の、制御および
入出力データの流れを示している。
FIG. 3 shows the flow of control and input / output data in the case of emergency output processing.

【0019】図3において、特定のユーザプログラムが
特定の入出力装置を優先的に占有したい場合、まずOS
にそのことを通知する。OSは可能なら、指定された入
出力装置に対する保護を外し、出力処理に必要なだけの
プライオリティを設定し、特定ユーザプログラムに制御
を戻す。入力処理と同様にこれ以降はその他の低速な入
出力装置への要求は保留になる。
In FIG. 3, when a specific user program preferentially occupies a specific input / output device, first the OS
Notify that to. If possible, the OS removes protection from the designated input / output device, sets the priority required for output processing, and returns control to the specific user program. Similar to the input processing, requests for other low-speed I / O devices are suspended thereafter.

【0020】特定ユーザプログラムは直接入出力装置に
アクセスして、優先的に処理を行ない、処理が終了する
と、OSにその制御を戻す。
The specific user program directly accesses the input / output device to preferentially perform the processing, and when the processing is completed, returns the control to the OS.

【0021】OSは指定された入出力装置の保護を元に
戻し、必要なら特定のユーザプログラムのプライオリテ
ィを元に戻すか、保留状態の低速入出力処理を行なうな
どして、通常のOSの処理に戻る。
The OS restores the protection of the designated I / O device, restores the priority of the specific user program if necessary, or performs the low-speed I / O processing in the pending state to perform normal OS processing. Return to.

【0022】さらに、前もって入力処理の開始時間が分
かっている場合も、あらかじめ特定ユーザプログラムに
制御を渡しておいて、優先的に処理するといったことも
同様に可能である。
Further, even when the start time of the input process is known in advance, it is possible to give control to a specific user program in advance and process it preferentially.

【0023】〔他の実施例〕マルチプロセッサ構成のシ
ステムにおいては、あらかじめ、この特定プログラム起
動時に固定のCPUを割り当てておくことによって、他
のプログラムと並行処理することも可能となり、走行中
の他のプログラムに影響を与えることなし、実時間に沿
った入出力処理を行なうことが可能になる。
[Other Embodiments] In a multi-processor system, by assigning a fixed CPU in advance when this specific program is started, it is possible to perform parallel processing with other programs, and it is possible to perform parallel processing with other programs. It is possible to perform input / output processing in real time without affecting the program.

【0024】[0024]

【発明の効果】以上の説明から明らかなように、本発明
によれば、マルチユーザ/マルチタスクの環境下におい
て、緊急時には、ユーザレベルのプログラムが音声デー
タや画像データなどの実時間に沿った入出力処理を必要
とするデータを取り扱うことができるので、より柔軟な
システム構成を実現することが可能である。要するに、
本発明はその趣旨を逸脱しない範囲で、種々に変形して
実施することが可能である。
As is apparent from the above description, according to the present invention, in an environment of multi-user / multi-task, in an emergency, a user-level program can follow the real time such as voice data and image data. Since data that requires input / output processing can be handled, a more flexible system configuration can be realized. in short,
The present invention can be variously modified and implemented without departing from the spirit of the present invention.

【図面の簡単な説明】[Brief description of drawings]

【図1】本実施例の特徴を表す図面である。FIG. 1 is a drawing showing the features of the present embodiment.

【図2】本実施例の入力処理を表す図である。FIG. 2 is a diagram showing an input process of this embodiment.

【図3】出力処理を表す図である。FIG. 3 is a diagram illustrating an output process.

【符号の説明】[Explanation of symbols]

11、15 オペレーティングシステム 12 入出力装置群 13、18 普通のユーザプログラム 16 入出力装置群 17 入出力装置群 14、19 特定のユーザプログラム 11, 15 operating system 12 input / output device group 13, 18 ordinary user program 16 input / output device group 17 input / output device group 14, 19 specific user program

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 実時間処理の必要となる入出力装置に対
してモード遷移を起こさせる手段と、 特定のユーザプログラムから実時間処理の必要となった
入出力装置をオペレーティングシステムに通知し、モー
ド遷移を起こさせる手段と、 モード遷移によって、入出力装置を特定のユーザプログ
ラムがアクセスできるように特権保護を外し、CPU資
源を優先的に特定ユーザプログラムに割り当て、かつ特
定のユーザプログラムが直接入出力装置を支配下に置け
るようにする手段と、 実時間処理が終了した場合に、CPU資源及び入出力装
置を解放し、入出力装置を元の保護モードに戻す手段と
を備えた入出力制御装置。
1. A means for causing a mode transition for an input / output device that requires real-time processing, and a specific user program that notifies the operating system of the input / output device that requires real-time processing, By means of causing a transition and mode transition, privilege protection is removed so that a specific user program can access the I / O device, CPU resources are preferentially allocated to the specific user program, and the specific user program directly inputs and outputs. An input / output control device having means for putting the device under control and means for releasing the CPU resource and the input / output device and returning the input / output device to the original protection mode when the real-time processing is completed. .
【請求項2】 実時間処理の必要となる入出力装置に対
してモード遷移を起こさせる手段と、 特定のユーザプログラムから実時間処理の必要となった
入出力装置をオペレーティングシステムに通知し、モー
ド遷移を起こさせるモード遷移工程と、 モード遷移によって、入出力装置を特定のユーザプログ
ラムがアクセスできるように特権保護を外し、CPU資
源を優先的に特定ユーザプログラムに割り当て、かつ特
定のユーザプログラムが直接入出力装置を支配下に置く
工程と、 実時間処理が終了した場合に、CPU資源及び入出力装
置を解放し、入出力装置を元の保護モードに戻す工程と
を備えた入出力制御方法。
2. A means for causing a mode transition to an input / output device requiring real-time processing, and a specific user program notifying the operating system of the input / output device requiring real-time processing, The mode transition process that causes a transition and the mode transition remove the privilege protection so that a specific user program can access the I / O device, preferentially allocate CPU resources to the specific user program, and the specific user program directly An I / O control method comprising the steps of placing the I / O device under control and releasing the CPU resources and I / O device to return the I / O device to the original protection mode when the real-time processing is completed.
JP10361395A 1995-04-27 1995-04-27 Input/output control method Withdrawn JPH08297580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10361395A JPH08297580A (en) 1995-04-27 1995-04-27 Input/output control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10361395A JPH08297580A (en) 1995-04-27 1995-04-27 Input/output control method

Publications (1)

Publication Number Publication Date
JPH08297580A true JPH08297580A (en) 1996-11-12

Family

ID=14358631

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10361395A Withdrawn JPH08297580A (en) 1995-04-27 1995-04-27 Input/output control method

Country Status (1)

Country Link
JP (1) JPH08297580A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11272828A (en) * 1998-02-06 1999-10-08 Koninkl Philips Electronics Nv Chip card having integrated circuit
KR100663654B1 (en) * 1998-06-30 2007-01-03 소니 가부시끼 가이샤 Information processing apparatus, information processing method, and recording medium
US8789064B2 (en) 2008-10-30 2014-07-22 Ntt Docomo, Inc. Mobile device and application switching method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11272828A (en) * 1998-02-06 1999-10-08 Koninkl Philips Electronics Nv Chip card having integrated circuit
KR100663654B1 (en) * 1998-06-30 2007-01-03 소니 가부시끼 가이샤 Information processing apparatus, information processing method, and recording medium
US8789064B2 (en) 2008-10-30 2014-07-22 Ntt Docomo, Inc. Mobile device and application switching method

Similar Documents

Publication Publication Date Title
US6006247A (en) Method and system for scheduling threads and handling exceptions within a multiprocessor data processing system
JP3659062B2 (en) Computer system
KR101366075B1 (en) Method and apparatus for migrating task in multicore platform
US8898666B2 (en) Virtual machine system and virtual machine system control method for controlling program execution on a plurality of processors that have a plurality of privileged modes
US5799188A (en) System and method for managing variable weight thread contexts in a multithreaded computer system
US7853743B2 (en) Processor and interrupt controlling method
US20110107344A1 (en) Multi-core apparatus and load balancing method thereof
KR20010070469A (en) Device and method for performing high-speed low overhead context switch
JP3938343B2 (en) Task management system, program, and control method
WO2024119988A1 (en) Process scheduling method and apparatus in multi-cpu environment, electronic device, and medium
WO2022121866A1 (en) Acceleration card-based service running method, apparatus, electronic device, and computer-readable storage medium
US5896520A (en) Virtual computer system of multi-processor constitution
JPS63310051A (en) Method and apparatus for executing input/output process containing program input/output instruction
JP2006243864A (en) Processor and information processing method
CN113535341B (en) Method and device for realizing interrupt communication between CPU cores under Linux
JPH08297580A (en) Input/output control method
JP3893136B2 (en) Embedded computer control program, recording medium recording the program, and embedded system
US11385927B2 (en) Interrupt servicing in userspace
US6920513B2 (en) Bus management techniques
KR100651722B1 (en) Method of configuring Linux kernel for supporting real time performance and test method for supporting real time performance
KR100506254B1 (en) Apparatus and method for handling interrupt in non-privileged of embedded system
US9678795B2 (en) Direct ring 3 submission of processing jobs to adjunct processors
JPH09160790A (en) Device and method for task schedule
JP2001229038A (en) Multi-operating computer system
JPH06324888A (en) Scheduling system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020702