JP2020052608A - Information processor and information processing method and program - Google Patents
Information processor and information processing method and program Download PDFInfo
- Publication number
- JP2020052608A JP2020052608A JP2018179987A JP2018179987A JP2020052608A JP 2020052608 A JP2020052608 A JP 2020052608A JP 2018179987 A JP2018179987 A JP 2018179987A JP 2018179987 A JP2018179987 A JP 2018179987A JP 2020052608 A JP2020052608 A JP 2020052608A
- Authority
- JP
- Japan
- Prior art keywords
- exception
- storage device
- external storage
- unmount
- information 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.)
- Pending
Links
Images
Landscapes
- Facsimiles In General (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
Abstract
Description
本発明は、情報処理装置、情報処理方法及びプログラムに関する。 The present invention relates to an information processing device, an information processing method, and a program.
Universal Serial Bus(以下 USB)のI/Fが搭載されているホストコンピュータでは、USBストレージや、USBカードリーダ等を接続し、ホストコンピュータの1つのデバイスとして使用することが可能である。USBメモリのような外部記憶装置を接続して使用する場合は、コンピュータのオペレーティングシステムが、接続された外部記憶装置をシステムに接続する、マウントと呼ばれる処理を実行する。マウントを行うことで、データの読み出しや書き込みを実行することができるようになる。USBメモリに対してデータを書き込む際は、ライトキャッシュと呼ばれるキャッシュに一時的に書き込みデータが保持される。 In a host computer equipped with a Universal Serial Bus (USB) I / F, a USB storage, a USB card reader, or the like can be connected and used as one device of the host computer. When an external storage device such as a USB memory is connected and used, an operating system of a computer executes a process called mounting for connecting the connected external storage device to the system. By performing mounting, data can be read or written. When writing data to a USB memory, the write data is temporarily stored in a cache called a write cache.
USBメモリの着脱は簡単に行うことができるが、データの書き込み中等に取り外しを行ってしまうとUSBメモリ内部のデータを破壊してしまう場合がある。これは、ライトキャッシュに書き込まれていないデータが存在している時にUSBメモリを取り外してしまった時等に起こり得る。そこで、システムは、アンマウントと呼ばれる、USBメモリを安全に取り外すための処理を行う。アンマウントを実行することでUSBメモリ内のデータを一貫性がある状態にし、USBメモリとシステムとの接続を切り離すことができる。 The USB memory can be easily attached and detached. However, if the USB memory is detached while data is being written, data in the USB memory may be destroyed. This can occur, for example, when the USB memory is removed while there is data that has not been written to the write cache. Therefore, the system performs a process called unmount for safely removing the USB memory. Executing the unmount makes the data in the USB memory consistent, and disconnects the USB memory from the system.
特許文献1には、ユーザからの明示的な指示を必要とせず、複数のアプリケーションが独立して外部記憶装置のマウント及びアンマウントをオペレーティングシステムに要求する技術が開示されている。
一般に、USBメモリを取り外す際には、ユーザは、ユーザインタフェースを利用して、USBメモリのアンマウント処理を装置に指示する。そして、指示を受けたアプリケーションがオペレーティングシステムに対してアンマウント処理を実行させる。しかしながら、アンマウントの要求を行うアプリケーションが例外処理の発生といった予期せぬ原因により停止した場合には、アンマウント処理を行うことができないという問題があった。 Generally, when removing a USB memory, a user uses a user interface to instruct the device to unmount the USB memory. Then, the application that has received the instruction causes the operating system to execute the unmount processing. However, if the application that makes the unmount request stops due to an unexpected cause such as the occurrence of exception processing, there is a problem that the unmount processing cannot be performed.
本発明はこのような問題点に鑑みなされたもので、アプリケーションがアンマウントの要求を行うことができない場合であっても、適切に情報処理装置から外部記憶装置を取り外すことができるようにすることを目的とする。 The present invention has been made in view of such a problem, and has an object to enable an external storage device to be appropriately detached from an information processing apparatus even when an application cannot make an unmount request. Aim.
そこで、本発明は、外部記憶装置を装着可能な情報処理装置であって、前記外部記憶装置の取り外しの指示を受け付けるためのユーザインタフェースの表示を制御するプロセスの実行中に、前記プロセスに係る例外処理が発生したか否かを判定する例外判定手段と、前記例外判定手段により前記例外処理が発生したと判定された場合に、前記外部記憶装置のアンマウント処理を実行する実行手段とを備えることを特徴とする。 Therefore, the present invention is directed to an information processing apparatus to which an external storage device can be attached, wherein an exception related to the process is performed during execution of a process for controlling display of a user interface for receiving an instruction to remove the external storage device. An exception determining unit that determines whether a process has occurred; and an executing unit that executes an unmount process of the external storage device when the exception determining unit determines that the exception process has occurred. Features.
本発明によれば、アプリケーションがアンマウントの要求を行うことができない場合であっても、適切に情報処理装置から該部記憶装置を取り外すことができるようにすることができる。 According to the present invention, even when an application cannot make an unmount request, it is possible to appropriately remove the unit storage device from the information processing device.
以下、本発明の実施形態について図面に基づいて説明する。
図1は、画像形成装置1のハードウェア構成図である。なお、画像形成装置1は、情報処理装置の一例である。CPU101は、画像形成装置1の全体を制御する。システムバス102は、ユニット同士を接続する。HDD103は、各種情報やプログラムを格納する。なお、画像形成装置1は、HDD103に替えて、又はHDD103と供にSolid State Drive(以下SSD)等の大容量不揮発メモリを備えてもよい。RAM104は、CPU101の主メモリ、ワークエリア等の一時記憶領域として用いられる。なお、後述する画像形成装置1の機能や処理は、CPU101がHDD103等に格納されているプログラムを読み出し、このプログラムを実行することにより実現されるものである。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a hardware configuration diagram of the
ネットワークコントローラI/F106は、ネットワーク上の他の機器との通信を行う。ネットワークコントローラ105は、ネットワークコントローラI/F106を制御する。USBホストI/F108は、USBメモリとの通信を制御する。USBホストI/F108はUSBケーブルを使用してUSBメモリと接続されるものとするが、他の例としては、USBケーブルを使用せず直接USBメモリと接続してもよい。USBホストコントローラ107は、USBホストI/F108を制御する。なお、図1においては、1つのUSBホストI/F108のみ示しているが画像形成装置1は、複数のUSBホストI/Fを有するものとする。このように画像形成装置1は、USBメモリを装着可能である。なお、USBメモリは、外部記憶装置の一例である。
The network controller I /
ディスプレイ111は、各種情報を表示する。ディスプレイ111は、例えば画像形成装置1の動作状況を表示する。ディスプレイコントローラ110は、ディスプレイ111を制御する。入力部113は、ユーザからの指示を受け付ける。入力部113は、例えばタッチパネルやハードキー等である。入力部コントローラ112は、入力部113を制御する。
The
クロック(RCT)114は、時計機能であり、アラーム機能、タイマー機能等を有する。不揮発性メモリ115は、各種情報を記憶する。不揮発性メモリ115は、Static Random Access Memory(以下SRAM)や、Electrically Erasable Programmable Read Only Memory(以下EEPROM)等であってもよい。スキャナ117は、画像を読み取る。スキャナI/F116は、スキャナ117を制御する。プリンタ119は、画像を形成する。プリンタI/F118は、プリンタ119を制御する。
The clock (RCT) 114 is a clock function, and has an alarm function, a timer function, and the like. The
図2は、画像形成装置1のソフトウェアモジュールの構成図である。図2に示す各モジュールは、CPU101により実現される。オペレーティングシステム(OS)201は、CPU101やRAM104等のハードウェアリソースを管理しており、他のソフトウェアモジュール(以下プロセス)はOS201によって割り当てられたリソースを使用して動作する。
FIG. 2 is a configuration diagram of a software module of the
OS201は、USBメモリが画像形成装置1に接続されるとマウント処理を行い、アプリケーション(プロセス)がUSBメモリにアクセスできるように画像形成装置1との接続を行う。UI/Job実行プロセス202は、USBメモリの取り外しの指示を受け付けるためのユーザインタフェース(UI)をディスプレイ111に表示すると共に、プリントやスキャンといったジョブを実行するためのプロセスである。ここで、マウントとは、USBメモリを含む物理的なデバイスを、OS201が、ファイルシステムにより管理されるマウントポイントに対応付けることである。たとえば識別子の、一例としては次がある。/dev/usb1というデバイスが、マウントポイント/media/usbdriveに所定のファイルシステムの形式でマウントされたとする。マウント後、OS201は、/media/usbdrive以下のディレクトリを論理的なドライブとして取り扱うことができるようになる。また、アンマウントを実行すると、マウントされたデバイスがアンマウントされ、ファイルシステムから切り離される。
The
例外ハンドラ登録プロセス203は、例外処理が発生した時に実行される例外ハンドラを有し、他のプロセスから例外ハンドラの登録要求があった場合に、例外ハンドラを登録する機能を有する。例外処理監視プロセス204は、例外処理が発生したことを検知するためのプロセスである。Job管理プロセス205は、UI/Job実行プロセス202によって実行されるジョブの実行順やジョブ種を管理するプロセスである。
The exception
図3は、ディスプレイ111に表示される表示画面300の一例を示す図である。ユーザは、表示画面300へのタッチ操作により、プリンタやスキャンといった機能の実行を指示することができる。USBメモリがUSBホストI/F108に接続され、マウント処理が完了すると、表示画面300には、アイコン301が表示される。アイコン301は、アンマウント処理の実行を指示するためのボタンである。ユーザは、USBメモリの使用を終えた際に、アイコン301を押下する。アイコン301が押下されると、図4に示すように、取り外しウィンドウ400が表示画面300上に重畳表示される。ユーザは、メモリーメディア一覧401において取り外し対象のメモリーメディアを選択し、アイコン402を押下すことで、USBメモリの取り外しを画像形成装置1に指示できる。
FIG. 3 is a diagram illustrating an example of the
図5は、例外管理処理を示すフローチャートである。S501において、UI/Job実行プロセス202は、例外ハンドラ登録プロセス203に対して例外ハンドラの登録要求を行い、例外ハンドラ登録プロセス203内に用意されている例外ハンドラを登録する。ここで、例外ハンドラとは、プロセスの実行中に不正メモリアクセス等の予期せぬ処理が発生した際に、OS201が発生させるシグナルに応じて実行される処理のことである。例外ハンドラの登録とは、例外ハンドラを指定することである。本実施形態においては、例外ハンドラ登録プロセス203は、SIGSEGV、SIGILL、SIGFPE、SIGBUS、SIGARBRTのシグナルに対して、例外ハンドラを登録する。SIGSEGV、SIGILL、SIGFPE、SIGBUS、SIGARBRTのシグナルの発行は、例外処理の一例である。ここで、SIGSEGVは、不正メモリアクセスに応じて発行されるシグナルである。SIGILLは、不正命令に応じて発行されるシグナルである。SIGFPEは、ゼロ除算に応じて発行されるシグナルである。SIGBUSは、アドレスエラー等に応じて発行されるシグナルである。
FIG. 5 is a flowchart illustrating the exception management process. In step S <b> 501, the UI /
S502において、例外ハンドラ登録プロセス203は、登録されたシグナルが発生したか否かを監視する。例外ハンドラ登録プロセス203は、登録したシグナルが発生するまで待機し、シグナルが発生すると(S502でYES)、処理をS503へ進める。S503において、例外ハンドラ登録プロセス203は、例外ハンドラを起動する。次に、S504において、例外ハンドラ登録プロセス203は、発生したシグナルの種類とシグナルが発生したプロセス名及びタスク名をRAM104上の例外ファイルに書き込む。以上で、例外管理処理が終了する。
In step S502, the exception
図6は、アンマウント管理処理を示すフローチャートである。S601において、例外処理監視プロセス204は、RAM104の例外ファイルに対してポーリングを行い、例外ファイルを読み込む。次に、S602において、例外処理監視プロセス204は、例外ファイルを参照することで、例外処理が発生しているか否かを判定する。例外処理監視プロセス204は、例外処理が発生している場合には(S602でYES)、処理を603へ進める。例外処理監視プロセス204は、例外処理が発生していない場合には(S602でNO)、処理をS601へ進める。
FIG. 6 is a flowchart showing the unmount management process. In step S601, the exception
S603において、例外処理監視プロセス204は、例外が発生したプロセスが、UI/Job実行プロセス202であるか否かを判定する。例外処理監視プロセス204は、UI/Job実行プロセス202の場合には(S603でYES)、処理をS604へ進める。例外処理監視プロセス204は、UI/Job実行プロセス202でない場合には(S603でNO)、処理をS601へ進める。S604において、例外処理監視プロセス204は、UI/Job実行プロセス202のジョブで実行中のジョブが存在するか否かを判定する。例外処理監視プロセス204は、実行中のジョブが存在する場合には(S604でYES)、処理をS601へ進める。例外処理監視プロセス204は、実行中のジョブが存在しない場合には(S604でNO)、処理をS605へ進める。S605において、例外処理監視プロセス204は、OS201に対しアンマウント処理を指示する。これに対応して、OS201は、アンマウント処理を実行する。なお、S603〜S605の処理は、例外判定処理の一例である。また、S604の処理は、ジョブ判定処理の一例である。
In step S603, the exception
OS201は、アンマウント処理として、外部記憶装置に書き込まれていないキャッシュデータの書き込みと、システムとの接続を解除する処理を行う。アンマウントコマンドはOS201において定義されうる。アンマウントコマンドにより実行されるアンマウント処理は、外部記憶装置をOS201において管理されている論理的な階層構造から切り離す意味でも使われる。アンマウント処理が実行されると、アンマウントされた外部記憶装置に対してはOS201を介しては原則としてアクセスできなくなる。この結果、画像形成装置1は、適切に外部記憶装置を取り外すことができる状態となる。
The
以上のように、画像形成装置1は、UI/Job実行プロセスの実行中に、UI/Job実行プロセスに係る例外処理が発生した場合には、自動的にアンマウント処理を行う。これにより、UI/Job実行プロセスにより表示されるべき、USBメモリを取り外すためのUIを表示することができないことにより、ユーザがアンマウント処理の実行指示を入力できなくなるのを避けることができる。すなわち、アプリケーションがアンマウントの要求を行うことができない場合であっても、適切にUSBメモリを取り外すことができる。
As described above, during the execution of the UI / Job execution process, the
さらに、UI/Job実行プロセスの実行中に例外処理が発生した場合であっても、UI/Job実行プロセスの一部のジョブが実行を継続している場合がある。この場合、実行中のジョブによりUSBメモリへのアクセスが行われる可能性がある。そのため、本実施形態の画像形成装置1は、この場合には、アンマウント処理を行わないこととした。これにより、USBメモリへのアクセス中にアンマウント処理が実行されるのを避けることができる。
Further, even when an exception process occurs during the execution of the UI / Job execution process, some jobs of the UI / Job execution process may continue to execute. In this case, there is a possibility that the USB memory is accessed by the job being executed. Therefore, in this case, the
なお、他の例としては、例外処理監視プロセス204は、実行中のジョブが存在する場合に(S604でYES)、さらに、実行中のジョブがUSBメモリへのアクセスを伴うジョブか否かを判定してもよい。そして、例外処理監視プロセス204は、USBメモリへのアクセスを伴わない場合に、アンマウント処理を指示し(S605)、USBメモリへのアクセスを伴う場合には処理をS601へ進めてもよい。
As another example, when there is a job being executed (YES in S604), the exception
以上、本発明の好ましい実施形態について詳述したが、本発明は係る特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。 As described above, the preferred embodiments of the present invention have been described in detail, but the present invention is not limited to the specific embodiments, and various modifications may be made within the scope of the present invention described in the appended claims.・ Change is possible.
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program for realizing one or more functions of the above-described embodiments to a system or an apparatus via a network or a storage medium, and one or more processors in a computer of the system or the apparatus read and execute the program. This processing can be realized. Further, it can also be realized by a circuit (for example, an ASIC) that realizes one or more functions.
1 画像形成装置
201 OS
202 UI/Job実行プロセス
204 例外処理監視プロセス
1 OS of
202 UI /
Claims (6)
前記外部記憶装置の取り外しの指示を受け付けるためのユーザインタフェースの表示を制御するプロセスの実行中に、前記プロセスに係る例外処理が発生したか否かを判定する例外判定手段と、
前記例外判定手段により前記例外処理が発生したと判定された場合に、前記外部記憶装置のアンマウント処理を実行する実行手段と
を備えることを特徴とする情報処理装置。 An information processing device to which an external storage device can be attached,
During a process of controlling the display of a user interface for receiving an instruction to remove the external storage device, during execution of a process, an exception determination unit that determines whether or not exceptional processing related to the process has occurred.
An information processing apparatus comprising: an execution unit that executes an unmount process of the external storage device when the exception determination unit determines that the exception process has occurred.
前記実行手段は、前記例外処理が発生したと判定され、かつジョブが実行中であると判定された場合に、前記アンマウント処理を実行することを特徴とする請求項1に記載の情報処理装置。 A job determination unit that determines whether a job included in the process is being executed;
2. The information processing apparatus according to claim 1, wherein the execution unit executes the unmount processing when it is determined that the exception processing has occurred and it is determined that a job is being executed.
前記実行手段は、前記例外処理が発生したと判定され、かつ前記外部記憶装置へのアクセスを含むジョブが実行中であると判定された場合に、前記アンマウント処理を実行することを特徴とする請求項2に記載の情報処理装置。 The job determination unit determines whether or not a job included in the process, and a job including access to the external storage device is being executed,
The execution unit executes the unmount process when it is determined that the exception process has occurred and when it is determined that a job including access to the external storage device is being executed. Item 3. The information processing device according to item 2.
前記例外判定手段は、前記登録手段により登録された前記例外処理が発生したか否かを判定することを特徴とする請求項1乃至3の何れか1項に記載の情報処理装置。 A registration unit for registering the exception processing,
4. The information processing apparatus according to claim 1, wherein the exception determination unit determines whether the exception process registered by the registration unit has occurred. 5.
前記外部記憶装置の取り外しの指示を受け付けるためのユーザインタフェースの表示を制御するプロセスの実行中に、前記プロセスに係る例外処理が発生したか否かを判定する例外判定ステップと、
前記例外判定ステップにおいて前記例外処理が発生したと判定された場合に、前記外部記憶装置のアンマウント処理を実行する実行ステップと
を含むことを特徴とする情報処理方法。 An information processing method executed by an information processing device to which an external storage device can be attached,
During a process of controlling the display of a user interface for receiving an instruction to remove the external storage device, during an execution of a process, an exception determination step of determining whether or not exceptional processing related to the process has occurred;
An execution step of executing an unmount process of the external storage device when it is determined in the exception determination step that the exception process has occurred.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018179987A JP2020052608A (en) | 2018-09-26 | 2018-09-26 | Information processor and information processing method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018179987A JP2020052608A (en) | 2018-09-26 | 2018-09-26 | Information processor and information processing method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2020052608A true JP2020052608A (en) | 2020-04-02 |
Family
ID=69997179
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018179987A Pending JP2020052608A (en) | 2018-09-26 | 2018-09-26 | Information processor and information processing method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2020052608A (en) |
-
2018
- 2018-09-26 JP JP2018179987A patent/JP2020052608A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4592814B2 (en) | Information processing device | |
JP5566054B2 (en) | Information processing apparatus, information processing apparatus control method, and program | |
US8891111B2 (en) | Adaptable printer driver | |
US20110289501A1 (en) | Information processing device, information processing method, and storage medium storing computer program | |
JP2012008861A (en) | Data processor, data processing method for data processor and program | |
JP6875808B2 (en) | Information processing device | |
JP6268991B2 (en) | Information processing system, information processing apparatus, and program | |
JP5183448B2 (en) | Information processing apparatus, information processing method, and program | |
US8810845B2 (en) | Image forming apparatus, data storing method, and non-transitory computer readable recording medium that stores data storing program | |
JP3823549B2 (en) | Print processing method and print processing apparatus | |
JP5811611B2 (en) | Information processing apparatus, information processing method, and program | |
JP2020052608A (en) | Information processor and information processing method and program | |
JP6380320B2 (en) | Electronic device, information processing method and program | |
US20230132909A1 (en) | Image processing apparatus having usb host controller, control method therefor, and storage medium storing control program therefor | |
US10038806B2 (en) | Image forming apparatus, non-transitory computer readable recording medium, and information processing method | |
KR20190062093A (en) | Method for managing printing job in case of error occurring in printing system, and apparatus for performing the same | |
US20220214910A1 (en) | Information processing system, information processing apparatus, and information processing method | |
JP2013258511A (en) | Image forming apparatus, and back-up/restore method and program | |
US10951787B2 (en) | Information processing apparatus that controls timing for enabling an application, control method of information processing apparatus, and recording medium | |
US10425545B2 (en) | Printing apparatus and method for controlling the same | |
JP3381637B2 (en) | Printer, computer system, file management method, file access method, and recording medium | |
JP2011107944A (en) | Storage equipment | |
JP2004302870A (en) | Write-protect method for media reader/writer | |
JP6497354B2 (en) | Information processing apparatus, program supply program, and information processing system | |
JP2016057799A (en) | Print control program, information processing device, information processing system, information processing method, and image processing system |