WO2012001787A1 - 情報処理装置、情報処理方法、および情報処理プログラム - Google Patents

情報処理装置、情報処理方法、および情報処理プログラム Download PDF

Info

Publication number
WO2012001787A1
WO2012001787A1 PCT/JP2010/061190 JP2010061190W WO2012001787A1 WO 2012001787 A1 WO2012001787 A1 WO 2012001787A1 JP 2010061190 W JP2010061190 W JP 2010061190W WO 2012001787 A1 WO2012001787 A1 WO 2012001787A1
Authority
WO
WIPO (PCT)
Prior art keywords
information processing
state
processing apparatus
switching
area
Prior art date
Application number
PCT/JP2010/061190
Other languages
English (en)
French (fr)
Inventor
浩一郎 山下
宏真 山内
鈴木 貴久
康志 栗原
Original Assignee
富士通株式会社
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 富士通株式会社 filed Critical 富士通株式会社
Priority to CN2010800677746A priority Critical patent/CN102971709A/zh
Priority to PCT/JP2010/061190 priority patent/WO2012001787A1/ja
Priority to JP2012522392A priority patent/JPWO2012001787A1/ja
Publication of WO2012001787A1 publication Critical patent/WO2012001787A1/ja
Priority to US13/730,161 priority patent/US20130117762A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45545Guest-host, i.e. hypervisor is an application program itself, e.g. VirtualBox

Definitions

  • the present invention relates to an information processing apparatus, an information processing method, and an information processing program for switching an OS.
  • VM refers to software that virtualizes resources such as CPUs and storage devices and is executed on the virtualized resources.
  • Software that virtualizes resources is also called a hypervisor.
  • Hybrid OS is a technology in which a slave OS, which is another OS, is executed as one process of the base master OS.
  • a real-time OS is adopted as a master OS and a general-purpose OS is adopted as a slave OS.
  • the real-time OS executes real-time processing that requires high processing performance
  • the general-purpose OS executes other processing, so that software assets of the general-purpose OS can be diverted while maintaining real-time performance, and development costs are increased. Can be suppressed.
  • the VM requires a hypervisor that switches the OS.
  • a system equipped with a hypervisor has a problem that it has a large software structure.
  • the hybrid OS can be implemented more easily than the VM, but the slave OS is a process executed on the master OS, and the processor allocation cycle is under the control of the master OS. For this reason, even if the master OS sets the priority of the entire slave OS to a low state, even if the slave OS executes a process with a high priority, the allocation period of the processor to the process remains small. There was a problem.
  • the present invention eliminates delays in processing of an OS that is a slave OS and improves response performance when switching between OSs. And an information processing program.
  • the disclosed information processing apparatus performs a switching request in a first state in which a first OS executes a process including a second OS different from the first OS. Is detected, the second OS switches from the first state to the second state in which a process including the first OS is executed.
  • the information processing apparatus According to the information processing apparatus, the information processing method, and the information processing program, there is an effect that, when the OS is switched, the processing delay of the OS that is the slave OS is eliminated, and the response performance can be improved.
  • FIG. 10 is an explanatory diagram illustrating a display example in which the OS is switched by the information processing apparatus 100.
  • FIG. It is explanatory drawing which shows an example of memory address space. It is explanatory drawing which shows the dispatch condition of the application at the time of OS switching. It is explanatory drawing which shows the outline of OS switching process. It is a flowchart of OS switching processing.
  • FIG. 1 is a block diagram illustrating hardware of the information processing apparatus 100 according to the embodiment.
  • the information processing apparatus 100 includes a CPU 101, a ROM (Read-Only Memory) 102, and a RAM (Random Access Memory) 103.
  • the information processing apparatus 100 also includes a flash ROM 104, a flash ROM controller 105, and a flash ROM 106.
  • the information processing apparatus 100 includes a display 107, an I / F (Interface) 108, and a keyboard 109 as input / output devices for a user and other devices. Each unit is connected by a bus 110.
  • the CPU 101 controls the entire information processing apparatus 100.
  • the ROM 102 stores a program such as a boot program.
  • the RAM 103 is used as a work area for the CPU 101.
  • the flash ROM 104 stores system software such as an OS (Operating System), application software, and the like.
  • the flash ROM controller 105 controls reading / writing of data with respect to the flash ROM 106 according to the control of the CPU 101.
  • the flash ROM 106 stores data written under the control of the flash ROM controller 105. Specific examples of the data include image data and video data acquired by the user using the information processing apparatus 100 through the I / F 108.
  • As the flash ROM 106 for example, a memory card, an SD card, or the like can be adopted.
  • the display 107 displays data such as a document, an image, and function information as well as a cursor, an icon, or a tool box.
  • a TFT liquid crystal display can be adopted as the display 107.
  • the I / F 108 is connected to a network 111 such as a LAN (Local Area Network), a WAN (Wide Area Network), and the Internet through a communication line, and is connected to another device via the network 111.
  • the I / F 108 controls an internal interface with the network 111 and controls data input / output from an external device.
  • a modem or a LAN adapter can be employed as the I / F 108.
  • the keyboard 109 has keys for inputting numbers, various instructions, etc., and inputs data.
  • the keyboard 109 may be a touch panel type input pad or a numeric keypad.
  • FIG. 2 is an explanatory diagram illustrating a state in which the OS is switched by the information processing apparatus 100.
  • the information processing apparatus 100 can take two states: a state 201 in which OS # 1 is being executed as a master OS, and a state 202 in which OS # 2 is being executed as a master OS.
  • OS # 1 and OS # 2 are OSes operating on the CPU 101.
  • OS # 1 and OS # 2 provide libraries used by processes as functions of the OS.
  • OS # 1 and OS # 2 have a function of performing process scheduling.
  • the master OS is an OS that controls the information processing apparatus 100.
  • the slave OS is an OS executed as one process of the master OS. By executing the slave OS, a plurality of OSs are simultaneously executed in the information processing apparatus 100, and the information processing apparatus 100 shows an aspect of a multi-core processor having a plurality of cores in a pseudo manner.
  • the information processing apparatus 100 in the state 201 uses the OS # 1 as the master OS, and executes the process 203 including the processes of the process A, the process B, and the OS # 2 under the control of the OS # 1. Inside the process 203, the information processing apparatus 100 executes process C and process D under the control of OS # 2. When the information processing apparatus 100 detects a switching request, the information processing apparatus 100 switches from the state 201 to the state 202 by switching between the master OS and the slave OS.
  • the information processing apparatus 100 in the state 202 uses the OS # 2 as a master OS, and executes a process 204 including processes C, D, and OS # 1 under the control of the OS # 2. Inside the process 204, the information processing apparatus 100 executes process A and process B under the control of OS # 1.
  • FIG. 3 is a block diagram illustrating functions of the information processing apparatus 100.
  • the information processing apparatus 100 includes a detection unit 301, a switching unit 302, a stop unit 303, a transition unit 304, an acquisition unit 305, and an allocation unit 306.
  • the functions (detection unit 301 to allocation unit 306) serving as the control unit are realized by the CPU 101 executing the program stored in the storage device. Examples of the storage device include the ROM 102, the RAM 103, the flash ROM 104, and the flash ROM 106 shown in FIG. Alternatively, the function may be realized by another CPU executing via the I / F 108.
  • the detecting unit 301 has a function of detecting a switching request in a first state in which the first OS executes a process including a second OS different from the first OS. For example, in the state 201 in which the OS 203 whose information processing apparatus 100 is the master OS executes the process 203 including the OS # 2 that is the slave OS, the detection unit 301 issues a switching request issued by a user operation or the like. Is detected. The detection result is stored in a storage area such as a register of the CPU 101 or the RAM 103.
  • the switching unit 302 has a function of switching from the first state to the second state in which the second OS executes a process including the first OS when the detection unit 301 detects a switching request.
  • the switching unit 302 may switch from the first state to the second state when the execution authority is transferred to the second OS by the transfer unit 304.
  • the switching unit 302 changes the state of the information processing apparatus 100 from the state 201 to the state 202 where the OS # 2 executes the process 204 using a pointer to the process 204 including the OS # 1 secured by the transition unit 304. Switch.
  • the switching unit 302 may switch from the first state to a state in which processing related to the user interface of the second OS is executed in addition to the second state.
  • the process related to the user interface is, for example, a key event process corresponding to the keyboard 109 or a mouse event process corresponding to the case where the display 107 is a touch panel.
  • the switching unit 302 further executes key event processing and mouse event processing of OS # 2 in a state 202 in which OS # 2 becomes the master OS.
  • the information indicating the switching may be stored in a storage area such as the register of the CPU 101 or the RAM 103.
  • the stop unit 303 has a function of stopping a process including the second OS when the detection unit 301 detects a switching request. For example, the stop unit 303 stops the process 203 when a switching request is detected. When the process 203 is stopped, the process 203 cannot be assigned to the CPU 101, but the information of the process 203 exists on the RAM 103.
  • the stop unit 303 may further stop processing related to the user interface of the first OS. For example, the stop unit 303 stops key event processing and mouse event processing of OS # 1. Information that processing related to the process or the user interface has been stopped is stored in a storage area such as a register of the CPU 101 or the RAM 103.
  • the migration unit 304 has a function of migrating the execution authority for the CPU 101 from the first OS to the second OS when the process including the second OS is stopped by the stop unit 303.
  • the transfer unit 304 transfers the execution authority from OS # 1 to OS # 2.
  • the master OS changes from OS # 1 to OS # 2.
  • the OS # 1 releases the pointer to the process 203, and the OS # 2 secures the pointer to the process 204, so that the execution authority is transferred from the OS # 1 to the OS # 2.
  • Information that the execution authority has been transferred and the master OS has been switched is stored in a storage area such as the register of the CPU 101 and the RAM 103.
  • the acquisition unit 305 assigns from the system area of the first OS assigned to a predetermined position in the first memory area accessible from the processor to the user area of the first OS and the process executed by the first OS.
  • the second memory area is obtained.
  • the first memory area is a storage area such as the ROM 102 and the RAM 103 that can be accessed by the CPU.
  • the system area is a memory area used by the OS or device driver, and the user area is an area allocated to the OS other than the system area, and is used by a process executed by the OS.
  • the predetermined position to which the system area is allocated may be any position as long as it does not move after the information processing apparatus 100 is activated.
  • the system area of OS # 1 may be assigned to the top address of the RAM 103.
  • the system area of OS # 2 may be allocated to the memory area next to the memory area allocated as the system area of OS # 1.
  • the second memory area allocated to the process is a memory area allocated as a process context.
  • the process stores data used by the process such as a CPU register value, a program counter, and a stack pointer in the context.
  • the acquisition unit 305 acquires a user area of OS # 1 and a memory area allocated as a context of process A and process B from the system area of OS # 1. In more detail, the acquisition unit 305 acquires a pointer that points to the memory area.
  • the acquired area information is stored in a storage area such as the register of the CPU 101 and the RAM 103.
  • the allocation unit 306 includes at least one of the memory areas excluding the second memory area from the user area of the first OS acquired by the acquisition unit 305. It has a function of allocating a part of the memory area to the second OS. For example, the assigning unit 306 assigns at least a part of the unused memory area obtained by removing the memory area assigned as the context of the process A and the process B from the user area of the OS # 1 to the OS # 2 Allocate as user area.
  • FIG. 4 is an explanatory diagram illustrating a display example in which the OS is switched by the information processing apparatus 100.
  • the information processing apparatus 100 in the state 401 and the state 402 executes a Web browser as the process A and a map display process as the process C on the information processing apparatus 100 in the state 201 and the state 202, respectively.
  • the Web browser is in the foreground, and an HTML (HyperText Markup Language) document is displayed.
  • the information processing apparatus 100 displays the map display process as a small window of the Web browser.
  • the map display process is a service on OS # 2, and is executed with low priority on the background.
  • a switching request is issued by an operation on the Web browser by the user, for example, by an operation such as clicking a map display process.
  • the information processing apparatus 100 transitions from the state 401 to the state 402, and the master OS and the slave OS, OS # 1 and OS # 2, are switched.
  • the map display process is in the foreground, and the web browser is in the background.
  • the information processing apparatus 100 notifies the map display process of the key event by the OS # 2 key event processing. Since the map display process requests a screen image indicating the front on the map based on the key event, the information processing apparatus 100 acquires the image image through the I / F 108 and displays it on the display 107.
  • OS # 2 is the master OS, the driver that controls the keyboard 109, the I / F 108, and the display 107 can be directly accessed, and drawing is performed at high speed from the time when the up arrow key is pressed. be able to.
  • OS # 2 is a slave OS under the control of OS # 1, and therefore OS # 2 is required to access the driver that controls the keyboard 109, the I / F 108, and the display 107. It was via # 1. Therefore, in the information processing apparatus 100 according to the conventional example, even if the priority of OS # 2 is increased and drawing is performed at a high speed, the information is processed at a high speed because it passes through the relatively low-speed OS # 1. I could not.
  • FIG. 5 is an explanatory diagram showing an example of a memory address space.
  • FIG. 5 shows a memory address space 501 and a memory address space 502 showing the contents stored in the RAM 103.
  • the information processing apparatus 100 expands the OS boot image stored in the flash ROM 104 or the like on the RAM 103 by the boot loader 503.
  • the address space of the RAM 103 displayed in FIG. 5 is indicated by an offset from the head address of the RAM 103.
  • a memory address space 501 indicates the stored contents of the RAM 103 in the state 201
  • a memory address space 502 indicates the stored contents of the RAM 103 in the state 202.
  • FIG. 5 it is assumed that the information processing apparatus 100 is activated in the state 201.
  • the boot loader 503 allocates system areas that are boot-up points for OS # 1 and OS # 2 to 0x0000 to 0x01ff and 0x0200 to 0x02ff, respectively, with a fixed size. Further, the boot loader 503 assigns the memory area 504 of 0x0300 to 0x23ff as the user area of OS # 1, and assigns 0x2400 to 0x31ff as the memory area 505 used by OS # 2.
  • the allocated memory area 505 can be regarded as the context of the process 203 including the processing of OS # 2.
  • OS # 1 stores the start address that is the context of the process 203 in the pointer 506.
  • the remaining 0x3200 to 0xffff are OS # 1 user areas and are managed by OS # 1.
  • the user area of OS # 1 is not a continuous memory area, but can be managed by an MMU (Memory Management Unit) even in such a state.
  • MMU Memory Management Unit
  • OS # 2 assigns the OS # 2 context, which is the work area of OS # 2, in the memory area 505 to 0x2400 to 0x24ff, and assigns the OS # 2 user area to 0x2500 to 0x31ff.
  • OS # 1 assigns the context area of process A to 0x2000 to 0x21ff and the context of process B to 0x2200 to 0x23ff from the unused area of the user area of OS # 1.
  • OS # 2 assigns the context of process C to 0x3000 to 0x31ff from 0x2500 to 0x31ff, which is the user area of OS # 2.
  • OS # 1 stores the start address of the user area of OS # 1 in the pointer 507. Further, OS # 1 stores the start address of the context of process A in the pointer 508 and stores the start address of the context of process B in the pointer 509.
  • the stored pointers 506 to 509 are stored in the system area of OS # 1. Further, a pointer 508 and a pointer 509 relating to the process are also stored in a process dispatch table 601 described later.
  • OS # 2 stores the start address of the user area of OS # 2 in the pointer 510, and stores the start address of the context of the process C in the pointer 511.
  • the stored pointer 510 and pointer 511 are stored in the system area of OS # 2.
  • the process-related pointer 511 is also stored in the process dispatch table 601.
  • the information processing apparatus 100 changes the memory address space from the memory address space 501 to the memory address space 502.
  • the memory address space 501 and the memory address space 502 are not changed in the allocated contents of the RAM 103, but some pointers are changed.
  • OS # 1 releases the pointer 506 that stored the start address of the process 203.
  • OS # 1 releases 0x3200 to 0xffff, which are unused memory areas.
  • OS # 2 regards the OS # 1 user area, the process A context, and the process B context in the memory area 504 under the management of OS # 1 as the context of the process 204, and starts the OS # 1 user area.
  • the address is stored in the pointer 512. Since OS # 1 releases the pointer 506 to the context of the process 203 and OS # 2 secures the pointer 512 to the context of the process 204, the execution authority has shifted from OS # 1 to OS # 2. .
  • the OS # 2 manages 0x3200 to 0xffff, which are unused areas. As a result, the OS # 2 that has become the master OS can allocate memory beyond the memory area allocated in the state 201 to a newly started process or a process that has requested a larger memory area. it can.
  • the boot loader 503 determines that the system area of OS # 1 is: OS # 2. System area:...: The system area of OS # N is allocated to the RAM 103 with a fixed size. Next, the boot loader 503 allocates the user area of OS # 1: user area of OS # 2:...: OS # N to the RAM 103 with a variable size.
  • FIG. 6 is an explanatory diagram showing the dispatch status of the application when the OS is switched.
  • the process dispatch table 601 stores pointers to the contexts of processes executed by all OSs.
  • the process dispatch table 601 stores pointers such as a pointer 508 to the context of the process A, a pointer 509 to the context of the process B, a pointer 511 to the context of the process C, and so on.
  • the cyclic dispatch management unit installed in the scheduler of each OS refers to the process dispatch table 601.
  • the cyclic dispatch manager can obtain a pointer to the process context by referring to the process dispatch table 601. Using the pointer to the process context, the cyclic dispatch manager reconstructs the dispatch loop based on the scheduling.
  • the scheduler of OS # 1 constructs a dispatch loop 602 by referring to the process dispatch table 601 by the cyclic dispatch manager.
  • the dispatch loop 602 is constructed so that the processes A, B, and 203 are executed in a time slice. Furthermore, the dispatch loop 602 is constructed so that the priority of the process A becomes high.
  • the scheduler of OS # 2 constructs a dispatch loop 603 by referring to the process dispatch table 601 by the cyclic dispatch manager.
  • the dispatch loop 603 is constructed so that the processes C, D, and 204 are executed in a time slice. Furthermore, the dispatch loop 603 is constructed so that the priority of the process C becomes high.
  • the scheduler of each OS can easily perform priority control.
  • FIG. 7 is an explanatory diagram showing an outline of the OS switching process.
  • the information processing apparatus 100 in the state 201 executes each process based on a UI (user interface) and a framework provided by the OS # 1.
  • UI user interface
  • OS # 2 the process A and OS # 2 that are in the foreground are executed by the UI of OS # 1.
  • OS # 2 a background process C is executed.
  • OS # 1 executes a mouse event process by moving an arrow icon or the like by a pointing device, and processes a request for a user process.
  • the information processing apparatus 100 executes OS switching processing. Details of the OS switching process will be described later with reference to FIG. Inside the OS switching process, the UI of OS # 1 is temporarily stopped and the stop of the UI of OS # 2 is released.
  • the information processing apparatus 100 that has finished the OS switching process and has entered the state 202 executes each process based on the UI and framework provided by the OS # 2. For example, in FIG. 7, the process C and OS # 1 that have become the foreground by the UI of OS # 2 are executed. In OS # 1, the process A that is a background is executed.
  • FIG. 8 is a flowchart of the OS switching process.
  • the OS switching process illustrated in FIG. 8 is a flowchart when the information processing apparatus 100 transitions from the state 201 to the state 202.
  • the processes of OS # 2 and OS # 1 are interchanged.
  • the information processing apparatus 100 executes steps S802, S803, S804, and S809 as processes on the OS # 1 side.
  • the information processing apparatus 100 executes Step S805, Step S807, Step S808, and Step S810 as processing on the OS # 2 side.
  • OS # 1 performs a lock process from the user (step S801).
  • the information processing apparatus 100 that has executed the lock process does not perform an external interrupt process including a user operation.
  • OS # 1 releases the pointer of the process 203 including OS # 2 (step S802).
  • OS # 1 deletes the process 203 from the dispatch loop managed by OS # 1 (step S803). Specifically, the OS # 1 deletes the pointer 506 that is a pointer indicating the context of the process 203.
  • OS # 1 acquires the address of the system area that is the boot-up point of OS # 1, and notifies OS # 2 of it (step S804). Subsequently, along with the notification, the CPU 101 switches the execution authority from OS # 1 to OS # 2 (step S806). As a result, the master OS is switched from OS # 1 to OS # 2. Actually, OS # 1 deletes the pointer to the process 203 from the system area of OS # 1 in step S803, and OS # 2 secures the pointer to the process 204 in step S806, so that the execution authority is switched. It will be. When the execution authority is transferred, the CPU 101 releases at least a part of the unused memory area from the user area of OS # 1, and allocates the released memory area as the user area of OS # 2.
  • OS # 2 newly secures a pointer that points to the process 204 (step S805), and acquires a pointer in the system area of OS # 1 by notification from OS # 1.
  • OS # 2 sets the address of OS # 1 as a new pointer (step S807).
  • OS # 2 sets the address of the user area of OS # 1 acquired from the system area of OS # 1 in the pointer 512 serving as a pointer indicating the context of the process 204.
  • the pointer 512 indicates the context of the process 204.
  • OS # 2 adds the process 204 including OS # 1 to the dispatch loop managed by OS # 2 (step S808). If a new pointer is secured in the process of step S805, the process 204 is added to the dispatch loop in the process of step S807 if the new pointer is added to the dispatch loop. In such a case, OS # 2 does not need to perform the process of step S808. After the addition, OS # 1 temporarily stops using the UI function (step S809), and OS # 2 releases the UI function from the stop (step S810).
  • OS # 2 After completing the process of step S809 by OS # 1 and the process of step S810 by OS # 2, OS # 2 performs an unlock process from the user (step S811), and ends the OS switching process.
  • the information processing apparatus 100 that has executed the unlock process performs an external interrupt process including a user operation.
  • OS # 1 that is the master OS and OS # 2 that is the slave OS are replaced with OS # 2.
  • OS # 1 is set as the slave OS in the master OS.
  • the information processing apparatus can eliminate the delay in processing from OS # 2 which is the slave OS to the device, and can improve the response performance of OS # 2.
  • the information processing apparatus stops the process including OS # 2 that is being executed in OS # 1, and switches the execution authority of the processor from OS # 1 to OS # 2.
  • OS # 2 may be a master OS and OS # 1 may be a slave OS.
  • OS # 1 may be a slave OS.
  • the information processing apparatus can switch the OS while avoiding an infinite loop state in which OS # 2 is under OS # 1 and OS # 1 is under OS # 2.
  • the information processing apparatus acquires the OS # 1 user area and the memory area assigned to the process executed by OS # 1 from the OS # 1 system area assigned to a predetermined position at the time of OS switching, An unused portion of the OS # 1 user area may be assigned to OS # 2.
  • the information processing apparatus can realize dynamic memory allocation such that when the OS that is the slave OS becomes the master OS, the memory is used beyond the memory area set at the time of the slave OS. it can.
  • the information processing apparatus may stop the UI function of OS # 1 and release the stop of the UI function of OS # 2 when the OS is switched.
  • the information processing apparatus can display the master OS on which the window to be operated is displayed on the display when the master-slave relationship is switched. Will be limited to this window. Therefore, the processing amount can be reduced by stopping the UI of the slave OS that is not displayed on the screen.
  • the information processing apparatus can improve the response performance by switching the master-slave relationship.
  • the switch interval of the process of OS # M that is the master OS is ⁇ m and the number of processes is M
  • the switch interval of the process of OS # N that is the slave OS is ⁇ n
  • the number of processes is N.
  • the worst M ⁇ m + N ⁇ n time is required for the process existing in OS # N to be called.
  • the master-slave relationship is switched, so that the switching can be performed in N ⁇ n time.
  • the information processing method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation.
  • the information processing program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer.
  • the information processing program may be distributed through a network such as the Internet.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

 情報処理装置(100)は、検出部(301)によってOS(#1)がOS(#1)とは異なるOS(#2)を含むプロセスを実行する第1の状態で、切り替え要求を検出する。情報処理装置(100)は、検出部(301)によって切り替え要求が検出された場合、停止部(303)によってOS(#2)を含むプロセスを停止させる。プロセスを停止させた後、情報処理装置(100)は、移行部(304)によってプロセッサに対する実行権限をOS(#1)からOS(#2)に移行する。実行権限を移行後、情報処理装置(100)は、切替部(302)によって、第1の状態からOS(#2)がOS(#1)を含むプロセスを実行する第2の状態へ切り替える。

Description

情報処理装置、情報処理方法、および情報処理プログラム
 本発明は、OSを切り替える情報処理装置、情報処理方法、および情報処理プログラムに関する。
 従来から、単一のプロセッサシステムで複数のOS(Operating System)を実行させる技術が存在する。この技術は、ユーザが享受したいサービスがOSに依存している場合で、かつ、享受したいサービスが複数あり、各々のサービスを実現するためのOSが異なる場合に1つのプロセッサシステム上で実現するために存在する。この機構を実現する方式として、VM(Virtual Machine)と、ハイブリッドOSなどが存在する。
 VMは、CPUや記憶装置などのリソースを仮想化し、仮想化したリソース上で実行されるソフトウェアを指す。リソースを仮想化するソフトウェアはハイパーバイザとも呼ばれる。VMを単一のプロセッサシステムに複数搭載することにより、2つ以上のOSを実行することができる。VMを搭載したプロセッサシステムでは、複数搭載されたOSのうち1つのOSがマスタOSとなり、プロセッサシステムの全体をマネジメントする機構を持つ。
 ハイブリッドOSは、基盤となるマスタOSの1プロセスとして、別のOSであるスレイブOSが実行される技術である。組み込みシステムなど、リアルタイム性を要求される環境では、マスタOSにリアルタイムOSが採用され、スレイブOSに汎用OSが採用されるケースが存在する。たとえば、高い処理性能が求められるリアルタイム性の処理をリアルタイムOSが実行し、それ以外の処理を汎用OSが実行することで、リアルタイム性能を維持しつつ、汎用OSのソフトウェア資産を流用でき、開発コストを抑えることができる。
 たとえば、ハイブリッドOSを利用した技術として、マスタOSとスレイブOSがそれぞれ制御する画面の解像度が異なる場合、画面の切り替えを高速に行える技術が開示されている(たとえば、下記特許文献1を参照。)。
 また、ハイブリッドOSに関する技術として、たとえば、メモリ管理テーブルを変換し、マスタOSの処理とスレイブOSの処理を切り替えることにより、マスタOSに障害が発生してもスレイブOSを操作可能とする技術が開示されている(たとえば、下記特許文献2を参照。)。
特開平5-181443号公報 特開2007-334572号公報
 上述した従来技術において、VMでは、OSを切り替えるハイパーバイザが要求される。ハイパーバイザを搭載したシステムは大掛かりなソフトウェア構造となってしまう問題があった。また、ハイブリッドOSは、VMより実装を簡略化することが可能であるが、スレイブOSはマスタOS上で実行されるプロセスであり、プロセッサの割り当て周期はマスタOSの制御配下にある。このため、マスタOSがスレイブOS全体の優先度を低い状態に設定している状態で、スレイブOSが優先度の高いプロセスを実行しても、プロセスへのプロセッサの割り当て周期は少ないままとなるという問題があった。
 また、特許文献1、2にかかる技術では、スレイブOSのプロセスを高優先度に設定すると、相対的にマスタOSの優先度が低下する。したがって、高優先度となったスレイブOSのプロセスがデバイスへのアクセスを行う場合、マスタOSを介してデバイスへのアクセスを行うために、優先度が低下したマスタOSがボトルネックとなり、処理が遅延するという問題があった。
 本発明は、上述した従来技術による問題点を解消するため、OSを切り替えた際に、スレイブOSであったOSの処理の遅延を解消し、応答性能を向上できる情報処理装置、情報処理方法、および情報処理プログラムを提供することを目的とする。
 上述した課題を解決し、目的を達成するため、開示の情報処理装置は、第1のOSが第1のOSとは異なる第2のOSを含むプロセスを実行する第1の状態で、切り替え要求が検出された場合、第1の状態から第2のOSが第1のOSを含むプロセスを実行する第2の状態へ切り替える。
 本情報処理装置、情報処理方法、および情報処理プログラムによれば、OSを切り替えた際に、スレイブOSであったOSの処理の遅延を解消し、応答性能を向上できるという効果を奏する。
実施の形態にかかる情報処理装置100のハードウェアを示すブロック図である。 情報処理装置100によるOSを切り替えた状態を示す説明図である。 情報処理装置100の機能を示すブロック図である。 情報処理装置100によるOSを切り替えた表示例を示す説明図である。 メモリアドレス空間の一例を示す説明図である。 OS切り替え時のアプリケーションのディスパッチ状況を示す説明図である。 OS切り替え処理の概略を示す説明図である。 OS切り替え処理のフローチャートである。
 以下に添付図面を参照して、本発明にかかる情報処理装置、情報処理方法、および情報処理プログラムの好適な実施の形態を詳細に説明する。
(情報処理装置のハードウェア)
 図1は、実施の形態にかかる情報処理装置100のハードウェアを示すブロック図である。図1において、情報処理装置100は、CPU101と、ROM(Read‐Only Memory)102と、RAM(Random Access Memory)103と、を有する。また、情報処理装置100は、フラッシュROM104と、フラッシュROMコントローラ105と、フラッシュROM106と、を有している。また、情報処理装置100は、ユーザやその他の機器との入出力装置として、ディスプレイ107と、I/F(Interface)108と、キーボード109と、を有している。また、各部はバス110によってそれぞれ接続されている。
 ここで、CPU101は、情報処理装置100の全体の制御を司る。ROM102は、ブートプログラムなどのプログラムを記憶している。RAM103は、CPU101のワークエリアとして使用される。フラッシュROM104は、OS(Operating System)などのシステムソフトウェアやアプリケーションソフトウェアなどを記憶している。
 フラッシュROMコントローラ105は、CPU101の制御に従ってフラッシュROM106に対するデータのリード/ライトを制御する。フラッシュROM106は、フラッシュROMコントローラ105の制御で書き込まれたデータを記憶する。データの具体例としては、情報処理装置100を使用するユーザがI/F108を通して取得した画像データ、映像データなどである。フラッシュROM106は、たとえば、メモリカード、SDカードなどを採用することができる。
 ディスプレイ107は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。このディスプレイ107は、たとえば、TFT液晶ディスプレイなどを採用することができる。
 I/F108は、通信回線を通じてLAN(Local Area Network)、WAN(Wide Area Network)、インターネットなどのネットワーク111に接続され、ネットワーク111を介して他の装置に接続される。そして、I/F108は、ネットワーク111と内部のインターフェースを司り、外部装置からのデータの入出力を制御する。I/F108には、たとえばモデムやLANアダプタなどを採用することができる。
 キーボード109は、数字、各種指示などの入力のためのキーを有し、データの入力を行う。また、キーボード109は、タッチパネル式の入力パッドやテンキーなどであってもよい。
 図2は、情報処理装置100によるOSを切り替えた状態を示す説明図である。情報処理装置100は、OS#1をマスタOSとして実行中である状態201と、OS#2をマスタOSとして実行中である状態202の、2つの状態をとり得る。
 OS#1とOS#2は、CPU101上で動作するOSである。たとえば、OS#1とOS#2は、OSの機能として、プロセスが使用するライブラリを提供する。また、OS#1とOS#2は、プロセスのスケジューリング処理を行う機能を有する。
 マスタOSは、情報処理装置100を制御するOSである。スレイブOSは、マスタOSの1プロセスとして実行されるOSである。スレイブOSを実行することで、情報処理装置100では複数のOSが同時に実行されることになり、情報処理装置100は擬似的に複数のコアを持つマルチコアプロセッサの様相を示すことになる。
 状態201における情報処理装置100は、OS#1をマスタOSとし、OS#1の制御のもと、プロセスAと、プロセスBと、OS#2の処理を含むプロセス203を実行している。プロセス203の内部にて情報処理装置100は、OS#2の制御のもと、プロセスCと、プロセスDを実行している。情報処理装置100は、切り替え要求を検出した場合にマスタOSとスレイブOSと切り替えることで、状態201から状態202に遷移する。
 状態202における情報処理装置100は、OS#2をマスタOSとし、OS#2の制御のもと、プロセスCと、プロセスDと、OS#1の処理を含むプロセス204を実行している。プロセス204の内部にて情報処理装置100は、OS#1の制御のもと、プロセスAと、プロセスBを実行している。
(情報処理装置100の機能)
 次に、情報処理装置100の機能について説明する。図3は、情報処理装置100の機能を示すブロック図である。情報処理装置100は、検出部301と、切替部302と、停止部303と、移行部304と、取得部305と、割当部306と、を含む。この制御部となる機能(検出部301~割当部306)は、記憶装置に記憶されたプログラムをCPU101が実行することにより、その機能を実現する。記憶装置とは、たとえば、図1に示したROM102、RAM103、フラッシュROM104、フラッシュROM106などである。または、I/F108を経由して他のCPUが実行することにより、その機能を実現してもよい。
 検出部301は、第1のOSが第1のOSとは異なる第2のOSを含むプロセスを実行する第1の状態で、切り替え要求を検出する機能を有する。たとえば、検出部301は、情報処理装置100がマスタOSとなるOS#1が、スレイブOSとなるOS#2を含むプロセス203を実行する状態201で、利用者の操作等によって発行された切り替え要求を検出する。なお、検出結果は、CPU101のレジスタ、RAM103などの記憶領域に記憶される。
 切替部302は、検出部301によって切り替え要求が検出された場合、第1の状態から第2のOSが第1のOSを含むプロセスを実行する第2の状態へ切り替える機能を有する。また、切替部302は、移行部304によって実行権限が第2のOSに移行された場合、第1の状態から第2の状態へ切り替えてもよい。たとえば、切替部302は、情報処理装置100の状態を状態201から、移行部304によって確保されたOS#1を含むプロセス204へのポインタを用いてOS#2がプロセス204を実行する状態202へ切り替える。
 また、切替部302は、第1の状態から第2の状態に加え第2のOSのユーザインタフェイスに関連する処理を実行する状態へ切り替えてもよい。ユーザインタフェイスに関連する処理とは、たとえば、キーボード109に対応したキーイベント処理や、ディスプレイ107がタッチパネルであった場合に対応したマウスイベント処理などである。たとえば、切替部302は、OS#2がマスタOSとなった状態202にて、さらにOS#2のキーイベント処理やマウスイベント処理を実行する。なお、切り替えたという情報は、CPU101のレジスタ、RAM103などの記憶領域に記憶されてもよい。
 停止部303は、検出部301によって切り替え要求が検出された場合、第2のOSを含むプロセスを停止させる機能を有する。たとえば、停止部303は、切り替え要求が検出された場合、プロセス203を停止させる。プロセス203が停止した場合、プロセス203がCPU101に割り当てられなくなるが、RAM103上にプロセス203の情報は存在している。
 また、停止部303は、さらに、第1のOSのユーザインタフェイスに関連する処理を停止させてもよい。たとえば、停止部303は、OS#1のキーイベント処理やマウスイベント処理を停止させる。なお、プロセスまたはユーザインタフェイスに関連する処理を停止させたという情報は、CPU101のレジスタ、RAM103などの記憶領域に記憶される。
 移行部304は、停止部303によって第2のOSを含むプロセスが停止した場合、CPU101に対する実行権限を第1のOSから第2のOSに移行する機能を有する。たとえば、移行部304は、停止部303によってプロセス203が停止した場合、実行権限をOS#1からOS#2に移行する。実行権限が移行することにより、マスタOSがOS#1からOS#2となる。実際には、OS#1がプロセス203へのポインタを解放し、OS#2がプロセス204へのポインタを確保することで、実行権限がOS#1からOS#2に移行する。さらに詳細な動作については、図5にて記述する。なお、実行権限が移行され、マスタOSが切り替わったという情報は、CPU101のレジスタ、RAM103などの記憶領域に記憶される。
 取得部305は、プロセッサからアクセス可能な第1のメモリ領域の所定の位置に割り当てられた第1のOSのシステム領域から、第1のOSのユーザ領域と第1のOSが実行するプロセスに割り当てられた第2のメモリ領域とを取得する機能を有する。第1のメモリ領域とは、CPUがアクセス可能なROM102、RAM103等といった記憶領域である。
 システム領域とは、OSやデバイスドライバなどによって使用されるメモリ領域のことであり、ユーザ領域は、システム領域以外にOSに割り当てられた領域であり、OSによって実行されるプロセスによって使用される。システム領域が割り当てられる所定の位置とは、情報処理装置100の起動後から移動しなければどの位置であってもよい。
 たとえば、OS#1のシステム領域は、RAM103の先頭アドレスに割り当てられてもよい。さらに、OS#2のシステム領域は、OS#1のシステム領域として割り当てられたメモリ領域の次のメモリ領域に割り当てられてもよい。また、プロセスに割り当てられた第2のメモリ領域は、プロセスのコンテキストとして割り当てられたメモリ領域である。プロセスは、コンテキストにCPUのレジスタの値、プログラムカウンタ、スタックポインタなどといったプロセスが使用するデータを格納する。
 たとえば、取得部305は、OS#1のシステム領域から、OS#1のユーザ領域とプロセスAおよびプロセスBのコンテキストとして割り当てられたメモリ領域とを取得する。また、詳細には、取得部305は、メモリ領域を指し示すポインタを取得する。取得された領域の情報は、CPU101のレジスタ、RAM103などの記憶領域に記憶される。
 割当部306は、移行部304によって実行権限が第2のOSに移行された場合、取得部305によって取得された第1のOSのユーザ領域から第2のメモリ領域を除いたメモリ領域のうち少なくとも一部のメモリ領域を、第2のOSに割り当てる機能を有する。たとえば、割当部306は、OS#1のユーザ領域からプロセスAおよびプロセスBのコンテキストとして割り当てられたメモリ領域を除いた未使用であるメモリ領域のうち少なくとも一部のメモリ領域を、OS#2のユーザ領域として割り当てる。
 なお、割当部306は、未使用であるメモリ領域のうち、すべてのメモリ領域を第2のOSに割り当ててもよいし、一部のメモリ領域であってもよい。たとえば、OS#1のユーザ領域が7[Mバイト]であり、OS#2のユーザ領域が4[Mバイト]であり、プロセスAおよびプロセスBのコンテキストとして割り当てられたメモリ領域の合計が3[Mバイト]である場合を想定する。このとき、割当部306は、OS#1のユーザ領域の未使用部分の4[Mバイト]をOS#2のユーザ領域に割り当ててもよいし、1[Mバイト]はOS#1のユーザ領域としておき、残りの3[Mバイト]をOS#2のユーザ領域に割り当て、OS#2のユーザ領域を4+3=7[Mバイト]としてもよい。
 図4は、情報処理装置100によるOSを切り替えた表示例を示す説明図である。状態401、状態402における情報処理装置100は、それぞれ、状態201、状態202の情報処理装置100に、プロセスAとしてWebブラウザを実行し、プロセスCとして地図表示プロセスを実行している。状態401における情報処理装置100は、Webブラウザがフォアグラウンドであり、HTML(HyperText Markup Language)文書を表示している。さらに、情報処理装置100は、Webブラウザの小窓として地図表示プロセスを表示している。地図表示プロセスは、OS#2上のサービスであり、バックグラウンド上で低い優先度で実行されている。
 ユーザによるWebブラウザ上の操作で、たとえば、地図表示プロセスがクリックされた等の動作により、切り替え要求が発行される。切り替え要求が発行されると、情報処理装置100は、状態401から状態402に状態遷移し、マスタOSとスレイブOSであるOS#1とOS#2が切り替わる。
 状態402における情報処理装置100は、地図表示プロセスがフォアグラウンドであり、Webブラウザがバックグラウンドとなっている。たとえば、キーボード109の上矢印キーが押下されると、情報処理装置100は、OS#2のキーイベント処理によって地図表示プロセスにキーイベントを通知する。情報処理装置100は、地図表示プロセスがキーイベントに基づいて地図上の前方を示す画面イメージを要求するため、I/F108を通じて画像イメージを取得し、ディスプレイ107に表示する。このとき、OS#2はマスタOSとなっているため、キーボード109、I/F108、ディスプレイ107を制御するドライバに直接アクセスすることができ、上矢印キーが押下された時刻からみて高速に描画を行うことができる。
 従来例にかかる情報処理装置100では、OS#2は、OS#1の配下のスレイブOSであるため、OS#2がキーボード109、I/F108、ディスプレイ107を制御するドライバにアクセスするにはOS#1を経由していた。したがって、従来例にかかる情報処理装置100では、OS#2の優先度を高くし高速に描画を行おうとしても、相対的に低速となったOS#1を経由するため、高速に表示することができなかった。
 図5は、メモリアドレス空間の一例を示す説明図である。図5では、RAM103の記憶内容を示したメモリアドレス空間501およびメモリアドレス空間502を示している。情報処理装置100は、フラッシュROM104などに格納されているOSブートイメージをブートローダ503によってRAM103に展開する。図5に表示されたRAM103のアドレス空間は、RAM103の先頭アドレスからのオフセットで示されている。メモリアドレス空間501は、状態201におけるRAM103の記憶内容を示しており、メモリアドレス空間502は、状態202におけるRAM103の記憶内容を示している。図5では、状態201の状態で情報処理装置100が起動されることを想定している。
 ブートローダ503は、OS#1、OS#2のブートアップポイントとなるシステム領域を、それぞれ0x0000~0x01ff、0x0200~0x02ffに固定サイズで割り当てる。さらに、ブートローダ503は、0x0300~0x23ffであるメモリ領域504をOS#1のユーザ領域として割り当て、0x2400~0x31ffをOS#2が使用するメモリ領域505として割り当てる。割り当てられたメモリ領域505はOS#2の処理を含むプロセス203のコンテキストとみなすことができる。
 割り当て後、OS#1は、プロセス203のコンテキストとなった先頭アドレスをポインタ506に記憶する。残りの0x3200~0xffffは、OS#1のユーザ領域となり、OS#1の管理下となる。なお、OS#1のユーザ領域は連続したメモリ領域ではなくなるが、このような状態であってもMMU(Memory Management Unit)によって管理することができる。
 また、OS#2は、メモリ領域505のうち、OS#2のワーク領域となるOS#2のコンテキストを0x2400~0x24ffに割り当て、OS#2のユーザ領域を0x2500~0x31ffに割り当てる。
 また、OS#1は、OS#1のユーザ領域の未使用領域から、プロセスAのコンテキスト領域を0x2000~0x21ffに割り当て、プロセスBのコンテキストを0x2200~0x23ffに割り当てる。OS#2は、OS#2のユーザ領域となる0x2500~0x31ffから、プロセスCのコンテキストを0x3000~0x31ffに割り当てる。
 割り当て後、OS#1は、OS#1のユーザ領域の先頭アドレスをポインタ507に記憶する。さらに、OS#1は、プロセスAのコンテキストの先頭アドレスをポインタ508に記憶し、プロセスBのコンテキストの先頭アドレスをポインタ509に記憶する。なお、記憶されたポインタ506~ポインタ509は、OS#1のシステム領域にて格納される。また、プロセスに関するポインタ508とポインタ509は、後述するプロセスディスパッチテーブル601にも格納される。
 同様に、OS#2は、OS#2のユーザ領域の先頭アドレスをポインタ510に記憶し、プロセスCのコンテキストの先頭アドレスをポインタ511に記憶する。なお、記憶されたポインタ510、ポインタ511は、OS#2のシステム領域にて格納される。また、プロセスに関するポインタ511はプロセスディスパッチテーブル601にも格納される。
 ユーザによる切り替え要求が発行された場合、情報処理装置100は、メモリアドレス空間をメモリアドレス空間501からメモリアドレス空間502に変更する。メモリアドレス空間501とメモリアドレス空間502は、RAM103の割り当てられている内容に変化はないが、いくつかのポインタが変更される。具体的には、OS#1は、プロセス203の先頭アドレスを記憶していたポインタ506を解放する。また、OS#1は、未使用のメモリ領域である0x3200~0xffffを解放する。
 続けて、OS#2は、OS#1の管理下となるメモリ領域504のOS#1ユーザ領域、プロセスAのコンテキスト、プロセスBのコンテキストをプロセス204のコンテキストとみなし、OS#1ユーザ領域の先頭アドレスをポインタ512に記憶する。OS#1がプロセス203のコンテキストへのポインタ506を解放し、OS#2がプロセス204のコンテキストへのポインタ512を確保したことで、実行権限がOS#1からOS#2に移行したことになる。また、OS#2は、未使用の領域であった0x3200~0xffffを管理する。これにより、マスタOSとなったOS#2は、新たに起動されたプロセスやより多くのメモリ領域を要求したプロセスに対して、状態201で割り当てられていたメモリ領域を超えてメモリを割り当てることができる。
 図5の例では、情報処理装置100にOSが2つ搭載される場合で説明を行ったが、OSがN個搭載される場合も、ブートローダ503は、OS#1のシステム領域:OS#2のシステム領域:…:OS#Nのシステム領域を固定サイズでRAM103に割り当てる。次に、ブートローダ503は、OS#1のユーザ領域:OS#2のユーザ領域:…:OS#Nのユーザ領域を可変サイズでRAM103に割り当てる。
 図6は、OS切り替え時のアプリケーションのディスパッチ状況を示す説明図である。プロセスディスパッチテーブル601は、すべてのOSで実行されているプロセスのコンテキストへのポインタが格納されている。たとえば、プロセスディスパッチテーブル601には、プロセスAのコンテキストへのポインタ508、プロセスBのコンテキストへのポインタ509、プロセスCのコンテキストへのポインタ511…といったポインタが格納されている。
 各OSのスケジューラに搭載される巡回ディスパッチ管理部は、プロセスディスパッチテーブル601を参照する。巡回ディスパッチ管理部は、プロセスディスパッチテーブル601を参照することで、プロセスのコンテキストへのポインタを取得することができる。プロセスのコンテキストへのポインタを用いて、巡回ディスパッチ管理部は、スケジューリングに基づいて、ディスパッチループを再構築する。
 具体的には、OS#1のスケジューラは、巡回ディスパッチ管理部によってプロセスディスパッチテーブル601の参照により、ディスパッチループ602を構築する。ディスパッチループ602は、プロセスA、プロセスB、プロセス203がタイムスライスで実行されるように構築されている。さらに、ディスパッチループ602は、プロセスAの優先度が高くなるように構築されている。
 ユーザによる操作等によって切り替え要求が発行されると、OS#2のスケジューラが、巡回ディスパッチ管理部によってプロセスディスパッチテーブル601の参照により、ディスパッチループ603を構築する。ディスパッチループ603は、プロセスC、プロセスD、プロセス204がタイムスライスで実行されるように構築されている。さらに、ディスパッチループ603は、プロセスCの優先度が高くなるように構築されている。このように、プロセスディスパッチテーブル601を参照することで、各OSのスケジューラは、優先度制御を容易に行うことができる。
 図7は、OS切り替え処理の概略を示す説明図である。状態201における情報処理装置100は、OS#1が提供するUI(ユーザインターフェイス)やフレームワークに基づいて各プロセスを実行している。たとえば、図7では、OS#1のUIによってフォアグラウンドとなるプロセスAやOS#2が実行されている。OS#2の中では、バックグラウンドとなるプロセスCが実行されている。たとえば、OS#1の提供するUIがGUIであれば、OS#1は、ポインティングデバイスによる矢印アイコン等を移動することによりマウスイベント処理を実行し、ユーザのプロセスに対する要求を処理する。
 ユーザによる切り替え要求が発行されると、情報処理装置100は、OS切り替え処理を実行する。OS切り替え処理の詳細は、図8にて後述する。OS切り替え処理の内部では、OS#1のUIを一時停止させ、OS#2のUIに停止解除させる。
 OS切り替え処理が終了し、状態202となった情報処理装置100は、OS#2が提供するUIやフレームワークに基づいて各プロセスを実行する。たとえば、図7では、OS#2のUIによってフォアグラウンドとなったプロセスCやOS#1が実行される。OS#1の中では、バックグラウンドとなったプロセスAが実行される。
 図8は、OS切り替え処理のフローチャートである。図8に示すOS切り替え処理は、情報処理装置100が状態201から状態202に遷移する場合のフローチャートを示している。情報処理装置100が状態202から状態201に遷移する場合は、OS#2とOS#1の処理が入れ替わることになる。また、ステップS801の処理後、情報処理装置100は、ステップS802、ステップS803、ステップS804、ステップS809をOS#1側の処理として実行する。また、情報処理装置100は、ステップS805、ステップS807、ステップS808、ステップS810をOS#2側の処理として実行する。
 OS#1は、ユーザからのロック処理を行う(ステップS801)。ロック処理が実行された情報処理装置100は、ユーザ操作を含む外部割り込み処理を行わない。ロック処理後、OS#1は、OS#2を含むプロセス203のポインタを解放する(ステップS802)。続けて、OS#1は、OS#1が管理中のディスパッチループからプロセス203を削除する(ステップS803)。具体的には、OS#1は、プロセス203のコンテキストを示すポインタであるポインタ506を削除する。
 次に、OS#1は、OS#1のブートアップポイントとなるシステム領域のアドレスを取得し、OS#2に通知する(ステップS804)。続けて、通知とあわせて、CPU101は、実行権限をOS#1からOS#2に切り替える(ステップS806)。これにより、マスタOSがOS#1からOS#2に切り替わることになる。実際には、OS#1がステップS803にてOS#1のシステム領域からプロセス203へのポインタを削除し、ステップS806にてOS#2がプロセス204へのポインタを確保することで実行権限が切り替わることになる。また、実行権限を移行時に、CPU101は、OS#1のユーザ領域から未使用のメモリ領域のうち少なくとも一部のメモリ領域を解放し、解放されたメモリ領域をOS#2のユーザ領域として割り当てる。
 OS#2は、プロセス204を指すことになるポインタを新規に確保し(ステップS805)、OS#1からの通知によってOS#1のシステム領域のポインタを取得する。取得後、OS#2は、新規ポインタとしてOS#1のアドレスを設定する(ステップS807)。具体的には、OS#2は、プロセス204のコンテキストを指すポインタとなるポインタ512に、OS#1のシステム領域から取得したOS#1のユーザ領域のアドレスを設定する。これにより、ポインタ512は、プロセス204のコンテキストを示すことになる。
 設定後、OS#2は、OS#2が管理中のディスパッチループにOS#1を含んだプロセス204を追加する(ステップS808)。また、ステップS805の処理にて、ポインタを新規に確保すると、新規ポインタがディスパッチループに追加される機構であれば、ステップS807の処理にてプロセス204がディスパッチループに追加されていることになる。このような場合、OS#2は、ステップS808の処理を行わずともよい。追加後、OS#1は、UI機能の利用を一時停止させ(ステップS809)、OS#2は、UI機能を停止解除させる(ステップS810)。
 OS#1によってステップS809の処理、OS#2によってステップS810の処理を終了後、OS#2は、ユーザからのアンロック処理を行い(ステップS811)、OS切り替え処理を終了する。アンロック処理が実行された情報処理装置100は、ユーザ操作を含む外部割り込み処理を行うようになる。
 以上説明したように、情報処理装置、情報処理方法、および情報処理プログラムによれば、切り替え要求を検出した場合、マスタOSであるOS#1とスレイブOSであるOS#2を、OS#2をマスタOSに、OS#1をスレイブOSに設定する。これにより、情報処理装置は、スレイブOSの優先度を高くした場合に、スレイブOSとデバイスとのアクセスで間にあったマスタOSを省いてアクセスすることができ、スレイブOSからデバイスへのアクセスを高速化することができる。情報処理装置は、スレイブOSであったOS#2からデバイスへの処理の遅延を解消し、OS#2の応答性能を向上させることができる。
 また、情報処理装置は、切り替え要求が検出された場合、OS#1にて実行されている、OS#2を含むプロセスを停止させ、プロセッサの実行権限をOS#1からOS#2に切り替えて、OS#2をマスタOSに、OS#1をスレイブOSにしてもよい。これにより、情報処理装置は、OS#1の配下にOS#2があり、OS#2の配下にOS#1がある、といった無限ループとなる状態を避けてOSを切り替えることができる。
 また、情報処理装置は、OS切り替え時に、所定の位置に割り当てられたOS#1のシステム領域から、OS#1のユーザ領域とOS#1が実行するプロセスに割り当てられたメモリ領域を取得し、OS#1のユーザ領域の未使用部分をOS#2に割り当ててもよい。これにより、情報処理装置は、スレイブOSであったOSがマスタOSとなった際に、スレイブOS時に設定されたメモリ領域を越えてメモリを使用するといった、動的なメモリ割り当てを実現することができる。
 また、情報処理装置は、OS切り替え時に、OS#1のUI機能を停止させ、OS#2のUI機能を停止解除してもよい。これにより、情報処理装置が携帯端末などの、ディスプレイの表示領域が限られている場合に、情報処理装置は、主従関係が入れ替わった際に操作対象となるウインドウをディスプレイに表示されているマスタOSのウインドウに限定することになる。よって、画面に表示されていないスレイブOSのUIを停止させることで、処理量を削減することができる。
 また、情報処理装置は、主従関係が入れ替わることにより、応答性能を向上することができる。たとえば、マスタOSであるOS#Mのプロセスのスイッチ間隔をτm、プロセス数がM個とし、スレイブOSであるOS#Nのプロセスのスイッチ間隔をτn、プロセス数がN個とした場合を想定する。主従関係が固定である装置の場合、OS#Nに存在するプロセスが呼び出されるには、最悪Mτm+Nτn時間を要することになる。本実施の形態にかかる情報処理装置では、主従関係が入れ替わることで、Nτn時間で切り替えることが可能となる。
 なお、本実施の形態で説明した情報処理方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。本情報処理プログラムは、ハードディスク、フレキシブルディスク、CD-ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また本情報処理プログラムは、インターネット等のネットワークを介して配布してもよい。
 #1、#2 OS
 100 情報処理装置
 301 検出部
 302 切替部
 303 停止部
 304 移行部
 305 取得部
 306 割当部

Claims (6)

  1.  第1のOSが前記第1のOSとは異なる第2のOSを含むプロセスを実行する第1の状態で、切り替え要求を検出する検出手段と、
     前記検出手段によって前記切り替え要求が検出された場合、前記第1の状態から前記第2のOSが前記第1のOSを含むプロセスを実行する第2の状態へ切り替える切替手段と、
     を備えることを特徴とする情報処理装置。
  2.  前記検出手段によって前記切り替え要求が検出された場合、前記第2のOSを含むプロセスを停止させる停止手段と、
     前記停止手段によって前記第2のOSを含むプロセスが停止した場合、プロセッサに対する実行権限を前記第1のOSから前記第2のOSに移行する移行手段と、をさらに備え、
     前記切替手段は、
     前記移行手段によって前記実行権限を前記第2のOSに移行した場合、前記第1の状態から前記第2の状態へ切り替えることを特徴とする請求項1に記載の情報処理装置。
  3.  前記プロセッサからアクセス可能な第1のメモリ領域の所定の位置に割り当てられた前記第1のOSのシステム領域から、前記第1のOSのユーザ領域と前記第1のOSが実行するプロセスに割り当てられた第2のメモリ領域とを取得する取得手段と、
     前記移行手段によって前記実行権限を前記第2のOSに移行した場合、前記取得手段によって取得された前記第1のOSのユーザ領域から前記第2のメモリ領域を除いたメモリ領域のうち少なくとも一部のメモリ領域を、前記第2のOSに割り当てる割当手段と、
     をさらに備えることを特徴とする請求項2に記載の情報処理装置。
  4.  前記停止手段は、
     さらに、前記第1のOSのユーザインタフェイスに関連する処理を停止させ、
     前記切替手段は、
     前記第1の状態から前記第2の状態に加え前記第2のOSのユーザインタフェイスに関連する処理を実行する状態へ切り替えることを特徴とする請求項2または3に記載の情報処理装置。
  5.  プロセッサが、
     第1のOSが前記第1のOSとは異なる第2のOSを含むプロセスを実行する第1の状態で、前記切り替え要求を検出する検出工程と、
     前記検出工程によって前記切り替え要求が検出された場合、前記第1の状態から前記第2のOSが前記第1のOSを含むプロセスを実行する第2の状態へ切り替える切替工程と、
     を実行することを特徴とする情報処理方法。
  6.  プロセッサに、
     第1のOSが前記第1のOSとは異なる第2のOSを含むプロセスを実行する第1の状態で、前記切り替え要求を検出する検出工程と、
     前記検出工程によって前記切り替え要求が検出された場合、前記第1の状態から前記第2のOSが前記第1のOSを含むプロセスを実行する第2の状態へ切り替える切替工程と、
     を実行させることを特徴とする情報処理プログラム。
PCT/JP2010/061190 2010-06-30 2010-06-30 情報処理装置、情報処理方法、および情報処理プログラム WO2012001787A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN2010800677746A CN102971709A (zh) 2010-06-30 2010-06-30 信息处理装置、信息处理方法以及信息处理程序
PCT/JP2010/061190 WO2012001787A1 (ja) 2010-06-30 2010-06-30 情報処理装置、情報処理方法、および情報処理プログラム
JP2012522392A JPWO2012001787A1 (ja) 2010-06-30 2010-06-30 情報処理装置、情報処理方法、および情報処理プログラム
US13/730,161 US20130117762A1 (en) 2010-06-30 2012-12-28 Information processing apparatus, information processing method, and computer product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2010/061190 WO2012001787A1 (ja) 2010-06-30 2010-06-30 情報処理装置、情報処理方法、および情報処理プログラム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/730,161 Continuation US20130117762A1 (en) 2010-06-30 2012-12-28 Information processing apparatus, information processing method, and computer product

Publications (1)

Publication Number Publication Date
WO2012001787A1 true WO2012001787A1 (ja) 2012-01-05

Family

ID=45401542

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/061190 WO2012001787A1 (ja) 2010-06-30 2010-06-30 情報処理装置、情報処理方法、および情報処理プログラム

Country Status (4)

Country Link
US (1) US20130117762A1 (ja)
JP (1) JPWO2012001787A1 (ja)
CN (1) CN102971709A (ja)
WO (1) WO2012001787A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018514014A (ja) * 2015-02-27 2018-05-31 サムスン エレクトロニクス カンパニー リミテッド 複数のオペレーティングシステムを駆動するデバイス、及びその方法

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102667725B (zh) * 2010-01-13 2015-09-16 马维尔以色列(M.I.S.L.)有限公司 用于媒体处理的硬件虚拟化
JP5977778B2 (ja) * 2014-03-27 2016-08-24 京セラドキュメントソリューションズ株式会社 情報処理装置およびメモリー管理方法
US11489731B2 (en) 2016-09-30 2022-11-01 Salesforce.Com, Inc. Techniques and architectures for efficient allocation of under-utilized resources
US10963311B2 (en) * 2016-09-30 2021-03-30 Salesforce.Com, Inc. Techniques and architectures for protection of efficiently allocated under-utilized resources
DE112018007748T5 (de) * 2018-12-18 2021-04-08 Intel Corporation Berechnungsverfahren und Vorrichtung mit Mehrphasen/stufen-Start
KR20220017319A (ko) * 2020-08-04 2022-02-11 삼성전자주식회사 메모리 보호 방법 및 전자 장치

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05181443A (ja) * 1991-07-01 1993-07-23 Seiko Epson Corp コンピュータ
JP2001216171A (ja) * 2000-01-31 2001-08-10 Toshiba Corp 仮想計算機システム
JP2005234658A (ja) * 2004-02-17 2005-09-02 Fujitsu Ltd タスク管理プログラムおよびタスク管理装置
JP2006350956A (ja) * 2005-06-20 2006-12-28 Fuji Xerox Co Ltd 情報処理装置及びプログラム
JP2007334572A (ja) * 2006-06-14 2007-12-27 Nec Corp Os切り替えシステム、仮想計算機システム、os切り替え方法及びos切り替え用プログラム
JP2008108075A (ja) * 2006-10-25 2008-05-08 Matsushita Electric Ind Co Ltd タスク切替え制御方法及びコンピュータシステム

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007220086A (ja) * 2006-01-17 2007-08-30 Ntt Docomo Inc 入出力制御装置、入出力制御システム及び入出力制御方法
JP4342576B2 (ja) * 2006-07-25 2009-10-14 株式会社エヌ・ティ・ティ・ドコモ 複数オペレーティングシステム切替制御装置及びコンピュータシステム
US20090158299A1 (en) * 2007-10-31 2009-06-18 Carter Ernst B System for and method of uniform synchronization between multiple kernels running on single computer systems with multiple CPUs installed
US9286088B2 (en) * 2009-03-09 2016-03-15 Microsoft Technology Licensing, Llc User interface for interaction with virtual machine

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05181443A (ja) * 1991-07-01 1993-07-23 Seiko Epson Corp コンピュータ
JP2001216171A (ja) * 2000-01-31 2001-08-10 Toshiba Corp 仮想計算機システム
JP2005234658A (ja) * 2004-02-17 2005-09-02 Fujitsu Ltd タスク管理プログラムおよびタスク管理装置
JP2006350956A (ja) * 2005-06-20 2006-12-28 Fuji Xerox Co Ltd 情報処理装置及びプログラム
JP2007334572A (ja) * 2006-06-14 2007-12-27 Nec Corp Os切り替えシステム、仮想計算機システム、os切り替え方法及びos切り替え用プログラム
JP2008108075A (ja) * 2006-10-25 2008-05-08 Matsushita Electric Ind Co Ltd タスク切替え制御方法及びコンピュータシステム

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018514014A (ja) * 2015-02-27 2018-05-31 サムスン エレクトロニクス カンパニー リミテッド 複数のオペレーティングシステムを駆動するデバイス、及びその方法
US11243802B2 (en) 2015-02-27 2022-02-08 Samsung Electronics Co., Ltd. Device and method of running multiple operating systems and presenting multiple operation screens using locking of host operating system

Also Published As

Publication number Publication date
US20130117762A1 (en) 2013-05-09
CN102971709A (zh) 2013-03-13
JPWO2012001787A1 (ja) 2013-08-22

Similar Documents

Publication Publication Date Title
WO2012001787A1 (ja) 情報処理装置、情報処理方法、および情報処理プログラム
US9459922B2 (en) Assigning a first portion of physical computing resources to a first logical partition and a second portion of the physical computing resources to a second logical portion
US8612633B2 (en) Virtual machine fast emulation assist
EP2656206B1 (en) Probe insertion via background virtual machine
US8266618B2 (en) Graphics hardware resource usage in a fully virtualized computing environment
US8219988B2 (en) Partition adjunct for data processing system
JP5450620B2 (ja) コンピュータシステム、処理方法及びコンピュータプログラム
US20130054734A1 (en) Migration of cloud applications between a local computing device and cloud
JP5040136B2 (ja) チューニング支援装置、チューニング支援プログラム、チューニング支援プログラムを記録したコンピュータ読み取り可能な記録媒体およびチューニング支援方法
KR20070100367A (ko) 하나의 가상 머신에서 다른 가상 머신으로 메모리를동적으로 재할당하기 위한 방법, 장치 및 시스템
JP2015503784A (ja) グラフィックス処理部における仮想マシン間の移行
KR20110094764A (ko) 트랜잭션 기반 입출력 인터페이스를 제공하는 가상화 장치 및 방법
US10613606B2 (en) Wireless component state based power management
KR20120068573A (ko) 심리스 애플리케이션 통합 장치 및 방법
WO2015154226A1 (zh) 一种虚拟化环境中的数据通信的方法、装置及处理器
WO2013008326A1 (ja) ソフトウェア検証方法、およびソフトウェア検証システム
Kilic et al. Overcoming virtualization overheads for large-vcpu virtual machines
JP5780296B2 (ja) スレッド処理方法、およびスレッド処理システム
US10241821B2 (en) Interrupt generated random number generator states
KR20080076304A (ko) 게스트 운영체제의 화면 출력 제어 방법 및 장치
US9202592B2 (en) Systems and methods for memory management in a dynamic translation computer system
Sundar Rajan et al. Virtualizing an automotive state-of-the-art microcontroller: Techniques and its evaluation
US9824020B2 (en) Systems and methods for memory management in a dynamic translation computer system
JP2022055002A (ja) 情報処理装置、情報処理方法および情報処理プログラム
Kapoor et al. Kernel Operating System

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201080067774.6

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10854084

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012522392

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10854084

Country of ref document: EP

Kind code of ref document: A1