Image processing apparatus and non-transitory computer-readable recording medium encoded with mode switching program

An image processing apparatus includes a volatile first storage, a non-volatile second storage, a host controller, a guest controller, an emulator that emulates access to the first storage and the second storage by the host controller such that the guest controller accesses the first storage and the second storage, and an application portion that controls the host controller to access the first storage and the second storage. Any one of the application portion and the emulator includes a transfer portion that stores data that is stored in a predetermined region of the second storage in a certain region of the first storage before the application portion stops the second storage. The emulator includes an access destination converter that converts access to the second storage by the guest controller into access to the certain region of the first storage after the second storage is stopped.

This application is based on Japanese Patent Application No. 2016-117177 filed with Japan Patent Office on Jun. 13, 2016, the entire content of which is hereby incorporated by reference.

BACKGROUND

Field of the Invention

The present invention relates to an image processing apparatus and a non-transitory computer-readable recording medium encoded with a mode switching program. In particular, the present invention relates to an image processing apparatus in which a plurality of operating systems are installed and a non-transitory computer-readable recording medium encoded with a mode switching program executed in the image processing apparatus.

Description of the Related Art

In recent years, a hypervisor has been known as a virtualization technique for realizing a virtual machine. In an MFP (Multi Function Peripheral) represented by an image processing apparatus for processing images, if the virtual machine is realized, various types of application programs can be executed in the MFP. On the other hand, in the case where the MFP is not used, it is desirable that a state of the MFP is changed to a power saving state for the request to save power.

For example, Japanese Patent Application Laid-Open No. 2012-18515 discloses an information processing apparatus, including a device, that includes a plurality of guest virtual machines that execute processes for the device, a device driver virtual machine that executes an access process to the device on behalf of the plurality of guest virtual machines, a counter that, as for each of the plurality of guest virtual machines accessing the device via the device driver virtual machine, counts an elapsed time period in which one of the plurality of guest virtual machines and the device are not accessing each other as a non-access time period, a storage that stores operation profile information that associates the non-access time period with operation mode information indicating an operation mode of the device, a determiner that determines an operation mode with reference to the operation profile information based on the counted non-access time period, and a transition controller that changes the operation mode of the device to the determined operation mode.

However, depending on an application program installed in the MFP, there is a program required to be executed without being stopped even in a power saving state. For example, in the case where an operation mode of a device that is not used by an application program executed in a first guest virtual machine is changed to a power saving operation mode, the device is sometimes used by an application program executed in a second guest virtual machine. In this case, the second guest virtual machine cannot be informed of the change, of the operation mode of the device to the power saving operation mode, made by the first guest virtual machine. Therefore, the second guest virtual machine cannot access the second guest virtual machine or that it takes time to activate the device.

SUMMARY

According to one or more embodiments of the present invention, an image processing apparatus includes a hardware processor, a volatile first storage, and a non-volatile second storage, wherein the hardware processor includes a host controller that is formed by execution of a first operating system program and controls the first storage and the second storage, a guest controller that is formed by execution of a second operating system program, an emulator that emulates access to the first storage and the second storage by the host controller such that the guest controller accesses the first storage and the second storage, and an application portion that is formed by execution of an application program and controls the host controller in order to access the first storage and the second storage, any one of the application portion and the emulator includes a transfer portion that, before the application portion stops the second storage, stores data, stored in a predetermined region of the second storage, in a certain region of the first storage, and the emulator includes an access destination converter that, after the second storage is stopped by the application portion, converts access to the second storage by the guest controller into access to the certain region of the first storage.

According to one or more embodiments of the present invention, an image processing apparatus comprising a hardware processor, a volatile first storage, and a non-volatile second storage, the hardware processor including a host controller that is formed by execution of a first operating system program and controls the first storage and the second storage, a guest controller that is formed by execution of a second operating system program, and an application portion that is formed by execution of an application program and controls the host controller in order to access the first storage and the second storage, wherein the host controller includes a hypervisor that controls access to the first storage and the second storage by the guest controller, the guest controller includes a virtual driver for controlling the hypervisor in order to access the second storage, and the hypervisor includes a transfer portion that, before the second storage is stopped by the application portion, stores data, stored in a predetermined region of the second storage, in a certain region of the first storage, and an access destination converter that, after the second storage is stopped, converts access to the second storage by the virtual driver into access to the certain region of the first storage.

According to one or more embodiments of the present invention, a non-transitory computer-readable recording medium encoded with an operation mode switching program that includes an application program and an emulate program which are executed by a computer that controls an image processing apparatus, the image processing apparatus comprising a volatile first storage, and a non-volatile second storage, the computer comprising a host operating system that executes a first operating system program and controls the first storage and the second storage, a guest operating system that executes a second operating system program, an emulate task that is formed by execution of the emulate program, and emulates access to the first storage and the second storage by the host operating system such that the guest operating system accesses the first storage and the second storage, and an application task that is formed by execution of the application program and controls the host operating system in order to access the first storage and the second storage, and the computer causing any one of the application task and the emulate task to perform a transfer step of, before the application task stops the second storage, storing data, stored in a predetermined region of the second storage, in a certain region of the first storage, and the emulate task to perform an access destination conversion step of, after the second storage is stopped by the application task, converting access to the second storage by the guest operating system into access to the certain region of the first storage.

According to one or more embodiments of the present invention, a non-transitory computer-readable recording medium encoded with an operation mode switching program that is executed by a computer that controls an image processing apparatus, the image forming apparatus comprising a volatile first storage, and a non-volatile second storage, and the computer comprising a host operating system that executes a first operating system program and controls the first storage and the second storage, a guest operating system that executes a second operating system program, and an application task that is formed by execution of an application program and controls the host operating system in order to access the first storage and the second storage, wherein the host operating system includes a hypervisor that is formed in the case where the computer executes the operation mode switching program included in the first operating system program, and controls access to the first storage and the second storage by the guest operating system, the guest operating system includes a virtual driver for controlling the hypervisor in order to access the second storage, and the guest operating system causes the hypervisor to perform a transfer step of, before the second storage is stopped by the application task, storing data, stored in a predetermined region of the second storage, in a certain region of the first storage, and an access destination conversion step of, after the second storage is stopped, converting access to the second storage by the virtual driver into access to the certain region of the first storage.

The foregoing and other features, aspects, and advantages of one or more embodiments of the present invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.

DETAILED DESCRIPTION

Embodiments of the present invention will be described below with reference to the drawings. In the following description, the same parts are denoted with the same reference characters. Their names and functions are also the same. Thus, a detailed description thereof will not be repeated.

FIG. 1is a perspective view showing the appearance of an MFP in accordance with one or more embodiments.FIG. 2is a block diagram showing an outline of a hardware configuration of the MFP in accordance with one or more embodiments. Referring toFIGS. 1 and 2, the MFP100that functions as an image forming apparatus includes a main circuit110, a document scanning unit130for scanning a document, an automatic document feeder120for conveying a document to the document scanning unit130, an image forming unit140for forming an image on a sheet of paper or other medium based on image data output by the document scanning unit130that has scanned the document, a paper feed unit150for supplying sheets of paper to the image forming unit140and an operation panel160serving as a user interface.

The main circuit110includes a CPU (Central Processing Unit)111, a communication interface (I/F) unit112, a ROM113, a RAM114, a hard disk drive (HDD)115as a mass storage, a facsimile unit116, and an external storage device117on which a CD-ROM (Compact Disk ROM)118is mounted. The CPU111is connected to the automatic document feeder120, the document scanning unit130, the image forming unit140, the paper feed unit150and the operation panel160, and controls the entire MFP100.

The ROM113stores a program executed by the CPU111or data necessary for execution of the program. The RAM114is used as a work area when the CPU111executes a program.

The communication I/F unit112is an interface for connecting the MFP100to a network. The CPU111communicates with a computer connected to the network via the communication I/F unit112, and transmits and receives data. Further, the communication I/F unit112can communicate with a computer connected to the Internet via the network.

The facsimile unit116is connected to the public switched telephone networks (PSTN) and transmits facsimile data to or receives facsimile data from the PSTN. The facsimile unit116stores the received facsimile data in the HDD115or outputs the received facsimile data to the image forming unit140. The image forming unit140prints the facsimile data received by the facsimile unit116on a sheet of paper. Further, the facsimile unit116converts the data stored in the HDD115into facsimile data, and transmits the facsimile data to a facsimile device connected to the PSTN.

The external storage device117is mounted with the CD-ROM118. The CPU111is capable of accessing the CD-ROM118via the external storage device117. The CPU111loads a program, recorded in the CD-ROM118which is mounted on the external storage device117, into the RAM114for execution. It is noted that the medium for storing the program executed by the CPU111is not limited to the CD-ROM118. It may be an optical disk (MO (Magnetic Optical Disk)/MD (Mini Disk)/DVD (Digital Versatile Disk)), an IC card, an optical card, and a semiconductor memory such as a mask ROM, an EPROM (Erasable Programmable ROM) and an EEPROM (Electrically EPROM).

Further, the program executed by the CPU111is not restricted to the program recorded in the CD-ROM118, and the CPU111may load a program, stored in the HDD115, into the RAM114for execution. In this case, another computer connected to the network may rewrite the program stored in the HDD115of the MFP100, or may additionally write a new program therein. Further, the MFP100may download a program from another computer connected to the network, and store the program in the HDD115. The program referred to here includes not only a program directly executable by the CPU111but also a source program, a compressed program, an encrypted program or the like.

The operation panel160includes a display unit161and an operation unit163. The display unit161is a Liquid Crystal Display (LCD) device or an organic ELD (Electroluminescence Display) device, for example, and displays instruction menus to users, information about the acquired image data, and the like. The operation unit163includes a touch panel165and a hard key unit167. The touch panel165is a capacitance type. Not only the capacitance type but also another type such as a resistive film type, a surface acoustic wave type, an infrared type and an electromagnetic induction type can be used for the touch panel165. The hard key unit167includes a plurality of hard keys. The hard keys are contact switches, for example.

FIG. 3is a diagram showing one example of functions of the CPU included in the MFP in accordance with one or more embodiments. Referring toFIG. 3, the CPU111includes a host control portion51, a guest control portion53, an emulate portion55, a first application portion57and a second application program59.

The host control portion51is a task formed in the case where the CPU111executes a first operating system program. The host control portion51controls hardware resources included in the MFP100. The hardware resources include the automatic document feeder120, the document scanning unit130, the image forming unit140, the paper feed unit150and the operation panel160in addition to the communication I/F unit112, the ROM113, the RAM114, the HDD115, the facsimile unit116and the external storage device117included in the main circuit110.

The guest control portion53is a task formed in the case where the CPU111executes a second operating system program. The second operating system program is different from the first operating system program.

The emulate portion55is formed in the case where the CPU111executes an emulate program. The emulate program is an application program compatible with the first operating system program. The emulate portion55is a virtual device for the guest control portion53, and emulates the control of the hardware resources by the host control portion51. The emulate portion55allows the guest control portion53to function as a virtual machine. Thus, the guest control portion53can control the hardware resources included in the MFP100.

The first application portion57is a task formed in the case where the CPU111executes a first application program compatible with the first operating system program. The first application portion57controls the host control portion51, thereby being capable of controlling the hardware resources included in the MFP100.

Each of the first application portion57and the emulate portion55can control the host control portion51and is managed by the host control portion51. Therefore, the first application portion57and the emulate portion55can identify each other, thereby being capable of communicating with each other by using inter-process communication or the like.

The second application portion59is a task formed in the case where the CPU111executes a second application program compatible with the second operating system program. The second application portion59controls the guest control portion53, thereby being capable of controlling the hardware resources included in the MFP100.

The first application portion57includes a mode switching portion77that switches operation modes of the MFP100, an image processing portion79that processes image data, a stop prediction portion61, a transfer portion63, a transfer completion notification portion65, a stop portion67, an activation portion69, an activation start notification portion71, a data recovery portion73and an activation completion notification portion75.

The image processing portion79controls the hardware resources included in the MFP100and processes the image data. The processes that can be executed by the image processing portion79include, for example, a scan process of controlling the automatic document feeder120and the document scanning unit130and scanning a document to output the image data, a facsimile transmission reception process of controlling the facsimile unit116and transmitting and receiving facsimile data that is the image data, a data transmission reception process of controlling the communication I/F unit112and transmitting and receiving the image data, an image data management process of controlling the HDD115, and an image forming process of controlling the image forming unit140and the paper feed unit150and forming an image of the image data on a sheet of paper. The image data management process includes a process of storing the image data in the HDD115, a process of scanning the image data stored in the HDD115, and a process of editing and deleting the image data stored in the HDD115. The image processing portion79executes a process in accordance with an operation of inputting in the operation unit163by a user. Further, the image forming portion79executes a process in response to reception of a print job, defining a process of forming an image of the image data, by the communication I/F unit112or reception of facsimile data by the facsimile unit116.

In the case where executing an image process, the image processing portion79stores image data to be processed in the RAM114. Therefore, in the RAM114, a region for storing the image data to be processed by the image processing portion79is defined in advance. The predetermined region for storing the image data in the RAM114is referred to as an image region.

The mode switching portion77switches an operation mode of the MFP100to any one of a normal mode, and a power saving mode in which the power consumption is lower than the power consumption in the normal mode. In the case where the below-mentioned state continues for a predetermined time period with the operation mode being the normal mode, the mode switching portion77switches the operation mode to the power saving mode, the state being a state where the operation unit163does not accept an operation by the user, the communication I/F unit112does not receive a print job, and the facsimile unit116does not receive facsimile data. Further, with the operation mode being the power saving mode, in the case where the operation unit163accepts an operation by the user, the case where the communication I/F unit112receives a print job, or the case where the facsimile unit116receives facsimile data, the mode switching portion77switches the operation mode to the normal mode. In the case where switching the operation mode to the power saving mode, the mode switching portion77stops the hardware resources except for the RAM114and the HDD115. Thus, the power consumed by the hardware resources except for the RAM114and the HDD115can be reduced. As for the communication I/F unit112and the facsimile unit116, with the operation mode being the power saving mode, the power is still consumed because reception of data is possible. However, the power consumption is smaller than the power consumption in the normal mode.

In the case where switching the operation mode from the normal mode to the power saving mode, the mode switching portion77outputs a power saving switch signal, indicating that the operation mode has been switched to the power saving mode, to the stop prediction portion61. In the case where switching the operation mode from the power saving mode to the normal mode, the mode switching portion77outputs a normal switch signal, indicating that the operation mode has been switched to the normal mode, to the activation portion69.

In response to reception of the power saving switch signal from the mode switching portion77, the stop prediction portion61notifies the emulate portion55of stopping of the HDD115. Specifically, the stop prediction portion61outputs a stop prediction signal to the emulate portion55.

The emulate portion55includes a stop response portion81, an access destination conversion portion83and an activation response portion85. In response to reception of the stop prediction signal from the stop prediction portion61, on the condition that no access to the HDD115by the guest control portion53is present, the stop response portion81responds to the stop prediction signal. Specifically, in the case where the emulate portion55is controlled by the guest control portion53and not controlling the HDD115at a time point at which the stop prediction signal is received from the stop prediction portion61, the stop response portion81outputs a response signal, corresponding to the stop prediction signal, to the transfer portion63. In the case where the emulate portion55is controlled by the guest control portion53and controlling the HDD115at the time point at which the stop prediction signal is received from the stop prediction portion61, the stop response portion81waits until the control of the HDD115by the guest control portion53ends. Then, in response to the end of the control of the HDD115by the guest control portion53, the stop response portion81outputs a response signal, corresponding to the stop prediction signal, to the transfer portion63.

In response to reception of the response signal corresponding to the stop prediction signal from the stop response portion81, the transfer portion63stores the data, stored in a predetermined region of the HDD115, in an image region of the RAM114. The predetermined region of the HDD115can be one or more predetermined partitions among a plurality of partitions of the HDD115. The transfer portion63reads out the data stored in the partition as the image data and stores the data in the image region of the RAM114. In response to completion of the storage of the data, stored in the HDD115, in the RAM114, the transfer portion63outputs a transfer completion signal to each of the stop portion67and the transfer completion notification portion65.

In response to reception of the transfer completion signal from the transfer portion63, the stop portion67stops the HDD115. Specifically, the stop portion67controls the host control portion51and cuts off the power supplied to the HDD115. In response to reception of the transfer completion signal from the transfer portion63, the transfer completion notification portion65outputs a transfer completion signal to the access destination conversion portion83of the emulate portion55.

In response to reception of the transfer completion signal from the transfer completion notification portion65, the access destination conversion portion83converts the access to the HDD115by the guest control portion53into the access to the image region of the RAM114. Specifically, the access destination conversion portion83converts the access to the HDD115by the guest control portion53into the access to the image region of the RAM114by emulating the control of the HDD115. Thus, with the HDD115stopped, the guest control portion53can control the HDD115. The control of the HDD115by the guest control portion53is switched to the control, of the RAM114by the host control portion51, by the access destination conversion portion83, so that the guest control portion53can perform the same control as the control performed in the case where the guest control portion53controls the HDD115.

In response to reception of a normal switch signal from the mode switching portion77, the activation portion69activates the HDD115. Specifically, the activation portion69controls the host control portion51and supplies the power to the HDD115. When the HDD115is activated, the activation portion69outputs an activation start signal to the activation start notification portion71. In response to reception of the activation start signal from the activation portion69, the activation start notification portion71outputs an activation start signal to the activation response portion85of the emulate portion55.

In response to reception of the activation start signal from the activation start notification portion71, on the condition that no access to the HDD115by the guest control portion53is present, the activation response portion85responds to the activation start signal. Specifically, in the case where the emulate portion55is controlled by the guest control portion53and not controlling the HDD115at a time point at which the activation start signal is received from the activation start notification portion71, the activation response portion85outputs a response signal corresponding to the activation start signal to the data recovery portion73. In the case where the emulate portion55is controlled by the guest control portion53and is controlling the HDD115at the time point at which the activation start signal is received from the activation start notification portion71, the activation response portion85waits until the control of the HDD115by the guest control portion53ends. Then, in response to the end of the control of the HDD115by the guest control portion53, the activation response portion85outputs a response signal corresponding to the activation start signal to the data recovery portion73.

At a time point at which the activation start signal is received from the activation start notification portion71, the access to the HDD115by the guest control portion53is converted by the access destination conversion portion83into the access to the image region of the RAM114. Therefore, in response to the reception of the activation start signal from the activation start notification portion71, on the condition that no access to the image region of the RAM114is present, the activation response portion85may respond to the activation start signal.

In response to reception of the response signal corresponding to the activation start signal from the activation response portion85, the data recovery portion73stores the data, stored in the image region of the RAM114, in a predetermined region of the HDD115. The data recovery portion73stores the data, stored in the image region of the RAM114, in the predetermined region of the HDD115as image data. In response to completion of the storage of the data, stored in the image region of the RAM114, in the HDD115, the data recovery portion73outputs a recovery completion signal to the activation completion notification portion75.

In response to reception of the recovery completion signal from the data recovery portion73, the activation completion notification portion75outputs a recovery completion signal to the access destination conversion portion83of the emulate portion55.

In response to reception of the recovery completion signal from the activation completion notification portion75, the access destination conversion portion83does not convert the access to the HDD115by the guest control portion53into the access to the image region of the RAM114. Specifically, the access destination conversion portion83does not emulate the control of the HDD115. Thus, the guest control portion53can control the HDD115.

FIG. 4is a diagram showing one example of a flow of data. InFIG. 4, a time flow is shown from the top to the bottom in a chronological order. Referring toFIG. 4, in the case where switching the operation mode to the power saving mode, the first application portion57outputs a stop prediction signal to the emulate portion55. In the case where accessing the HDD115at a time point at which receiving the stop prediction signal, the emulate portion55waits until the access to the HDD115ends. In response to the end of the access to the HDD115, the emulate portion55outputs a response signal to the first application portion57.

The first application portion57waits until the response signal corresponding to the stop prediction signal is received. In response to reception of the response signal, the first application portion57transfers the data by storing the data, stored in the HDD115, in the image region of the RAM114. In response to completion of the transfer of the data stored in the HDD115to the RAM114, the first application portion57outputs a transfer completion signal to the emulate portion55. In response to reception of the transfer completion signal, the emulate portion55starts emulating the control of the HDD115, and converts the access to the HDD115into the access to the image region of the RAM114. Further, the emulate portion55suspends the control of the HDD115from the time when outputting a response signal corresponding to the stop prediction signal until the time when receiving the transfer completion signal.

After switching the operation mode to the power saving mode, the first application portion57does not store the data, stored in the predetermined region of the HDD115, in the image region of the RAM114until receiving the response signal corresponding to the stop prediction signal from the emulate portion55. In other words, during a time period in which the HDD115is controlled by the guest control portion53, the first application portion57does not store the data, stored in the predetermined region of the HDD115, in the image region of the RAM114. Therefore, the changed data, which is created in the case where the data stored in the HDD115is changed by the emulate portion55, can be stored in the image region of the RAM114. Thus, the data stored in the image region of the RAM114and the data stored in the HDD115are the same at time points at which the first application portion57starts and ends storing the data, stored in the HDD115, in the image region of the RAM114, so that the same data as the data stored in the HDD115can be stored in the RAM114.

In the case where switching the operation mode to the normal mode, the first application portion57activates the HDD115and then outputs an activation start signal to the emulate portion55. In the case where accessing the image region of the RAM114at a time point at which receiving the activation start signal, the emulate portion55waits until the access to the RAM114ends. In response to the end of the access to the RAM114, the emulate portion55outputs a response signal to the first application portion57.

The first application portion57waits until receiving the response signal corresponding to the activation start signal. In response to the reception of the response signal, the first application portion57recovers the data by storing the data, stored in the image region of the RAM114, in the HDD115. In response to completion of the transfer of the data stored in the image region of the RAM114to the HDD115, the first application portion57outputs a recovery completion signal to the emulate portion55. In response to reception of the recovery completion signal, the emulate portion55ends emulating the control of the HDD115. Further, the emulate portion55suspends the control of the RAM114from the time when outputting the response signal corresponding to the activation start signal until the time when receiving the recovery completion signal.

After switching the operation mode to the normal mode, the first application portion57does not store the data, stored in the image region of the RAM114, in the predetermined region of the HDD115until receiving the response signal corresponding to the activation start signal from the emulate portion55. In other words, during a time period in which the HDD115is controlled by the guest control portion53, the first application portion57does not store the data, stored in the image region of the RAM114, in the predetermined region of the HDD115. Therefore, the changed data, which is created in the case where the data stored in the image region of the RAM114is changed by the guest control portion53, can be stored in the predetermined region of the HDD115. Thus, the data stored in the image region of the RAM114and the data stored in the HDD115are the same at time points at which the first application portion57starts and ends storing the data, stored in the image region of the RAM114, in the HDD115, so that the same data as the data stored in image region of the RAM114can be stored in the predetermined region of the HDD115.

FIG. 5is a flow chart showing one example of a flow of an operation mode switching process. The operation mode switching process is a process executed by the CPU111in the case where the CPU111executes an operation mode switching program stored in the ROM113, the HDD115or the CD-ROM118. The operation mode switching program is part of a mode switching program and part of the first application program. Referring toFIG. 5, the CPU111sets the operation mode to the normal mode (step S01). For example, at a time point at which being activated, the CPU111sets the operation mode to the normal mode. In the next step S02, the hardware resources are driven, and the process proceeds to the step S03.

In the step S03, whether a switching condition for switching the operation modes is satisfied is determined. The process waits until the switching condition for switching the operation modes is satisfied (NO in the step S03). If the switching condition is satisfied (YES in the step S03), the process proceeds to the step S04. The switching condition for switching the operation modes includes a switching condition for switching the operation mode from the normal mode to the power saving mode and a switching condition for switching the operation mode from the power saving mode to the normal mode. The switching condition for switching the operation mode to the power saving mode is applied in the case where, for example, the below-mentioned state continues for a predetermined time period with the operation mode switched to the normal mode, the state being a state where the operation unit163does not accept an operation by the user, the communication I/F unit112does not receive a print job, and the facsimile unit116does not receive facsimile data. The switching condition for switching the operation mode to the normal mode is applied to the case where, for example, with the operation mode switched to the power saving mode, the operation unit163accepts an operation by the user, the communication I/F unit112receives a print job, or the facsimile unit116receives facsimile data.

In the step S04, the process branches depending on an operation mode that is set at that time point. If the operation mode is set to the normal mode, the process proceeds to the step S05. If the operation mode is set to the power saving mode, the process proceeds to the step S13.

In the step S05, the CPU111switches the operation mode to the power saving mode, and the process proceeds to the step S06. In the step S06, the hardware resources except for the RAM114and the HDD115are stopped, and the process proceeds to the step S07. Thus, the power consumed by the hardware resources except for the RAM114and the HDD115is reduced. In the step S07, a stop prediction signal is output to the emulate portion55formed by the execution of the emulate program, and the process proceeds to the step S08. In the step S08, the process waits until a response signal corresponding to the stop prediction signal is received from the task formed by the execution of the emulate program (NO in the step S08). If the response signal is received (YES in the step S08), the process proceeds to the step S09.

In the step S09, the CPU111starts transferring data. The CPU111starts a process of storing the data, stored in the predetermined region of the HDD115, in the image region of the RAM114as image data. In the next step S10, whether the process of transferring the data has been completed is determined. The process waits until the process of transferring the data is completed (NO in the step S10). If the process is completed (YES in the step S10), the process proceeds to the step S11. In the step S11, a transfer completion signal is output to the emulate portion55formed by the execution of the emulate program, and the process proceeds to the step S12. In the step S12, the HDD115is stopped, and the process returns to the step S03.

In the step S13, the CPU111switches the operation mode to the normal mode, and the process proceeds to the step S14. In the step S14, the hardware resources except for the RAM114are activated, and the process proceeds to the step S15. In the step S15, the process waits until the HDD115is activated (NO in the step S15). If the HDD115is activated (YES in the step S15), the process proceeds to the step S16. The state where the HDD115is activated is the state where the data can be written into or read from the HDD115. In the step S16, an activation start signal is output to the emulate portion55that is a task formed by the execution of the emulate program, and the process proceeds to the step S17. In the step S17, the process waits until a response signal corresponding to the activation start signal is received from the task formed by the execution of the emulate program (NO in the step S17). If the response signal is received (YES in the step S17), the process proceeds to the step S18.

In the step S18, the CPU111starts recovering data. The CPU111starts a process of storing the data, stored in the image region of the RAM114, in the predetermined region in the HDD115as image data. In the next step S19, whether the process of recovering the data has been completed is determined. The process waits until the process of recovering the data is completed (NO in the step S19). If the process is completed (YES in the step S19), the process proceeds to the step S20. In the step S20, an activation completion signal is output to the emulate portion55that is a task formed by the execution of the emulate program, and the process returns to the step S03.

FIGS. 6 and 7are flow charts showing one example of a flow of an emulate process. The emulate process is a process executed by the CPU111in the case where the CPU111executes the emulate program stored in the RAM113, the HDD115or the CD-ROM118. The emulate program is part of the mode switching program. Referring toFIGS. 6 and 7, the CPU111determines whether a stop prediction signal has been received from a task formed by the execution of the operation mode switching program (step S21). If the stop prediction signal is received, the process proceeds to the step S22. If not, the process proceeds to the step S41. In the step S41, whether the access to the HDD115is present is determined. In the case where a system call for controlling the HDD115is received from a task formed when the CPU111executes the second operating system program, the CPU111detects the access to the HDD115. If the CPU111detects the access to the HDD115, the process proceeds to the step S42. If not, the process returns to the step S21. In the step S42, the CPU111accesses the HDD115, and the process returns to the step S21. Specifically, a system call for controlling the HDD115is output to a task formed in the case where the CPU111executes the first operating system program.

In the step S22, the CPU111determines whether the CPU111is controlling the HDD115. If the CPU111is controlling the HDD115, the process proceeds to the step S23. If not, the process proceeds to the step S24. In the step S23, the process waits until the control of the HDD115is completed (NO in the step S23). If the control of the HDD115is completed (YES in the step S23), the process proceeds to the step S24. In the step S24, a response signal is output to a task formed in the case where the CPU111executes the operation mode switching program, and the process proceeds to the step S25.

In the step S25, the CPU111determines whether a transfer completion signal has been received from the task formed by the execution of the operation mode switching program. If the transfer completion signal is received, the process proceeds to the step S26. If not, the process proceeds to the step S30. In the step S30, the CPU111determines whether the access to the HDD115is present. In the case where a system call for controlling the HDD115is received from a task formed when the CPU111executes the second operating system program, the CPU111detects the access to the HDD115. If the access to the HDD115is detected, the process proceeds to the step S31. If not, the process returns to the step S25. In the step S31, the CPU111suspends the access to the HDD115, and the process returns to the step S25. Specifically, the system call, received from the task formed in the case where the CPU111executes the second operating system program, is suspended.

In the step S26, the CPU111determines whether the suspended access to the HDD115is present. If the access to the HDD115is suspended in the step S31, the process proceeds to the step S27. If not, the process proceeds to the step S28. In the step S27, the suspended access to the HDD115is emulated, and the CPU111accesses the image region of the RAM114. Then, the process proceeds to the step S28.

In the step S28, the CPU111determines whether the access to the HDD115is present. In the case where a system call for controlling the HDD115is received from a task formed when the CPU111executes the second operating system program, the CPU111detects the access to the HDD115. If the access to the HDD115is detected, the process proceeds to the step S29. If not, the process proceeds to the step S32. In the step S29, the access to the HDD115is emulated, and the CPU111accesses to the image region of the RAM114. Then, the process returns to the step S28.

In the step S32, the CPU111determines whether an activation start signal has been received from a task formed by the execution of the operation mode switching program. If the activation start signal is received, the process proceeds to the step S33. If not, the process returns to the step S28. In the step S33, whether the CPU111is controlling the RAM114is determined. If the CPU111is controlling the RAM114, the process proceeds to the step S34. If not, the process proceeds to the step S35. In the step S34, the process waits until the control of the RAM114is completed (NO in the step S34). If the control of the RAM114is completed (YES in the step S34), the process proceeds to the step S35.

In the step S35, a response signal is output to the task formed in the case where the CPU111executes the operation mode switching program, and the process proceeds to the step S36. In the step S36, the CPU111determines whether a recovery completion signal has been received from the task formed by the execution of the operation mode switching program. If the recovery completion signal is received, the process proceeds to the step S37. If not, the process proceeds to the step S39. In the step S39, the CPU111determines whether the access to the HDD115is present. In the case where a system call for controlling the HDD115is received from a task formed in the case where the CPU111executes the second operating system program, the CPU111detects the access to the HDD115. If the access to the HDD115is detected, the process proceeds to the step S40. If not, the process returns to the step S36. In the step S40, the CPU111suspends the access to the HDD115, and the process returns to the step S38.

In the step S37, the CPU111determines whether the suspended access to the HDD115is present. If the access to the HDD115is suspended in the step S40, the process proceeds to the step S38. If not, the process returns to the step S21. In the step S38, the CPU111carries out the suspended access to the HDD115, and the process returns to the step S21.

Modified Example

In the MFP100of one or more embodiments described above, the task, which is formed in the case where the CPU111executes the first application program, executes the process of storing the data, stored in the predetermined region of the HDD115, in the image region of the RAM114, and the first application portion57executes the process of storing the data, stored in the image region of the RAM114, in the predetermined region of the HDD115. In an MFP100in the modified example, a task, which is formed in the case where the CPU111executes an emulate program, is allowed to execute the process of storing the data, stored in the predetermined region of the HDD115, in the image region of the RAM114, and the process, of storing the data stored in the image region of the RAM114in the predetermined region of the HDD115. Differences from the MFP100in one or more embodiments as described above will be mainly described below.

FIG. 8is a diagram showing one example of functions of a CPU included in the MFP in the modified example. Referring toFIG. 8, the functions of the CPU111included in the MFP100in the modified examples differ from the functions shown inFIG. 3in that the first application portion57and the emulate portion55are respectively changed to a first application portion57A and an emulate portion55A. Further, the same functions as the functions shown inFIG. 3are denoted with the same reference characters. Thus, a detailed description thereof will not be repeated.

The emulate portion55A is a task formed in the case where the CPU111executes the emulate program in the modified example. The emulate program in the modified example is an application program compatible with the first operating system program. The emulate portion55A is a virtual device for the guest control portion53and emulates the control of the hardware resources by the host control portion51.

The first application portion57A is a task formed in the case where the CPU111executes the first application program in the modified example compatible with the first operating system program. The first application portion57A controls the host control portion51, thereby being capable of controlling the hardware resources included in the MFP100.

Each of the first application portion57A and the emulate portion55A can control the host control portion51and is managed by the host control portion51. Thus, the first application portion57A and the emulate portion55A can identify each other, thereby being capable of communicating with each other by using the inter-process communication and the like.

The first application portion57A includes the mode switching portion77that switches operation modes of the MFP100, the stop prediction portion61, the image processing portion79and an activation instruction portion71A. In the case where switching the operation mode from the normal mode to the power saving mode, the mode switching portion77outputs a power saving switch signal, indicating that the operation mode has been switched to the power saving mode, to the stop prediction portion61. In response to reception of a normal switch signal from the mode switching portion77, the activation instruction portion71A outputs an activation instruction signal that gives an instruction to activate the HDD115to the emulate portion55A. In the case where switching the operation mode from the power saving mode to the normal mode, the mode switching portion77outputs a normal switch signal indicating that the operation mode has been switched to the normal mode to the activation instruction portion71A. In response to reception of the normal switch signal from the mode switching portion77, the activation instruction portion71A outputs an activation instruction signal that gives an instruction to activate the HDD115to the emulate portion55A.

The emulate portion55A includes a transfer portion63A, a stop portion67A, an activation portion69A, a data recovery portion73A and an access destination conversion portion83A. In response to reception of the stop prediction signal from the stop prediction portion61, on the condition that no access to the HDD115by the guest control portion53is present, the transfer portion63A stores the data, stored in the predetermined region of the HDD115, in the image region of the RAM114. Specifically, in the case where the emulate portion55A is controlled by the guest control portion53and not controlling the HDD115at a time point at which the stop prediction signal is received from the stop prediction portion61, the transfer portion63A stores the data, stored in the predetermined region of the HDD115, in the image region of the RAM114. In the case where the emulate portion55A is controlled by the guest control portion53and is controlling the HDD115at the time point at which the stop prediction signal is received from the stop prediction portion61, the transfer portion63A waits until the control of the HDD115by the guest control portion53ends. Then, in response to the end of the control of the HDD115by the guest control portion53, the transfer portion63A stores the data, stored in the predetermined region of the HDD115, in the image region of the RAM114. The predetermined region of the HDD115can be one or more predetermined partitions among the plurality of partitions of the HDD115. The transfer portion63A reads out the data stored in the partition as image data, and stores the data in the image region of the RAM114. In response to completion of the storage of the data, stored in the HDD115, in the RAM114, the transfer portion63A outputs a transfer completion signal to each of the stop portion67A and the access destination conversion portion83A.

In response to reception of the transfer completion signal from the transfer portion63A, the stop portion67A stops the HDD115. Specifically, the stop portion67A controls the host control portion51and cuts off the power supplied to the HDD115.

After the operation mode is switched to the power saving mode, the transfer portion63A does not store the data, stored in the predetermined region of the HDD115, in the image region of the RAM114until the access to the HDD115by the guest control portion53is no longer present. In other words, during a period in which the HDD115is controlled by the guest control portion53, the transfer portion63A does not store the data, stored in the predetermined region of the HDD115, in the image region of the RAM114. Therefore, the changed data, which is created in the case where the data stored in the HDD115is changed by the guest control portion53, can be stored in the image region of the RAM114. Thus, the data stored in the image region of the RAM114and the data stored in the HDD115are the same at time points at which the transfer portion63A starts and ends storing the data, stored in the HDD115, in the RAM114, so that the same data as the data stored in the HDD115can be stored in the RAM114.

In response to reception of the transfer completion signal from the transfer portion63A, the access destination conversion portion83A converts the access to the HDD115by the guest control portion53into the access to the image region of the RAM114. Specifically, the access destination conversion portion83A converts the access to the HDD115by the guest control portion53into the access to the image region of the RAM114by emulating the control of the HDD115. Thus, with the HDD115stopped, the guest control portion53can control the HDD115. Because the control of the HDD115by the guest control portion53is switched by the access destination conversion portion83A to the control of the RAM114by the host control portion51, the guest control portion53can perform the same control as the control performed in the case where the guest control portion53controls the HDD115.

In response to reception of the activation instruction signal from the activation instruction portion71A, the activation portion69A activates the HDD115. Specifically, the activation portion69A controls the host control portion51and supplies the power to the HDD115. When the HDD115is activated, the activation portion69A outputs an activation completion signal to the data recovery portion73A.

In response to reception of the activation completion signal from the activation portion69A, on the condition that no access to the HDD115by the guest control portion53is present, the data recovery portion73A stores the data, stored in the image region of the RAM114, in the predetermined region of the HDD115. Specifically, in the case where the emulate portion55A is controlled by the guest control portion53and not controlling the HDD115at a time point at which the activation completion signal is received from the activation portion69A, the data recovery portion73A stores the data, stored in the image region of the RAM114, in the predetermined region of the HDD115. In the case where the emulate portion55A is controlled by the guest control portion53and controlling the HDD115at the time point at which the activation completion signal is received from the activation portion69A, the data recovery portion73A waits until the control of the HDD115by the guest control portion53ends. In response to the end of the control of the HDD115by the guest control portion53, the data recovery portion73A stores the data, stored in the image region of the RAM114, in the predetermined region of the HDD115. The data recovery portion73A stores the data, stored in the image region of the RAM114, in the predetermined region of the HDD115as image data. In response to completion of the storage, of the data stored in the image region of the RAM114, in the HDD115, the data recovery portion73A outputs a recovery completion signal to the access destination conversion portion83A.

After the operation mode is switched to the normal mode, the data recovery portion73A does not store the data, stored in the image region of the RAM114, in the predetermined region of the HDD115until the access to the HDD115by the guest control portion53is no longer present. In other words, during a period in which the HDD115is controlled by the guest control portion53, the data recovery portion73A does not store the data, stored in the image region of the RAM114, in the predetermined region of the HDD115. Therefore, the changed data, which is created in the case where the data stored in the image region of the RAM114is changed by the guest control portion53, can be stored in the predetermined region of the HDD115. Thus, the data stored in the image region of the RAM114and the data stored in the HDD115are the same at time points at which the data recovery portion73A starts and ends storing the data, stored in the image region of the RAM114, in the HDD115, so that the same data as the data stored in the image region of the RAM114can be stored in the predetermined region of the HDD115.

At a time point at which the activation completion signal is received from the activation portion69A, the access to the HDD115by the guest control portion53is switched by the access destination conversion portion83A to the access to the image region of the RAM114. Therefore, in response to reception of the activation completion signal from the activation portion69A, on the condition that no access to the image region of the RAM114is present, the data recovery portion73A stores the data, stored in the image region of the RAM114, in the predetermined region of the HDD115.

In response to reception of the recovery completion signal from the data recovery portion73A, the access destination conversion portion83A does not convert the access to the HDD115by the guest control portion53into the access to the image region of the RAM114. Specifically, the access destination conversion portion83A does not emulate the control of the HDD115. Thus, the guest control portion53can control the HDD115.

FIG. 9is a flow chart showing one example of a flow of an operation mode switching process in the modified example. The operation mode switching process in the modified example is a process executed by the CPU111in the case where the CPU111executes an operation mode switching program stored in the ROM113, the HDD115or the CD-ROM118. The operation mode switching program in the modified example is part of a mode switching program in the modified example, and part of a first application program. Referring toFIG. 9, differences from the operation mode switching process shown inFIG. 5are that the steps S08to S11and the steps S15to S19are deleted, and that the step S07and the step S14are respectively changed to the step S07A and the step S14A. The other process is the same as the process shown inFIG. 5. Therefore, a description thereof will not be repeated.

In the step S07A, the CPU111outputs a transfer prediction signal to the emulate portion55that is a task formed by the execution of the emulate program, and the process returns to the step S03. In the step S14A, the CPU111outputs an activation instruction signal to the emulate portion55that is the task formed by the execution of the emulate program, and the process returns to the step S03.

FIGS. 10 and 11are flow charts showing one example of a flow of an emulate process in the modified example. The emulate process in the modified example is a process executed by the CPU111in the case where the CPU111executes the emulate program in the modified example stored in the ROM113, the HDD115or the CD-ROM118. The emulate program in the modified example is part of a mode switching program in the modified example. Referring toFIGS. 10 and 11, differences from the process shown inFIGS. 6 and 7are that the step S24, the step S25, the step S32, the step S35and the step S36are respectively changed to the step S24A, the step S25A, the step S32A, the step S35A and the step S36A, and that the step S24A and the step S34A are added. The other process is the same as the process shown inFIGS. 6 and 7. Therefore, a description thereof will not be repeated.

The case where the process proceeds to the step S24A is the case where it is determined in the step S22that the CPU111is not controlling the HDD115at a time point at which a stop prediction signal is received in the step S21. Alternatively, the case where the process proceeds to the step S24A is the case where it is determined in the step S22that the CPU111is controlling the HDD115at the time point at which the stop prediction signal is received in the step S21, and also it is determined in the step S23that the control of the HDD115is completed. In the step S24A, the CPU111starts transferring data. The CPU111starts a process of storing the data, stored in the predetermined region of the HDD115, in the image region of the RAM114as image data. In the next step S25A, whether the process of transferring the data has been completed is determined. If the process of transferring the data is completed, the process proceeds to the step S26A. If not, the process proceeds to the step S30. In the step S26A, the CPU111stops the HDD115, and the process proceeds to the step S26.

The case where the process proceeds to the step S32A is the case where the operation mode is switched to the power saving mode. In the step S32A, the CPU111determines whether an activation instruction signal has been received from a task formed by the execution of the operation mode switching program. If the activation instruction signal is received, the process proceeds to the step S33. If not, the process returns to the step S28.

The case where the process proceeds to the step S34A is the case where the CPU111is not controlling the RAM114at a time point at which the activation instruction signal is received from the task formed by the execution of the operation mode switching program in the step S32A. Alternatively, the case where the process proceeds to the step S34A is the case where it is determined in the step S33that the CPU111is controlling the RAM114at the time point at which the activation instruction signal is received from the task formed by the execution of the operation mode switching program in the step32A, and also it is determined in the step S34that the control of the RAM114is completed. In the step S34A, the process waits until the HDD115is activated (NO in the step S34A). If the HDD115is activated (YES In the step S34A), the process proceeds to the step S35A.

In the step S35A, the CPU111starts recovering the data. The CPU111starts a process of storing the data, stored in the image region of the RAM114, in the predetermined region of the HDD115as image data. In the next step S36A, the CPU111determines whether the process of recovering the data has been completed. If the process of recovering the data is completed (YES in the step S36A), the process proceeds to the step S37. If not (NO in the step S36A), the process proceeds to the step S39.

As described above, the MFP100of one or more embodiments includes the volatile RAM114, the non-volatile HDD115and the CPU111, and the CPU111executes the first operating system program, the second operating system program, the emulate program, the first application program and the second application program. Before the task formed by the execution of the first application program switches the operation mode to the power saving mode and stops the HDD115, a host operating system that executes the first application program stores the data, stored in the predetermined partition of the HDD115, in the image region of the RAM114. Further, before the task formed by the execution of the first application program switches the operation mode to the power saving mode and stops the HDD115, the MFP110in the modified example stores the data, stored in the predetermined partition of the HDD115, in the image region of the RAM114.

Then, after the HDD115is stopped by the task formed by the execution of the first application program, the task formed by the execution of the emulate program converts the access to the HDD115by a guest operation system that executes the second operating system program into the access to the image region of the RAM114. Therefore, even after the HDD115is stopped, the second operating system can access the data that had been stored in the HDD115. In other words, in the power saving mode, the power consumed by the HDD115is reduced, and the CPU111switches the access to the HDD115by the task formed by the execution of the second application program to the access to the RAM114. Thus, the task formed by the execution of the second application program can access the data stored in the HDD115.

Further, in the case where activating the HDD115being stopped, the task formed by the execution of the first application program stores the data, stored in the image region of the RAM114, in the predetermined partition of the HDD115. In the MFP100in the modified example, when the task formed by the execution of the emulate program activates the HDD115being stopped, the task formed by the execution of the emulate program stores the data, stored in the image region of the RAM114, in the predetermined partition of the HDD115.

Then, after the HDD115is activated by the task formed by the execution of the first application program, the task formed by the execution of the emulate program does not convert the access to the HDD115by the task formed by the execution of the second operating system program into the access to the image region of the RAM114. Therefore, the changed data, which is created in the case where the data is changed in the RAM114during a period in which the HDD115is stopped, can be stored in the HDD115.

The image region of the RAM114is a region used when the task formed by the execution of the first application program processes the image data, and the task formed by the execution of the first application program does not process the image data in the power saving mode. Thus, the image region of the RAM114can be effectively utilized in the power saving mode.

The MFP100in one or more embodiments described above shows the case where the second operating system program, which cannot be changed by the user of the MFP100, is installed as the example. In the MFP100in one or more embodiments described below, a second operating system program, which can be changed by the user of the MFP100, is installed. The appearance of the MFP100is the same as the perspective view shown inFIG. 1. The outline of the hardware configurations of the MFP100is the same as the block diagram shown inFIG. 2. Therefore, a description thereof will not be repeated.

FIG. 12is a diagram showing one example of functions of a CPU included in an MFP100in accordance with one or more embodiments. The same functions as the functions shown inFIG. 3are denoted with the same reference characters. A description thereof will not be repeated. Referring toFIG. 12, the CPU111included in the MFP100of one or more embodiments includes a host control portion51B, a guest control portion53B, an emulate portion55B, a first application portion57B and a second application portion59.

The host control portion51B is a task formed in the case where the CPU111executes a first operating system program. The host control portion51B controls the hardware resources included in the MFP100.

The guest control portion53B is a task formed in the case where the CPU111executes a second operating system program. The second operating system program is different from the first operating system program. The guest control portion53B includes a virtual device driver54. The virtual device driver54is compatible with the host control portion51B and outputs a system call to the host control portion51B in order to control the HDD115. Thus, the guest control portion53B can control the HDD115of the MFP100.

The emulate portion55B is a task formed in the case where the CPU111executes an emulate program. The emulate program is an application program compatible with the first operating system program. The emulate portion55B is a virtual device for the guest control portion53B and emulates the control of the hardware resources except for the HDD115by the host control portion51B. The emulate portion55B allows the guest control portion33B to function as a virtual machine. Thus, the guest control portion53B can control the hardware resources included in the MFP100.

The first application portion57is a task formed in the case where the CPU111executes the first application program compatible with the first operating system program. The first application portion57controls the host control portion51B, thereby being capable of controlling the hardware resources included in the MFP100.

Each of the first application portion57B and the emulate portion55B can control the host control portion51B and is managed by the host control portion51B.

The second application portion59is a task formed in the case where the CPU111executes the second application program compatible with the second operating system program. The second application portion59controls the guest control portion53B, thereby being capable of controlling the hardware resources included in the MFP100.

The first application portion57B includes a mode switching portion77that switches the operation modes of the MFP100, a stop instruction portion61B, an image processing portion79and an activation instruction portion71B. In the case where switching the operation mode from the normal mode to the power saving mode, the mode switching portion77outputs a power saving switch signal, indicating that the operation mode has been switched to the power saving mode, to the stop instruction portion61B. In the case where switching the operation mode from the power saving mode to the normal mode, the mode switching portion77outputs a normal switch signal, indicating that the operation mode has been switched to the normal mode, to the activation instruction portion71B. In response to reception of the power saving switch signal from the mode switching portion77, the stop instruction portion61B controls the host control portion51B and stops the hardware resources except for the RAM114. In response to reception of the normal switch signal from the mode switching portion77, the activation instruction portion71B controls the host control portion51B and activates the hardware resources.

In the case where the hardware resources except for the RAM114are stopped by the stop instruction portion61B of the first application portion57, the host control portion51B stops the hardware resources except for the RAM114and the HDD115. The host control portion51B includes a hypervisor91. The hypervisor91includes a stop portion67B, a transfer portion63B, an access destination conversion portion83, an activation portion69B and a data recovery portion73B. In the case where the hardware resources except for the RAM114are stopped by the stop instruction portion61B, on the condition that no access to the HDD115by the virtual device driver54included in the guest control portion53B is present, the transfer portion63B stores the data, stored in the predetermined region of the HDD115, in the image region of the RAM114. Specifically, in the case where a system call for controlling the HDD115is not input by the virtual device driver at a time point at which the hardware resources except for the RAM114are stopped by the stop instruction portion61B, the transfer portion63B stores the data, stored in the predetermined region of the HDD115, in the image region of the RAM114. In the case where a system call for controlling the HDD115is input by the virtual device driver54at the time point at which the hardware resources except for the RAM114are stopped by the stop instruction portion61B, the transfer portion63B waits until the control of the HDD115in accordance with the system call ends. In response to the end of the control of the HDD115, the transfer portion63B stores the data, stored in the predetermined region of the HDD115, in the image region of the RAM114. The predetermined region of the HDD115can be one or more predetermined partitions among a plurality of partitions of the HDD115. The transfer portion63B reads out the data stored in the partition as image data and stores the data in the image region of the RAM114. In response to completion of the storage of the data, stored in the HDD115, in the RAM114, the transfer portion63B outputs a transfer completion signal to each of the stop portion67B and the access destination conversion portion83B.

In response to reception of the transfer completion signal from the transfer portion63B, the stop portion67B stops the HDD115. Specifically, the stop portion67B cuts off the power supplied to the HDD115.

After the operation mode is switched to the power saving mode by the first application portion57B, the transfer portion63B does not store the data, stored in the predetermined region of the HDD115, in the image region of the RAM114until a system call, for controlling the HDD115, input by the virtual device driver54is no longer present. In other words, during a period in which the transfer portion63B is controlling the HDD115in accordance with the system call, for controlling the HDD115, input by the virtual device driver54, the transfer portion63B does not store the data, stored in the predetermined region of the HDD115, in the image region of the RAM114. Therefore, the changed data, which is created in the case where the data stored in the HDD115is changed by the virtual device driver54, can be stored in the image region of the RAM114. Thus, the data stored in the image region of the RAM114and the data stored in the HDD115are the same at time points at which the transfer portion63B starts and ends storing the data, stored in the HDD115, in the RAM114, so that the same data as the data stored in the HDD115can be stored in the RAM114.

In response to reception of the transfer completion signal from the transfer portion63B, the access destination conversion portion83B converts the system call, for controlling the HDD115, input by the virtual device driver54into the access to the image region of the RAM114. Thus, with the HDD115stopped, the guest control portion53B can control the HDD115. The system call, for controlling the HDD115, input by the virtual device driver54is switched by the access destination conversion portion83A to the control of the RAM114, so that the guest control portion53B can perform the same control as the control performed in the case where the guest control portion53B controls the HDD115.

In response to activation of the hardware resources by the activation instruction portion71B included in the first application portion57B, the activation portion69B activates the hardware resources including the HDD115. The activation of the HDD115will be explained here. Specifically, the activation portion69B supplies the power to the HDD115. When the HDD115is activated, the activation portion69B outputs an activation completion signal to the data recovery portion73B.

In response to reception of the activation completion signal from the activation portion69B, on the condition that no system call, for controlling the HDD115, input by the virtual device driver54is present, the data recovery portion73B stores the data, stored in the image region of the RAM114, in the predetermined region of the HDD115. Specifically, in the case where the system call, for controlling the HDD115, is not input by the virtual device driver54at a time point at which the activation completion signal is received from the activation portion69B, the data recovery portion73B stores the data, stored in the image region of the RAM114, in the predetermined region of the HDD115. In the case where the system call, for controlling the HDD115, is input by the virtual device driver54at a time point at which the activation completion signal is received from the activation portion69B, the data recovery portion73B waits until the control of the HDD115in accordance with the system call, for controlling the HDD115, input by the virtual device driver54ends. Then, in response to the end of the control of the HDD115in accordance with the system call, for controlling the HDD115, input by the virtual device driver54, the data recovery portion73B stores the data, stored in the image region of the RAM114, in the predetermined region of the HDD115. The data recovery portion73B stores the data, stored in the image region of the RAM114, in the predetermined region of the HDD115as image data. In response to completion of the storage of the data, stored in the image region of the RAM114, in the HDD115, the data recovery portion73B outputs a recovery completion signal to the access destination conversion portion83B.

After the operation mode is switched to the normal mode, the data recovery portion71B does not store the data, stored in the image region of the RAM114, in the predetermined region of the HDD115until the system call, for controlling the HDD115, input by the virtual device driver54is no longer present. In other words, during a period in which the system call, for controlling the HDD115, is input by the virtual device driver54, the data recovery portion73B does not store the data, stored in the image region of the RAM114, in the predetermined region of the HDD115. Therefore, the changed data, which is created in the case where the data stored in the image region of the RAM114is changed by the virtual device driver54, can be stored in the predetermined region of the HDD115. Thus, the data stored in the image region of the RAM114and the data stored in the HDD115are the same at time points at which the data recovery portion73B starts and ends storing the data, stored in the image region of the RAM114, in the HDD115, so that the same data as the data stored in the image region of the RAM114can be stored in the predetermined region of the HDD115.

After receiving the recovery completion signal from the data recovery portion73B, the access destination conversion portion83B does not convert the system call, for controlling the HDD115, input by the virtual device driver54into the access to the image region of the RAM114. Thus, the CPU111can control the HDD115in accordance with the system call, for controlling the HDD115, input by the virtual device driver54.

FIG. 13is a flow chart showing one example of a flow of an operation mode switching process in accordance with one or more embodiments. The operation mode switching process is a process executed by the CPU111in the case where the CPU111executes an operation mode switching program stored in the ROM113, the HDD115or the CD-ROM118. The operation mode switching program is part of the mode switching program and part of the first application program. Referring toFIG. 13, a difference from the operation mode switching process shown inFIG. 5is that the steps S07to S11, and the steps S14to S19are deleted. The other process is the same as the process shown inFIG. 5. Therefore, a description thereof will not be repeated.

In the step S06, the CPU111stops the hardware resources except for the RAM114, and the process returns to the step S03. In the step S13, the hardware resources are activated, and the process returns to the step S03.

FIGS. 14 and 15are flow charts showing one example of a flow of a device switching process in accordance with one or more embodiments. The device switching process is a process executed by the CPU111in the case where the CPU111executes a second operating system program stored in the ROM113, the HDD115or the CD-ROM118.

Referring toFIGS. 14 and 15, the CPU111determines whether the hardware resources have been stopped by a task formed by the execution of the operation mode switching program (step S51). If the CPU111has received a command of stopping the hardware resources, the process proceeds to the step S52. If not, the process proceeds to the step S73. In the step S73, the CPU111determines whether a system call for controlling the HDD115has been received from the guest control portion53B. If the CPU111has received the system call for controlling the HDD115from the guest control portion53B, the process proceeds to the step S74. If not, the process returns to the step S51. In the step S74, the CPU111accesses the HDD115by controlling the HDD115in accordance with the system call, and the process returns to the step S51.

In the step S52, the CPU111determines whether the CPU111is controlling the HDD115. If the CPU111is controlling the HDD115, the process proceeds to the step S53. If not, the process proceeds to the step S54. In the step S53, the CPU111determines whether the control of the HDD115has been completed. The process waits until the control of the HDD115is completed (NO in the step S53). If the control of the HDD115is completed (YES in the step S53), the process proceeds to the step S54. In the step S54, the CPU111starts transferring data. The CPU111starts a process of storing the data, stored in the predetermined region of the HDD115, in the image region of the RAM114as image data. In the next step S55, the CPU111determines whether the process of transferring the data has been completed. If the process of transferring the data is completed, the process proceeds to the step S56. If not, the process proceeds to the step S61.

In the step S61, the CPU111determines whether the system call for controlling the HDD115has been received from the guest control portion53B. If the system call for the HDD115is received from the guest control portion53B, the process proceeds to the step S62. If not, the process returns to the step S55. In the step S62, the CPU111suspends the system call, and the process returns to the step S55.

In the step S56, the CPU111stops the HDD115, and the process proceeds to the step S57. In the step S57, the CPU111determines whether the suspended system call is present. In the step S62, if the system call for controlling the HDD115is suspended, the process proceeds to the step S58. If not, the process proceeds to the step S59. In the step S58, the CPU111converts the suspended system call into the access to the image region of the RAM114and accesses the RAM114.

In the next step S59, the CPU111determines whether the system call for controlling the HDD115has been received from the guest control portion53B. If the system call for the HDD115is received from the guest control portion53B, the process proceeds to the step S60. If not, the process proceeds to the step S63. In the step S60, the CPU111converts the system call into the access to the image region of the RAM114and accesses the RAM114. Then, the process returns to the step S59.

In the step S63, the CPU111determines whether the hardware resources have been activated by the task formed by the execution of the operation mode switching program. If the CPU111has received a command of activating the hardware resources, the process proceeds to the step S64. If not, the process returns to the step S59.

In the step S64, the CPU111determines whether the CPU111is controlling the RAM114. If the CPU111is controlling the RAM114, the process proceeds to the step S65. If not, the process proceeds to the step S66. In the step S65, the process waits until the control of the RAM114is completed (NO in the step S65). If the control of the RAM114is completed (YES in the step S65), the process proceeds to the step S66.

In the step S66, the process waits until the HDD115is activated (NO in the step S66). If the HDD115is activated (YES in the step S66), the process proceeds to the step S67. In the step S67, the CPU111starts recovering the data. The CPU111starts a process of storing the data, stored in the image region of the RAM114, in the predetermined region of the HDD115as image data. In the next step S68, the CPU111determines whether the process of recovering the data has been completed. If the process of recovering the data is completed, the process proceeds to the step S69. If not, the process proceeds to the step S71.

In the step S71, the CPU111determines whether the system call for controlling the HDD115has been received from the guest control portion53B. If the system call for the HDD115is received from the guest control portion53B, the process proceeds to the step S72. If not, the process returns to the step S68. In the step S72, the CPU111suspends the system call, and the process returns to the step S68.

In the step S60, the CPU111determines whether the suspended system call is present. In the step S72, if the system call for controlling the HDD115is suspended, the process proceeds to the step S70. If not, the process returns to the step S51. In the step S70, the CPU111executes the suspended system call, and the process returns to the step S51.

The MFP100of one or more embodiments includes the volatile RAM114, the non-volatile HDD115and the CPU111, and the CPU111executes the first operating system program, the second operating system program, the emulate program, the first application program and the second application program. The host operating system that executes the first operating system program includes the hypervisor that controls the access to the RAM114and the HDD115by the guest operating system that executes the second operating system program. The guest operating system includes the virtual driver for controlling the hypervisor and accessing the HDD115. The hypervisor, before the HDD115is stopped by the task formed by the execution of the first application program, allows the data, stored in the predetermined partition of the HDD115, to be stored in the image region of the RAM115. Further, after the HDD115is stopped, the hypervisor converts the access to the HDD115by the virtual driver into the access to the image region of the RAM114. Therefore, the second operating system can access the data stored in the HDD115even after the HDD115is stopped. In other words, in the power saving mode, the power consumed by the HDD115is reduced, and the access to the HDD115by the task formed by the execution of the second application program is switched to the access to the RAM114. Therefore, the task formed by the execution of the second application program can access the data stored in the HDD115.

Further, in response to an instruction of activating the HDD115by the task formed by the execution of the first application program, the hypervisor activates the HDD115. In response to the activation of the HDD115, the hypervisor allows the data stored in the image region of the RAM114to be stored in the predetermined partition of the HDD115. After the data is stored in the HDD115, the hypervisor does not convert the access to the HDD115by the virtual driver into the access to the image region of the RAM114. Therefore, after the HDD115is activated, the data stored in the image region of the RAM114is stored in the predetermined partition of the HDD115. Therefore, during a period in which the HDD115is stopped, the changed data created in the case where the data is changed in the RAM114can be stored in the HDD115.

In one or more embodiments, the MFP100has been described as one example of the image processing apparatus. However, the image processing apparatus may be a facsimile device, a scanner device, a camera or the like, for example, as long as it includes a function of processing image data. Further, the one or more embodiments of the present invention can be regarded as the operation mode switching method for allowing the MFP100to execute the processes shown inFIGS. 5 to 7,FIGS. 9 to 11andFIGS. 13 to 15, and the operation mode switching program for allowing the CPU111that controls the MFP100to perform the operation mode switching method.