JP2021086206A - Image forming apparatus and control method thereof - Google Patents

Image forming apparatus and control method thereof Download PDF

Info

Publication number
JP2021086206A
JP2021086206A JP2019212455A JP2019212455A JP2021086206A JP 2021086206 A JP2021086206 A JP 2021086206A JP 2019212455 A JP2019212455 A JP 2019212455A JP 2019212455 A JP2019212455 A JP 2019212455A JP 2021086206 A JP2021086206 A JP 2021086206A
Authority
JP
Japan
Prior art keywords
image forming
forming apparatus
trim command
trim
time
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
Application number
JP2019212455A
Other languages
Japanese (ja)
Inventor
修司 小幡
Shuji Obata
修司 小幡
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 JP2019212455A priority Critical patent/JP2021086206A/en
Publication of JP2021086206A publication Critical patent/JP2021086206A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Memory System (AREA)

Abstract

To suppress performance degradation of a storage device while reducing an impact on performance of a user operation.SOLUTION: A storage device 104 includes storage areas 203-207 divided into a plurality of parts. When TRIM needs to be executed at the next automatic sleep recovery, a main CPU 101 calculates a TRIM required time and changes an interrupt generation time to a time (T13) before an original designation time (T14) by the TRIM required time. When there is a sleep recovery request from an RTC 105 due to the interrupt after the change, the main CPU 101 starts issuing a TRIM command, and causes an image forming apparatus 1 to shift to a standby state when the issuance of the TRIM command is completed.SELECTED DRAWING: Figure 7

Description

本発明は、複数に分割された記憶領域を有する記憶装置を備える画像形成装置およびその制御方法に関する。 The present invention relates to an image forming apparatus including a storage apparatus having a storage area divided into a plurality of areas and a control method thereof.

SSD(Solid State Drive)やeMMC(embedded Multi Media Card)といったフラッシュメモリと制御回路とを備える半導体記憶装置を有する画像形成装置(情報処理装置)が知られている。この種の記憶装置では、内蔵するフラッシュメモリの寿命を延ばすためにウェアレベリングと呼ばれる分散書き込みが行われている。ウェアレベリングでは、書き込み回数の少ないブロックをなるべく使用するように、ブロックを置き換えて書き込みが行われる。そのため、ウェアレベリング処理の実行中には、ブロック置き換え時にブロック消去やデータコピーなどが発生し、パフォーマンス(読み書き性能)が低下する場合がある。 An image forming apparatus (information processing apparatus) having a semiconductor storage device including a flash memory and a control circuit such as SSD (Solid State Drive) and eMMC (embedded MultiMediaCard) is known. In this type of storage device, distributed writing called wear leveling is performed in order to extend the life of the built-in flash memory. In wear leveling, writing is performed by replacing blocks so as to use blocks with a small number of writes as much as possible. Therefore, during the execution of the wear leveling process, block erasure or data copy may occur at the time of block replacement, and the performance (read / write performance) may deteriorate.

不揮発性の半導体記憶装置では、パフォーマンスの低下を改善する方法としてTRIM(トリム)と呼ばれる処理を行うのが一般的である。TRIMとは、記憶装置に対して、OS(オペレーティングシステム)のファイルシステムにとって不要になった記憶領域を通知するコマンドである。記憶装置にTRIMコマンドで通知することにより、記憶装置のコントローラは、不必要な領域までウェアレベリング処理をする必要がなくなり、パフォーマンス低下を抑制することができる。 In a non-volatile semiconductor storage device, a process called TRIM (trim) is generally performed as a method for improving the deterioration in performance. TRIM is a command for notifying a storage device of a storage area that is no longer needed for the OS (operating system) file system. By notifying the storage device with the TRIM command, the controller of the storage device does not need to perform wear leveling processing to an unnecessary area, and the performance deterioration can be suppressed.

eMMCの規格の中には、TRIMコマンドが用意されており、eMMCがアイドル時間中に不要データを削除することで、データ転送速度を良好に保つことができる。上記記憶装置を組み込んだ画像形成装置等の機器を使用しているタイミングでTRIMを実行すると、CPUリソースが占有されてしまうため、機器の備える機能を実行することができなくなり、ユーザの利便性が損なわれる。よって、ユーザが組み込み機器を使用しないタイミングでTRIMを実行するのが望ましい。TRIMの実行タイミングに関して、印刷ジョブの状況を取得して、ジョブの中断を示す状況にあると判断したらウェアレベリングのために利用可能なTRIMコマンドを実行する技術が知られている(特許文献1)。 The TRIM command is prepared in the eMMC standard, and the data transfer speed can be kept good by the eMMC deleting unnecessary data during the idle time. If TRIM is executed at the timing when a device such as an image forming device incorporating the above storage device is used, CPU resources are occupied, so that the functions provided by the device cannot be executed, which is convenient for the user. It is impaired. Therefore, it is desirable to execute TRIM at a timing when the user does not use the embedded device. Regarding the execution timing of TRIM, there is known a technique of acquiring the status of a print job and executing a TRIM command that can be used for wear leveling when it is determined that the status indicates a job interruption (Patent Document 1). ..

特開2015−141681号公報Japanese Unexamined Patent Publication No. 2015-141681

特許文献1では、TRIM処理がジョブ実行のパフォーマンスに影響しないように考慮されている。しかし、機器全体のパフォーマンスについては考慮されていない。例えば、ジョブが実行されていないアイドル時においてTRIM処理を実施している最中にユーザが操作部を操作した場合、TRIM処理と操作部の処理とが競合して操作部の画面の動作が遅くなるおそれがある。このような場合、ユーザは、機器が適切に稼働していると認識できず、不快に感じるおそれがある。従って、機器としてのパフォーマンスに影響が生じる可能性がある。 In Patent Document 1, it is considered that TRIM processing does not affect the performance of job execution. However, the performance of the entire device is not considered. For example, if the user operates the operation unit while performing TRIM processing when the job is idle and the job is not being executed, the TRIM processing and the processing of the operation unit conflict with each other and the operation of the operation unit screen is slow. There is a risk of becoming. In such a case, the user may not recognize that the device is operating properly and may feel uncomfortable. Therefore, the performance as a device may be affected.

本発明は、ユーザ操作のパフォーマンスへの影響を軽減しつつ、記憶装置のパフォーマンス低下を抑制することを目的とする。 An object of the present invention is to suppress a deterioration in the performance of a storage device while reducing the influence on the performance of user operations.

上記目的を達成するために本発明は、複数に分割された記憶領域を有する記憶装置を備える画像形成装置であって、前記画像形成装置を指定時刻に省電力状態から通常電力状態へ復帰させる移行手段と、前記記憶装置における使用しなくなった記憶領域を通知するTRIMコマンドを発行する発行手段と、を有し、前記発行手段は、前記画像形成装置が前記省電力状態に移行した場合において、前記TRIMコマンドを発行する必要があるときは、前記TRIMコマンドを前記指定時刻より前に発行することを特徴とする。 In order to achieve the above object, the present invention is an image forming apparatus including a storage device having a storage area divided into a plurality of divided areas, and shifts the image forming apparatus from a power saving state to a normal power state at a designated time. The issuing means includes means and issuing means for issuing a TRIM command notifying the storage area that is no longer used in the storage device, and the issuing means is said to be said when the image forming apparatus shifts to the power saving state. When it is necessary to issue a TRIM command, the TRIM command is issued before the designated time.

本発明によれば、ユーザ操作のパフォーマンスへの影響を軽減しつつ、記憶装置のパフォーマンス低下を抑制することができる。 According to the present invention, it is possible to suppress the deterioration of the performance of the storage device while reducing the influence on the performance of the user operation.

画像形成装置のハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware structure of an image forming apparatus. メインCPUおよび記憶装置のブロック図である。It is a block diagram of a main CPU and a storage device. スタンバイ状態における画像形成装置の電源供給状態を示すブロック図である。It is a block diagram which shows the power supply state of the image forming apparatus in a standby state. スリープ状態における画像形成装置の電源供給状態を示すブロック図である。It is a block diagram which shows the power supply state of the image forming apparatus in a sleep state. TRIM実施中における画像形成装置の電源供給状態を示すブロック図である。It is a block diagram which shows the power supply state of the image forming apparatus during TRIM execution. TRIM自動指定画面の例を示す図である。It is a figure which shows the example of the TRIM automatic designation screen. 電力状態とTRIM実施のタイミングチャートである。It is a timing chart of power status and TRIM implementation. スタンバイ時処理のフローチャートである。It is a flowchart of standby processing. スリープ時処理のフローチャートである。It is a flowchart of sleep processing. 電力状態とTRIM実施のタイミングチャートである。It is a timing chart of power status and TRIM implementation. スタンバイ時処理のフローチャートである。It is a flowchart of standby processing. 電力状態とTRIM実施のタイミングチャートである。It is a timing chart of power status and TRIM implementation. スタンバイ時処理のフローチャートである。It is a flowchart of standby processing. スリープ時処理のフローチャートである。It is a flowchart of sleep processing.

以下、図面を参照して本発明の実施の形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.

(第1の実施の形態)
図1は、本発明の第1の実施の形態に係る画像形成装置のハードウェア構成を示すブロック図である。
(First Embodiment)
FIG. 1 is a block diagram showing a hardware configuration of an image forming apparatus according to a first embodiment of the present invention.

画像形成装置1は、コントローラ100、表示部107、操作部109、プリンタ113、スキャナ115、USB I/F117、FAX I/F119、有線LAN I/F121、無線LAN用アンテナ122、人感センサ125を有する。コントローラ100は、メインCPU101、RAM102、ROM103、記憶装置104、RTC(リアルタイムクロック)105、表示部コントローラ106、操作部コントローラ108、プリンタコントローラ112、スキャナコントローラ114を有する。また、コントローラ100は、USBコントローラ116、FAXコントローラ118、ネットワークコントローラ120、画像処理コントローラ123、人感センサコントローラ124、システムバス126を備える。操作部109は、タッチパネル110およびキー111を有する。 The image forming apparatus 1 includes a controller 100, a display unit 107, an operation unit 109, a printer 113, a scanner 115, a USB I / F 117, a FAX I / F 119, a wired LAN I / F 121, a wireless LAN antenna 122, and a motion sensor 125. Have. The controller 100 includes a main CPU 101, a RAM 102, a ROM 103, a storage device 104, an RTC (real-time clock) 105, a display unit controller 106, an operation unit controller 108, a printer controller 112, and a scanner controller 114. Further, the controller 100 includes a USB controller 116, a FAX controller 118, a network controller 120, an image processing controller 123, a motion sensor controller 124, and a system bus 126. The operation unit 109 has a touch panel 110 and a key 111.

メインCPU101は、画像形成装置1全体を制御する中央演算ユニットであり、各部とシステムバス126で接続されている。RAM102は、メインCPU101が動作するためのワークメモリであり、各種プログラムの展開や演算処理結果の保存、プリント、スキャン等の動作による画像処理コントローラ123で処理された画像データの保存に用いられる。ROM103は、メインCPU101の起動プログラムや各種設定情報等が保存されるメモリである。記憶装置104は、サイズの大きなプログラムやデータを保存しておくための不揮発性の半導体記憶装置であり、例えば、NAND型不揮発性メモリ(フラッシュメモリ)である。記憶装置104としてeMMCを例示するが、記憶装置104はeMMCに限定されず、SSDやそれ以外の不揮発性メモリデバイスであってもよい。 The main CPU 101 is a central arithmetic unit that controls the entire image forming apparatus 1, and is connected to each unit by a system bus 126. The RAM 102 is a work memory for operating the main CPU 101, and is used for expanding various programs, saving calculation processing results, and saving image data processed by the image processing controller 123 by operations such as printing and scanning. The ROM 103 is a memory in which the startup program of the main CPU 101, various setting information, and the like are stored. The storage device 104 is a non-volatile semiconductor storage device for storing a large-sized program or data, and is, for example, a NAND non-volatile memory (flash memory). Although eMMC is exemplified as the storage device 104, the storage device 104 is not limited to the eMMC, and may be an SSD or other non-volatile memory device.

表示部コントローラ106は、表示部107の通信プロトコルに則り、画像データを表示部107へ送信する。操作部コントローラ108は、タッチパネル110とキー111からの入力を受け付け、メインCPU101が理解できるデータに変換する。プリンタコントローラ112は、メインCPU101により指定された画像データを印刷するにあたり、プリンタ113における印刷動作に関わる感光体ドラムやレーザ発振器、トナー定着器等の各種デバイスを制御する。スキャナコントローラ114は、スキャナ115の読み取り動作に関わる原稿検知センサや読み取りセンサ等の各種デバイスを制御する。 The display unit controller 106 transmits image data to the display unit 107 according to the communication protocol of the display unit 107. The operation unit controller 108 receives the input from the touch panel 110 and the key 111, and converts the data into data that the main CPU 101 can understand. The printer controller 112 controls various devices such as a photoconductor drum, a laser oscillator, and a toner fuser that are involved in the printing operation of the printer 113 when printing the image data designated by the main CPU 101. The scanner controller 114 controls various devices such as a document detection sensor and a scanning sensor involved in the scanning operation of the scanner 115.

USBコントローラ116は、USBケーブルでUSB I/F117に接続された外部端末と、画像データ等の通信を行う。FAXコントローラ118は、電話線でFAX I/F119に接続された公衆回線網と、画像データ等の通信を行う。ネットワークコントローラ120は、LANケーブルで有線LAN I/F121に接続された外部端末と、ネットワーク通信を行う。また、ネットワークコントローラ120は、無線LAN用アンテナ122を介して外部端末と無線でデータを送受信する。画像処理コントローラ123は、スキャナ115で読み取った原稿の画像データへの変換や、拡大、縮小、モノクロ化等、プリンタ113で印刷するための画像データに変換する等の画像処理を行う。人感センサコントローラ124は、人感センサ125の起動制御、及び画像形成装置1の前方の人の有無をメインCPU101へ通知する。 The USB controller 116 communicates image data and the like with an external terminal connected to the USB I / F 117 with a USB cable. The FAX controller 118 communicates image data and the like with the public line network connected to the FAX I / F 119 by a telephone line. The network controller 120 performs network communication with an external terminal connected to the wired LAN I / F 121 with a LAN cable. Further, the network controller 120 wirelessly transmits / receives data to / from an external terminal via the wireless LAN antenna 122. The image processing controller 123 performs image processing such as conversion of the original read by the scanner 115 into image data, enlargement / reduction, monochrome conversion, and conversion into image data for printing by the printer 113. The motion sensor controller 124 notifies the main CPU 101 of the activation control of the motion sensor 125 and the presence / absence of a person in front of the image forming apparatus 1.

図2は、メインCPU101および記憶装置104のブロック図である。図2を用いて、メインCPU101と記憶装置104との間での処理について説明する。なお、簡略化のため、各ブロック間を接続するシステムバス126の図示は省略されている。 FIG. 2 is a block diagram of the main CPU 101 and the storage device 104. The processing between the main CPU 101 and the storage device 104 will be described with reference to FIG. For the sake of simplicity, the system bus 126 connecting the blocks is not shown.

コントローラ100は、メインCPU101の演算によってオペレーティングシステム(OS)201を動作させる。OS201はソフトウェアやハードウェア全体を制御及び管理し、多くのアプリケーションから共通して利用される基本ソフトウェアである。このOS201には、記憶装置104に対してデータを読み書きする機能も含まれる。例えば、OS201上で動作するアプリケーションにおいて、記憶装置104のデータの読み出しを行う場合、OS201によりメインCPU101から記憶装置104へデータ読み出しコマンドが発行される。データ読み出しコマンドを受信した記憶装置104は、その内部の記憶装置コントローラ202を動作させ、記憶装置104内の記憶領域からコマンドで要求されたデータを取得し、メインCPU101へ転送する。同様に、記憶装置104にデータを書き込む場合は、OS201によりメインCPU101から記憶装置104へデータ書き込みコマンドが発行される。データ書き込みコマンドを受信した記憶装置104は、記憶装置コントローラ202を動作させ、記憶装置104内の記憶領域にコマンドで要求されたデータを書き込む。 The controller 100 operates the operating system (OS) 201 by the calculation of the main CPU 101. OS201 is basic software that controls and manages the entire software and hardware and is commonly used by many applications. The OS 201 also includes a function of reading and writing data to and from the storage device 104. For example, in an application running on the OS 201, when reading the data of the storage device 104, the OS 201 issues a data read command from the main CPU 101 to the storage device 104. The storage device 104 that has received the data read command operates the storage device controller 202 inside the storage device 104, acquires the data requested by the command from the storage area in the storage device 104, and transfers the data to the main CPU 101. Similarly, when writing data to the storage device 104, the OS 201 issues a data write command from the main CPU 101 to the storage device 104. The storage device 104 that has received the data write command operates the storage device controller 202 and writes the data requested by the command to the storage area in the storage device 104.

また、OS201は、記憶装置104内の記憶領域を複数の領域に区切って管理する。これは、例えば、複数のアプリケーションが記憶装置104へデータの書き込みを行ったときに、重複した記憶領域へ異なるアプリケーションがデータを書いてしまい、必要なデータが失われないようにするためである。本実施の形態では、記憶装置104は、複数に分割された記憶領域を有する。図2では、説明を簡単にするために、5つの記憶領域(記憶領域203、記憶領域204、記憶領域205、記憶領域206、記憶領域207)に分割されている。なお、記憶領域の数は問わない。 Further, the OS 201 manages the storage area in the storage device 104 by dividing it into a plurality of areas. This is to prevent, for example, when a plurality of applications write data to the storage device 104, different applications write data to the overlapping storage areas and necessary data is not lost. In the present embodiment, the storage device 104 has a storage area divided into a plurality of parts. In FIG. 2, for simplification of explanation, it is divided into five storage areas (storage area 203, storage area 204, storage area 205, storage area 206, and storage area 207). The number of storage areas does not matter.

記憶装置104にデータを書き込む際、記憶装置コントローラ202は、データ書き込みコマンドで指定された領域にデータを書き込む前に、その領域に何らかのデータが存在するかどうかを確認する。データが存在しない場合は、記憶装置コントローラ202は、指定された記憶領域にデータを書き込む。ただし、記憶装置104のようなフラッシュメモリは1つのデータセルごとに書き換え回数に制限がある。そのため、記憶装置104では、内蔵するフラッシュメモリの寿命を延ばすために、記憶装置コントローラ202によってウェアレベリングが行われる。ウェアレベリング処理の実行中には記憶装置104のパフォーマンス(読み書き性能)が低下する場合がある。これを回避するために、TRIM(トリム)処理が行われる。 When writing data to the storage device 104, the storage device controller 202 confirms whether or not any data exists in the area before writing the data to the area specified by the data write command. If the data does not exist, the storage controller 202 writes the data to the designated storage area. However, a flash memory such as the storage device 104 has a limit on the number of rewrites for each data cell. Therefore, in the storage device 104, wear leveling is performed by the storage device controller 202 in order to extend the life of the built-in flash memory. The performance (read / write performance) of the storage device 104 may deteriorate during the execution of the wear leveling process. In order to avoid this, TRIM processing is performed.

本実施の形態におけるTRIMとは、記憶装置104に対して、OS201のファイルシステムにとって不要になった記憶ブロックを通知するコマンドである。具体的には、メインCPU101は、TRIMの実施が必要な場合は、使用しなくなった記憶領域を、TRIMコマンドによって記憶装置104に通知する。記憶装置コントローラ202は、未使用領域を認識することにより、使用中のブロックだけを集めて(ガーベージコレクション)ウェアレベリングすればよい。従って、コピーするデータ量が小さくなり、使用ブロック数も減少し、全体の書き替え回数も減少する。よって、記憶装置104に不要になった記憶ブロックをTRIMコマンドで通知することにより、不必要な領域までウェアレベリング処理をする必要がなくなり、記憶装置104のパフォーマンス低下が抑制される。 The TRIM in the present embodiment is a command for notifying the storage device 104 of a storage block that is no longer needed for the file system of the OS 201. Specifically, when it is necessary to carry out TRIM, the main CPU 101 notifies the storage device 104 of the unused storage area by a TRIM command. By recognizing the unused area, the storage controller 202 needs to collect only the blocks in use (garbage collection) for wear leveling. Therefore, the amount of data to be copied is reduced, the number of blocks used is reduced, and the total number of rewrites is also reduced. Therefore, by notifying the storage device 104 of the unnecessary storage block by the TRIM command, it is not necessary to perform wear leveling processing up to an unnecessary area, and the performance deterioration of the storage device 104 is suppressed.

しかしながら、TRIMコマンドを発行している間、不要となった記憶領域を通知することや応答を待つことにメインCPU101が占有されてしまい、OS201上の他のアプリケーションの動作に支障をきたしてしまう。例えば、画像形成装置1が印刷やスキャンのジョブ動作を実行するために、アプリケーションでプリンタコントローラ112やスキャナコントローラ114を制御していたとする。この場合に、メインCPU101がTRIMコマンドにより占有されてしまうとジョブ実行が中断してしまう。この他にも、ユーザ操作によりアプリケーションが表示部コントローラ106を制御していた場合、メインCPU101が占有されることで表示部107の画面遷移などの動作が止まってしまう。このようにジョブ動作やユーザ操作中にTRIMコマンドが発行されると、ユーザに画像形成装置1が故障したような誤解や不快感を与えてしまうおそれがある。このことから、TRIMコマンドを発行するタイミングは、ジョブが実施されておらず、且つユーザが画像形成装置1を操作しない時間に限定することが望ましい。 However, while issuing the TRIM command, the main CPU 101 is occupied by notifying the unnecessary storage area and waiting for a response, which hinders the operation of other applications on the OS 201. For example, suppose that the image forming apparatus 1 controls a printer controller 112 and a scanner controller 114 in an application in order to execute a print or scan job operation. In this case, if the main CPU 101 is occupied by the TRIM command, the job execution will be interrupted. In addition to this, when the application controls the display unit controller 106 by user operation, operations such as screen transition of the display unit 107 are stopped because the main CPU 101 is occupied. If the TRIM command is issued during the job operation or the user operation in this way, the user may be misunderstood or uncomfortable as if the image forming apparatus 1 had failed. For this reason, it is desirable to limit the timing of issuing the TRIM command to the time when the job is not executed and the user does not operate the image forming apparatus 1.

ところで、ユーザが操作しない時間にTRIMコマンドを発行したとしても、記憶装置104の全ての領域をTRIMコマンド発行の対象にしてしまうと、メインCPU101の占有時間が長くなってしまう。一方、TRIMコマンドの発行タイミングを、メインCPU101の占有時間が長くなってもユーザの操作に影響しない時間に限定すると、発行機会が少なくなってしまう。これを回避するために、記憶装置104内の分割された記憶領域に対して個別に、順次、TRIMコマンドを発行することが望ましい。そうすることで、1回のTRIMコマンドでメインCPU101を占有する時間が短くなり、TRIMコマンドを発行するための条件が緩和される。例えば記憶装置104内の記憶領域203および記憶領域204のTRIMコマンドを発行したい場合、メインCPU101は、最初に記憶領域203のTRIMコマンドを発行し、TRIMが完了した後、記憶領域204のTRIMコマンドを発行する。 By the way, even if the TRIM command is issued at a time when the user does not operate, if the entire area of the storage device 104 is targeted for issuing the TRIM command, the occupancy time of the main CPU 101 becomes long. On the other hand, if the timing of issuing the TRIM command is limited to a time that does not affect the user's operation even if the occupied time of the main CPU 101 becomes long, the issuing opportunity is reduced. In order to avoid this, it is desirable to issue TRIM commands individually and sequentially to the divided storage areas in the storage device 104. By doing so, the time for occupying the main CPU 101 with one TRIM command is shortened, and the conditions for issuing the TRIM command are relaxed. For example, when it is desired to issue a TRIM command for the storage area 203 and the storage area 204 in the storage device 104, the main CPU 101 first issues a TRIM command for the storage area 203, and after the TRIM is completed, issues a TRIM command for the storage area 204. Issue.

次に、TRIMの実施タイミングについて説明する。画像形成装置1の電力状態には、大別してスタンバイ状態(通常電力状態)とスリープ状態(省電力状態)とがある。TRIMを実施するタイミングとして、時刻指定によるスリープ自動復帰機能(以下、スリープ自動復帰機能)を利用する方法が考えられる。スリープ自動復帰機能とは、スリープ状態にある画像形成装置1をユーザが予め設定した時刻(指定時刻)にスタンバイ状態に自動で復帰させる機能である。指定時刻は、通常、ユーザが画像形成装置1を使用することが予定されるより前の時刻に設定される。 Next, the implementation timing of TRIM will be described. The power state of the image forming apparatus 1 is roughly classified into a standby state (normal power state) and a sleep state (power saving state). As a timing for executing TRIM, a method of using the sleep automatic wakeup function by specifying the time (hereinafter referred to as the sleep automatic wakeup function) can be considered. The sleep automatic wakeup function is a function of automatically returning the image forming apparatus 1 in the sleep state to the standby state at a time (designated time) preset by the user. The designated time is usually set to a time before the user is scheduled to use the image forming apparatus 1.

スリープ自動復帰時のメインCPU101とRTC105の動きについて具体的に説明する。まず、ユーザによりスリープから自動で復帰する指定時刻が設定されると、メインCPU101は、その指定時刻にRTC105から割り込みが発生するように設定する。発行手段としてのRTC105から発行される割り込みはメインCPU101に入力される。スリープ中、メインCPU101はWFI(Wait for Interrupt)状態となり、RTC105の割り込みを監視する。WFI状態は節電状態であり、メインCPU101は、監視用に供給される電力により、割り込み要求の発生を待つ状態である。 The movements of the main CPU 101 and the RTC 105 at the time of automatic sleep recovery will be specifically described. First, when a designated time for automatically returning from sleep is set by the user, the main CPU 101 is set so that an interrupt is generated from the RTC 105 at the designated time. The interrupt issued from the RTC 105 as the issuing means is input to the main CPU 101. During sleep, the main CPU 101 enters the WFI (Wait for Interrupt) state and monitors the interrupt of the RTC 105. The WFI state is a power saving state, and the main CPU 101 is in a state of waiting for the occurrence of an interrupt request by the power supplied for monitoring.

そして、画像形成装置1がスリープ状態からスタンバイ状態へ自動復帰するべき指定時刻になると、RTC105は割り込みを発生させる。移行手段としてのメインCPU101は、RTC105からの割り込みを受信すると節電状態から復帰し、画像形成装置1をスリープ状態からスタンバイ状態に復帰させる。この指定時刻より前の時間帯は、ユーザが画像形成装置1を使用すると想定される前の時間帯(ユーザが操作しないタイミング)である。そのため、この時間帯にTRIMを実施すれば、ユーザが画像形成装置1を使用する際のパフォーマンスに影響を与えることがないと考えられる。 Then, when the designated time at which the image forming apparatus 1 should automatically return from the sleep state to the standby state comes, the RTC 105 generates an interrupt. Upon receiving the interrupt from the RTC 105, the main CPU 101 as the transition means returns from the power saving state, and returns the image forming apparatus 1 from the sleep state to the standby state. The time zone before the designated time is the time zone before the user is expected to use the image forming apparatus 1 (timing when the user does not operate). Therefore, if TRIM is performed during this time period, it is considered that the performance when the user uses the image forming apparatus 1 is not affected.

次に、スリープ自動復帰前のタイミングでTRIMを実施する流れと、各タイミングにおける画像形成装置1の電源状態について説明する。図3、図4、図5はそれぞれ、スタンバイ状態、スリープ状態、TRIM実施中における画像形成装置1の電源供給状態を示すブロック図である。 Next, the flow of performing TRIM at the timing before the automatic wakeup from sleep and the power supply state of the image forming apparatus 1 at each timing will be described. 3, FIG. 4, and FIG. 5 are block diagrams showing a power supply state of the image forming apparatus 1 during a standby state, a sleep state, and TRIM execution, respectively.

まず、スタンバイ状態(図3)では、画像形成装置1のすべてのモジュールに電源が供給されている。スリープ状態(図4)では、ROM103、記憶装置104、RTC105には電源が供給され、それ以外のモジュールは節電状態もしくは非電源供給状態となっている。スリープ中は、メインCPU101には、監視用電源が供給されており、メインCPU101はRTC105からの割り込みの発生を待つ節電状態となっている。なお、メインCPU101とは別に、割り込み監視用にサブCPUを設ける構成としてもよい。そのように構成した場合、スリープ中は、メインCPU101への電力は遮断され且つサブCPUには電力が供給されるようにしてもよい。TRIM実施中(図5)では、メインCPU101、ROM103、記憶装置104、RTC105には電源が供給されており、それ以外のモジュールは節電状態もしくは非電源供給状態となっている。特に、少なくとも、TRIMコマンドの発行開始から発行完了までの期間は、ユーザインターフェイスである操作部109へ電力が供給されないので、TRIM実施中に操作部109がユーザに操作されることが回避される。 First, in the standby state (FIG. 3), power is supplied to all the modules of the image forming apparatus 1. In the sleep state (FIG. 4), power is supplied to the ROM 103, the storage device 104, and the RTC 105, and the other modules are in the power saving state or the non-power supply state. During sleep, monitoring power is supplied to the main CPU 101, and the main CPU 101 is in a power saving state waiting for the occurrence of an interrupt from the RTC 105. In addition to the main CPU 101, a sub CPU may be provided for interrupt monitoring. In such a configuration, the power to the main CPU 101 may be cut off and the power may be supplied to the sub CPU during sleep. During TRIM implementation (FIG. 5), power is supplied to the main CPU 101, ROM 103, storage device 104, and RTC 105, and the other modules are in a power saving state or a non-power supply state. In particular, at least during the period from the start of issuance of the TRIM command to the completion of issuance, power is not supplied to the operation unit 109 which is the user interface, so that the operation unit 109 is prevented from being operated by the user during the execution of TRIM.

図6は、TRIM自動指定画面の例を示す図である。このTRIM自動指定画面は、管理者モードにおいて、表示部107に表示されるUI画面である。TRIM自動指定画面にて、ユーザは、TRIMの自動実行の有効/無効を指定することができる。TRIMの自動実行が無効に設定されると、TRIMコマンドの発行が禁止される。 FIG. 6 is a diagram showing an example of a TRIM automatic designation screen. This TRIM automatic designation screen is a UI screen displayed on the display unit 107 in the administrator mode. On the TRIM automatic specification screen, the user can specify whether to enable / disable the automatic execution of TRIM. When the automatic execution of TRIM is disabled, the issuance of TRIM commands is prohibited.

図7は、電力状態とTRIM実施のタイミングチャートである。図7において、「その他コントローラ/負荷電源」は、図1の符号106〜125で示す構成要素の電源状態を指す。図7に示す例では、スリープ自動復帰の指定時刻であるタイミングT14は「AM7:00:00」に設定されている。スタンバイ状態では画像形成装置1のすべてのモジュールに電源が供給されている(図3)。画像形成装置1は、タイミングT11で、スタンバイ状態からスリープ状態への移行処理(スリープ移行処理)を開始する。このスリープ移行処理は、ユーザからの操作が一定時間継続して無い場合や、ユーザが操作部109の節電ボタンを押下することにより開始される。 FIG. 7 is a timing chart of the power state and the implementation of TRIM. In FIG. 7, “other controller / load power supply” refers to the power supply state of the component indicated by reference numerals 106 to 125 in FIG. In the example shown in FIG. 7, the timing T14, which is the designated time for automatic sleep wakeup, is set to “7:00 AM”. In the standby state, power is supplied to all the modules of the image forming apparatus 1 (FIG. 3). The image forming apparatus 1 starts the transition process from the standby state to the sleep state (sleep transition process) at the timing T11. This sleep transition process is started when the operation from the user is not continued for a certain period of time or when the user presses the power saving button of the operation unit 109.

スリープ移行処理の期間に、メインCPU101はTRIMを実施するために必要なTRIM所要時間を算出する。ここで、仮にTRIM所要時間が20秒であったとする。この場合、メインCPU101は、本来の(当初の)スリープ自動復帰の指定時刻である「AM7:00:00」より20秒だけ早い「AM6:59:40」にRTC105から割り込みが発生するようにRTC105を設定する(タイミングT13)。スリープ移行処理が完了したら、タイミングT12で、画像形成装置1はスリープ状態に移行する。スリープ状態では、ROM103、記憶装置104、RTC105に電源が供給され(図4)、メインCPU101はRTC105からの割り込みの発生を監視する。 During the sleep transition process, the main CPU 101 calculates the TRIM required time required to execute the TRIM. Here, it is assumed that the TRIM time required is 20 seconds. In this case, the main CPU 101 causes the RTC105 to generate an interrupt from the RTC105 at "6:59:40 AM", which is 20 seconds earlier than the original (initial) designated time of automatic sleep recovery, "7:00 AM". Is set (timing T13). When the sleep transition process is completed, the image forming apparatus 1 shifts to the sleep state at the timing T12. In the sleep state, power is supplied to the ROM 103, the storage device 104, and the RTC 105 (FIG. 4), and the main CPU 101 monitors the occurrence of an interrupt from the RTC 105.

タイミングT13で、変更後の指定時刻である「AM6:59:40」になると、RTC105からの割り込みが発生する。RTC105からの割り込みが発生するとメインCPU101は節電状態から復帰し、TRIMを実施する。TRIM中、メインCPU101、ROM103、記憶装置104、RTC105には電源が供給されている(図5)。タイミングT14でTRIMが完了すると、画像形成装置1はスタンバイ状態への移行処理(スリープ復帰処理)を開始し、スタンバイ状態へ移行する。 At the timing T13, when the designated time after the change is "6:59:40 AM", an interrupt from the RTC 105 is generated. When an interrupt from the RTC 105 occurs, the main CPU 101 returns from the power saving state and executes TRIM. During TRIM, power is supplied to the main CPU 101, ROM 103, storage device 104, and RTC 105 (FIG. 5). When the TRIM is completed at the timing T14, the image forming apparatus 1 starts the transition process to the standby state (sleep return process) and shifts to the standby state.

このように、当初のスリープ自動復帰の指定時刻(T14)の前は、ユーザが画像形成装置1に対する操作をしない期間である。この期間にTRIMが実施されるので、ユーザ操作のパフォーマンスに影響を与えないで済む。このようなTRIM実施処理を図7に加えて図8、図9を参照してさらに説明する。 As described above, before the initial designated time (T14) for automatic sleep recovery, the user does not operate the image forming apparatus 1. Since TRIM is performed during this period, it does not affect the performance of user operations. Such a TRIM execution process will be further described with reference to FIGS. 8 and 9 in addition to FIG.

図8は、スタンバイ時処理のフローチャートである。この処理は、ROM103に格納された制御プログラムをメインCPU101がRAM102に展開して実行することにより実現される。この処理は、画像形成装置1がスタンバイ状態になると開始される。 FIG. 8 is a flowchart of standby processing. This process is realized by the main CPU 101 expanding the control program stored in the ROM 103 into the RAM 102 and executing it. This process is started when the image forming apparatus 1 is in the standby state.

まず、ステップS101で、メインCPU101は、ユーザ操作が一定時間継続して無いことや、節電ボタンの押下等により、スタンバイ状態からスリープ状態への移行開始指示がされるまで待機する。スリープ状態への移行開始指示があると(タイミングT11)、メインCPU101は、ステップS102で、次回のスリープ自動復帰時にTRIMの実施が必要か否かを判別する。TRIM実施の判別要因としては次のような要因が例示される。例えば、前回にTRIMを実施した後から、画像形成装置1が使用されていない場合は、TRIMの実施が不要と判別される。すなわち、TRIMコマンドを発行する必要がないと判定される。また、TRIM自動指定画面(図6)にて、TRIMの自動実行が無効に指定されている場合も、TRIMの実施が不要と判別される。これら以外の場合は、TRIMの実施が必要と判別される。 First, in step S101, the main CPU 101 waits until a shift start instruction from the standby state to the sleep state is given due to the user operation not continuing for a certain period of time, pressing the power saving button, or the like. When there is an instruction to start the transition to the sleep state (timing T11), the main CPU 101 determines in step S102 whether or not TRIM needs to be executed at the next automatic wakeup from sleep. The following factors are exemplified as the discriminating factors for implementing TRIM. For example, if the image forming apparatus 1 has not been used since the last TRIM was performed, it is determined that the TRIM is not necessary. That is, it is determined that it is not necessary to issue the TRIM command. Further, even when the automatic execution of TRIM is invalidated on the TRIM automatic designation screen (FIG. 6), it is determined that the execution of TRIM is unnecessary. In cases other than these, it is determined that TRIM needs to be performed.

そして、TRIMの実施が不要と判別された場合は、メインCPU101は、ステップS103で、スリープ自動復帰後のTRIM実施フラグをOFF(オフ)に設定する。実施フラグは、ON(オン)に設定されていることで、スリープ状態への復帰前にTRIMを実施することを示し、OFFに設定されていることで、スリープ状態への復帰前にTRIMを実施しないことを示す。その後、メインCPU101は、ステップS108で、画像形成装置1をスリープ状態に移行させる(タイミングT12)。 Then, when it is determined that the execution of TRIM is unnecessary, the main CPU 101 sets the TRIM execution flag after the automatic return from sleep to OFF in step S103. When the execution flag is set to ON, it indicates that TRIM is executed before returning to the sleep state, and when it is set to OFF, TRIM is executed before returning to the sleep state. Indicates not to. After that, the main CPU 101 shifts the image forming apparatus 1 to the sleep state in step S108 (timing T12).

一方、TRIMの実施が必要と判別された場合は、メインCPU101は、ステップS104で、記憶装置104におけるTRIM未完了の記憶領域を確認する。ステップS105では、メインCPU101は、TRIM未完了の記憶領域の数から、TRIMコマンドの発行に必要なTRIM所要時間を算出する。ステップS106では、メインCPU101は、当初のスリープ自動復帰の指定時刻(タイミングT14)よりもTRIM所要時間だけ早いタイミングでTRIMコマンドが発行されるような割り込みが発生するように、RTC105を設定する。すなわち、メインCPU101は、割り込みが発生する時刻を、当初の指定時刻(タイミングT14)よりも、TRIM所要時間だけ前の時刻(タイミングT13)に変更する。当初の割り込みに対して、割り込みが発生する時刻が変更された後の割り込みを、「変更後の割り込み」と称する。 On the other hand, when it is determined that the implementation of TRIM is necessary, the main CPU 101 confirms the storage area in which TRIM has not been completed in the storage device 104 in step S104. In step S105, the main CPU 101 calculates the TRIM required time required for issuing the TRIM command from the number of storage areas for which TRIM has not been completed. In step S106, the main CPU 101 sets the RTC 105 so that an interrupt such that a TRIM command is issued at a timing earlier than the initial designated time for automatic sleep recovery (timing T14) by the time required for TRIM is generated. That is, the main CPU 101 changes the time at which the interrupt occurs to a time (timing T13) that is earlier than the initially specified time (timing T14) by the TRIM required time. An interrupt after the time at which the interrupt occurs is changed with respect to the initial interrupt is referred to as an "interrupt after the change".

ステップS107では、メインCPU101は、TRIM実施フラグをONに設定し、ステップS108で、画像形成装置1をスリープ状態へ移行させる(タイミングT12)。ステップS108の後、メインCPU101は、図8に示す処理を終了する。 In step S107, the main CPU 101 sets the TRIM execution flag to ON, and in step S108, shifts the image forming apparatus 1 to the sleep state (timing T12). After step S108, the main CPU 101 ends the process shown in FIG.

図9は、スリープ時処理のフローチャートである。この処理は、ROM103に格納された制御プログラムをメインCPU101がRAM102に展開して実行することにより実現される。この処理は、画像形成装置1がスリープ状態になると開始される。 FIG. 9 is a flowchart of sleep processing. This process is realized by the main CPU 101 expanding the control program stored in the ROM 103 into the RAM 102 and executing it. This process is started when the image forming apparatus 1 goes to sleep.

ステップS201では、メインCPU101は、スリープ状態からスタンバイ状態へ復帰させるためのスリープ復帰要求があるまで待機する。ここで、スリープ復帰要求は大別して次の3つの場合に発行される。すなわち、RTC105から、当初の割り込み(T14)が発生した場合、変更後の割り込み(T13)が発生した場合、または、ユーザによる操作部109の操作があった場合に、スリープ復帰要求は発行される。スリープ復帰要求があると、ステップS202で、メインCPU101は、節電状態から復帰する(図5)。すなわち、メインCPU101だけ、スリープ状態から復帰する。 In step S201, the main CPU 101 waits until there is a sleep wakeup request for returning from the sleep state to the standby state. Here, the sleep wakeup request is roughly classified into the following three cases. That is, the sleep wakeup request is issued from the RTC 105 when the initial interrupt (T14) is generated, when the changed interrupt (T13) is generated, or when the operation unit 109 is operated by the user. .. When there is a sleep wakeup request, the main CPU 101 wakes up from the power saving state in step S202 (FIG. 5). That is, only the main CPU 101 wakes up from the sleep state.

ステップS203ではメインCPU101は、ステップS201で受けたスリープ復帰要求が、時刻指定による自動復帰、すなわち、RTC105からの割り込みによるものであるか否かを判別する。スリープ復帰要求が、RTC105からの割り込みによるものでない場合、ユーザによる操作部109の操作があったことによるスリープ復帰要求である。この場合、ユーザが画像形成装置1を使用するために意図的にスリープから復帰させているので、TRIMを実施するとUIが稼働しなくなってしまう。従って、メインCPU101は、TRIMを実施することなく、処理をステップS207に進め、画像形成装置1をスタンバイ状態に移行させ、図9に示す処理を終了する。 In step S203, the main CPU 101 determines whether or not the sleep wakeup request received in step S201 is an automatic wakeup by specifying a time, that is, an interrupt from the RTC105. When the sleep wakeup request is not due to an interrupt from the RTC 105, it is a sleep wakeup request due to an operation of the operation unit 109 by the user. In this case, since the user intentionally wakes up from sleep in order to use the image forming apparatus 1, the UI will not operate when TRIM is executed. Therefore, the main CPU 101 proceeds to step S207 without performing TRIM, shifts the image forming apparatus 1 to the standby state, and ends the process shown in FIG.

一方、ステップS201で受けたスリープ復帰要求が、RTC105からの割り込みによるものである場合は、ステップS204で、メインCPU101は、TRIM実施フラグがONであるか否かを判別する。そして、TRIM実施フラグがOFFである場合は、スリープ復帰要求が、RTC105からの当初の割り込みによるものであることを意味する。そこでメインCPU101は、TRIMを実施することなく、処理をステップS207に進める。しかし、TRIM実施フラグがONである場合は、スリープ復帰要求が、RTC105からの変更後の割り込みによるものであることを意味する。そこで、メインCPU101は、TRIMを実施するために、処理をステップS205に進める。 On the other hand, when the sleep wakeup request received in step S201 is due to an interrupt from RTC105, in step S204, the main CPU 101 determines whether or not the TRIM execution flag is ON. Then, when the TRIM execution flag is OFF, it means that the sleep wakeup request is due to the initial interrupt from the RTC105. Therefore, the main CPU 101 proceeds to step S207 without executing TRIM. However, when the TRIM execution flag is ON, it means that the sleep wakeup request is due to the interrupt after the change from the RTC105. Therefore, the main CPU 101 advances the process to step S205 in order to carry out TRIM.

ステップS205では、メインCPU101は、TRIMコマンドの発行を開始する。上述したように、メインCPU101は、記憶領域に対して個別に、順次、TRIMコマンドを発行する。そして、TRIMコマンドの発行が完了すると、メインCPU101は、ステップS206で、TRIM実施フラグをOFFに設定する。なお、ここで、TRIMコマンドの発行が完了を待つことに代えて、TRIMコマンドの発行からTRIM所要時間が経過したら、処理をステップS206に進めてもよい。その後、メインCPU101は、ステップS207を実行する(T14)。 In step S205, the main CPU 101 starts issuing a TRIM command. As described above, the main CPU 101 issues TRIM commands individually and sequentially to the storage area. Then, when the issuance of the TRIM command is completed, the main CPU 101 sets the TRIM execution flag to OFF in step S206. Here, instead of waiting for the issuance of the TRIM command to be completed, the process may proceed to step S206 when the TRIM required time has elapsed from the issuance of the TRIM command. After that, the main CPU 101 executes step S207 (T14).

なお、指定時刻を変更した変更後の割り込みが発生するよう設定した場合であっても、変更後の割り込み(T13)と当初の割り込み(T14)とを併存させてもよい。この場合、メインCPU101は、ステップS205で、TRIMコマンドの発行が完了を待つことに代えて、当初の割り込み(T14)が発生したことに応じてステップS206に進んでもよい。 Even when the specified time is changed and the changed interrupt is set to be generated, the changed interrupt (T13) and the initial interrupt (T14) may coexist. In this case, the main CPU 101 may proceed to step S206 in response to the occurrence of the initial interrupt (T14) instead of waiting for the issuance of the TRIM command to be completed in step S205.

なお、TRIM所要時間は、TRIM未完了の記憶領域の数から算出されたが、TRIM所要時間の決定方法はこれに限定されない。例えば、記憶装置104の全記憶領域に対してTRIMを実施する場合にかかる所要時間を、予めメインCPU101に記憶させておく。そして、当初のスリープ自動復帰の指定時刻(タイミングT14)よりも上記所要時間以上分だけ早いタイミングでTRIMコマンドが発行されるように設定してもよい。 The TRIM required time was calculated from the number of storage areas in which TRIM was not completed, but the method for determining the TRIM required time is not limited to this. For example, the time required for performing TRIM on the entire storage area of the storage device 104 is stored in advance in the main CPU 101. Then, the TRIM command may be set to be issued at a timing earlier than the initial designated time for automatic sleep recovery (timing T14) by the required time or more.

本実施の形態によれば、画像形成装置1がスリープ状態に移行した場合において、TRIMコマンドを発行する必要があるときは、TRIMコマンドは指定時刻(T14)より前(T13)に発行される。言い換えると、TRIMコマンドは、画像形成装置1がスタンバイ状態へ復帰する前に発行される。例えば、当初の指定時刻よりも、TRIM所要時間だけ前の時刻にTRIMコマンドの発行が開始される。従って、ユーザ操作がされる可能性がある期間とTRIM実施期間とが重なることを回避できる。これにより、ユーザ操作のパフォーマンスへの影響を軽減しつつ、記憶装置104のパフォーマンス低下を抑制することができる。 According to the present embodiment, when the image forming apparatus 1 shifts to the sleep state and it is necessary to issue the TRIM command, the TRIM command is issued before the designated time (T14) (T13). In other words, the TRIM command is issued before the image forming apparatus 1 returns to the standby state. For example, the issuance of the TRIM command is started at a time earlier than the originally specified time by the time required for TRIM. Therefore, it is possible to avoid overlapping the period in which the user operation may be performed and the TRIM implementation period. As a result, it is possible to suppress the deterioration of the performance of the storage device 104 while reducing the influence on the performance of the user operation.

なお、当初のスリープ自動復帰の指定時刻(タイミングT14)よりもTRIM所要時間だけ早いタイミングT13でTRIMコマンドが発行されるような割り込みが発生するように、RTC105が設定された。これにより、スタンバイ状態への復帰が、当初の指定時刻よりも遅延することが回避される。しかし、タイミングT13は、タイミングT14よりもTRIM所要時間以上早くてもよい。すなわち、当初の割り込みの指定時刻よりも、TRIM所要時間以上だけ前の時刻に、TRIMコマンドの発行を開始できるような割り込みが発生するように、RTC105を設定してもよい。 The RTC105 was set so that an interrupt such that a TRIM command is issued at a timing T13 earlier than the initial designated time for automatic sleep recovery (timing T14) by the time required for TRIM is generated. As a result, it is possible to prevent the return to the standby state from being delayed from the originally specified time. However, the timing T13 may be earlier than the timing T14 by the TRIM required time or more. That is, the RTC 105 may be set so that an interrupt that can start issuing a TRIM command occurs at a time that is equal to or longer than the required time of the TRIM from the specified time of the initial interrupt.

なお、スタンバイ状態への復帰が、当初の指定時刻よりも遅延することを許容するならば、変更後の割り込みの指定時刻(T13)は、当初の割り込みの指定時刻(T14)よりも早ければよく、両者の間にTRIM所要時間を設けることは必須でない。 If it is allowed that the return to the standby state is delayed from the originally specified time, the specified interrupt time (T13) after the change may be earlier than the initially specified interrupt time (T14). , It is not essential to provide the TRIM time required between the two.

(第2の実施の形態)
本発明の第2の実施の形態は、第1の実施の形態に対し、TRIM実施処理が異なり、その他の構成は同様である。本実施の形態におけるTRIM実施処理を、図10、図11で説明する。
(Second Embodiment)
The second embodiment of the present invention is different from the first embodiment in the TRIM implementation process, and the other configurations are the same. The TRIM execution process in this embodiment will be described with reference to FIGS. 10 and 11.

TRIMを実施するタイミングとして、時刻指定によるオートスリープ移行機能を利用する方法が考えられる。オートスリープ移行機能とは、スタンバイ状態にある画像形成装置1を、ユーザが予め設定した指定時刻にスリープ状態に自動で移行させる機能である。この機能は主に、指定時刻以降しばらくの間、ユーザが画像形成装置1を使用しないと想定される場合に利用される。 As a timing for executing TRIM, a method of using the auto sleep transition function by specifying the time can be considered. The auto sleep transition function is a function that automatically shifts the image forming apparatus 1 in the standby state to the sleep state at a designated time set in advance by the user. This function is mainly used when it is assumed that the user will not use the image forming apparatus 1 for a while after the designated time.

オートスリープ移行の指定時刻がユーザから設定されると、メインCPU101はその指定時刻にRTC105から割り込みが発生するようにRTC105を設定する。RTC105から発生する割り込みをメインCPU101が監視する。オートスリープ移行の指定時刻になると、RTC105は割り込みを発生させる。メインCPU101はRTC105からの割り込みを受信すると画像形成装置1をスタンバイ状態からスリープ状態に移行させる。オートスリープ移行の指定時刻より後の時間は、ユーザが画像形成装置1を使用しないと想定される時間帯(ユーザが操作しないタイミング)である。そのため、この時間帯にTRIMを実施すれば、ユーザが画像形成装置1を使用する際のパフォーマンスに影響を与えることがないと考えられる。 When the user sets the designated time for auto sleep transition, the main CPU 101 sets the RTC 105 so that an interrupt is generated from the RTC 105 at the designated time. The main CPU 101 monitors the interrupt generated from the RTC 105. At the designated time of the auto sleep transition, the RTC 105 generates an interrupt. When the main CPU 101 receives an interrupt from the RTC 105, the main CPU 101 shifts the image forming apparatus 1 from the standby state to the sleep state. The time after the designated time of the auto sleep transition is a time zone (timing when the user does not operate) where it is assumed that the user does not use the image forming apparatus 1. Therefore, if TRIM is performed during this time period, it is considered that the performance when the user uses the image forming apparatus 1 is not affected.

図10は、電力状態とTRIM実施のタイミングチャートである。各電源状態は、図7で説明したのと同様である。オートスリープ移行の指定時刻(タイミングT21)は「PM23:00:00」に設定されている。スタンバイ中、メインCPU101は、RTC105からの割り込みを監視する。タイミングT21で、指定時刻である「PM23:00:00」になるとRTC105から割り込みが発生する。すると、メインCPU101は、画像形成装置1をスタンバイ状態からスリープ状態へ移行するスリープ移行処理を開始する。スリープに移行するための準備が完了すると、タイミングT22で、メインCPU101はTRIMを実施する。タイミングT23でTRIMが完了すると、画像形成装置1はスリープ状態へ移行する。従って、TRIMコマンドの発行は、オートスリープ移行の指定時刻(タイミングT21)より後に開始され、TRIMコマンドの発行完了後(タイミングT23)に、画像形成装置1がスリープ状態へ移行する。 FIG. 10 is a timing chart of the power state and the implementation of TRIM. Each power state is the same as described with reference to FIG. The designated time (timing T21) for shifting to auto sleep is set to "23:00 PM". During standby, the main CPU 101 monitors an interrupt from the RTC 105. At the timing T21, when the designated time "23:00 PM" is reached, an interrupt is generated from the RTC 105. Then, the main CPU 101 starts the sleep transition process of shifting the image forming apparatus 1 from the standby state to the sleep state. When the preparation for going to sleep is completed, the main CPU 101 executes TRIM at the timing T22. When the TRIM is completed at the timing T23, the image forming apparatus 1 shifts to the sleep state. Therefore, the issuance of the TRIM command is started after the designated time (timing T21) of the auto sleep transition, and the image forming apparatus 1 shifts to the sleep state after the issuance of the TRIM command is completed (timing T23).

図11は、スタンバイ時処理のフローチャートである。この処理は、ROM103に格納された制御プログラムをメインCPU101がRAM102に展開して実行することにより実現される。この処理は、画像形成装置1がスタンバイ状態になると開始される。 FIG. 11 is a flowchart of standby processing. This process is realized by the main CPU 101 expanding the control program stored in the ROM 103 into the RAM 102 and executing it. This process is started when the image forming apparatus 1 is in the standby state.

ステップS301では、図8のステップS101と同様の処理を実行する。ただし、ステップS301では、オートスリープ移行機能によるスリープ移行指示(割り込み発生)も、スリープ状態への移行開始指示に含まれる。スリープ状態への移行開始指示があると、メインCPU101は、ステップS302で、今回の移行開始指示が、オートスリープ移行機能によるスリープ移行指示である否かを判別する。そして、今回の移行開始指示が、オートスリープ移行機能によるスリープ移行指示でない場合は、通常の移行開始指示であるので、TRIMを実施することなく、処理をステップS306に進める。この場合、メインCPU101は、画像形成装置1をスリープ状態に移行させ、図11に示す処理を終了する。 In step S301, the same process as in step S101 of FIG. 8 is executed. However, in step S301, the sleep transition instruction (interrupt generation) by the auto sleep transition function is also included in the transition start instruction to the sleep state. When there is a transition start instruction to the sleep state, the main CPU 101 determines in step S302 whether or not the transition start instruction this time is a sleep transition instruction by the auto sleep transition function. If the transition start instruction this time is not a sleep transition instruction by the auto sleep transition function, it is a normal transition start instruction, so the process proceeds to step S306 without executing TRIM. In this case, the main CPU 101 shifts the image forming apparatus 1 to the sleep state and ends the process shown in FIG.

一方、今回の移行開始指示が、オートスリープ移行機能によるスリープ移行指示である場合は、メインCPU101は、ステップS303で、図8のステップS102と同様の処理を実行する。その際、スリープ移行処理も開始される。そして、TRIMの実施が不要と判別された場合は、メインCPU101は、TRIMを実施することなく、処理をステップS306に進める。一方、TRIMの実施が必要と判別された場合は、メインCPU101は、ステップS304で、記憶装置104におけるTRIM未完了の記憶領域を確認する。さらにスリープ移行処理が完了すると、ステップS305で、メインCPU101は、TRIMコマンドの発行を開始する。そして、TRIMコマンドの発行が完了すると、メインCPU101は、処理をステップS306に進める。 On the other hand, when the transition start instruction this time is a sleep transition instruction by the auto sleep transition function, the main CPU 101 executes the same process as step S102 in FIG. 8 in step S303. At that time, the sleep transition process is also started. Then, when it is determined that the execution of TRIM is unnecessary, the main CPU 101 proceeds to step S306 without executing TRIM. On the other hand, when it is determined that the implementation of TRIM is necessary, the main CPU 101 confirms the storage area in which TRIM has not been completed in the storage device 104 in step S304. Further, when the sleep transition process is completed, in step S305, the main CPU 101 starts issuing a TRIM command. Then, when the issuance of the TRIM command is completed, the main CPU 101 advances the process to step S306.

本実施の形態によれば、TRIMコマンドを発行する必要がある場合に、オートスリープ移行機能による割り込みが発生したときは、メインCPU101は、画像形成装置1がスリープ状態へ移行した後にTRIMコマンドの発行を開始する。さらにメインCPU101は、TRIMコマンドの発行完了後に画像形成装置1をスリープ状態に移行させる。よって、ユーザ操作のパフォーマンスへの影響を軽減しつつ、記憶装置104のパフォーマンス低下を抑制することに関し、第1の実施の形態と同様の効果を奏することができる。 According to the present embodiment, when it is necessary to issue a TRIM command and an interrupt is generated by the auto sleep transition function, the main CPU 101 issues a TRIM command after the image forming apparatus 1 shifts to the sleep state. To start. Further, the main CPU 101 puts the image forming apparatus 1 into the sleep state after the issuance of the TRIM command is completed. Therefore, it is possible to obtain the same effect as that of the first embodiment with respect to suppressing the deterioration of the performance of the storage device 104 while reducing the influence on the performance of the user operation.

(第3の実施の形態)
本発明の第3の実施の形態は、第1の実施の形態に対し、TRIM実施処理が異なり、その他の構成は同様である。本実施の形態におけるTRIM実施処理を、図12〜図14で説明する。
(Third Embodiment)
The third embodiment of the present invention is different from the first embodiment in the TRIM implementation process, and the other configurations are the same. The TRIM execution process in this embodiment will be described with reference to FIGS. 12 to 14.

TRIMを実施するタイミングとして、オートスリープ移行機能(第2の実施の形態で説明)およびスリープ自動復帰機能(第1の実施の形態で説明)を利用する方法が考えられる。オートスリープ移行機能の指定時刻を「スリープ移行指定時刻」と称する(第1の指定時刻)。スリープ自動復帰機能の指定時刻を「スリープ復帰指定時刻」と称する(第2の指定時刻)。両機能が有効になっているとき、スリープ移行指定時刻からスリープ復帰指定時刻までの時間帯を利用してTRIMを実施する方法が考えられる。上記時間帯は、ユーザが操作しないと想定される時間帯である。そのため、この時間帯にTRIMを実施すれば、ユーザが画像形成装置1を使用する際のパフォーマンスに影響を与えることがないと考えられる。 As a timing for executing TRIM, a method of using the auto sleep transition function (described in the second embodiment) and the sleep automatic wakeup function (described in the first embodiment) can be considered. The designated time of the auto sleep transition function is referred to as "sleep transition designated time" (first designated time). The designated time of the sleep automatic wakeup function is referred to as "sleep wakeup designated time" (second designated time). When both functions are enabled, a method of executing TRIM using the time zone from the designated time for sleep transition to the designated time for returning to sleep can be considered. The above time zone is a time zone that is not expected to be operated by the user. Therefore, if TRIM is performed during this time period, it is considered that the performance when the user uses the image forming apparatus 1 is not affected.

図12は、電力状態とTRIM実施のタイミングチャートである。各電源状態は、図7で説明したのと同様である。スリープ移行指定時刻(タイミングT31)は「PM23:00:00」に設定され、スリープ復帰指定時刻(タイミングT35)は「AM7:00:00」に設定されている。両機能が有効な場合、RTC105からは、スリープ移行指定時刻では第1の割り込みが発生し、スリープ復帰指定時刻では第2の割り込みが発生する。 FIG. 12 is a timing chart of the power state and the implementation of TRIM. Each power state is the same as described with reference to FIG. The sleep transition designated time (timing T31) is set to "23:00 PM", and the sleep return designated time (timing T35) is set to "7:00 AM". When both functions are enabled, the RTC105 generates a first interrupt at the sleep transition designated time and a second interrupt at the sleep wakeup designated time.

まず、スタンバイ中、メインCPU101は、RTC105からの割り込みを監視する。タイミングT31で、スリープ移行指定時刻である「PM23:00:00」になると、RTC105から第1の割り込みが発生し、メインCPU101は画像形成装置1をスタンバイ状態からスリープ状態へ移行させるスリープ移行処理を開始する。その際、メインCPU101は、TRIMコマンドの発行を開始するTRIM実施時刻(第3の指定時刻)を算出し、TRIM実施時刻に第3の割り込みが発生するよう、RTC105を設定する。TRIM実施時刻は、スリープ移行指定時刻(タイミングT31)とスリープ復帰指定時刻(タイミングT35)との間の時刻(タイミングT33)として算出される。例えば、「PM23:00:00」と「AM7:00:00」のちょうど中間の時刻である「AM3:00:00」とされる。ただし、この時刻に限定されない。例えば、「AM2:00:00」や「AM4:00:00」等でもよい。 First, during standby, the main CPU 101 monitors an interrupt from the RTC 105. At the timing T31, when the sleep transition designated time “23:00 PM” is reached, the first interrupt is generated from the RTC 105, and the main CPU 101 performs the sleep transition process of shifting the image forming apparatus 1 from the standby state to the sleep state. Start. At that time, the main CPU 101 calculates the TRIM execution time (third designated time) at which the TRIM command issuance is started, and sets the RTC 105 so that a third interrupt is generated at the TRIM execution time. The TRIM execution time is calculated as a time (timing T33) between the sleep transition designated time (timing T31) and the sleep wakeup designated time (timing T35). For example, it is set to "3:00 AM", which is a time just between "23:00 PM" and "7:00 AM". However, it is not limited to this time. For example, "2:00 AM" or "4:00 AM" may be used.

なお、メインCPU101は、第1の実施の形態と同様に、TRIM所要時間を算出し、TRIM発行の完了時刻がスリープ復帰指定時刻以前となるように、TRIM実施時刻を決定してもよい。つまり、メインCPU101は、TRIM実施時刻を、スリープ復帰指定時刻よりも、TRIM所要時間以上だけ前の時刻に設定してもよい。 The main CPU 101 may calculate the TRIM required time and determine the TRIM execution time so that the completion time of the TRIM issuance is before the sleep return designated time, as in the first embodiment. That is, the main CPU 101 may set the TRIM execution time to a time earlier than the sleep return designated time by the TRIM required time or more.

スリープに移行するための準備が完了すると、タイミングT32で、画像形成装置1はスリープ状態へ移行する。スリープ中、メインCPU101はRTC105からの割り込みの発生を待つ。そして、タイミングT33で、TRIM実施時刻である「AM3:00:00」になるとRTC105から第3の割り込みが発生する。RTC105からの第3の割り込みが発生すると、メインCPU101は節電状態から復帰し、TRIMを実施する。 When the preparation for going to sleep is completed, the image forming apparatus 1 goes to sleep at timing T32. During sleep, the main CPU 101 waits for an interrupt from the RTC 105 to occur. Then, at the timing T33, when the TRIM execution time “3:00 AM” is reached, a third interrupt is generated from the RTC 105. When the third interrupt from the RTC 105 occurs, the main CPU 101 returns from the power saving state and executes TRIM.

タイミングT34でTRIMが完了すると、画像形成装置1は再びスリープ状態へ移行し、RTC105からの割り込みの発生を待つ状態となる。そして、タイミングT35でスリープ復帰指定時刻である「AM8:00:00」になると、RTC105から第2の割り込みが発生する。すると、メインCPU101は節電状態から復帰して、画像形成装置1をスリープ状態からスタンバイ状態に移行させる。 When the TRIM is completed at the timing T34, the image forming apparatus 1 shifts to the sleep state again and waits for the occurrence of an interrupt from the RTC 105. Then, at the timing T35, when the designated time for returning to sleep is "8:00 AM", a second interrupt is generated from the RTC 105. Then, the main CPU 101 returns from the power saving state and shifts the image forming apparatus 1 from the sleep state to the standby state.

このように、スリープ移行指定時刻からスリープ復帰指定時刻の間の時間帯にTRIMが実施されるので、ユーザ操作のパフォーマンスに影響を与えないで済む。このようなTRIM実施処理を、図12に加えて図13、図14を参照してさらに説明する。 In this way, since the TRIM is executed in the time zone between the sleep transition designated time and the sleep wakeup designated time, it is not necessary to affect the performance of the user operation. Such a TRIM execution process will be further described with reference to FIGS. 13 and 14 in addition to FIG.

図13は、スタンバイ時処理のフローチャートである。この処理は、ROM103に格納された制御プログラムをメインCPU101がRAM102に展開して実行することにより実現される。この処理は、画像形成装置1がスタンバイ状態になると開始される。 FIG. 13 is a flowchart of standby processing. This process is realized by the main CPU 101 expanding the control program stored in the ROM 103 into the RAM 102 and executing it. This process is started when the image forming apparatus 1 is in the standby state.

ステップS401〜S403では、図11のステップS301〜S303と同様の処理を実行する。ただし、ステップS401では、オートスリープ移行機能によるスリープ移行指示(第1の割り込み発生)も、スリープ状態への移行開始指示に含まれる。また、ステップS402で、今回の移行開始指示が、オートスリープ移行機能によるスリープ移行指示でない場合は、メインCPU101は、ステップS404で、図8のステップS103と同様の処理を実行する。そして、ステップS409で、メインCPU101は、画像形成装置1をスリープ状態に移行させる。その後、メインCPU101は、図13に示す処理を終了する。 In steps S401 to S403, the same processing as in steps S301 to S303 of FIG. 11 is executed. However, in step S401, the sleep transition instruction (first interrupt generation) by the auto sleep transition function is also included in the transition start instruction to the sleep state. Further, in step S402, if the current transition start instruction is not a sleep transition instruction by the auto sleep transition function, the main CPU 101 executes the same process as in step S103 of FIG. 8 in step S404. Then, in step S409, the main CPU 101 shifts the image forming apparatus 1 to the sleep state. After that, the main CPU 101 ends the process shown in FIG.

ステップS403で、TRIMの実施が不要と判別された場合は、メインCPU101は、処理をステップS404に進める。一方、TRIMの実施が必要と判別された場合は、メインCPU101は、ステップS405で、記憶装置104におけるTRIM未完了の記憶領域を確認する。ステップS406で、メインCPU101は、上述のように、TRIM実施時刻を算出する。そして、ステップS407では、メインCPU101は、TRIM実施時刻にメインCPU101が節電状態から復帰できるようにするため、RTC105からTRIM実施時刻に第3の割り込みが発生するように、RTC105を設定する。 If it is determined in step S403 that the implementation of TRIM is unnecessary, the main CPU 101 advances the process to step S404. On the other hand, when it is determined that the implementation of TRIM is necessary, the main CPU 101 confirms the storage area in which TRIM has not been completed in the storage device 104 in step S405. In step S406, the main CPU 101 calculates the TRIM execution time as described above. Then, in step S407, the main CPU 101 sets the RTC 105 so that a third interrupt is generated from the RTC 105 at the TRIM execution time so that the main CPU 101 can recover from the power saving state at the TRIM execution time.

ステップS408では、メインCPU101は、TRIM実施フラグをONに設定する。さらにスリープ移行処理が完了すると、メインCPU101は、ステップS409で、画像形成装置1をスリープ状態へ移行させる(タイミングT32)。 In step S408, the main CPU 101 sets the TRIM execution flag to ON. Further, when the sleep transition process is completed, the main CPU 101 shifts the image forming apparatus 1 to the sleep state in step S409 (timing T32).

図14は、スリープ時処理のフローチャートである。この処理は、ROM103に格納された制御プログラムをメインCPU101がRAM102に展開して実行することにより実現される。この処理は、画像形成装置1がスリープ状態になると開始される。 FIG. 14 is a flowchart of sleep processing. This process is realized by the main CPU 101 expanding the control program stored in the ROM 103 into the RAM 102 and executing it. This process is started when the image forming apparatus 1 goes to sleep.

ステップS501では、メインCPU101は、スリープ状態からスタンバイ状態へ復帰させるためのスリープ復帰要求があるまで待機する。ここで、スリープ復帰要求は大別して次の3つの場合に発行される。すなわち、RTC105から、第2の割り込み(T35)が発生した場合、第3の割り込み(T33)が発生した場合、または、ユーザによる操作部109の操作があった場合に、スリープ復帰要求は発行される。スリープ復帰要求があると、ステップS502で、メインCPU101は、節電状態から復帰する。すなわち、メインCPU101だけ、スリープ状態から復帰する。 In step S501, the main CPU 101 waits until there is a sleep wakeup request for returning from the sleep state to the standby state. Here, the sleep wakeup request is roughly classified into the following three cases. That is, the sleep wakeup request is issued from the RTC 105 when the second interrupt (T35) is generated, when the third interrupt (T33) is generated, or when the operation unit 109 is operated by the user. To. When there is a sleep wakeup request, the main CPU 101 wakes up from the power saving state in step S502. That is, only the main CPU 101 wakes up from the sleep state.

ステップS503では、ステップS501で受けたスリープ復帰要求が、時刻指定による自動復帰、すなわち、RTC105からの割り込みによるものであるか否かを判別する。スリープ復帰要求が、RTC105からの割り込みによるものでない場合、ユーザによる操作部109の操作があったことによるスリープ復帰要求である。この場合、メインCPU101は、TRIMを実施することなく、処理をステップS508で画像形成装置1をスタンバイ状態に移行させ、図14に示す処理を終了する。 In step S503, it is determined whether or not the sleep wakeup request received in step S501 is an automatic wakeup by specifying a time, that is, an interrupt from the RTC105. When the sleep wakeup request is not due to an interrupt from the RTC 105, it is a sleep wakeup request due to an operation of the operation unit 109 by the user. In this case, the main CPU 101 shifts the image forming apparatus 1 to the standby state in step S508 without executing TRIM, and ends the process shown in FIG.

一方、ステップS501で受けたスリープ復帰要求が、RTC105からの割り込みによるものである場合は、ステップS504で、メインCPU101は、TRIM実施フラグがONであるか否かを判別する。そして、TRIM実施フラグがOFFである場合は、スリープ復帰要求が、RTC105からの第2の割り込みによるものであることを意味する。そこでメインCPU101は、TRIMを実施することなく、処理をステップS508に進める。しかし、TRIM実施フラグがONである場合は、スリープ復帰要求が、RTC105からの第3の割り込みによるものであることを意味する。そこで、メインCPU101は、TRIMを実施するために、処理をステップS505に進める。 On the other hand, when the sleep wakeup request received in step S501 is due to an interrupt from RTC 105, in step S504, the main CPU 101 determines whether or not the TRIM execution flag is ON. When the TRIM execution flag is OFF, it means that the sleep wakeup request is due to the second interrupt from the RTC105. Therefore, the main CPU 101 proceeds to step S508 without executing TRIM. However, when the TRIM execution flag is ON, it means that the sleep wakeup request is due to the third interrupt from the RTC105. Therefore, the main CPU 101 advances the process to step S505 in order to carry out TRIM.

ステップS505では、メインCPU101は、図9のステップS205と同様に、TRIMコマンドの発行を開始する(T33)。TRIMを実施する記憶領域は、スリープ移行前に決めた記憶領域である。そして、TRIMコマンドの発行が完了すると、メインCPU101は、ステップS506で、図9のステップS206と同様に、TRIM実施フラグをOFFに設定する。ステップS507では、メインCPU101は、画像形成装置1を再びスリープ状態に移行させ、処理をステップS501に戻す。従って、再びスリープ復帰要求を待つ状態となる。 In step S505, the main CPU 101 starts issuing a TRIM command as in step S205 of FIG. 9 (T33). The storage area for performing TRIM is a storage area determined before the sleep transition. Then, when the issuance of the TRIM command is completed, the main CPU 101 sets the TRIM execution flag to OFF in step S506, as in step S206 of FIG. In step S507, the main CPU 101 puts the image forming apparatus 1 into the sleep state again, and returns the process to step S501. Therefore, it is in a state of waiting for the sleep wakeup request again.

なお、ステップS505〜S507を経由した後のステップS504では、TRIM実施フラグはOFFになっているので、第2の割り込みが受信したことに応じて、ステップS508が実行される(T35)。 In step S504 after passing through steps S505 to S507, the TRIM execution flag is OFF, so step S508 is executed in response to the reception of the second interrupt (T35).

本実施の形態によれば、スリープ移行指定時刻の後で且つスリープ復帰指定時刻より前に、TRIMコマンドの発行が開始される。言い換えると、画像形成装置1がスタンバイ状態からスリープ状態へ移行した後で且つスタンバイ状態へ復帰する前に、TRIMコマンドの発行が開始される。すなわち、メインCPU101は、第1の割り込みが発生した際に、スリープ復帰指定時刻(T35)より前のTRIM実施時刻(T33)に第3の割り込みが発生するようにRTC105を設定する。そして、メインCPU101は、第3の割り込みが発生するとTRIMコマンドの発行を開始し、その後、第2の割り込みが発生すると画像形成装置1をスタンバイ状態へ復帰させる。言い換えると、画像形成装置1がスタンバイ状態からスリープ状態へ移行した後で且つスリープ状態からスタンバイ状態へ復帰する前に、TRIMコマンドが発行される。よって、ユーザ操作のパフォーマンスへの影響を軽減しつつ、記憶装置104のパフォーマンス低下を抑制することに関し、第1の実施の形態と同様の効果を奏することができる。 According to the present embodiment, the issuance of the TRIM command is started after the sleep transition designated time and before the sleep wakeup designated time. In other words, the issuance of the TRIM command is started after the image forming apparatus 1 shifts from the standby state to the sleep state and before returning to the standby state. That is, the main CPU 101 sets the RTC 105 so that when the first interrupt occurs, the third interrupt occurs at the TRIM execution time (T33) before the sleep wakeup designated time (T35). Then, the main CPU 101 starts issuing the TRIM command when the third interrupt occurs, and then returns the image forming apparatus 1 to the standby state when the second interrupt occurs. In other words, the TRIM command is issued after the image forming apparatus 1 has transitioned from the standby state to the sleep state and before returning from the sleep state to the standby state. Therefore, it is possible to obtain the same effect as that of the first embodiment with respect to suppressing the deterioration of the performance of the storage device 104 while reducing the influence on the performance of the user operation.

なお、上記各実施の形態において、「スリープ状態」とは通常の動作状態に対して相対的に節電された状態であることを指している。例えば自動で電源がオン・オフされる画像形成装置において、「電源オフ状態」が「スリープ状態」と同じ電力状態であれば、「スリープ状態」を「電源オフ状態」と読み替えて本発明を適用可能である。 In each of the above embodiments, the "sleep state" refers to a state in which power is saved relative to the normal operating state. For example, in an image forming apparatus in which the power is automatically turned on / off, if the "power off state" is the same power state as the "sleep state", the "sleep state" is read as the "power off state" and the present invention is applied. It is possible.

なお、本発明は、画像形成装置に限らず、複数に分割された記憶領域を有する記憶装置を備える各種の情報処理装置に適用可能である。 The present invention is not limited to the image forming apparatus, and can be applied to various information processing devices including a storage device having a storage area divided into a plurality of parts.

以上、本発明をその好適な実施形態に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。上述の実施形態の一部を適宜組み合わせてもよい。 Although the present invention has been described in detail based on the preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various embodiments within the scope of the gist of the present invention are also included in the present invention. included. Some of the above-described embodiments may be combined as appropriate.

101 メインCPU
104 記憶装置
105 RTC
203〜207 記憶領域
101 main CPU
104 Storage device 105 RTC
203-207 Storage area

Claims (19)

複数に分割された記憶領域を有する記憶装置を備える画像形成装置であって、
前記画像形成装置を指定時刻に省電力状態から通常電力状態へ復帰させる移行手段と、
前記記憶装置における使用しなくなった記憶領域を通知するTRIMコマンドを発行する発行手段と、を有し、
前記発行手段は、前記画像形成装置が前記省電力状態に移行した場合において、前記TRIMコマンドを発行する必要があるときは、前記TRIMコマンドを前記指定時刻より前に発行することを特徴とする画像形成装置。
An image forming apparatus including a storage device having a storage area divided into a plurality of parts.
A transition means for returning the image forming apparatus from the power saving state to the normal power state at a designated time, and
It has an issuing means for issuing a TRIM command notifying a storage area that is no longer used in the storage device.
The issuing means is characterized in that when the image forming apparatus shifts to the power saving state and it is necessary to issue the TRIM command, the TRIM command is issued before the designated time. Forming device.
前記発行手段は、前記画像形成装置が前記省電力状態に移行した場合において、前記TRIMコマンドを発行する必要があるときは、前記TRIMコマンドを、前記画像形成装置が前記通常電力状態へ復帰する前に発行することを特徴とする請求項1に記載の画像形成装置。 When the issuing means needs to issue the TRIM command when the image forming apparatus shifts to the power saving state, the issuing means issues the TRIM command before the image forming apparatus returns to the normal power state. The image forming apparatus according to claim 1, wherein the image forming apparatus is issued in 1. 前記発行手段は、前記指定時刻よりも、前記TRIMコマンドの発行の所要時間以上だけ前の時刻に、前記TRIMコマンドの発行を開始することを特徴とする請求項1または2に記載の画像形成装置。 The image forming apparatus according to claim 1 or 2, wherein the issuing means starts issuing the TRIM command at a time equal to or longer than the time required for issuing the TRIM command. .. 前記通常電力状態へ復帰させるための割り込みを前記指定時刻に発生させる発生手段を有し、
前記移行手段は、前記発生手段により前記割り込みが発生したことに応じて、前記画像形成装置を省電力状態から前記通常電力状態へ復帰させ、
前記発行手段は、前記TRIMコマンドを発行する必要がある場合は、前記省電力状態への移行の際に、前記発生手段による前記割り込みが発生する時刻を、前記指定時刻より前の時刻に変更し、
割り込みが発生する時刻が変更された後の割り込みが前記発生手段により発生した場合、前記発行手段は、前記TRIMコマンドの発行を開始すると共に、前記移行手段は、前記TRIMコマンドの発行完了後に前記画像形成装置を前記省電力状態から前記通常電力状態へ復帰させることを特徴とする請求項1に記載の画像形成装置。
It has a generating means for generating an interrupt for returning to the normal power state at the designated time.
The transition means returns the image forming apparatus from the power saving state to the normal power state in response to the occurrence of the interrupt by the generating means.
When the issuing means needs to issue the TRIM command, the issuing means changes the time at which the interrupt by the generating means occurs to a time before the designated time at the time of transition to the power saving state. ,
When an interrupt is generated by the generating means after the time at which the interrupt is generated is changed, the issuing means starts issuing the TRIM command, and the transition means receives the image after the issuance of the TRIM command is completed. The image forming apparatus according to claim 1, wherein the forming apparatus is returned from the power saving state to the normal power state.
前記発行手段は、前記TRIMコマンドを発行する必要がある場合は、前記省電力状態への移行の際に、前記発生手段による割り込みが発生する時刻を、前記指定時刻よりも、前記TRIMコマンドの発行の所要時間以上だけ前の時刻に変更することを特徴とする請求項4に記載の画像形成装置。 When the issuing means needs to issue the TRIM command, the issuing means issues the TRIM command at a time when an interrupt by the generating means occurs at the time of transition to the power saving state, rather than the designated time. The image forming apparatus according to claim 4, wherein the time is changed to a time earlier than the required time of the above. 複数に分割された記憶領域を有する記憶装置を備える画像形成装置であって、
前記画像形成装置を指定時刻に通常電力状態から省電力状態へ移行させる移行手段と、
前記記憶装置における使用しなくなった記憶領域を通知するTRIMコマンドを発行する発行手段と、を有し、
前記発行手段は、前記TRIMコマンドを発行する必要がある場合は、前記TRIMコマンドを前記指定時刻より後に発行することを特徴とする画像形成装置。
An image forming apparatus including a storage device having a storage area divided into a plurality of parts.
A transition means for shifting the image forming apparatus from a normal power state to a power saving state at a specified time, and
It has an issuing means for issuing a TRIM command notifying a storage area that is no longer used in the storage device.
An image forming apparatus, wherein the issuing means issues the TRIM command after the designated time when it is necessary to issue the TRIM command.
前記発行手段は、前記TRIMコマンドを発行する必要がある場合は、前記TRIMコマンドを、前記画像形成装置が前記省電力状態へ移行した後に発行することを特徴とする請求項6に記載の画像形成装置。 The image forming according to claim 6, wherein the issuing means issues the TRIM command after the image forming apparatus shifts to the power saving state when it is necessary to issue the TRIM command. apparatus. 前記省電力状態へ移行させるための割り込みを前記指定時刻に発生させる発生手段を有し、
前記移行手段は、前記発生手段により前記割り込みが発生したことに応じて、前記画像形成装置を前記省電力状態へ移行させ、
前記TRIMコマンドを発行する必要がある場合に、前記発生手段により前記割り込みが発生したときは、前記発行手段は、前記画像形成装置が前記省電力状態へ移行した後に前記TRIMコマンドの発行を開始すると共に、前記移行手段は前記TRIMコマンドの発行完了後に前記画像形成装置を前記省電力状態へ移行させることを特徴とする請求項6または7に記載の画像形成装置。
It has a generating means for generating an interrupt for shifting to the power saving state at the designated time.
The transition means shifts the image forming apparatus to the power saving state in response to the generation of the interrupt by the generation means.
When it is necessary to issue the TRIM command and the interrupt is generated by the generating means, the issuing means starts issuing the TRIM command after the image forming apparatus shifts to the power saving state. The image forming apparatus according to claim 6 or 7, wherein the transition means shifts the image forming apparatus to the power saving state after the issuance of the TRIM command is completed.
複数に分割された記憶領域を有する記憶装置を備える画像形成装置であって、
前記画像形成装置を第1の指定時刻に通常電力状態から省電力状態へ移行させると共に、前記画像形成装置を前記第1の指定時刻より後の第2の指定時刻に前記省電力状態から前記通常電力状態へ復帰させる移行手段と、
前記記憶装置における使用しなくなった記憶領域を通知するTRIMコマンドを発行する発行手段と、を有し、
前記発行手段は、前記TRIMコマンドを発行する必要がある場合は、前記第1の指定時刻の後で且つ前記第2の指定時刻より前に、前記TRIMコマンドを発行することを特徴とする画像形成装置。
An image forming apparatus including a storage device having a storage area divided into a plurality of parts.
The image forming apparatus is shifted from the normal power state to the power saving state at the first designated time, and the image forming apparatus is moved from the power saving state to the normal power saving state at the second designated time after the first designated time. A transitional means to return to the power state,
It has an issuing means for issuing a TRIM command notifying a storage area that is no longer used in the storage device.
The image forming means is characterized in that, when it is necessary to issue the TRIM command, the issuing means issues the TRIM command after the first designated time and before the second designated time. apparatus.
前記発行手段は、前記TRIMコマンドを発行する必要がある場合は、前記画像形成装置が前記通常電力状態から前記省電力状態へ移行した後で且つ前記画像形成装置が前記省電力状態から前記通常電力状態へ復帰する前に、前記TRIMコマンドを発行することを特徴とする請求項9に記載の画像形成装置。 When the issuing means needs to issue the TRIM command, after the image forming apparatus shifts from the normal power state to the power saving state and the image forming apparatus shifts from the power saving state to the normal power state. The image forming apparatus according to claim 9, wherein the TRIM command is issued before returning to the state. 前記発行手段は、前記第2の指定時刻よりも、前記TRIMコマンドの発行の所要時間以上だけ前の時刻に、前記TRIMコマンドの発行を開始することを特徴とする請求項9または10に記載の画像形成装置。 The method according to claim 9 or 10, wherein the issuing means starts issuing the TRIM command at a time equal to or longer than the time required for issuing the TRIM command from the second designated time. Image forming device. 前記省電力状態へ移行させるための第1の割り込みを前記第1の指定時刻に発生させると共に、前記通常電力状態へ復帰させるための第2の割り込みを前記第2の指定時刻に発生させる発生手段を有し、
前記移行手段は、前記発生手段により前記第1の割り込みが発生したことに応じて、前記画像形成装置を前記通常電力状態から前記省電力状態へ移行させると共に、前記発生手段により前記第2の割り込みが発生したことに応じて、前記画像形成装置を前記省電力状態から前記通常電力状態へ復帰させ、
前記発行手段は、前記TRIMコマンドを発行する必要がある場合は、前記第1の割り込みが発生した際に、前記第2の指定時刻より前の第3の指定時刻に第3の割り込みが発生するように前記発生手段を設定し、
前記発生手段により前記第3の割り込みが発生すると、前記発行手段は前記TRIMコマンドの発行を開始し、その後、前記発生手段により前記第2の割り込みが発生すると、前記移行手段は前記画像形成装置を前記省電力状態から前記通常電力状態へ復帰させることを特徴とする請求項9に記載の画像形成装置。
A generating means for generating a first interrupt for shifting to the power saving state at the first designated time and a second interrupt for returning to the normal power state at the second designated time. Have,
The transition means shifts the image forming apparatus from the normal power state to the power saving state in response to the generation of the first interrupt by the generation means, and the second interrupt by the generation means. The image forming apparatus is returned from the power saving state to the normal power state in response to the occurrence of the above.
When the issuing means needs to issue the TRIM command, when the first interrupt is generated, the third interrupt is generated at the third designated time before the second designated time. The generation means is set so as to
When the third interrupt is generated by the generating means, the issuing means starts issuing the TRIM command, and then when the second interrupt is generated by the generating means, the transition means causes the image forming apparatus. The image forming apparatus according to claim 9, wherein the image forming apparatus returns from the power saving state to the normal power state.
前記発行手段は、前記TRIMコマンドを発行する必要がある場合は、前記省電力状態への移行の際に、前記発生手段による前記第3の割り込みが発生する前記第3の指定時刻を、前記第2の指定時刻よりも、前記TRIMコマンドの発行の所要時間以上だけ前の時刻に設定することを特徴とする請求項12に記載の画像形成装置。 When it is necessary to issue the TRIM command, the issuing means sets the third designated time at which the third interrupt by the generating means is generated at the time of transition to the power saving state. The image forming apparatus according to claim 12, wherein the time is set to a time equal to or longer than the time required for issuing the TRIM command. 少なくとも、前記発行手段による前記TRIMコマンドの発行開始から発行完了までの期間は、ユーザインターフェイスへ電力が供給されないことを特徴とする請求項1乃至13のいずれか1項に記載の画像形成装置。 The image forming apparatus according to any one of claims 1 to 13, wherein power is not supplied to the user interface during the period from the start of issuance of the TRIM command by the issuing means to the completion of issuance. 前記発行手段による前記TRIMコマンドの発行をユーザの指示に従い禁止する手段を有することを特徴とする請求項1乃至14のいずれか1項に記載の画像形成装置。 The image forming apparatus according to any one of claims 1 to 14, further comprising means for prohibiting the issuance of the TRIM command by the issuing means in accordance with a user's instruction. 前記発行手段は、前回にTRIMコマンドを発行してから前記画像形成装置が使用されていないか、または、前記TRIMコマンドの発行が禁止されている場合に、前記TRIMコマンドを発行する必要がないと判定することを特徴とする請求項1乃至15のいずれか1項に記載の画像形成装置。 The issuing means does not need to issue the TRIM command when the image forming apparatus has not been used since the last issue of the TRIM command or when the issuance of the TRIM command is prohibited. The image forming apparatus according to any one of claims 1 to 15, wherein the image forming apparatus is determined. 複数に分割された記憶領域を有する記憶装置を備える画像形成装置の制御方法であって、
前記画像形成装置を指定時刻に省電力状態から通常電力状態へ復帰させ、
前記画像形成装置が前記省電力状態に移行した場合において、前記記憶装置における使用しなくなった記憶領域を通知するTRIMコマンドを発行する必要があるときは、前記TRIMコマンドを前記指定時刻より前に発行することを特徴とする画像形成装置の制御方法。
It is a control method of an image forming apparatus including a storage device having a storage area divided into a plurality of parts.
The image forming apparatus is returned from the power saving state to the normal power state at a specified time, and then the image forming apparatus is returned to the normal power state.
When the image forming apparatus shifts to the power saving state and it is necessary to issue a TRIM command notifying the storage area that is no longer used in the storage device, the TRIM command is issued before the designated time. A method of controlling an image forming apparatus, which comprises performing.
複数に分割された記憶領域を有する記憶装置を備える画像形成装置の制御方法であって、
前記画像形成装置を指定時刻に通常電力状態から省電力状態へ移行させ、
前記記憶装置における使用しなくなった記憶領域を通知するTRIMコマンドを発行する必要がある場合は、前記TRIMコマンドを前記指定時刻より後に発行することを特徴とする画像形成装置の制御方法。
It is a control method of an image forming apparatus including a storage device having a storage area divided into a plurality of parts.
The image forming apparatus is shifted from the normal power state to the power saving state at a specified time, and then the image forming apparatus is changed to the power saving state.
A control method for an image forming apparatus, which comprises issuing a TRIM command after a designated time when it is necessary to issue a TRIM command for notifying a storage area that is no longer used in the storage device.
複数に分割された記憶領域を有する記憶装置を備える画像形成装置の制御方法であって、
前記画像形成装置を第1の指定時刻に通常電力状態から省電力状態へ移行させると共に、前記画像形成装置を前記第1の指定時刻より後の第2の指定時刻に前記省電力状態から前記通常電力状態へ復帰させ、
前記記憶装置における使用しなくなった記憶領域を通知するTRIMコマンドを発行する必要がある場合は、前記第1の指定時刻の後で且つ前記第2の指定時刻より前に、前記TRIMコマンドを発行することを特徴とする画像形成装置の制御方法。

It is a control method of an image forming apparatus including a storage device having a storage area divided into a plurality of parts.
The image forming apparatus is shifted from the normal power state to the power saving state at the first designated time, and the image forming apparatus is moved from the power saving state to the normal power saving state at the second designated time after the first designated time. Return to power state,
When it is necessary to issue a TRIM command notifying the storage area that is no longer used in the storage device, the TRIM command is issued after the first designated time and before the second designated time. A method for controlling an image forming apparatus.

JP2019212455A 2019-11-25 2019-11-25 Image forming apparatus and control method thereof Pending JP2021086206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019212455A JP2021086206A (en) 2019-11-25 2019-11-25 Image forming apparatus and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019212455A JP2021086206A (en) 2019-11-25 2019-11-25 Image forming apparatus and control method thereof

Publications (1)

Publication Number Publication Date
JP2021086206A true JP2021086206A (en) 2021-06-03

Family

ID=76087651

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019212455A Pending JP2021086206A (en) 2019-11-25 2019-11-25 Image forming apparatus and control method thereof

Country Status (1)

Country Link
JP (1) JP2021086206A (en)

Similar Documents

Publication Publication Date Title
US11067932B2 (en) Information processing apparatus capable of appropriately executing shutdown processing, method of controlling the information processing apparatus, and storage medium
US9513853B2 (en) Data processing apparatus capable of controlling power supply, control method therefor, and storage medium
JP2008087353A (en) Electronic device with power saving function
JP5822749B2 (en) Image forming apparatus, image forming apparatus control method, and program
KR20140100502A (en) Image forming apparatus, method for controlling image forming apparatus, and program
US9513694B2 (en) Information processing apparatus and power-source switching method
JP2014232366A (en) Image forming apparatus, control method thereof, and program
JP6489751B2 (en) Data processing apparatus, control method therefor, and program
US20160041605A1 (en) Image processing apparatus, control method therefor and storage medium
JP2017130071A (en) Image processing apparatus, memory control device, and memory control method
US8823984B2 (en) Image processing apparatus, controlling method of image processing apparatus, and program
JP2018078485A (en) Information processing apparatus and starting method of information processing apparatus
JP2010129042A (en) Power supply switching control circuit, image forming apparatus, power supply switching control method, and computer program
JP2021086206A (en) Image forming apparatus and control method thereof
US10732702B2 (en) Data processing apparatus, method of controlling data processing apparatus, and recording medium
JP6074486B2 (en) Image processing apparatus, control method thereof, and program
JP2016068521A (en) Image forming apparatus, control method thereof, and program
JP2008067299A (en) Image forming apparatus
JP6842641B2 (en) Image forming device
JP2009177387A (en) Multifunction apparatus and power saving method of the apparatus
JP6459543B2 (en) Image forming apparatus, job processing control method, and job processing control program
US11372603B2 (en) Image forming apparatus and non-transitory computer readable medium
JP2005262586A (en) Image forming apparatus
JP2017147529A (en) Image forming apparatus, method for controlling task and program for controlling task in the apparatus
JP6481378B2 (en) Image forming apparatus, task control method and task control program in the same