WO2011161787A1 - 通信装置、通信方法、および通信プログラム - Google Patents

通信装置、通信方法、および通信プログラム Download PDF

Info

Publication number
WO2011161787A1
WO2011161787A1 PCT/JP2010/060687 JP2010060687W WO2011161787A1 WO 2011161787 A1 WO2011161787 A1 WO 2011161787A1 JP 2010060687 W JP2010060687 W JP 2010060687W WO 2011161787 A1 WO2011161787 A1 WO 2011161787A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication
access
memory
unit
request
Prior art date
Application number
PCT/JP2010/060687
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 JP2012521220A priority Critical patent/JP5403160B2/ja
Priority to PCT/JP2010/060687 priority patent/WO2011161787A1/ja
Priority to CN201080067646.1A priority patent/CN102947817B/zh
Publication of WO2011161787A1 publication Critical patent/WO2011161787A1/ja
Priority to US13/724,949 priority patent/US9565049B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1416Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to a communication device that performs communication, a communication method, and a communication program.
  • a technique for performing distributed processing while sharing data in a terminal device such as a portable terminal.
  • a terminal device such as a portable terminal.
  • a server side terminal and a mobile terminal on the client side are connected by wireless connection, and the data is shared, so that a limited storage area in the mobile terminal can be obtained.
  • Techniques that can be used effectively are disclosed. (For example, refer to Patent Document 1 below.)
  • a program code required at startup can be transmitted by providing a section for determining whether to perform data transfer.
  • a technique for shortening the startup time of a program is disclosed. (For example, see Patent Document 3 below.)
  • a technique for controlling shared data transfer for example, a technique is disclosed in which a free area in a distributed shared memory area is added and allocated to an area where the distributed shared memory is often insufficient. (For example, see Patent Document 4 below.)
  • the server interrupts data distribution to a plurality of control devices when a line or device is abnormal, and resumes data distribution normally or periodically.
  • a line or device is abnormal
  • resumes data distribution normally or periodically Is disclosed.
  • the present invention has an object to provide a communication device, a communication method, and a communication program capable of performing communication without forming a file in order to solve the above-described problems caused by the prior art.
  • the disclosed communication device can control the access unit that accesses the memory of the own device and the communication unit that communicates with another device, and an access request generated from within the own device. And whether or not the address of the access target data in the detected access request is an address assigned to the memory of the own device, and based on the determined determination result, the access unit Then, either one of the process for accessing the memory of the own apparatus or the process for communicating with another apparatus based on the access request by the communication unit is selected and executed.
  • FIG. 3 is an explanatory diagram illustrating an outline of the operation of the communication system 100 according to the first embodiment.
  • 1 is a block diagram showing functions of a communication system 100 according to a first embodiment.
  • 4 is an explanatory diagram illustrating a first operation during memory area sharing processing of the communication system 100 according to the first embodiment;
  • FIG. 10 is an explanatory diagram illustrating a second operation during the memory area sharing process of the communication system 100 according to the first embodiment;
  • 3 is an explanatory diagram showing that a moving image is being reproduced in the communication system 100 according to the first embodiment.
  • FIG. 3 is an explanatory diagram showing a game application being executed in the communication system 100 according to the first embodiment; 4 is an explanatory diagram illustrating an example of stored contents of an event table 801.
  • FIG. 3 is a flowchart showing a memory area sharing start process and a memory area sharing end process according to the first embodiment; 3 is a flowchart showing memory area sharing processing according to the first exemplary embodiment; 1 is an explanatory diagram illustrating a problem of a communication system 100 according to a first embodiment.
  • FIG. 6 is an explanatory diagram showing an outline of the operation of the communication system 100 according to the second embodiment.
  • FIG. 3 is a block diagram illustrating functions of a communication system 100 according to a second embodiment.
  • FIG. 10 is an explanatory diagram showing an outline of an operation at the time of shutting down during a memory sharing process of the communication system 100 according to the second exemplary embodiment
  • FIG. 10 is an explanatory diagram illustrating an outline of an operation at the time of reconnection during the memory sharing process of the communication system 100 according to the second embodiment
  • It is explanatory drawing which shows the state in execution of the game application in the communication system 100 concerning Embodiment 2.
  • FIG. FIG. 10 is an explanatory diagram of an example of an I / O log according to the second embodiment. 10 is a flowchart illustrating a distribution start process and a distribution end process according to the second embodiment.
  • 10 is a flowchart (part 1) illustrating a distributed process according to the second embodiment; 10 is a flowchart (part 2) illustrating the distributed processing according to the second embodiment; 10 is a flowchart (No. 3) illustrating the distributed processing according to the second embodiment; 10 is a flowchart (part 4) illustrating the distributed processing according to the second embodiment;
  • FIG. 1 is a block diagram of hardware of a communication system 100 according to the embodiment.
  • a communication system 100 includes a communication device 101 # 0 and a communication device 101 # 1.
  • Communication device 101 # 0 includes CPU 102 # 0, ROM (Read-Only Memory) 103 # 0, and RAM (Random Access Memory) 103 # 0.
  • Communication device 101 # 0 includes flash ROM 105 # 0, flash ROM controller 106 # 0, and flash ROM 107 # 0.
  • the communication device 101 # 0 includes a display 108 # 0, an I / F (Interface) 109 # 0, and a keyboard 110 # 0 as input / output devices for the user and other devices. Each unit is connected by a bus 111 # 0.
  • the communication device 101 # 1 includes the same hardware as the communication device 101 # 0. Specifically, the communication device 101 # 1 includes a CPU 102 # 1, a ROM 103 # 1, a RAM 104 # 1, and a bus 111 # 1. The communication device 101 # 1 includes a flash ROM 105 # 1, a flash ROM controller 106 # 1, a flash ROM 107 # 1, a display 108 # 1, an I / F 109 # 1, and a keyboard 110 # 1. But you can.
  • the flash ROM 105 to the display 108 and the keyboard 110 may exist in either the communication device 101 # 0 or the communication device 101 # 1.
  • the communication device 101 # 0 may include the display 108 # 0
  • the communication device 101 # 1 may include the flash ROM 105 # 1 to the flash ROM 107 # 1 and the keyboard 110 # 1.
  • specific hardware exists in both the communication device 101 # 0 and the communication device 101 # 1, and the flash ROM 105 to the display 108 # 0 and the keyboard 110 excluding the specific hardware exist in either one of them. You may take
  • the communication device 101 # 0 and the communication device 101 # 1 may be separate portable terminal devices that are handled as one unit by two devices.
  • the communication device 101 # 0 may include a display 108 # 0 having a touch panel function
  • the communication device 101 # 1 may include a keyboard 110 # 1.
  • the hardware in the communication device 101 # 0 will be described, but the hardware in the communication device 101 # 1 has the same function as the hardware in the communication device 101 # 0.
  • the CPU 102 # 0 governs overall control of the communication device 101 # 0.
  • the CPU 102 # 0 may be a multi-core processor including a plurality of CPUs.
  • a multi-core processor system is a computer system including a processor having a plurality of cores.
  • ROM 103 # 0 stores a program such as a boot program.
  • the RAM 104 # 0 is used as a work area for the CPU 102 # 0.
  • the flash ROM 105 # 0 stores system software such as an OS (Operating System), application software, and the like. For example, when updating the OS, the communication apparatus 101 # 0 receives the new OS through the I / F 109 # 0, and updates the old OS stored in the flash ROM 105 # 0 to the received new OS.
  • OS Operating System
  • the flash ROM controller 106 # 0 controls reading / writing of data with respect to the flash ROM 107 # 0 according to the control of the CPU 102 # 0.
  • the flash ROM 107 # 0 stores data written under the control of the flash ROM controller 106 # 0. Specific examples of the data include image data and video data acquired by the user using the communication apparatus 101 # 0 through the I / F 109 # 0.
  • the flash ROM 107 # 0 can employ, for example, a memory card, an SD card, or the like.
  • Display 108 # 0 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 108 # 0 for example.
  • the I / F 109 # 0 directly communicates with the communication apparatus 101 # 1 by ad hoc communication, which is one of wireless LAN communication methods.
  • the I / F 109 # 0 may be connected to a network such as a LAN (Local Area Network), a WAN (Wide Area Network), or the Internet through a communication line, and may be connected to another device via the network.
  • the I / F 109 # 0 serves as an internal interface with the network and controls input / output of data from an external device.
  • a modem or a LAN adapter can be employed as the I / F 109 # 0.
  • the communication method in the present embodiment is preferably assumed to be wireless communication, but data may be input / output to / from another device by wire.
  • the keyboard 110 # 0 has keys for inputting numbers, various instructions, etc., and inputs data.
  • the keyboard 110 # 0 may be a touch panel type input pad or a numeric keypad.
  • FIG. 2 is an explanatory diagram of an operation outline of the communication system 100 according to the first embodiment.
  • the CPU 102 # 0 that controls the communication apparatus 101 # 0 stores the data 202 # 0 in the MEM 201 # 0 via the bus 111 # 0.
  • the MEM 201 # 0 is a storage device such as a RAM used as a work area of the CPU 102 # 0, and specifically, is a hardware such as the RAM 104 # 0.
  • the communication apparatus 101 # 0 executes an OS 203 # 0, a memory driver 204 # 0, a communication driver 205 # 0, and a file system 206 # 0 as software.
  • OS 203 # 0 is a program for controlling the communication device 101 # 0. Specifically, the OS 203 # 0 provides a driver used by the application software. In addition, the OS 203 # 0 provides the file system 206 # 0 to the application software in order to access the flash ROM 107 serving as an auxiliary storage device.
  • the memory driver 204 # 0 is one of drivers provided by the OS 203 # 0 and has a function of accessing the MEM 201 # 0.
  • the communication driver 205 # 0 is also one of drivers provided by the OS 203 # 0, and has a function of communicating with the communication device 101 # 1 through the I / F 109 # 0.
  • the file system 206 # 0 is one of the functions provided by the OS 203 # 0, and has a function of accessing files that are data stored in the flash ROM 105 # 0, the flash ROM 107 # 0, and the like serving as auxiliary storage devices. is doing. For example, the file stored in the flash ROM 107 is read into the RAM 104 # 0 by the CPU 102 # 0. The data updated by the CPU 102 # 0 is written as a file in the flash ROM 107 # 0.
  • the CPU 102 # 1 that controls the communication apparatus 101 # 1 stores the data 202 # 1 in the MEM 201 # 1 via the bus 111 # 1.
  • the same software as communication apparatus 101 # 0 is included. That is, the communication apparatus 101 # 1 executes the OS 203 # 1, the memory driver 204 # 1, the communication driver 205 # 1, and the file system 206 # 1 as software.
  • the communication system 100 shares data using the software described above.
  • the OS 203 # 0 detects an access request for the data 202 # 0 generated by the software of the communication apparatus 101 # 0, and determines whether the access destination of the data 202 # 0 is the MEM 201 # 0.
  • the OS 203 # 0 since the data 202 # 0 is stored in the MEM 201 # 0, the OS 203 # 0 controls to access the memory driver 204 # 0.
  • the OS 203 # 0 determines whether the access destination of the data 202 # 1 is the MEM 201 # 0. In the example of FIG. 2, since the data 202 # 1 is not stored in the MEM 201 # 0, the OS 203 # 0 communicates a signal based on the access request to the communication driver 205 # 0 with the communication device 101 # 1. Receiving the signal from the communication driver 205 # 0, the communication device 101 # 1 accesses the data 202 # 1 stored in the MEM 201 # 1 by the memory driver 204 # 1.
  • the communication device 101 # 0 and the communication device 101 # 1 connected by wireless communication access the memory of the connection destination device via the communication driver 205 # 0 and the communication driver 205 # 1, thereby data. Can be distributed while sharing.
  • a file formation process exists before the communication driver 205 # 0 and the communication driver 205 # 1.
  • communication processing can be performed without overhead associated with file processing.
  • FIG. 3 is a block diagram of functions of the communication system 100 according to the first embodiment.
  • the communication system 100 according to the first embodiment includes a detection unit 301, a determination unit 302, a control unit 303, an access unit 304, a communication unit 305, a communication unit 306, an access unit 307, and a stop unit 308. ,including.
  • the functions (detection unit 301 to stop unit 308) serving as the control unit are realized by the CPU 102 # 0 and CPU 102 # 1 executing the program stored in the storage device.
  • the storage device is, for example, the ROM 103, the RAM 104, the flash ROM 105, the flash ROM 107, etc. shown in FIG.
  • the function may be realized by acquiring a program via the I / F 109 # 0 and executing the acquired program by the CPU 102 # 0 and the CPU 102 # 1.
  • the detection unit 301 to the communication unit 305 are included in the function of the communication device 101 # 0, and the communication unit 306 to the stop unit 308 are included in the function of the communication device 101 # 1.
  • the detection unit 301 to the communication unit 305 may be included in the function of the communication device 101 # 1.
  • the communication unit 306 to the stop unit 308 may be included in the function of the communication device 101 # 0.
  • the detecting unit 301 has a function of detecting an access request generated from the own device.
  • the access request includes a read request and a write request.
  • the detection unit 301 detects an access request generated by a process being executed in the communication device 101 # 0.
  • the detected access request information is stored in a storage area such as a register or a memory of a CPU on which the detection unit 301 is executed.
  • information of the detected access request is stored in the register of the CPU 102 # 0 or the MEM 201 # 0.
  • the determination unit 302 has a function of determining whether the address of the access target data in the access request detected by the detection unit 301 is an address assigned to the memory of the own device.
  • the determination unit 302 determines whether the address of the access target data in the access request is an address assigned to the MEM 201 # 0 of the communication device 101 # 0. Specifically, it is assumed that the address range in MEM201 # 0 is 0x00000000 to 0x1ffffff.
  • the determination unit 302 determines that the address of the access target data is an address assigned to the memory of the own device because the address of the access target data is within the address range of MEM201 # 0. . If the address of the access target data in the access request is 0x20001000, the determination unit 302 determines that the address of the access target data is outside the address range of MEM201 # 0 and is not an address assigned to the memory of the own device. .
  • the determination result is stored in a storage area such as a register or memory of the CPU where the determination unit 302 is executed.
  • a storage area such as a register or memory of the CPU where the determination unit 302 is executed.
  • information of the detected access request is stored in the register of the CPU 102 # 0 or the MEM 201 # 0.
  • the control unit 303 has a function of selecting and executing either the process of the access unit 304 or the process of the communication unit 305 based on the determination result determined by the determination unit 302.
  • the control unit 303 causes the access unit 304 to access its own memory based on the access request.
  • the control unit 303 causes the communication unit 305 to communicate with another device based on the access request.
  • the control unit 303 selects the processing of the access unit 304 and causes the access unit 304 to access the MEM 201 # 0. If the determination unit 302 determines that the access request is not the address assigned to the MEM 201 # 0, the communication unit 305 selects the process of the communication unit 305, and the communication unit 305 uses the I / F 109 # 0 to perform the communication apparatus 101 #. 1 to communicate.
  • the access unit 304 has a function of accessing its own memory. Specifically, in the communication device 101 # 0, the access unit 304 is the memory driver 204 # 0. The accessed result is stored in a register of the CPU that executes the access unit 304. For example, when the access unit 304 is the memory driver 204 # 0, it is stored in the register of the CPU 102 # 0.
  • the communication unit 305 has a function of communicating with other devices. Specifically, in the communication apparatus 101 # 0, the communication unit 305 is the communication driver 205 # 0. Note that the communication result is stored in a register or memory of a CPU on which the communication unit 305 is executed. For example, when the communication unit 305 is the communication driver 205 # 0, it is stored in the register of the CPU 102 # 0 or the MEM 201 # 0.
  • the communication unit 306 included in the function of the CPU 102 # 1 has the same function as the communication unit 305, and the access unit 307 also has the same function as the access unit 304.
  • the communication unit 306 receives an access request from the communication unit 305, the communication unit 306 notifies the access unit 307 of the access request.
  • the access unit 307 that has received the access request accesses the MEM 201 # 1 based on the access request.
  • the stop unit 308 When the communication unit 306 receives an access request, the stop unit 308 has a function of stopping the OS based on the execution state related to the software being executed by the own device.
  • the software specified here includes processes and interrupt processing.
  • the stop unit 308 when the communication unit 306 receives an access request when the communication unit 306 receives an access request, the stop unit 308 causes the OS to enter a sleep state when there is no process being executed in the communication device 101 # 1 and does not support interrupt processing.
  • FIG. 4 is an explanatory diagram of a first operation during the memory area sharing process of the communication system 100 according to the first embodiment.
  • the communication system 100 during the first operation is in a state in which the CPU 102 # 0 executes the process 401 # 0 and the process 401 # 1, and the CPU 102 # 1 does not execute the process in particular. .
  • the display 108 # 0 of the communication apparatus 101 # 0 performs drawing by the process 401 # 0 or the process 401 # 1, and the display 108 # 1 of the communication apparatus 101 # 1 is turned off.
  • the communication device 101 # 0 is a master device
  • the communication device 101 # 1 is a slave device
  • the master device uses the memory area of the slave device.
  • the communication apparatus 101 # 0 virtually treats the memory area MEM201 # 1 of the connection destination communication apparatus 101 # 1 as the memory area of its own apparatus.
  • the communication device 101 # 0 transmits an access command by the communication driver 205 # 0 for access to an address other than the MEM 201 # 0, and the communication device 101 # 1 Data access is performed via the memory driver 204 # 1.
  • the memory area is virtually increased, so that page-out of data on the memory handled by the high priority process can be prevented.
  • FIG. 5 is an explanatory diagram of a second operation during the memory area sharing process of the communication system 100 according to the first embodiment.
  • the communication system 100 during the second operation is in a state where distributed processing is performed in which the CPU 102 # 0 executes the process 401 # 0 and the CPU 102 # 1 executes the process 401 # 1.
  • the display 108 # 0 of the communication apparatus 101 # 0 performs drawing by the process 401 # 0, and the display 108 # 1 of the communication apparatus 101 # 1 performs drawing by the process 401 # 1.
  • the communication device 101 # 0 becomes a master device
  • the communication device 101 # 1 becomes a slave device
  • the master device uses the memory area of the slave device.
  • the communication system 100 performs distributed processing by a plurality of devices
  • the own device transmits an access command using the communication driver.
  • the other device that has received the access command by the communication driver accesses the data via the memory driver, and transmits the data to the own device again by the communication driver.
  • FIG. 6 is an explanatory diagram of a moving image being reproduced in the communication system 100 according to the first embodiment.
  • the communication system 100 in FIG. 6 is in the first operation during the memory area sharing process shown in FIG. 4, and the communication apparatus 101 # 0 executes the moving image reproduction process 601 and the data update process 602.
  • the display 108 # 0 reproduces the moving image by the moving image reproduction process 601.
  • the moving image playback process 601 is required to be processed at high speed, and the data update process 602 is not required to be processed at high speed, and the data update operation may be performed in the background.
  • the communication device 101 # 0 stores the data 603 # 1 used by the data update processing 602 in the MEM201 # 1, thereby increasing the free space of the MEM201 # 0. Therefore, the communication apparatus 101 # 0 can prevent page-out of the data 603 # 0 used by the moving image reproduction process 601 that requires high-speed processing.
  • the data 603 # 0 is stored in the file system 206 # 0 having a low access speed, which hinders the high-speed processing of the moving image playback processing 601.
  • FIG. 7 is an explanatory diagram of a game application being executed in the communication system 100 according to the first embodiment.
  • the communication system 100 in FIG. 7 is in the second operation during the memory area sharing process shown in FIG. 5, and the communication apparatus 101 # 0 executes the GUI process 701 # 0 and the game process 702, and the communication apparatus 101 # 1 executes the GUI processing 701 # 1.
  • the communication device 101 # 0 is the master device and the communication device 101 # 1 is the slave device, so that the game processing 702 recognizes the display 108 # 0 and the display 108 # 1 as one screen. It is possible to display.
  • the OS 203 # 0 determines whether the target address of the drawing command is the address of the MEM 201 # 0. Based on the determination result, the OS 203 # 0 accesses the MEM 201 # 0 by the memory driver 204 # 0 if the target address of the drawing command is the address of the MEM 201 # 0. If the target address of the drawing command is not the address of MEM 201 # 0, the OS 203 # 0 transmits an access request to the communication device 101 # 1 by the communication driver 205 # 0.
  • the communication driver 205 # 1 that has received the access request requests the memory driver 204 # 1 to access the MEM 201 # 1, and the memory driver 204 # 1 accesses the MEM 201 # 1.
  • the display area of the display 108 # 0 and the display 108 # 1 is a QVGA (Quarter Video Graphics Array) having a width of 320 [pixels] and a height of 240 [pixels]. It is assumed that the image is displayed in 32-bit color.
  • QVGA Quadrater Video Graphics Array
  • FIG. 8 is an explanatory diagram showing an example of the stored contents of the event table 801.
  • the event ID to be executed is prepared as in the event table 801, and the other device performs processing corresponding to the event ID by notifying the other device of the event ID.
  • Event IDs “0” to “3” are used in the communication system 100 according to the first embodiment, and event IDs “1” and “4” to “7” are used in the communication system 100 according to the second embodiment to be described later. Used.
  • the communication apparatus 101 # 0 transmits the event ID “0” to the communication apparatus 101 # 1
  • the communication apparatus 101 # 1 recognizes that a wireless connection request has been received.
  • the communication apparatus 101 # 0 transmits the event ID “1” to the communication apparatus 101 # 1
  • the communication apparatus 101 # 1 recognizes that a notification regarding disconnection of a wireless connection has been received.
  • the communication apparatus 101 # 0 transmits the event ID “4” to the communication apparatus 101 # 1
  • the communication apparatus 101 # 1 recognizes that it has received a connection request for wireless distributed processing.
  • the communication device 101 may transmit the event ID with other parameters when transmitting the event ID. For example, when the communication apparatus 101 # 0 transmits the event ID “2” and the address to the communication apparatus 101 # 1, the communication apparatus 101 # 1 reads when the access destination address is outside the range of the physical address of the own apparatus. Recognize that a notification about an instruction has been received. Further, by analyzing the parameters, the communication apparatus 101 # 1 recognizes the parameter address as the access destination address.
  • the communication apparatus 101 # 0 transmits the event ID “3”, the address, and the write target data to the communication apparatus 101 # 1, the write command when the access destination address is outside the range of the physical address of the own apparatus. Recognize that a notification has been received. Further, by analyzing the parameters, the communication apparatus 101 # 1 recognizes the parameter address as the access destination address, and recognizes the write target data as the data to be written to the access destination address.
  • the communication device 101 # 0 transmits the event ID “5”, the address, and the updated value to the communication device 101 # 1, the communication device 101 # 1 updates the data after write access to the data unique to the own device. Recognize that a value has been notified to another device via the communication driver. Further, by analyzing the parameters, the communication apparatus 101 # 1 recognizes that the parameter address is the address that performed the write access, and recognizes the updated value that is the parameter as the value written to the address that performed the write access.
  • the communication apparatus 101 # 0 transmits the event ID “6” and the address to the communication apparatus 101 # 1
  • the communication apparatus 101 # 1 receives a request for transferring target data to another apparatus via the communication driver. Recognize that Further, by analyzing the parameters, the communication apparatus 101 # 1 recognizes that the parameter address is the address of the target data requested to be transferred.
  • the communication apparatus 101 # 0 transmits the event ID “7” and the I / O log to the communication apparatus 101 # 1, the communication apparatus 101 # 1 recognizes that the I / O log has been transmitted. Further, by analyzing the parameters, the communication apparatus 101 # 1 recognizes that the parameter I / O log is an actually transmitted I / O log.
  • FIG. 9 is a flowchart of the memory area sharing start process and the memory area sharing end process according to the first embodiment.
  • the communication apparatus 101 # 0 is a master apparatus and the communication apparatus 101 # 1 is a slave apparatus.
  • the processes in steps S901 to S908 and S910 indicate a memory area sharing start process
  • the processes in steps S912 to S915 indicate a memory area sharing end process.
  • the processes in steps S909 and S911 indicate that the memory area sharing process is being executed.
  • the communication apparatus 101 # 0 transmits a wireless connection request in response to a request from the running process 401 # 0 (step S901), and the communication apparatus 101 # 1 receives the connection request (step S902).
  • the communication apparatus 101 # 0 that has transmitted the connection request waits for a response to the connection request.
  • the communication device 101 # 0 transmits the event ID “0” shown in FIG. 8, and the communication device 101 # 1 receives the connection request by receiving the event ID “0”. recognize.
  • the communication device 101 # 1 that has received the connection request determines whether to permit the connection request (step S903).
  • the communication device 101 # 1 may always permit a connection request, or may determine based on the state of the communication device 101 # 1. For example, the communication device 101 # 1 may determine that the connection request is not permitted because the load is excessive if the number of processes currently being executed is a certain number or more.
  • the communication apparatus 101 # 1 may display the received connection request on the display 108 # 1, and accept the permission of the connection request by the user.
  • step S903: No If the connection request is not permitted (step S903: No), the communication device 101 # 1 transmits a connection NG to the communication device 101 # 0 (step S904), and ends the memory area sharing start process.
  • step S903: Yes the communication apparatus 101 # 1 determines whether there is a process being executed (step S905). If there is no process being executed (step S905: No), the communication apparatus 101 # 1 determines whether the interrupt process is supported during the memory area sharing process (step S906).
  • step S906 If the interrupt process is not supported (step S906: No), the communication apparatus 101 # 1 shifts the OS 203 # 1 to the sleep state (step S907), and transmits a connection OK to the communication apparatus 101 # 0 (step S908).
  • step S907 the communication system 100 is the first operation in the memory area sharing process shown in FIG. 4, and when the process of step S907 is not performed, the communication system 100 is as shown in FIG. This is the second operation in the memory area sharing process shown.
  • step S905 Yes
  • step S906 Yes
  • step S906 Yes
  • step S909 Details of the memory area sharing process will be described later with reference to FIG.
  • step S910 the connection result is connection NG (step S910: NG)
  • step S910 the communication apparatus 101 # 0 disconnects the wireless connection (step S915), and ends the memory area sharing start process.
  • step S910 If there is no response yet (step S910: waiting for response), the communication apparatus 101 # 0 executes the process of step S910 again after a predetermined time.
  • connection OK step S910: OK
  • the communication device 101 # 0 executes memory area sharing processing (step S911). After the memory area sharing process ends, the communication apparatus 101 # 0 transmits a disconnection (step S912). After the process proceeds to step S915, the memory area sharing end process ends. Specifically, the communication device 101 # 0 transmits the event ID “1” shown in FIG. 8, and the communication device 101 # 1 receives the notification regarding the disconnection of the connection by receiving the event ID “1”. Recognize that.
  • the communication device 101 # 1 that has received the disconnection notification in step S912 determines whether the OS 203 # 1 is in the sleep state (step S913). When in the sleep state (step S913: Yes), the communication apparatus 101 # 1 restores the OS 203 # 1 (step S914). When the OS 203 # 1 is not in the sleep state (step S913: No), or after the process of step S914, the communication device 101 # 1 ends the memory area sharing end process.
  • the communication device 101 # 1 may notify the range of the memory to be provided to the communication device 101 # 0 in the process of step S908. For example, when the address range in the MEM 201 # 1 is 0x00000000 to 0x1ffffff, the communication device 101 # 1 notifies the communication device 101 # 0 of 0x10000000 to 0x1fffffff as the provided memory range. Receiving the notification, the communication apparatus 101 # 0 sets 0x10000000 to 0x1ffffffff to, for example, virtual addresses 0x20000000 to 0x2ffffffffff. As a result, the communication device 101 # 0 determines that an access request to an address included in 0x20000000 to 0x2ffffffffff is issued as an access request to another device in the memory area sharing process.
  • FIG. 10 is a flowchart of the memory area sharing process according to the first embodiment.
  • the memory area sharing process is executed by the master device and the slave device.
  • the communication device 101 # 0 becomes the master device and the memory region sharing process is executed in the communication device 101 # 0.
  • the communication device 101 # 0 determines whether a request to end the memory area sharing process has been detected (step S1001). When the end request is detected (step S1001: Yes), the communication device 101 # 0 ends the memory area sharing process.
  • the case where the communication apparatus 101 # 0 detects a request to end the memory area sharing process is, for example, a case where the process 401 that has requested the memory area sharing process ends.
  • the communication device 101 # 0 may detect a state where the communication device 101 # 0 has not been operated for a certain time or more during the memory area sharing process. Alternatively, it may be a case where the end request for the memory area sharing process is issued by the user and the communication apparatus 101 # 0 detects the end request.
  • step S1002 determines whether the occurrence of memory access has been detected.
  • step S1002 determines whether the occurrence of memory access has been detected.
  • step S1003 determines whether the access destination address is the physical address area of the own apparatus.
  • the physical address area includes the area of MEM201 # 0. If communication apparatus 101 # 0 takes the form of a memory mapped IO in which the address space of the input / output device coexists in the address space of the memory, the address of the input / output device is also included in the physical address of the own device.
  • step S1003 If the access destination address is the physical address area of the own device (step S1003: Yes), the communication device 101 # 0 accesses the memory of the own device (step S1004), and proceeds to the processing of step S1001. If it is not the physical address area of the own device (step S1003: No), the communication device 101 # 0 activates the communication driver 205 # 0 (step S1005), and determines the type of access (step S1006).
  • the communication device 101 # 0 transmits the access destination address to the communication device 101 # 1 by the communication driver 205 # 0 (step S1007).
  • the communication device 101 # 1 acquires the access destination address from the communication driver 205 # 0 (step S1008). Specifically, the communication device 101 # 0 transmits the event ID “2” and the access destination address shown in FIG. 8, and the communication device 101 # 1 receives the received content from the received event ID “2”. Recognizes that a read command request for the access destination address has been received.
  • the communication device 101 # 1 that has acquired the access destination address activates the communication driver 205 # 1 and transmits the data read from the access destination address to the communication device 101 # 0 (step S1009). Receiving the data, the communication apparatus 101 # 0 notifies the data to the process that is the memory access generation source, and proceeds to the process of step S1001.
  • the communication device 101 # 0 transmits the access destination address and write target data to the communication device 101 # 1 by the communication driver 205 # 0 (step S1010). ).
  • the communication device 101 # 1 acquires the access destination address from the communication driver 205 (step S1011). Specifically, the communication apparatus 101 # 0 transmits the event ID “3”, the access destination address, and the write target data shown in FIG. The communication apparatus 101 # 1 recognizes from the received event ID “3” that the received content has received a write command request for the access destination address.
  • the communication device 101 # 1 that has acquired the access destination address writes the write target data to the access destination address (step S1012).
  • the communication apparatus 101 # 0 that has transmitted the access destination address in the process of step S1007 proceeds to the process of step S1001.
  • the communication device when an access request is made to other than the memory of the own device, the access request is transmitted to the other device, and the other device transmits the other device. Access the memory space.
  • the communication apparatus can omit the file formation and expansion processing that has been performed during communication, and can eliminate overhead.
  • the memory of the other device since the memory of the other device is set to be the memory of the own device in a pseudo manner, the memory space is expanded, so that page-out of data of a process with high priority can be prevented.
  • the communication device can easily handle the displays of the own device and the other device virtually as one screen.
  • a new application such as a game for a mobile terminal that operates a plurality of mobile terminals in cooperation with each other.
  • a new application such as a game for a mobile terminal that operates a plurality of mobile terminals in cooperation with each other.
  • two separate portable terminals can be prepared, one of the screens can be linked to each other, a game application can be started, and the other can be used as a controller for two players to play simultaneously.
  • the communication device 101 # 2 further exists in the communication system 100 according to the first embodiment, the communication device 101 # 0 is a master device, and the communication device 101 # 1 and the communication device 101 # 2 are slave devices. Also good.
  • the communication device 101 # 0 has two areas that are outside the physical address of the own device, an area that accesses the memory of the communication apparatus 101 # 1 and an area that accesses the memory of the communication apparatus 101 # 2. It may be divided into regions. Subsequently, after the processing in step S1003: Yes in FIG. 10, the communication device 101 # 0 accesses the memory of the communication device 101 # 1 or accesses the memory of the communication device 101 # 2 based on the access destination address. You may decide whether to do it.
  • FIG. 11 is an explanatory diagram of a problem of the communication system 100 according to the first embodiment.
  • the communication system 100 according to the first embodiment when communication is interrupted, it becomes impossible to access the memory area to which the connection is made, and thus the processing cannot be continued. Further, as illustrated in FIG. 11, the communication system 100 according to the first embodiment secures a data area for the communication device 101 # 1 in the MEM 201 # 0 and secures a data area for the communication device 101 # 0 in the MEM 201 # 1. It is also assumed that a shared data area is used.
  • the CPU 102 # 0 reserves the data area 1101 # 0_0 and the data area 1101 # 1_0 as areas for sharing data with the communication apparatus 101 # 1, and the data area 1101 # 0_0 Data 202 # 0 is stored. Further, the CPU 102 # 0 stores data equal to the data 202 # 1 as data 202 # 1_0 in the data area 1101 # 1_0.
  • the CPU 102 # 1 secures the data area 1101 # 1_0 and the data area 1101 # 1_1 as areas for sharing data with the communication device 101 # 0, and stores the data 202 # 1 in the data area 1101 # 1_1.
  • the CPU 102 # 1 stores data equal to the data 202 # 0 in the data area 1101 # 0_1 as data 202 # 0_1.
  • data consistency between devices cannot be achieved at the time of reconnection, and the communication system 100 starts processing from the beginning.
  • the server redistributes data that could not be distributed at the time of abnormality, when it is normal. Even when this technique is applied to the communication system 100 according to the first embodiment, there is a problem that it is difficult to execute processing during line disconnection. In the communication system 100 according to the second embodiment shown in FIGS. 12 to 19, the processing is continued as much as possible even when the communication system 100 according to the first embodiment is disconnected, and the processing is resumed when the line is reconnected. With the goal.
  • FIG. 12 is an explanatory diagram of an operation outline of the communication system 100 according to the second embodiment.
  • the description of the communication system 100 is the description of the communication system 100 according to the second embodiment.
  • the communication system 100 shown in FIG. 12 is the same as the hardware of the communication system 100 according to the first embodiment shown in FIG. 2 as hardware, and has the form of securing the shared data area described in FIG. 11 as the function. Take.
  • the communication device 101 in the communication system 100 performs a write access to the data unique to the own device
  • the communication device 101 issues a coherency execution request to another device.
  • the communication driver 205 # 0 transmits the written result to the communication device 101 # 1
  • the communication device 101 # 1 transmits the result to the communication device 101 # 1.
  • Request to perform coherency Receiving the request, the communication apparatus 101 # 1 updates the data 202 # 0_1 existing in the shared data area as execution of coherency. As a result, the data 202 # 0 and the data 202 # 0_1 coincide with each other and the consistency is achieved.
  • the connection state is interrupted.
  • the write result is described in the I / O log.
  • the communication apparatus 101 transmits an I / O log to another apparatus, and the other apparatus executes coherency based on the received I / O log.
  • the handling of the I / O log will be described later with reference to FIGS. 14 and 15, and the details of the I / O log will be described later with reference to FIG.
  • the own device performs data speculation via the communication driver while performing speculative execution based on the data in the shared data area. Determine if it is up to date. If the data is old, the communication apparatus 101 re-executes from the time of read access.
  • the communication device 101 # 0 when the communication device 101 # 0 performs read access to the data 202 # 1, the process that requested the read access performs speculative execution based on the data 202 # 1_0 stored in the shared data area. Further, the communication device 101 # 0 acquires the value of the data 202 # 1 by the communication driver 205 # 0 and compares it with the data 202 # 1_0 stored in the shared data area. If the data 202 # 1 stored in the shared data area does not match and is old, the communication apparatus 101 # 0 performs the re-execution from the state in which the data 202 # 1_0 is read before the speculative execution.
  • the communication device 101 in the communication system 100 does not perform write access to data unique to other devices.
  • the communication system 100 can replace the write access to the data unique to the other device by writing in the area unique to the own device and reading by the other device.
  • FIG. 13 is a block diagram of functions of the communication system 100 according to the second embodiment.
  • the communication system 100 according to the second embodiment includes a detection unit 1301, a determination unit 1302, a control unit 1303, an access unit 1304, a communication unit 1305, a communication unit 1306, an access unit 1307, and an execution unit 1308. ,including.
  • control unit 1301 to execution unit 1308 are realized by the CPU 102 # 0 and CPU 102 # 1 executing the program stored in the storage device.
  • the storage device is, for example, the ROM 103, the RAM 104, the flash ROM 105, the flash ROM 107, etc. shown in FIG.
  • the function may be realized by acquiring a program via the I / F 109 and executing the acquired program by the CPU 102 # 0 and the CPU 102 # 1.
  • the detection unit 1301 to the communication unit 1305 and the execution unit 1308 are included in the function of the communication device 101 # 0, and the communication unit 1306 and the access unit 1307 are included in the function of the communication device 101 # 1. Is shown. Further, the detection unit 1301 to the communication unit 1305 and the execution unit 1308 are also included in the function of the communication device 101 # 1.
  • the determination unit 1302, the communication unit 1305, the communication unit 1306, and the access unit 1307 have the same functions as the determination unit 302, the communication unit 305, the communication unit 306, and the access unit 307, respectively.
  • the detecting unit 1301 has a function of detecting an access request generated from within the own device. Further, the detection unit 1301 may detect a communication state between the own device and another device. Further, the detection unit 1301 may detect a result of writing to the memory of the own device in response to the write request generated from the execution unit 1308 as an access request by the access unit 1304.
  • the detection unit 1301 detects a state where the communication state between the communication device 101 # 0 and the communication device 101 # 1 is cut off or a state where the communication device 101 # 1 is connected. In addition, the detection unit 1301 detects the result of writing to the MEM 201 # 0 by the access unit 1304.
  • the detection result is stored in a storage area such as a register or memory of a CPU on which the detection unit 1301 is executed. For example, when the detection unit 1301 is executed by the communication device 101 # 0, the detection result is stored in the register of the CPU 102 # 0 or the MEM 201 # 0.
  • the control unit 1303 has a function of selecting and executing either the processing of the access unit 1304 or the processing of the communication unit 1305 based on the determination result determined by the determination unit 1302.
  • the control unit 1303 determines that the read request generated from the execution unit 1308 as an access request is not an address assigned to the memory of the own device by the determination unit 1302
  • the communication unit 1305 determines that the other device based on the read request. You may make it communicate with. For example, if the address of the read request generated from the process 401 # 0 is not the address of MEM201 # 0, the control unit 1303 may transmit the read request to the communication apparatus 101 # 1 through the I / F 109 # 0 by the communication unit 1305. Good.
  • the control unit 1303 also executes the execution unit 1308 when it is determined by the determination unit 1302 that the access request is not an address assigned to the memory of the own device after the detection unit 1301 detects that the communication state is cut off. Stop. Subsequently, the control unit 1303 may cancel the stop of the execution unit 1308 when the detection unit 1301 detects that the communication state is connected. For example, when the communication state is interrupted and the access request is an address assigned to the memory of another device, the control unit 1303 stops the process 401 # 0, and when the communication state is connected, The stop of 401 # 0 may be canceled.
  • the control unit 1303 may cause the communication unit 1305 to transmit a coherency execution request based on the write result to another device.
  • the coherency execution request based on the write result for example, the own device transmits an event ID indicating the write result and the coherency execution request, thereby recognizing that the received other device has received the coherency execution request.
  • the control unit 1303 causes the communication device 101 # 1 to transmit a coherency execution request based on the write result through the I / F 109 # 0.
  • control unit 1303 may cause the access unit 1304 to write the result as a read result in the memory of the own device. For example, when the control unit 1303 receives the value of the communication device 202 # 1 as a coherency execution request, the control unit 1303 writes the data 202 # 1_0 by the access unit 1304. The written data is used for speculative execution.
  • the control unit 1303 executes coherency based on the result of writing to the memory of the own device during the blocked state.
  • the request may be transmitted to another device by the communication unit 1305.
  • a recording method of the result of writing to the memory of the own device during the shut-off state a method of setting a flag in the written memory may be used.
  • the control unit 1303 transmits the address in which the flag is set to the other device when the coherency execution request is made.
  • the control unit 1303 describes the write result in the I / O log, and performs coherency. The I / O log is transmitted to the other device at the time of execution request.
  • the access unit 1304 has a function of accessing its own memory. Further, the access unit 1304 may write the read result corresponding to the read request by the communication unit 1305 in the memory of the own device. For example, the access unit 1304 writes the read result obtained through the I / F 109 # 0 by the communication unit 1305 in the data area 1101 # 1_0.
  • the execution unit 1308 has a function of executing a process. For example, the execution unit 1308 executes the process 401 # 0.
  • the execution unit 1308 may execute the process using the read result written by the access unit 1304. For example, the execution unit 1308 executes the process 401 # 0 using the data 202 # 1_0 that is the read result written in the data area 1101 # 1_0.
  • the execution unit 1308 may execute a process using the read result written in the memory of the own device until a new read result for the read request newly issued by the access unit 1304 is written. .
  • the execution unit 1308 issues a new read request to the memory of the communication device 101 # 1, and the data 202 # 1_0 already written until a new read result is written in the data area 1101 # 1_0. Is used to execute process 401 # 0. Thereby, the execution part 1308 can perform speculative execution.
  • FIG. 14 is an explanatory diagram of an outline of the operation when the communication system 100 according to the second embodiment is shut off during the memory sharing process.
  • the communication device 101 # 0 and the communication device 101 # 1 are in a state where the wireless connection has not been established and the communication has been cut off.
  • the process 401 # 0 and the process 401 # 1 executed by the communication device 101 # 0 and the communication device 101 # 1 continue processing in each device until the connection destination data is read. .
  • the communication apparatus 101 makes a reconnection request and shifts to the low power mode. For example, the communication device 101 # 0 continues the process of the process 401 # 1 up to the point where the data of another device is read. When the reading to the data 202 # 1_0 is detected, the communication device 101 # 0 makes a reconnection request, stops the process, and shifts to the low power mode. When making a reconnection request, the communication apparatus 101 # 0 may display the reconnection request on the display 108 # 0 and wait for a response as to whether or not to issue a connection request to the user.
  • the communication device 101 # 0 stops the process 401 # 0 because the process 401 # 0 has read the data 202 # 1_0.
  • the communication apparatus 101 # 1 can continue to execute the process 401 # 1 because the process 401 # 1 only reads and writes the data 202 # 1 and does not read the data 202 # 0.
  • the communication device 101 records write access to data unique to the device in the I / O log from the time when the connection state is interrupted. At this time, the communication apparatus 101 does not make a coherency request to another apparatus, which has been performed at the time of write access to data unique to the own apparatus. For example, the communication apparatus 101 # 0 records the write access to the data 202 # 0, which is data unique to the terminal, from the time when the connection state is blocked, in the I / O log 1401 # 0, and the communication apparatus 101 # 1 Stop coherency request notification for.
  • FIG. 15 is an explanatory diagram of an outline of an operation at the time of reconnection during the memory sharing process of the communication system 100 according to the second embodiment.
  • the communication system 100 in FIG. 15 shows a state where communication is reconnected from the state of FIG.
  • each device transmits an I / O log to a connection destination device.
  • the communication device 101 # 0 transmits the I / O log 1401 # 0 to the communication device 101 # 1
  • the communication device 101 # 1 transmits the I / O log 1401 # 1 to the communication device 101 # 0.
  • each device After transmitting the I / O log, each device enters the normal mode, executes data coherency based on the I / O log, and resumes the process. For example, the communication apparatus 101 # 0 updates the data 202 # 1_0 from the I / O log 1401 # 1, and resumes the process 401 # 0 that has been stopped.
  • FIG. 16 is an explanatory diagram of a state in which the game application is being executed in the communication system 100 according to the second embodiment.
  • the communication device 101 # 0 executes the game process 1601 #
  • the communication device 101 # 1 executes the game process 1601 # 1.
  • the game process or the like shown in FIG. 16 in which a plurality of devices are connected by wireless or the like, even if communication is temporarily interrupted, the game process is continued without being restarted by the operation described with reference to FIGS. be able to.
  • the communication device 101 # 0 every time the communication device 101 # 0 writes to the data 1602 # 0 used by the game process 1601 # 0, the communication device 101 # 0 transmits a write result to the communication device 101 # 1 and requests to execute coherency.
  • the communication apparatus 101 # 1 that has received the write result executes coherency of the data 1602 # 0_1 based on the write result, and makes the data 1602 # 0_1 equal to the data 1602 # 0.
  • the communication device 101 # 0 and the communication device 101 # 1 record in the I / O log every time the data 1602 # 0 and the data 1602 # 1 are write-accessed. After the reconnection, the communication device 101 # 0 and the communication device 101 # 1 transmit I / O logs and execute coherency between the data 1602 # 1_0 and the data 1602 # 0_1. After executing the coherency, the communication device 101 # 0 and the communication device 101 # 1 continue the game process 1601 # 0 and the game process 1601 # 1. As described above, since the process can be continued without restarting each time communication is interrupted, the usability of the game application can be improved for the user.
  • FIG. 17 is an explanatory diagram of an example of the I / O log according to the second embodiment.
  • the I / O log records a virtual address written by the communication apparatus 101 and a value written to the virtual address.
  • the communication device 101 # 0 when 0 is written to the virtual address 0x12345678, the communication device 101 # 0 stores “0x12345678” and “0” in the I / O log.
  • the communication apparatus 101 # 0 stores “0x234456789” and “1” in the I / O log.
  • the communication apparatus 101 # 0 stores “0x345567890” and “2” in the I / O log.
  • the I / O log is generated in units of 1 byte, but the I / O log may be generated in different units.
  • the communication device 101 # 0 may generate an I / O log in units of 4 bytes. Specifically, when 0xfffffffff is written to the virtual address 0x10000000, the communication apparatus 101 # 0 stores “0x10000000” and “0xfffffff” in the I / O log. Further, the communication device 101 may overwrite the value when the same address already exists in the I / O log.
  • FIG. 18 is a flowchart of the distribution start process and the distribution end process according to the second embodiment. Steps S1801 to S1807 and steps S1809 to S1811 indicate the distribution start process, and steps S1813 to S1816 indicate the distribution end process. Further, the processing in steps S1808 and S1812 indicates that the distributed processing is being executed.
  • the communication device 101 # 0 transmits a connection request for wireless distributed processing (step S1801).
  • the communication device 101 # 1 receives the connection request (step S1802).
  • the communication apparatus 101 # 0 transmits the event ID “4” shown in FIG. 8, and the communication apparatus 101 # 1 receives the connection request for distributed processing upon receiving the event ID “4”. Recognize that.
  • the communication device 101 # 0 may transmit the device ID and the shared memory size as information on the process for performing the distributed processing together with the event ID.
  • the device ID is an ID unique to the device, such as a MAC (Media Access Control) address or a device serial number.
  • the shared memory size is the size of the shared memory that is used by processes that perform distributed processing. Based on this size, the communication apparatus 101 # 1 sets the size of the area secured in the shared memory.
  • the communication device 101 # 1 that has received the connection request determines whether to permit the connection request (step S1803).
  • the communication device 101 # 1 may always permit a connection request, or may determine based on the state of the communication device 101 # 1. For example, the communication device 101 # 1 may determine that the connection request is not permitted because the load is excessive if the number of processes currently being executed is a certain number or more.
  • the communication device 101 # 1 compares the device ID of the process data received in step S1801 with the ID already registered in the communication device 101 # 1, and permits the connection request if they match. Good.
  • the communication apparatus 101 # 1 may display the received connection request on the display 108 # 1, and accept the permission of the connection request by the user.
  • the communication apparatus 101 # 1 transmits a connection NG to the communication apparatus 101 # 0 (step S1804), and ends the distribution start process.
  • the communication apparatus 101 # 1 has the data area for causing the connection destination apparatus to share the data generated by the own apparatus and the data generated by the connection destination apparatus. Secures a data area for sharing (step S1805). Specifically, the communication apparatus 101 # 1 secures the data area 1101 # 1_1 as a data area for sharing the data generated by the own apparatus to the connection destination apparatus, and the data generated by the connection destination apparatus is automatically acquired. 1101 # 0_1 is secured as a data area to be shared by the devices.
  • the communication apparatus 101 # 1 After securing, the communication apparatus 101 # 1 sets the secured data area as a shared data area (step S1806), transmits a connection OK to the communication apparatus 101 # 1 (step S1807), and executes distributed processing (step S1808). ). Details of the distributed processing will be described later with reference to FIG.
  • the communication device 101 # 0 that receives the response in steps S1804 and S1807 determines the connection result (step S1809). If the connection result is connection NG (step S1809: NG), the communication apparatus 101 # 0 disconnects the wireless connection (step S1816) and ends the distribution start process. If there is no response yet (step S1809: waiting for response), the communication apparatus 101 # 0 executes the process of step S1809 again after a predetermined time.
  • connection OK connection OK
  • the communication apparatus 101 # 0 self-registers the data area for allowing the connection destination apparatus to share the data generated by itself and the data generated by the connection destination apparatus.
  • a data area for sharing by the apparatus is secured (step S1810).
  • the communication apparatus 101 # 0 secures the data area 1101 # 0_0 as a data area for sharing the data generated by itself to the connection destination apparatus, and the data generated by the connection destination apparatus is automatically acquired.
  • a data area 1101 # 1_0 is secured as a data area to be shared by apparatuses.
  • the communication apparatus 101 # 0 After securing, the communication apparatus 101 # 0 sets the secured data area as the shared data area (step S1811), and executes distributed processing (step S1812). After the distribution process ends, the communication device 101 # 0 notifies the disconnection (step S1813), releases the shared data area (step S1815), and moves to the process of step S1816, and then ends the distribution end process. Specifically, the communication device 101 # 0 transmits the event ID “1” shown in FIG. 8, and the communication device 101 # 1 receives the notification regarding the disconnection of the connection by receiving the event ID “1”. Recognize that.
  • the communication device 101 # 1 that has received the disconnection notification in the process of step S1813 after the distribution process ends releases the shared data area (step S1814), and ends the distribution end process.
  • 19A to 19D are flowcharts showing the distributed processing according to the second embodiment.
  • the distributed processing is performed by both the communication device 101 # 0 and the communication device 101 # 1.
  • 19A to 19D flowcharts in distributed processing in the communication apparatus 101 # 0 will be described.
  • FIG. 19A shows a flowchart for access related to the own apparatus, in which the connection is continued in the distributed processing and the type of access is.
  • the communication apparatus 101 # 0 determines whether a distributed processing end request has been detected (step S1901). When the end request is detected (step S1901: Yes), the communication device 101 # 0 ends the distributed processing.
  • the case where the communication device 101 # 0 detects a distributed processing end request is, for example, a case where the communication device 101 # 0 detects a state in which the communication device 101 # 0 has not been operated for a certain period of time. .
  • step S1901 determines whether the wireless connection is continued (step S1902). When the connection is continued (step S1902: YES), the communication apparatus 101 # 0 determines again whether the distribution processing end request is detected (step S1903). If an end request is detected (step S1903: YES), the communication apparatus 101 # 0 ends the distributed process.
  • step S1903 determines whether the distributed processing end request is not detected (step S1903: No). If the distributed processing end request is not detected (step S1903: No), the communication apparatus 101 # 0 determines whether the occurrence of memory access is detected (step S1904). If the occurrence of memory access is not detected (step S1904: NO), the communication apparatus 101 # 0 proceeds to the process of step S1901. If the occurrence of memory access is detected (step S1904: YES), the communication apparatus 101 # 0 determines the type of access (step S1905). Note that the method of determining whether the access type is on the own device or on another device is the same as the processing in step S1003 in the first embodiment.
  • step S1905: (1) When the access type is read access to process-specific data on the own device (step S1905: (1)), the communication device 101 # 0 reads the memory of the own device (step S1906), and the process of step S1901 Migrate to When the access type is write access to process-specific data on the own device (step S1905: (2)), the communication device 101 # 0 writes the updated value via the communication driver 205 # 0 after writing. Then, the data is transferred to the communication device 101 # 1 (step S1907).
  • the communication device 101 # 1 that has received the data transfer via the communication driver 205 # 0 updates the target data to the transferred value via the memory driver 204 # 1 (step S1908).
  • the communication apparatus 101 # 1 has executed coherency. Specifically, the communication device 101 # 0 transmits the event ID “5”, the address, and the updated value shown in FIG. 8, and the communication device 101 # 1 is transmitted together with the event ID “5”. Recognizing that a coherency execution request with an updated value is received.
  • the communication device 101 # 0 that has transferred the value in the process of step S1907 proceeds to the process of step S1901.
  • FIG. 19B shows a flowchart regarding the read access of another apparatus in which the connection is continued in the distributed processing and the access type is another device.
  • the communication device 101 # 0 stores the execution state of the target process (step S1909).
  • the communication apparatus 101 # 0 saves the contents of the register including the program counter.
  • the communication device 101 # 0 requests transfer of target data from the communication device 101 # 1 via the communication driver 205 # 0 (step S1910). Specifically, the communication device 101 # 0 transmits the event ID “6” and the address of the target data shown in FIG. 8, and the communication device 101 # 1 transfers the target data by receiving the event ID “6”. Recognize that a request has been received.
  • the communication device 101 # 0 After requesting the transfer of the target data, the communication device 101 # 0 reads the target data from the shared data area of its own device and executes the target process (step S1911). Since the process is executed before the target data is received, the process of step S1911 is speculatively executed. When data whose value is updated by write access is generated for the process-specific data on its own device during speculative execution, a new value is stored in a different area from the shared data area. The value saved in another area is used as the running data.
  • the communication device 101 # 0 determines whether the value read from the own device matches the value received from the communication device 101 # 1 (step S1912). S1913). If the value read from the own device matches the received value (step S1913: Yes), the speculative execution has succeeded, and the communication device 101 # 0 is saving and executing in another area related to the target process. Data is copied to the shared data area (step S1914). After copying, the communication apparatus 101 # 0 discards the execution state stored in another area (step S1915). After discarding, the communication apparatus 101 # 0 continues the process of the target process (step S1916), and proceeds to the process of step S1901.
  • step S1913 If the value read from the own device does not match the received value (step S1913: No), the speculative execution has failed, and the communication device 101 # 0 is saving and executing in another area related to the target process. Are discarded (step S1917). Also, the communication device 101 # 0 returns to the saved execution state (step S1918), resumes the process of the target process, and proceeds to the process of step S1901.
  • FIG. 19C shows a flowchart for a state in which the connection is interrupted in the distributed processing. If the connection is not continued (step S1902: NO), the communication apparatus 101 # 0 determines whether a distribution processing end request is detected (step S1920). When the end request is detected (step S1920: Yes), the communication device 101 # 0 ends the distributed processing. When the termination request is not detected (step S1920: No), the communication device 101 # 0 determines whether reconnection has been performed (step S1921). If not reconnected (step S1921: NO), the communication apparatus 101 # 0 determines whether the occurrence of memory access has been detected (step S1922).
  • step S1922: No If the occurrence of memory access is not detected (step S1922: No), the communication apparatus 101 # 0 proceeds to the process of step S1920.
  • step S1922: Yes the communication device 101 # 0 determines the type of access (step S1923).
  • step S1923: (1) the communication device 101 # 0 reads the memory of the own device (step S1924), and the process of step S1920 Migrate to
  • step S1923: (2) When the access type is write access to process-specific data on the own device (step S1923: (2)), the communication device 101 # 0 records the write access in the I / O log 1401 # 0 after writing. (Step S1925). After recording, the communication apparatus 101 # 0 proceeds to the process of step S1920.
  • step S1923: (3) If the access type is read access to process-specific data on another device (step S1923: (3)), the communication device 101 # 0 determines whether there is another executable process (step S1923: (3)). S1926). When there is another executable process (step S1926: Yes), the communication apparatus 101 # 0 switches to an executable process (step S1927), and proceeds to the process of step S1920.
  • FIG. 19D shows a flowchart for a state in which the connection is interrupted and then reconnected after the distributed processing.
  • the communication device 101 # 0 executes reconnection (step S1928).
  • the communication apparatus 101 # 0 may execute reconnection after a predetermined time, or may execute reconnection according to a request from the user.
  • the communication apparatus 101 # 0 After executing the reconnection, the communication apparatus 101 # 0 shifts to the low power mode by the OS 203 # 0 (step S1929) and shifts to a reconnection waiting state. After the state transition, the communication device 101 # 0 determines whether or not it has been reconnected (step S1930). If not reconnected (step S1930: No), the communication device 101 # 0 executes the process of step S1930 after a predetermined time. When the connection is reestablished (step S1930: Yes), the communication device 101 # 0 cancels the low power mode and shifts to the normal mode (step S1931).
  • the communication apparatus 101 # 0 determines whether the I / O log 1401 # 0 exists (step S1932).
  • the I / O log 1401 # 0 is generated by executing the process of step S1925.
  • the communication device 101 # 0 transmits the I / O log 1401 # 0 to the communication device 101 # 1 (step S1933).
  • the communication apparatus 101 # 0 transmits the event ID “7” and the I / O log 1401 # 0 shown in FIG. 8, and the communication apparatus 101 # 1 receives the event ID “7” and receives the I / O log 1401 # 0. Recognize that the / O log has been received.
  • the communication device 101 # 0 After the transmission of the I / O log 1401 # 0 or when the I / O log 1401 # 0 does not exist (step S1932: No), the communication device 101 # 0 receives an I / O log from the connection destination communication device 101 # 1. 1401 # 1 is read and coherency is executed (step S1934). Specifically, the communication device 101 # 0 recognizes the reception of the I / O log by receiving the event ID “7”, and sets the value of the I / O log 1401 # 1 to the corresponding location of the data 202 # 1_0. By updating to, coherency of the data 202 # 1_0 is executed. After executing the coherency, the communication apparatus 101 # 0 resumes the process of the target process (step S1935), and proceeds to the process of step S1901.
  • the communication device of the first embodiment further transmits the result of writing to the memory of the own device by the process to another device. And cause other devices to perform coherency. As a result, the memory contents of the plurality of communication devices can be maintained in a consistent state.
  • the communication device when the communication device according to the second embodiment transitions from the blocked state to the connected state, the communication device writes the result of writing to its own memory by the process performed during the blocked state. Transmit to other device and cause other device to perform coherency. As a result, the communication device can continue the processing until the data generated by the connection destination terminal is accessed even after the communication is interrupted, thereby avoiding a decrease in the throughput of the communication device. It becomes possible. Further, since the communication device can resume processing from that point in time for reconnection in order to take an I / O log to the shared data, it is possible to further guarantee the performance at the time of execution.
  • the communication device when a request for reading into the memory of another device is issued from the process, the communication device according to the second embodiment requests the memory value from the other device, and the memory value that has already been written in the own device.
  • the process may continue with reference to. Thereby, the communication apparatus can perform speculative execution using the value already written in the own apparatus.
  • the process can be executed without waiting for the reception of the memory value from another device, and the processing can be speeded up.
  • the communication apparatus when the communication apparatus according to the second embodiment receives a coherency execution request from another apparatus, the communication apparatus may write the result of reading the memory of the other apparatus into the memory of the own apparatus.
  • the communication device can maintain a consistent state with respect to the read result of the memory of the other device already written in the own device. Therefore, there is a high possibility that speculative execution will be successful.
  • the communication device stops the process when reading the memory of another device after the communication state is interrupted, and cancels the process stop when the communication state is reconnected. Good.
  • the processing capability required during the interruption of the communication state is reduced in the communication device, so that a power saving effect can be obtained by reducing the clock frequency.
  • the communication method described in the first and second embodiments can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation.
  • the communication 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 communication program may be distributed via a network such as the Internet.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Multi Processors (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

 通信装置(101#0)は、自装置のメモリであるMEM(201#0)にアクセスするアクセス部(304)およびI/F(109#0)により通信装置(101#1)と通信する通信部(305)を制御可能である。通信装置(101#0)は、検出部(301)によって自装置内から発生したアクセス要求を検出し、判断部(302)によってアクセス要求におけるアクセス対象データのアドレスがMEM(201#0)に割り当てられたアドレスであるか否かを判断する。通信装置(101#0)は、制御部(303)によって、判断部(302)による判断結果に基づいて、アクセス部(304)による処理、通信部(305)による処理、のうちいずれか一方の処理を選択して実行させる。

Description

通信装置、通信方法、および通信プログラム
 本発明は、通信を行う通信装置、通信方法、および通信プログラムに関する。
 従来から、携帯端末などの端末装置にて、データ共有を行いながら分散処理を行う技術が存在している。たとえば、複数の装置とデータを共有する技術として、たとえば、サーバ側端末とクライアント側となる携帯端末とを無線接続によって接続し、データを共有することで、携帯端末内の限られた保存領域を有効に利用する技術が開示されている。(たとえば、下記特許文献1を参照。)。
 また、データを共有する別の技術として、たとえば、携帯端末にてデータを共有する際に、開示要求を行うことなくデータファイルの共有化を実現し、データ共有にかかる利用者の負担を軽減する技術が開示されている。(たとえば、下記特許文献2を参照。)。
 また、別の技術として、たとえば、プログラムコードを他のコアに転送する際に、データ転送を行うか否かを判断する区分を持たせることにより、起動時に要求されるプログラムコードを送信することで、プログラムの起動時間を短縮する技術が開示されている。(たとえば、下記特許文献3を参照。)。
 また、共有されるデータ転送を制御する技術として、たとえば、分散共有メモリの領域内の空き領域を、分散共有メモリの不足が多い領域に追加して割り当てる技術が開示されている。(たとえば、下記特許文献4を参照。)。
 また、複数の装置に対するデータの配信方法について、サーバは、複数の制御装置に対し、回線や装置などの異常時にはデータの配信を中断し、正常時または定期的にデータの配信を再開するという技術が開示されている。(たとえば、下記特許文献5を参照。)。
特開2004-260274号公報 特開2008-250572号公報 国際公開第2008/001671号パンフレット 特開2008-305201号公報 特開2001-325007号公報
 しかしながら、上述した従来技術において、特許文献1~特許文献5にかかる技術では通信を行う際に、ファイルを形成するため、小規模なデータを頻繁に通信しあう場合に、ファイルの形成および展開の処理が分散処理におけるオーバーヘッドとなる問題があった。
 本発明は、上述した従来技術による問題点を解消するため、ファイルの形成を行わずに通信を行うことができる通信装置、通信方法、および通信プログラムを提供することを目的とする。
 上述した課題を解決し、目的を達成するため、開示の通信装置は、自装置のメモリにアクセスするアクセス部および他装置と通信する通信部を制御可能であり、自装置内から発生したアクセス要求を検出し、検出されたアクセス要求におけるアクセス対象データのアドレスが自装置のメモリに割り当てられたアドレスであるか否かを判断し、判断された判断結果に基づいて、アクセス部によりアクセス要求に基づいて自装置のメモリにアクセスする処理、または通信部によりアクセス要求に基づいて他装置と通信する処理、のうちいずれか一方の処理を選択して実行させる。
 本通信装置、通信方法、および通信プログラムによれば、通信処理時に発生していたファイルの形成および展開の処理によるオーバーヘッドを解消することができるという効果を奏する。
実施の形態にかかる通信システム100のハードウェアを示すブロック図である。 実施の形態1にかかる通信システム100の動作概略を示す説明図である。 実施の形態1にかかる通信システム100の機能を示すブロック図である。 実施の形態1にかかる通信システム100のメモリ領域共有処理中における第1の動作を示す説明図である。 実施の形態1にかかる通信システム100のメモリ領域共有処理中における第2の動作を示す説明図である。 実施の形態1にかかる通信システム100にて動画再生中を示す説明図である。 実施の形態1にかかる通信システム100にてゲームアプリケーションの実行中を示す説明図である。 イベントテーブル801の記憶内容の一例を示す説明図である。 実施の形態1にかかるメモリ領域共有開始処理、メモリ領域共有終了処理を示すフローチャートである。 実施の形態1にかかるメモリ領域共有処理を示すフローチャートである。 実施の形態1にかかる通信システム100の課題を示す説明図である。 実施の形態2にかかる通信システム100の動作概略を示す説明図である。 実施の形態2にかかる通信システム100の機能を示すブロック図である。 実施の形態2にかかる通信システム100のメモリ共有処理中における遮断時における動作概略を示す説明図である。 実施の形態2にかかる通信システム100のメモリ共有処理中における再接続時における動作概略を示す説明図である。 実施の形態2にかかる通信システム100にてゲームアプリケーションの実行中の状態を示す説明図である。 実施の形態2にかかるI/Oログの一例を示す説明図である。 実施の形態2にかかる分散開始処理、分散終了処理を示すフローチャートである。 実施の形態2にかかる分散処理を示すフローチャート(その1)である。 実施の形態2にかかる分散処理を示すフローチャート(その2)である。 実施の形態2にかかる分散処理を示すフローチャート(その3)である。 実施の形態2にかかる分散処理を示すフローチャート(その4)である。
 以下に添付図面を参照して、本発明にかかる通信装置、通信方法、および通信プログラムの好適な実施の形態を詳細に説明する。
(通信装置のハードウェア)
 図1は、実施の形態にかかる通信システム100のハードウェアを示すブロック図である。図1において、通信システム100は、通信装置101#0と通信装置101#1とを含む。通信装置101の具体例としては、小型の携帯端末装置などが考えられる。通信装置101#0は、CPU102#0と、ROM(Read‐Only Memory)103#0と、RAM(Random Access Memory)103#0と、を含む。また、通信装置101#0は、フラッシュROM105#0と、フラッシュROMコントローラ106#0と、フラッシュROM107#0と、を含む。また、通信装置101#0は、ユーザやその他の機器との入出力装置として、ディスプレイ108#0と、I/F(Interface)109#0と、キーボード110#0と、を含む。また、各部はバス111#0によってそれぞれ接続されている。
 また、通信装置101#1も、通信装置101#0と同様のハードウェアを含む。具体的に、通信装置101#1は、CPU102#1と、ROM103#1と、RAM104#1と、バス111#1と、を含む。また、通信装置101#1は、フラッシュROM105#1と、フラッシュROMコントローラ106#1と、フラッシュROM107#1と、ディスプレイ108#1と、I/F109#1と、キーボード110#1と、を含んでもよい。
 また、フラッシュROM105~ディスプレイ108、キーボード110については、通信装置101#0か通信装置101#1のいずれか一方に存在する状態でもよい。たとえば、通信装置101#0はディスプレイ108#0を含み、通信装置101#1は、フラッシュROM105#1~フラッシュROM107#1、キーボード110#1を含む、といった形態をとってもよい。また、特定のハードウェアが通信装置101#0と通信装置101#1の両方に存在し、特定のハードウェアを除いたフラッシュROM105~ディスプレイ108#0、キーボード110についてはどちらか片方に存在する形態をとってもよい。
 たとえば、通信装置101#0と通信装置101#1は、2つの装置で1台として扱われるセパレート型の携帯端末装置であってもよい。セパレート型の携帯端末装置である場合、通信装置101#0には、タッチパネルの機能を有するディスプレイ108#0を含み、通信装置101#1は、キーボード110#1を含んだ形態をとってもよい。
 以下、通信装置101#0内のハードウェアについて説明を行うが、通信装置101#1内のハードウェアも通信装置101#0内のハードウェアと等しい機能を有する。
 ここで、CPU102#0は、通信装置101#0の全体の制御を司る。なお、CPU102#0は、複数のCPUを含むマルチコアプロセッサであってもよい。マルチコアプロセッサシステムとは、コアが複数搭載されたプロセッサを含むコンピュータのシステムである。
 ROM103#0は、ブートプログラムなどのプログラムを記憶している。RAM104#0は、CPU102#0のワークエリアとして使用される。フラッシュROM105#0は、OS(Operating System)などのシステムソフトウェアやアプリケーションソフトウェアなどを記憶している。たとえば、OSを更新する場合、通信装置101#0は、I/F109#0によって新しいOSを受信し、フラッシュROM105#0に格納されている古いOSを、受信した新しいOSに更新する。
 フラッシュROMコントローラ106#0は、CPU102#0の制御に従ってフラッシュROM107#0に対するデータのリード/ライトを制御する。フラッシュROM107#0は、フラッシュROMコントローラ106#0の制御で書き込まれたデータを記憶する。データの具体例としては、通信装置101#0を使用するユーザがI/F109#0を通して取得した画像データ、映像データなどである。フラッシュROM107#0は、たとえば、メモリカード、SDカードなどを採用することができる。
 ディスプレイ108#0は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。このディスプレイ108#0は、たとえば、TFT液晶ディスプレイなどを採用することができる。
 I/F109#0は、無線LANの通信方式の1つである、アドホック通信によって通信装置101#1と直接通信を行う。また、I/F109#0は、通信回線を通じてLAN(Local Area Network)、WAN(Wide Area Network)、インターネットなどのネットワークに接続され、ネットワークを介して他の装置に接続されてもよい。そして、I/F109#0は、ネットワークと内部のインターフェースを司り、外部装置からのデータの入出力を制御する。I/F109#0には、たとえばモデムやLANアダプタなどを採用することができる。また、本実施の形態における通信方法は、好ましくは無線通信を想定しているが、有線によって他装置とデータの入出力を行ってもよい。
 キーボード110#0は、数字、各種指示などの入力のためのキーを有し、データの入力を行う。また、キーボード110#0は、タッチパネル式の入力パッドやテンキーなどであってもよい。
 図2は、実施の形態1にかかる通信システム100の動作概略を示す説明図である。通信装置101#0を制御するCPU102#0は、バス111#0を経由してMEM201#0にデータ202#0を格納する。MEM201#0とはCPU102#0のワークエリアとして使用されるRAMなどの記憶装置であり、具体的にはRAM104#0などのハードウェアである。また、通信装置101#0は、ソフトウェアとして、OS203#0、メモリドライバ204#0、通信ドライバ205#0、ファイルシステム206#0を実行している。
 OS203#0は、通信装置101#0を制御するプログラムである。具体的には、OS203#0は、アプリケーションソフトウェアが使用するドライバを提供する。また、OS203#0は、アプリケーションソフトウェアに対して、補助記憶装置となるフラッシュROM107などにアクセスするためにファイルシステム206#0を提供する。
 メモリドライバ204#0は、OS203#0が提供するドライバの一つであり、MEM201#0にアクセスする機能を有する。通信ドライバ205#0も、OS203#0が提供するドライバの一つであり、I/F109#0を通じて通信装置101#1と通信する機能を有する。
 ファイルシステム206#0は、OS203#0が提供する機能の一つであり、補助記憶装置となるフラッシュROM105#0、フラッシュROM107#0などに格納されたデータであるファイルのアクセスを行う機能を有している。たとえば、フラッシュROM107に格納されたファイルは、CPU102#0によってRAM104#0に読み込まれる。また、CPU102#0によって更新されたデータは、フラッシュROM107#0にファイルとして書き込まれる。
 通信装置101#1も、通信装置101#1を制御するCPU102#1がバス111#1を経由してMEM201#1にデータ202#1を格納する。また、通信装置101#0と同様のソフトウェアを含む。すなわち通信装置101#1は、ソフトウェアとして、OS203#1、メモリドライバ204#1、通信ドライバ205#1、ファイルシステム206#1を実行している。
 前述のソフトウェアを利用して通信システム100は、データの共有を行う。たとえば、OS203#0は、通信装置101#0のソフトウェアにより発生したデータ202#0に対するアクセス要求を検出し、データ202#0のアクセス先がMEM201#0か否かを判断する。図2の例では、データ202#0はMEM201#0内に格納されているため、OS203#0は、メモリドライバ204#0に対してアクセスするように制御する。
 また、通信装置101#0にて、データ202#1に対するアクセス要求を検出した場合、OS203#0はデータ202#1のアクセス先がMEM201#0か否かを判断する。図2の例では、データ202#1はMEM201#0内に格納されていないため、OS203#0は、通信ドライバ205#0にアクセス要求に基づいた信号を通信装置101#1と通信する。通信ドライバ205#0から信号を受けた通信装置101#1は、メモリドライバ204#1によって、MEM201#1内に格納されているデータ202#1にアクセスする。
 このように、無線通信によって接続された通信装置101#0、通信装置101#1が、通信ドライバ205#0、通信ドライバ205#1を介して接続先の装置のメモリにアクセスすることで、データを共有しながら分散処理を行うことができる。従来例にかかる通信システム100であれば、通信ドライバ205#0、通信ドライバ205#1を介する前に、ファイルの形成処理が存在する。本実施の形態1にかかる通信システム100では、ファイル処理を行わないため、ファイル処理にかかるオーバーヘッドを伴わずに通信処理を行うことができる。
(実施の形態1にかかる通信システム100の機能)
 次に、実施の形態1にかかる通信システム100の機能について説明する。図3は、実施の形態1にかかる通信システム100の機能を示すブロック図である。実施の形態1にかかる通信システム100は、検出部301と、判断部302と、制御部303と、アクセス部304と、通信部305と、通信部306と、アクセス部307と、停止部308と、を含む。
 この制御部となる機能(検出部301~停止部308)は、記憶装置に記憶されたプログラムをCPU102#0、CPU102#1が実行することにより、その機能を実現する。記憶装置とは、具体的には、たとえば、図1に示したROM103、RAM104、フラッシュROM105、フラッシュROM107などである。または、I/F109#0を経由してプログラムを取得し、CPU102#0、CPU102#1が取得されたプログラムを実行することにより、その機能を実現してもよい。
 また、図3に示す状態では、検出部301~通信部305が通信装置101#0の機能に含まれ、通信部306~停止部308が通信装置101#1の機能に含まれているが、検出部301~通信部305が通信装置101#1の機能に含まれていてもよい。同様に、通信部306~停止部308が通信装置101#0の機能に含まれていてもよい。
 検出部301は、自装置内から発生したアクセス要求を検出する機能を有する。アクセス要求には、読み込み要求と書き込み要求が存在する。たとえば、検出部301は、通信装置101#0にて実行中のプロセスによって発生したアクセス要求を検出する。なお、検出されたアクセス要求の情報は、検出部301が実行されるCPUのレジスタやメモリなどの記憶領域に記憶される。たとえば、検出部301が通信装置101#0にて実行されている場合、検出されたアクセス要求の情報は、CPU102#0のレジスタや、MEM201#0に記憶される。
 判断部302は、検出部301によって検出されたアクセス要求におけるアクセス対象データのアドレスが自装置のメモリに割り当てられたアドレスであるか否かを判断する機能を有する。
 たとえば、判断部302は、アクセス要求におけるアクセス対象データのアドレスが通信装置101#0のMEM201#0に割り当てられたアドレスであるか否かを判断する。具体的には、MEM201#0内のアドレスの範囲が0x00000000~0x1fffffffである場合を想定する。
 アクセス要求におけるアクセス対象データのアドレスが0x00001000であれば、判断部302は、アクセス対象データのアドレスがMEM201#0のアドレスの範囲内であるため自装置のメモリに割り当てられたアドレスであると判断する。アクセス要求におけるアクセス対象データのアドレスが0x20001000であれば、判断部302は、アクセス対象データのアドレスがMEM201#0のアドレスの範囲外であるため自装置のメモリに割り当てられたアドレスではないと判断する。
 なお、判断結果は、判断部302が実行されるCPUのレジスタやメモリなどの記憶領域に記憶される。たとえば、判断部302が通信装置101#0にて実行されている場合、検出されたアクセス要求の情報は、CPU102#0のレジスタや、MEM201#0に記憶される。
 制御部303は、判断部302によって判断された判断結果に基づいて、アクセス部304の処理または通信部305の処理、のうちいずれか一方の処理を選択して実行させる機能を有する。アクセス部304の処理を選択した場合、制御部303は、アクセス部304によりアクセス要求に基づいて自装置のメモリにアクセスさせる。通信部305の処理を選択した場合、制御部303は、通信部305によりアクセス要求に基づいて他装置と通信させる。
 たとえば、制御部303は、判断部302によってアクセス要求がMEM201#0に割り当てられたアドレスであると判断された場合、アクセス部304の処理を選択し、アクセス部304によりMEM201#0にアクセスさせる。また、判断部302によってアクセス要求がMEM201#0に割り当てられたアドレスではないと判断された場合、通信部305の処理を選択し、通信部305によりI/F109#0を用いて通信装置101#1と通信させる。
 アクセス部304は、自装置のメモリにアクセスする機能を有する。具体的には、通信装置101#0では、アクセス部304はメモリドライバ204#0となる。なお、アクセスされた結果は、アクセス部304が実行されるCPUのレジスタに記憶される。たとえば、アクセス部304がメモリドライバ204#0である場合は、CPU102#0のレジスタに記憶される。
 通信部305は、他装置と通信する機能を有する。具体的には通信装置101#0では、通信部305は通信ドライバ205#0となる。なお、通信された結果は、通信部305が実行されるCPUのレジスタやメモリに記憶される。たとえば、通信部305が通信ドライバ205#0である場合は、CPU102#0のレジスタや、MEM201#0に記憶される。
 CPU102#1の機能に含まれる通信部306は、通信部305と等しい機能を有し、アクセス部307も、アクセス部304と等しい機能を有する。また、通信部306は、通信部305によりアクセス要求を受信した際に、アクセス部307にアクセス要求を通知する。アクセス要求を受けたアクセス部307は、アクセス要求に基づいてMEM201#1にアクセスする。
 停止部308は、通信部306がアクセス要求を受信した場合、自装置にて実行中のソフトウェアに関する実行状態に基づいて、OSを停止する機能を有する。ここで指定するソフトウェアとは、プロセスや、割り込み処理を含む。たとえば、停止部308は、通信部306がアクセス要求を受信した時、通信装置101#1で実行中のプロセスが存在せず、割り込み処理に対応しない場合、OSをスリープ状態にさせる。
 図4は、実施の形態1にかかる通信システム100のメモリ領域共有処理中における第1の動作を示す説明図である。第1の動作中における通信システム100は、CPU102#0がプロセス401#0とプロセス401#1を実行し、CPU102#1が特にプロセスを実行していない、といった分散処理を行っている状態である。通信装置101#0のディスプレイ108#0は、プロセス401#0またはプロセス401#1による描画を行っており、通信装置101#1のディスプレイ108#1は、消灯中である。
 図4の状態では、通信装置101#0がマスタ装置となり、通信装置101#1がスレーブ装置となり、マスタ装置によって、スレーブ装置のメモリ領域を利用する。具体的には、通信装置101#0は、接続先の通信装置101#1のメモリ領域であるMEM201#1を、仮想的に自装置のメモリ領域として扱う。
 仮想的に自装置のメモリ領域とする方法として、通信装置101#0は、MEM201#0以外のアドレスのアクセスについては通信ドライバ205#0にてアクセス命令を送信し、通信装置101#1は、メモリドライバ204#1を介してデータアクセスを行う。これにより、仮想的にメモリ領域が増大することになるため、高優先度プロセスが扱うメモリ上のデータのページアウトを防止することができる。
 図5は、実施の形態1にかかる通信システム100のメモリ領域共有処理中における第2の動作を示す説明図である。第2の動作中における通信システム100は、CPU102#0がプロセス401#0を実行し、CPU102#1がプロセス401#1を実行するといった、分散処理を行っている状態である。通信装置101#0のディスプレイ108#0は、プロセス401#0による描画を行っており、通信装置101#1のディスプレイ108#1は、プロセス401#1による描画を行っている。図5の状態でも、通信装置101#0がマスタ装置となり、通信装置101#1がスレーブ装置となり、マスタ装置によって、スレーブ装置のメモリ領域を利用する。
 このように、通信システム100が複数の装置によって分散処理が行われている場合、データのアクセス先が接続先の装置のデータならば、自装置は、通信ドライバでアクセス命令を送信する。アクセス命令を通信ドライバによって受信した他装置は、メモリドライバを介してデータにアクセスし、そのデータを再度通信ドライバによって自装置に送信する。
 図6は、実施の形態1にかかる通信システム100にて動画再生中を示す説明図である。図6における通信システム100は、図4にて示したメモリ領域共有処理中における第1の動作中であり、通信装置101#0は、動画再生処理601とデータ更新処理602を実行している。ディスプレイ108#0は、動画再生処理601により動画を再生している。また、動画再生処理601に関しては高速で処理することが求められ、データ更新処理602に関しては、高速で処理することは求められておらず、データ更新作業はバックグラウンドで動作してもよい。
 図6の状態で、通信装置101#0は、データ更新処理602が使用するデータ603#1をMEM201#1に格納することで、MEM201#0の空き領域が増加する。したがって、通信装置101#0は、高速処理が求められる動画再生処理601が使用するデータ603#0のページアウトを防ぐことができる。ページアウトした場合、データ603#0は、アクセス速度が低速なファイルシステム206#0に格納されるため、動画再生処理601の高速処理を妨げることになる。
 図7は、実施の形態1にかかる通信システム100にてゲームアプリケーションの実行中を示す説明図である。図7における通信システム100は、図5にて示したメモリ領域共有処理中における第2の動作中であり、通信装置101#0はGUI処理701#0とゲーム処理702を実行し、通信装置101#1はGUI処理701#1を実行している。図7の状態では、通信装置101#0をマスタ装置、通信装置101#1をスレーブ装置とすることで、ゲーム処理702は、ディスプレイ108#0、ディスプレイ108#1を1つの画面として認識して表示することが可能である。
 ゲーム処理702は、1つの画面に対して描画命令を行うと、OS203#0は、描画命令の対象アドレスが、MEM201#0のアドレスであるかを判断する。判断結果に基づいて、OS203#0は、描画命令の対象アドレスがMEM201#0のアドレスであればメモリドライバ204#0によってMEM201#0へアクセスする。描画命令の対象アドレスがMEM201#0のアドレスでないならば、OS203#0は、通信ドライバ205#0によってアクセス要求を通信装置101#1に送信する。
 アクセス要求を受信した通信ドライバ205#1は、メモリドライバ204#1に対しMEM201#1にアクセスするよう依頼し、メモリドライバ204#1は、MEM201#1に対しアクセスを行う。
 より詳細には、たとえば、ディスプレイ108#0、ディスプレイ108#1の表示領域が、幅が320[ピクセル]であり、高さが240[ピクセル]であるQVGA(Quarter Video Graphics Array)が採用されており、32ビットカラーで表示される場合を想定する。
 このとき、表示領域のデータサイズは、320×240×4=0x4b000[バイト]となる。仮に、通信装置101#0のMEM201#0内のアドレスの範囲が0x00000000~0x1fffffffである場合、ディスプレイ108#0への転送領域を0x1ffb5000~0x1fffffffとする。続けて、通信装置101#0は、ディスプレイ108#1への転送領域を、仮想アドレス0x20000000~0x2004afffと設定する。これにより、通信システム100は、仮想的に320×480の表示領域を確保することができる。表示領域が連続しているため、GUI処理701#0、GUI処理701#1、ゲーム処理702は描画処理を容易に行うことができる。
 図8は、イベントテーブル801の記憶内容の一例を示す説明図である。他装置への処理内容を指示する際には、実行するイベントIDをイベントテーブル801のように用意しておき、イベントIDを他装置に通知することで、他装置はイベントIDに対応した処理を実行する。イベントID“0”~“3”は実施の形態1にかかる通信システム100にて使用され、イベントID“1”、“4”~“7”は後述する実施の形態2にかかる通信システム100にて使用される。
 たとえば、通信装置101#0がイベントID“0”を通信装置101#1に送信すると、通信装置101#1は、無線による接続要求を受信したことを認識する。同様に、通信装置101#0がイベントID“1”を通信装置101#1に送信すると、通信装置101#1は、無線による接続の切断に関する通知を受けたことを認識する。また、通信装置101#0がイベントID“4”を通信装置101#1に送信すると、通信装置101#1は、無線による分散処理の接続要求を受信したことを認識する。
 また、通信装置101はイベントIDの送信時に、他のパラメータを伴って送信してもよい。たとえば、通信装置101#0がイベントID“2”とアドレスを通信装置101#1に送信すると、通信装置101#1は、アクセス先のアドレスが自装置の物理アドレスの範囲外である場合のリード命令に関する通知を受信したことを認識する。さらにパラメータの解析により、通信装置101#1は、パラメータのアドレスをアクセス先のアドレスとして認識する。
 同様に、通信装置101#0がイベントID“3”とアドレスと書き込み対象データを通信装置101#1に送信すると、アクセス先のアドレスが自装置の物理アドレスの範囲外である場合のライト命令に関する通知を受信したことを認識する。さらにパラメータの解析により、通信装置101#1は、パラメータのアドレスをアクセス先のアドレスとして認識し、書き込み対象データをアクセス先のアドレスに書き込むデータとして認識する。
 また、通信装置101#0がイベントID“5”とアドレスと更新した値を通信装置101#1に送信すると、通信装置101#1は、自装置固有のデータへのライトアクセス後の、更新した値を通信ドライバを介しての他装置への通知を受信したことを認識する。さらにパラメータの解析により、通信装置101#1は、パラメータのアドレスがライトアクセスを行ったアドレスとして認識し、パラメータである更新した値がライトアクセスを行ったアドレスに対して書き込んだ値として認識する。
 また、通信装置101#0がイベントID“6”とアドレスを通信装置101#1に送信すると、通信装置101#1は、通信ドライバを介しての、他装置への対象データの転送要求を受信したことを認識する。さらにパラメータの解析により、通信装置101#1は、パラメータのアドレスが、転送要求のあった対象データのアドレスであることを認識する。
 また、通信装置101#0がイベントID“7”とI/Oログを通信装置101#1に送信すると、通信装置101#1は、I/Oログが送信されてきたことを認識する。さらにパラメータの解析により、通信装置101#1は、パラメータのI/Oログが実際に送信されてきたI/Oログであると認識する。
 図9は、実施の形態1にかかるメモリ領域共有開始処理、メモリ領域共有終了処理を示すフローチャートである。図9に示すメモリ領域共有開始処理、メモリ領域共有終了処理では、通信装置101#0がマスタ装置、通信装置101#1がスレーブ装置となる状態を想定する。また、ステップS901~ステップS908、ステップS910の処理がメモリ領域共有開始処理を示し、ステップS912~ステップS915の処理がメモリ領域共有終了処理を示している。また、ステップS909、ステップS911の処理がメモリ領域共有処理の実行中を示している。
 通信装置101#0は、実行中のプロセス401#0などの要求によって無線による接続要求を送信し(ステップS901)、通信装置101#1は接続要求を受信する(ステップS902)。接続要求を送信した通信装置101#0は、接続要求の応答があるまで待機する。具体的には、通信装置101#0は図8にて示したイベントID“0”を送信し、通信装置101#1はイベントID“0”の受信により、接続要求の受信があったことを認識する。
 接続要求を受信した通信装置101#1は、接続要求を許可するかを判断する(ステップS903)。なお、通信装置101#1は常に接続要求を許可してもよいし、通信装置101#1の状態によって判断してもよい。たとえば、通信装置101#1は、現在実行されているプロセス数が一定以上であれば負荷が過大であるとして接続要求を許可しないと判断してもよい。または、通信装置101#1は、受信した接続要求をディスプレイ108#1に表示し、ユーザによる接続要求の許可を受け付けてもよい。
 接続要求を許可しない場合(ステップS903:No)、通信装置101#1は、接続NGを通信装置101#0に送信し(ステップS904)、メモリ領域共有開始処理を終了する。接続要求を許可する場合(ステップS903:Yes)、通信装置101#1は、実行中のプロセスが存在するかを判断する(ステップS905)。実行中のプロセスが存在しない場合(ステップS905:No)、通信装置101#1は、メモリ領域共有処理中に割り込み処理に対応するかを判断する(ステップS906)。
 割り込み処理に対応しない場合(ステップS906:No)、通信装置101#1はOS203#1をスリープ状態に移行し(ステップS907)、通信装置101#0に接続OKを送信する(ステップS908)。なお、ステップS907の処理を行った場合、通信システム100は、図4にて示したメモリ領域共有処理における第1の動作となり、ステップS907の処理を行わなかった場合、通信システム100は図5にて示したメモリ領域共有処理における第2の動作となる。
 実行中のプロセスが存在する場合(ステップS905:Yes)、または、割り込み処理に対応する場合(ステップS906:Yes)、通信装置101#1は、ステップS908の処理に移行し、メモリ領域共有処理を実行する(ステップS909)。メモリ領域共有処理の詳細は図10にて後述する。ステップS904、またはステップS908にて応答を受けた通信装置101#0は、接続結果を判断する(ステップS910)。接続結果が接続NGである場合(ステップS910:NG)、通信装置101#0は、無線による接続を切断し(ステップS915)、メモリ領域共有開始処理を終了する。
 まだ応答がない場合(ステップS910:応答待ち)、通信装置101#0は、一定時間後再びステップS910の処理を実行する。接続結果が接続OKである場合(ステップS910:OK)、通信装置101#0は、メモリ領域共有処理を実行する(ステップS911)。メモリ領域共有処理の終了後、通信装置101#0は、接続の切断を送信し(ステップS912)、ステップS915の処理に移行後、メモリ領域共有終了処理を終了する。具体的には、通信装置101#0は図8にて示したイベントID“1”を送信し、通信装置101#1はイベントID“1”の受信により、接続の切断に関する通知の受信があったことを認識する。
 ステップS912の処理にて切断の通知を受けた通信装置101#1は、OS203#1がスリープ状態かを判断する(ステップS913)。スリープ状態である場合(ステップS913:Yes)、通信装置101#1は、OS203#1を復帰させる(ステップS914)。OS203#1がスリープ状態でない場合(ステップS913:No)、またはステップS914の処理後、通信装置101#1は、メモリ領域共有終了処理を終了する。
 なお、ステップS908の処理にて、通信装置101#1は、通信装置101#0に提供するメモリの範囲を通知してもよい。たとえば、MEM201#1内のアドレスの範囲が0x00000000~0x1fffffffである場合、通信装置101#1は、提供するメモリの範囲として、0x10000000~0x1fffffffを通信装置101#0に通知する。通知を受けた通信装置101#0は、0x10000000~0x1fffffffを、たとえば、仮想アドレス0x20000000~0x2fffffffと設定する。これにより通信装置101#0は、メモリ領域共有処理にて、0x20000000~0x2fffffffに含まれるアドレスに対するアクセス要求が発行された場合に、他装置に対するアクセス要求として判断することになる。
 図10は、実施の形態1にかかるメモリ領域共有処理を示すフローチャートである。メモリ領域共有処理は、マスタ装置とスレーブ装置が実行する。図10の説明では、通信装置101#0がマスタ装置となり、通信装置101#0にてメモリ領域共有処理が実行される状態を想定する。
 通信装置101#0は、メモリ領域共有処理の終了要求を検出したかを判断する(ステップS1001)。終了要求を検出した場合(ステップS1001:Yes)、通信装置101#0は、メモリ領域共有処理を終了する。通信装置101#0がメモリ領域共有処理の終了要求を検出する場合としては、たとえば、メモリ領域共有処理を要求したプロセス401が終了する場合である。または、通信装置101#0がメモリ領域共有処理中に一定時間以上、通信装置101#0が操作されていない状態を検出した場合であってもよい。または、ユーザによりメモリ領域共有処理の終了要求が発行され、通信装置101#0が終了要求を検出した場合であってもよい。
 メモリ領域共有処理の終了要求を検出していない場合(ステップS1001:No)、通信装置101#0は、メモリアクセスの発生を検出したかを判断する(ステップS1002)。メモリアクセスの発生を検出していない場合(ステップS1002:No)、通信装置101#0は、ステップS1001の処理に移行する。メモリアクセスの発生を検出した場合(ステップS1002:Yes)、通信装置101#0は、続けて、アクセス先のアドレスが自装置の物理アドレスの領域かを判断する(ステップS1003)。
 なお、ステップS1003の判断にて、物理アドレスの領域には、MEM201#0の領域が含まれる。また、通信装置101#0がメモリのアドレス空間に入出力機器のアドレス空間が共存するメモリマップドIOの形態をとるならば、入出力機器のアドレスも自装置の物理アドレスに含める。
 アクセス先のアドレスが自装置の物理アドレスの領域である場合(ステップS1003:Yes)、通信装置101#0は、自装置のメモリにアクセスし(ステップS1004)、ステップS1001の処理に移行する。自装置の物理アドレスの領域でない場合(ステップS1003:No)、通信装置101#0は、通信ドライバ205#0を起動し(ステップS1005)、アクセスの種類を判断する(ステップS1006)。
 アクセスの種類がリードアクセスである場合(ステップS1006:リードアクセス)、通信装置101#0は、通信ドライバ205#0によってアクセス先のアドレスを通信装置101#1に送信する(ステップS1007)。通信装置101#1は、通信ドライバ205#0よりアクセス先のアドレスを取得する(ステップS1008)。具体的には、通信装置101#0は図8にて示したイベントID“2”とアクセス先のアドレスを送信し、通信装置101#1は、受信したイベントID“2”より、受信した内容がアクセス先のアドレスに対するリード命令要求の受信があったことを認識する。
 アクセス先のアドレスを取得した通信装置101#1は、通信ドライバ205#1を起動し、アクセス先のアドレスから読み込んだデータを通信装置101#0に送信する(ステップS1009)。データを受信した通信装置101#0は、メモリアクセスの発生元となるプロセスにデータを通知し、ステップS1001の処理に移行する。
 アクセスの種類がライトアクセスである場合(ステップS1006:ライトアクセス)、通信装置101#0は、通信ドライバ205#0によってアクセス先のアドレスおよび書き込み対象データを通信装置101#1に送信する(ステップS1010)。通信装置101#1は、通信ドライバ205よりアクセス先のアドレスを取得する(ステップS1011)。具体的には、通信装置101#0は図8にて示したイベントID“3”とアクセス先のアドレスと書き込み対象データを送信する。通信装置101#1は、受信したイベントID“3”より、受信した内容がアクセス先のアドレスに対するライト命令要求の受信があったことを認識する。
 アクセス先のアドレスを取得した通信装置101#1は、アクセス先のアドレスに書き込み対象データを書き込む(ステップS1012)。また、ステップS1007の処理にて、アクセス先のアドレスを送信した通信装置101#0は、ステップS1001の処理に移行する。
 以上説明したように、実施の形態1にかかる通信装置、通信方法、および通信プログラムによれば、自装置のメモリ以外にアクセス要求した場合、他装置にアクセス要求を送信し、他装置が他装置のメモリ空間にアクセスする。これにより、通信装置は、通信時に行っていたファイルの形成および展開の処理を省くことができ、オーバーヘッドを解消することができる。また、他装置のメモリを擬似的に自装置のメモリとすることで、メモリ空間が拡大するため、優先度の高いプロセスのデータのページアウトを防ぐことができる。
 また、他装置のメモリを擬似的に自装置のメモリとすることで、他装置と自装置のメモリの内容に関連性を持たせることが容易になる。たとえば、通信装置は、自装置と他装置のディスプレイを仮想的に1つの画面として扱うことが容易となる。
 このように、ファイルという形式を介さずにデータを共有することが可能となるため、複数台の携帯端末を連携して動作させる携帯端末用のゲームなどの新規アプリケーションを実行することが可能となる。たとえば、セパレート型の携帯端末を2つ用意し、画面のある片方ずつを連携させ、ゲームアプリケーションを起動し、もう一方をコントローラとして、2人同時プレイをすることが実現できる。
 また、実施の形態1にかかる通信システム100では、通信装置が2つ存在していたが、通信装置が3つ以上の形態をとってもよい。たとえば、実施の形態1にかかる通信システム100に、通信装置101#2がさらに存在し、通信装置101#0がマスタ装置となり、通信装置101#1、通信装置101#2がスレーブ装置となってもよい。
 この場合、通信装置101#0は、自装置の物理アドレス外となる領域を、通信装置101#1のメモリにアクセスする領域と、通信装置101#2のメモリにアクセスする領域と、の2つの領域に分割してもよい。続けて、図10のステップS1003:Yesの処理後、通信装置101#0は、アクセス先のアドレスに基づいて、通信装置101#1のメモリにアクセスするか、通信装置101#2のメモリにアクセスするかを判断してもよい。
 図11は、実施の形態1にかかる通信システム100の課題を示す説明図である。実施の形態1にかかる通信システム100では、通信が遮断されると接続先のメモリ領域にアクセスできなくなるため、処理を継続することができなくなる。また、実施の形態1にかかる通信システム100は、図11で示すように、MEM201#0に通信装置101#1用データ領域を確保し、MEM201#1に通信装置101#0用データ領域を確保するといった、共有データ領域を用いた場合も想定される。
 具体的な共有データ領域の確保方法として、CPU102#0は、通信装置101#1とデータを共有する領域としてデータ領域1101#0_0、データ領域1101#1_0を確保し、データ領域1101#0_0内にデータ202#0を格納する。また、CPU102#0は、データ202#1と等しいデータをデータ202#1_0としてデータ領域1101#1_0に格納する。
 また、CPU102#1は、通信装置101#0とデータを共有する領域としてデータ領域1101#1_0、データ領域1101#1_1を確保し、データ領域1101#1_1内にデータ202#1を格納する。また、CPU102#1は、データ202#0と等しいデータをデータ202#0_1としてデータ領域1101#0_1に格納する。しかし、共有データ領域を用いた場合も再接続時に装置間のデータの整合性が取れず、通信システム100は、処理を最初からやり直すことになる。
 また、特許文献5にかかる技術では、サーバは異常時に配信できなかったデータを、正常時に再配信する。この技術を実施の形態1にかかる通信システム100に適用しても、回線遮断中における処理を実行することが困難であるという問題があった。図12~図19に示す実施の形態2にかかる通信システム100では、実施の形態1にかかる通信システム100が回線遮断中においても可能な限り処理を続行し、回線再接続時に処理を再開することを目的とする。
(実施の形態2の概要説明)
 図12は、実施の形態2にかかる通信システム100の動作概略を示す説明図である。以下、図12~図19にて、特に指定がない場合、通信システム100についての記述は、実施の形態2にかかる通信システム100について記述したものである。図12に示す通信システム100は、ハードウェアとしては図2で示した実施の形態1にかかる通信システム100のハードウェアと等しく、機能としては、図11で説明した共有データ領域を確保する形態をとる。
 さらに、通信システム100内の通信装置101は、自装置固有のデータに対してライトアクセスを行った場合、他装置に対してコヒーレンシの実行要求をする。たとえば、通信装置101#0は、データ202#0に対してライトアクセスを行った場合、書き込んだ結果を通信装置101#1に通信ドライバ205#0によって送信し、通信装置101#1に対してコヒーレンシを実行するように要求する。要求を受信した通信装置101#1は、コヒーレンシの実行として、共有データ領域に存在するデータ202#0_1を更新する。これにより、データ202#0とデータ202#0_1が一致し、整合性が取れた状態となる。
 また、通信システム100内の通信装置101が自装置固有のデータに対してライトアクセスを行う際に接続状態が遮断されている場合、他装置に対してコヒーレンシの実行要求を行わず、ライトアクセスによる書き込み結果をI/Oログに記述する。接続状態が確立した後に、通信装置101は他装置にI/Oログを送信し、他装置は受信したI/Oログに基づいてコヒーレンシを実行する。I/Oログの扱いについては、図14、図15にて、I/Oログの詳細は図17にて後述する。
 また、通信システム100内の通信装置101が他装置固有のデータに対してのリードアクセスを行う場合、共有データ領域のデータを基に投機実行を行いつつ、自装置は通信ドライバを介してデータが最新か否かを判断する。データが古い場合、通信装置101は、リードアクセス時から再実行する。
 たとえば、通信装置101#0は、データ202#1に対してリードアクセスを行う場合、リードアクセスを要求したプロセスは、共有データ領域に格納されたデータ202#1_0を基に投機実行を行う。また、通信装置101#0は、通信ドライバ205#0によってデータ202#1の値を取得し、共有データ領域に格納されたデータ202#1_0と比較する。共有データ領域に格納されたデータ202#1が不一致となり古い場合、通信装置101#0は、投機実行する前となる、データ202#1_0を読み込んだ状態から再実行を行う。
 また、通信システム100内の通信装置101は、他装置固有のデータに対してのライトアクセスは行わない。たとえば、通信システム100は、自装置固有の領域に書き込み、他装置が読み込む、といった形態にすることで、他装置固有のデータに対してのライトアクセスを置き換えることができる。
(実施の形態2にかかる通信システム100の機能)
 次に、実施の形態2にかかる通信システム100の機能について説明する。図13は、実施の形態2にかかる通信システム100の機能を示すブロック図である。実施の形態2にかかる通信システム100は、検出部1301と、判断部1302と、制御部1303と、アクセス部1304と、通信部1305と、通信部1306と、アクセス部1307と、実行部1308と、を含む。
 この制御部となる機能(検出部1301~実行部1308)は、記憶装置に記憶されたプログラムをCPU102#0、CPU102#1が実行することにより、その機能を実現する。記憶装置とは、具体的には、たとえば、図1に示したROM103、RAM104、フラッシュROM105、フラッシュROM107などである。または、I/F109を経由してプログラムを取得し、CPU102#0、CPU102#1が取得されたプログラムを実行することにより、その機能を実現してもよい。
 また、図13では、検出部1301~通信部1305、実行部1308が通信装置101#0の機能に含まれ、通信部1306、アクセス部1307が通信装置101#1の機能に含まれている状態を示している。また、検出部1301~通信部1305、実行部1308も通信装置101#1の機能に含まれる。また、判断部1302、通信部1305、通信部1306、アクセス部1307は、それぞれ、判断部302、通信部305、通信部306、アクセス部307と等しい機能を有するため、説明を省略する。
 検出部1301は、自装置内から発生したアクセス要求を検出する機能を有する。また、検出部1301は、自装置と他装置との通信状態を検出してもよい。また、検出部1301は、アクセス部1304によりアクセス要求として実行部1308から発生した書き込み要求に応じる自装置のメモリへの書き込み結果を検出してもよい。
 たとえば、検出部1301は、通信装置101#0と通信装置101#1との通信状態が遮断された状態や、接続された状態を検出する。また、検出部1301は、アクセス部1304によりMEM201#0への書き込み結果を検出する。なお、検出結果は、検出部1301が実行されるCPUのレジスタやメモリなどの記憶領域に記憶される。たとえば、検出部1301が通信装置101#0にて実行されている場合、検出結果は、CPU102#0のレジスタや、MEM201#0に記憶される。
 制御部1303は、判断部1302によって判断された判断結果に基づいて、アクセス部1304の処理または通信部1305の処理、のうちいずれか一方の処理を選択して実行させる機能を有する。また、制御部1303は、アクセス要求として実行部1308から発生した読み込み要求が判断部1302によって自装置のメモリに割り当てられたアドレスでないと判断された場合、通信部1305により読み込み要求に基づいて他装置と通信させてもよい。たとえば、制御部1303は、プロセス401#0から発生した読み込み要求のアドレスがMEM201#0のアドレスでない場合、通信部1305によりI/F109#0を通じて読み込み要求を通信装置101#1に送信してもよい。
 また、制御部1303は、検出部1301により通信状態が遮断されたことが検出された後、アクセス要求が判断部1302によって自装置のメモリに割り当てられたアドレスでないと判断された場合に実行部1308を停止させる。続けて、制御部1303は、検出部1301により通信状態が接続されたことが検出された場合に実行部1308の停止を解除させてもよい。たとえば、制御部1303は、通信状態が遮断された状態で、アクセス要求が他装置のメモリに割り当てられたアドレスである場合、プロセス401#0を停止させ、通信状態が接続された場合に、プロセス401#0の停止を解除してもよい。
 また、制御部1303は、検出部1301によって自装置のメモリへの書き込み結果が検出された場合、通信部1305により書き込み結果に基づくコヒーレンシの実行要求を他装置に送信させてもよい。書き込み結果に基づくコヒーレンシの実行要求は、たとえば、自装置が、書き込み結果とコヒーレンシの実行要求を意味するイベントIDを送信することで、受信した他装置がコヒーレンシの実行要求を受けたことを認識する。たとえば、制御部1303は、MEM201#0への書き込み結果が検出された場合、I/F109#0を通じて書き込み結果に基づくコヒーレンシの実行要求を通信装置101#1に送信させる。
 また、制御部1303は、他装置からコヒーレンシの実行要求を受信した場合、アクセス部1304により読み込み結果として自装置のメモリに書き込ませてもよい。たとえば、制御部1303は、コヒーレンシの実行要求として通信装置202#1の値を受信した場合、アクセス部1304によりデータ202#1_0として書き込む。書き込まれたデータは投機実行に使用される。
 また、制御部1303は、検出部1301により通信状態が遮断から接続された状態に遷移したことが検出された場合、遮断された状態の間に自装置のメモリへの書き込み結果に基づくコヒーレンシの実行要求を通信部1305により他装置に送信させてもよい。遮断された状態の間に自装置のメモリへの書き込み結果の記録方法については、書き込まれたメモリにフラグを設定するといった方法でもよい。この場合、制御部1303は、コヒーレンシの実行要求時にフラグが設定されたアドレスを他装置に送信する、本実施の形態2では、制御部1303は、書き込み結果をI/Oログに記述し、コヒーレンシの実行要求時に他装置にI/Oログを送信する。
 アクセス部1304は、自装置のメモリにアクセスする機能を有する。また、アクセス部1304は、通信部1305によって読み込み要求に対応する読み込み結果を自装置のメモリに書き込んでもよい。たとえば、アクセス部1304は、通信部1305によってI/F109#0を通じて得た読み込み結果を、データ領域1101#1_0に書き込む。
 実行部1308は、プロセスを実行する機能を有する。たとえば、実行部1308は、プロセス401#0を実行する。また実行部1308は、アクセス部1304によって書き込まれた読み込み結果を用いて前記プロセスを実行してもよい。たとえば、実行部1308は、データ領域1101#1_0に書き込まれた読み込み結果であるデータ202#1_0を用いてプロセス401#0を実行する。
 また、実行部1308は、アクセス部1304によって新たに発行された読み込み要求に対する新たな読み込み結果が書き込まれるまでの間、自装置のメモリに書き込まれた読み込み結果を用いてプロセスを実行してもよい。たとえば、実行部1308は、通信装置101#1のメモリへの新たな読み込み要求を発行し、データ領域1101#1_0に新たな読み込み結果が書き込まれるまでの間、既に書き込まれているデータ202#1_0を用いてプロセス401#0を実行する。これにより、実行部1308は投機実行を行うことができる。
 図14は、実施の形態2にかかる通信システム100のメモリ共有処理中における遮断時における動作概略を示す説明図である。通信装置101#0と通信装置101#1は、無線接続が確立していなく、通信が遮断された状態である。通信が遮断されると、通信装置101#0と通信装置101#1で実行しているプロセス401#0、プロセス401#1は、接続先のデータを読み込む箇所まで、各装置で処理を継続する。
 通信ドライバを介した接続先のメモリ領域へのアクセス要求が発生すると、通信装置101は再接続要求を行い、低電力モードへ移行する。たとえば、通信装置101#0は、プロセス401#1を他装置のデータを読み込む箇所までプロセスの処理を継続する。データ202#1_0に対する読み込みを検出した場合、通信装置101#0は、再接続要求を行ってプロセスの処理を停止し、低電力モードへ移行する。また再接続要求を行う際に、通信装置101#0は、ディスプレイ108#0にて再接続要求を表示し、ユーザに対し接続要求を発行するか否かの応答を待ってもよい。
 たとえば、通信装置101#0は、プロセス401#0がデータ202#1_0の読み込みを行ったため、プロセス401#0を停止する。通信装置101#1は、プロセス401#1がデータ202#1の読み込みと書き込みしか行わず、データ202#0の読み込みに行っていないため、プロセス401#1の処理を実行し続けることができる。
 また、通信装置101は、接続状態が遮断された時点から、自装置固有のデータへのライトアクセスをI/Oログに記録する。このとき、通信装置101は、自装置固有のデータに対してライトアクセスの際に行っていた、他装置に対するコヒーレンシ要求を行わない。たとえば、通信装置101#0は、接続状態が遮断された時点から、自端末固有のデータとなるデータ202#0へのライトアクセスをI/Oログ1401#0に記録し、通信装置101#1に対するコヒーレンシの要求通知を停止する。
 図15は、実施の形態2にかかる通信システム100のメモリ共有処理中における再接続時における動作概略を示す説明図である。図15における通信システム100は、図14の状態から、通信が再接続された状態を示している。通信が再接続されると、各装置は、接続先の装置にI/Oログを送信する。たとえば、通信装置101#0はI/Oログ1401#0を通信装置101#1に送信し、通信装置101#1はI/Oログ1401#1を通信装置101#0に送信する。
 I/Oログを送信した後には、各装置は通常モードになり、I/Oログに基づいてデータのコヒーレンシを実行しプロセスの処理を再開する。たとえば、通信装置101#0はI/Oログ1401#1からデータ202#1_0を更新し、停止中であったプロセス401#0の処理を再開する。
 図16は、実施の形態2にかかる通信システム100にてゲームアプリケーションの実行中の状態を示す説明図である。図16における通信システム100は、通信装置101#0がゲーム処理1601#0を実行し、通信装置101#1がゲーム処理1601#1を実行している。図16で示した、複数の装置を無線などによって接続するゲーム処理などにおいて、通信が一時的に遮断されても図14、図15で説明した動作により、ゲーム処理を再起動することなく継続することができる。
 具体的には、通信装置101#0は、ゲーム処理1601#0が使用するデータ1602#0へ書き込むたびに、通信装置101#1に書き込み結果を送信し、コヒーレンシを実行するように要求する。書き込み結果を受信した通信装置101#1は、書き込み結果に基づいてデータ1602#0_1のコヒーレンシを実行し、データ1602#0_1をデータ1602#0と等しい状態にする。
 また、無線による接続が遮断された場合、通信装置101#0、通信装置101#1は、データ1602#0、データ1602#1のライトアクセスのたびにI/Oログに記録する。再接続後、通信装置101#0、通信装置101#1は、I/Oログを送信しあい、データ1602#1_0と、データ1602#0_1のコヒーレンシを実行する。コヒーレンシを実行した後、通信装置101#0、通信装置101#1は、ゲーム処理1601#0、ゲーム処理1601#1を続行する。このように、通信の遮断のたびに処理を再起動せずに継続することができるため、ユーザに対してゲームアプリケーションの使い勝手を向上させることができる。
 図17は、実施の形態2にかかるI/Oログの一例を示す説明図である。I/Oログは、通信装置101が書き込みを行った仮想アドレスと、仮想アドレスへ書き込んだ値を記録している。たとえば、図17の例にて、通信装置101#0は、仮想アドレス0x12345678に0を書き込んだ場合、I/Oログに、“0x12345678”、”0”を格納する。同様に、仮想アドレス0x23456789に1を書き込んだ場合、通信装置101#0は、I/Oログに、“0x23456789”、”1”を格納する。仮想アドレス0x34567890に2を書き込んだ場合、通信装置101#0は、I/Oログに、“0x34567890”、”2”を格納する。
 図17の例では1バイト単位にてI/Oログを生成しているが、異なる単位にてI/Oログを生成してもよい。たとえば、通信装置101#0は、4バイト単位にてI/Oログを生成してもよい。具体的には、通信装置101#0は、仮想アドレス0x10000000に0xffffffffを書き込んだ場合、I/Oログに、“0x10000000”、”0xffffffff”を格納する。また、通信装置101は、I/Oログ内に、既に同じアドレスが存在する場合、値を上書きしてもよい。
 図18は、実施の形態2にかかる分散開始処理、分散終了処理を示すフローチャートである。ステップS1801~ステップS1807、ステップS1809~ステップS1811の処理が分散開始処理を示し、ステップS1813~ステップS1816の処理が分散終了処理を示している。また、ステップS1808、ステップS1812の処理が分散処理の実行中を示している。
 通信装置101#0は、無線による分散処理の接続要求を送信する(ステップS1801)。通信装置101#1は、接続要求を受信する(ステップS1802)。具体的には、通信装置101#0は図8にて示したイベントID“4”を送信し、通信装置101#1はイベントID“4”の受信により、分散処理の接続要求の受信があったことを認識する。
 また、通信装置101#0は、イベントIDと併せて、分散処理を行うプロセスの情報として、装置IDと共有メモリサイズを送信してもよい。装置IDとは装置固有のIDであり、たとえば、MAC(Media Access Control)アドレスや装置の製造番号などである。共有メモリサイズとは、分散処理を行うプロセスが使用する共有メモリのサイズである。このサイズに基づいて、通信装置101#1は共有メモリの確保する領域の大きさを設定する。
 接続要求を受信した通信装置101#1は、接続要求を許可するかを判断する(ステップS1803)。なお、通信装置101#1は常に接続要求を許可してもよいし、通信装置101#1の状態によって判断してもよい。たとえば、通信装置101#1は、現在実行されているプロセス数が一定以上であれば負荷が過大であるとして接続要求を許可しないと判断してもよい。または、通信装置101#1は、ステップS1801にて受信したプロセスデータのうち装置IDと通信装置101#1に既に登録されていたIDとを比較し、一致した場合に接続要求を許可してもよい。または、通信装置101#1は、受信した接続要求をディスプレイ108#1に表示し、ユーザによる接続要求の許可を受け付けてもよい。
 接続要求を許可しない場合(ステップS1803:No)、通信装置101#1は、接続NGを通信装置101#0に送信し(ステップS1804)、分散開始処理を終了する。接続要求を許可する場合(ステップS1803:Yes)、通信装置101#1は、自装置が生成したデータを接続先の装置に共有させるためのデータ領域および接続先の装置が生成したデータを自装置が共有するためのデータ領域を確保する(ステップS1805)。具体的には、通信装置101#1は、自装置が生成したデータを接続先の装置に共有させるためのデータ領域としてデータ領域1101#1_1を確保し、接続先の装置が生成したデータを自装置が共有するためのデータ領域として1101#0_1を確保する。
 確保後、通信装置101#1は、確保したデータ領域を共有データ領域として設定し(ステップS1806)、接続OKを通信装置101#1に送信し(ステップS1807)、分散処理を実行する(ステップS1808)。分散処理の詳細については、図19にて後述する。
 ステップS1804、ステップS1807にて応答を受けた通信装置101#0は、接続結果を判断する(ステップS1809)。接続結果が接続NGである場合(ステップS1809:NG)、通信装置101#0は、無線による接続を切断し(ステップS1816)、分散開始処理を終了する。まだ応答がない場合(ステップS1809:応答待ち)、通信装置101#0は、一定時間後再びステップS1809の処理を実行する。
 接続結果が接続OKの場合(ステップS1809:OK)、通信装置101#0は、自装置が生成したデータを接続先の装置に共有させるためのデータ領域および接続先の装置が生成したデータを自装置が共有するためのデータ領域を確保する(ステップS1810)。具体的には、通信装置101#0は、自装置が生成したデータを接続先の装置に共有させるためのデータ領域としてデータ領域1101#0_0を確保し、接続先の装置が生成したデータを自装置が共有するためのデータ領域としてデータ領域1101#1_0を確保する。
 確保後、通信装置101#0は、確保したデータ領域を共有データ領域として設定し(ステップS1811)、分散処理を実行する(ステップS1812)。分散処理の終了後、通信装置101#0は、接続の切断を通知し(ステップS1813)、共有データ領域を解放し(ステップS1815)、ステップS1816の処理に移行後、分散終了処理を終了する。具体的には、通信装置101#0は図8にて示したイベントID“1”を送信し、通信装置101#1はイベントID“1”の受信により、接続の切断に関する通知の受信があったことを認識する。
 分散処理の終了後、またはステップS1813の処理にて切断の通知を受けた通信装置101#1は、共有データ領域を解放し(ステップS1814)、分散終了処理を終了する。
 図19A~図19Dは、実施の形態2にかかる分散処理を示すフローチャートである。分散処理は、通信装置101#0でも通信装置101#1でも行われる。図19A~図19Dでは、通信装置101#0での分散処理におけるフローチャートを説明する。
 図19Aは、分散処理にて接続が継続中であり、アクセスの種類が自装置に関するアクセスについてのフローチャートを示している。通信装置101#0は、分散処理の終了要求を検出したかを判断する(ステップS1901)。終了要求を検出した場合(ステップS1901:Yes)、通信装置101#0は、分散処理を終了する。具体的に、通信装置101#0が分散処理の終了要求を検出する場合としては、たとえば、通信装置101#0が一定時間以上通信装置101#0が操作されていない状態を検出した場合である。または、ユーザにより分散処理の終了要求が発行され、通信装置101#0が終了要求を検出した場合であってもよい。
 分散処理の終了を検出していない場合(ステップS1901:No)、通信装置101#0は、無線による接続が継続されているかを判断する(ステップS1902)。接続が継続されている場合(ステップS1902:Yes)、通信装置101#0は、再び分散処理の終了要求を検出したかを判断する(ステップS1903)。終了要求を検出した場合(ステップS1903:Yes)、通信装置101#0は、分散処理を終了する。
 分散処理の終了要求を検出していない場合(ステップS1903:No)、通信装置101#0は、メモリアクセスの発生を検出したかを判断する(ステップS1904)。メモリアクセスの発生を検出していない場合(ステップS1904:No)、通信装置101#0は、ステップS1901の処理に移行する。メモリアクセスの発生を検出した場合(ステップS1904:Yes)、通信装置101#0は、アクセスの種類を判断する(ステップS1905)。なお、アクセスの種類が自装置上か他装置上かの判断方法は、実施の形態1でのステップS1003の処理と同一である。
 アクセスの種類が自装置上のプロセス固有のデータへのリードアクセスである場合(ステップS1905:(1))、通信装置101#0は、自装置のメモリを読み込み(ステップS1906)、ステップS1901の処理に移行する。アクセスの種類が自装置上のプロセス固有のデータへのライトアクセスである場合(ステップS1905:(2))、通信装置101#0は、書き込み後、更新した値を通信ドライバ205#0を介して、通信装置101#1に転送する(ステップS1907)。
 転送後、通信ドライバ205#0を介してデータ転送を受けた通信装置101#1は、メモリドライバ204#1を介して、対象のデータを転送された値に更新する(ステップS1908)。ステップS1907の処理により、通信装置101#1は、コヒーレンシの実行を行ったことになる。具体的には、通信装置101#0は図8にて示したイベントID“5”とアドレスと更新した値を送信し、通信装置101#1はイベントID“5”により、併せて送信されている更新した値によるコヒーレンシの実行要求を受信したことを認識する。ステップS1907の処理にて値を転送した通信装置101#0は、ステップS1901の処理に移行する。
 図19Bは、分散処理にて接続が継続中であり、アクセスの種類が他装置のリードアクセスについてのフローチャートを示している。アクセスの種類が他装置上のプロセス固有のデータへのリードアクセスである場合(ステップS1905:(3))、通信装置101#0は、対象プロセスの実行状態を保存する(ステップS1909)。保存する内容として、通信装置101#0は、プログラムカウンタを含むレジスタの中身を保存する。
 保存後、通信装置101#0は、通信ドライバ205#0を介して、通信装置101#1から対象データの転送を要求する(ステップS1910)。具体的には、通信装置101#0は図8にて示したイベントID“6”と対象データのアドレスを送信し、通信装置101#1はイベントID“6”の受信により、対象データの転送要求の受信があったことを認識する。
 対象データの転送を要求後、通信装置101#0は、自装置の共有データ領域から対象データを読み込み、対象プロセスを実行する(ステップS1911)。対象データを受信する前に処理を実行するため、ステップS1911の処理は投機実行したことになる。投機実行中に自装置上のプロセス固有のデータに関して、ライトアクセスにより値が更新されるデータが発生した場合、共有データ領域とは異なる別の領域に新しい値を保存し、その後の投機実行処理では、別の領域に保存した値を実行中のデータとして使用する。
 通信装置101#0は、対象プロセスの投機実行中に対象データを受信する(ステップS1912)と、自装置から読み込んだ値と通信装置101#1から受信した値が一致するかを判断する(ステップS1913)。自装置から読み込んだ値と受信した値が一致する場合(ステップS1913:Yes)、投機実行が成功したことになり、通信装置101#0は、対象プロセスに関する別の領域に保存して実行中のデータを共有データ領域にコピーする(ステップS1914)。コピー後、通信装置101#0は、別の領域に保存してあった実行状態を破棄する(ステップS1915)。破棄後、通信装置101#0は、対象プロセスの処理を継続し(ステップS1916)、ステップS1901の処理に移行する。
 自装置から読み込んだ値と受信した値が不一致である場合(ステップS1913:No)、投機実行が失敗したことになり、通信装置101#0は、対象プロセスに関する別の領域に保存して実行中のデータを破棄する(ステップS1917)。また、通信装置101#0は、保存していた実行状態に復帰し(ステップS1918)、対象プロセスの処理を再開し、ステップS1901の処理に移行する。
 図19Cは、分散処理にて接続が遮断されている状態についてのフローチャートを示している。接続が継続されていない場合(ステップS1902:No)、通信装置101#0は、分散処理の終了要求を検出したかを判断する(ステップS1920)。終了要求を検出した場合(ステップS1920:Yes)、通信装置101#0は、分散処理を終了する。終了要求を検出していない場合(ステップS1920:No)、通信装置101#0は、再接続されたかを判断する(ステップS1921)。再接続されていない場合(ステップS1921:No)、通信装置101#0は、メモリアクセスの発生を検出したかを判断する(ステップS1922)。
 メモリアクセスの発生を検出していない場合(ステップS1922:No)、通信装置101#0は、ステップS1920の処理に移行する。メモリアクセスの発生を検出した場合(ステップS1922:Yes)、通信装置101#0は、アクセスの種類を判断する(ステップS1923)。アクセスの種類が自装置上のプロセス固有のデータへのリードアクセスである場合(ステップS1923:(1))、通信装置101#0は、自装置のメモリを読み込み(ステップS1924)、ステップS1920の処理に移行する。
 アクセスの種類が自装置上のプロセス固有のデータへのライトアクセスである場合(ステップS1923:(2))、通信装置101#0は、書き込み後、ライトアクセスをI/Oログ1401#0に記録する(ステップS1925)。記録後、通信装置101#0は、ステップS1920の処理に移行する。
 アクセスの種類が他装置上のプロセス固有のデータへのリードアクセスである場合(ステップS1923:(3))、通信装置101#0は、他に実行可能なプロセスが存在するかを判断する(ステップS1926)。他に実行可能なプロセスが存在する場合(ステップS1926:Yes)、通信装置101#0は、実行可能なプロセスにスイッチし(ステップS1927)、ステップS1920の処理に移行する。
 図19Dは、分散処理にて接続が遮断された後、再接続された状態についてのフローチャートを示している。他に実行可能なプロセスが存在しない場合(ステップS1926:No)、通信装置101#0は、再接続を実行する(ステップS1928)。具体的には、通信装置101#0は、一定時間後に再接続を実行してもよいし、利用者からの要求によって再接続を実行してもよい。
 再接続を実行後、通信装置101#0はOS203#0によって低電力モードに移行し(ステップS1929)、再接続待ち状態に遷移する。状態遷移後、通信装置101#0は、再接続されたか否かを判断する(ステップS1930)。再接続されていない場合(ステップS1930:No)、通信装置101#0は、一定時間後にステップS1930の処理を実行する。再接続した場合(ステップS1930:Yes)、通信装置101#0は、低電力モードを解除し、通常モードへ移行する(ステップS1931)。
 通常モードへ移行後、または再接続された場合(ステップS1921:Yes)、通信装置101#0は、I/Oログ1401#0が存在するかを判断する(ステップS1932)。なお、I/Oログ1401#0は、ステップS1925の処理が実行されることで生成される。I/Oログ1401#0が存在する場合(ステップS1932:Yes)、通信装置101#0は、I/Oログ1401#0を通信装置101#1に送信する(ステップS1933)。具体的には、通信装置101#0は図8にて示したイベントID“7”とI/Oログ1401#0を送信し、通信装置101#1はイベントID“7”の受信により、I/Oログの受信があったことを認識する。
 I/Oログ1401#0の送信後、またはI/Oログ1401#0が存在しない場合(ステップS1932:No)、通信装置101#0は、接続先の通信装置101#1からI/Oログ1401#1を読み込み、コヒーレンシを実行する(ステップS1934)。具体的には、通信装置101#0は、イベントID“7”の受信により、I/Oログの受信を認識し、I/Oログ1401#1の値を、データ202#1_0の対応する箇所へ更新することで、データ202#1_0のコヒーレンシを実行する。コヒーレンシの実行後、通信装置101#0は、対象プロセスの処理を再開し(ステップS1935)、ステップS1901の処理に移行する。
 以上説明したように、実施の形態2にかかる通信装置、通信方法、および通信プログラムによれば、実施の形態1の通信装置からさらに、プロセスによる自装置のメモリへの書き込み結果を他装置に送信し、他装置にコヒーレンシを実行させる。これにより、複数の通信装置のメモリ内容が整合性の取れた状態を維持することができる。
 また、実施の形態2にかかる通信装置は、通信状態が遮断された状態から接続された状態に遷移した場合、遮断された状態の間に行われたプロセスによる自装置のメモリへの書き込み結果を他装置に送信し、他装置にコヒーレンシを実行させる。これにより、通信装置は、通信が一旦遮断した際にも、接続先の端末が生成するデータへのアクセスを行うまで処理を継続することが可能となるため、通信装置のスループット低下を避けることが可能となる。また、通信装置は、共有データへのI/Oログを取るために、再接続時に処理をその時点から再開することが可能となるため、実行時の性能をより保証することが可能となる。
 また、実施の形態2にかかる通信装置は、プロセスから他装置のメモリへの読み込む要求が発行された場合、他装置にメモリの値を要求しつつ、既に自装置に書き込んであったメモリの値を参照してプロセスを続行してもよい。これにより、通信装置は、既に自装置に書き込んであった値を利用して投機実行を行うことができる。投機実行が成功することにより、他装置からのメモリの値の受信を待つことなくプロセスを実行することができ、処理を高速化することができる。
 また、実施の形態2にかかる通信装置は、他装置からコヒーレンシの実行要求を受信した場合、他装置のメモリの読み込み結果として自装置のメモリに書き込んでもよい。これにより、通信装置は、既に自装置に書き込まれた他装置のメモリの読み込み結果について整合性が取れた状態を維持することができる。したがって、投機実行が成功する可能性が大きい。
 また、実施の形態2にかかる通信装置は、通信状態が遮断された後、他装置のメモリを読み込む場合にプロセスを停止し、通信状態が再接続された場合、プロセスの停止を解除してもよい。これにより、通信装置は、通信状態の遮断中に要求される処理能力が低下するため、クロック周波数の低下などを行うことで省電力効果を得ることができる。
 なお、本実施の形態1、実施の形態2で説明した通信方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーションなどのコンピュータで実行することにより実現することができる。本通信プログラムは、ハードディスク、フレキシブルディスク、CD-ROM、MO、DVDなどのコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また本通信プログラムは、インターネットなどのネットワークを介して配布してもよい。
 101#0、101#1 通信装置
 102#0、102#1 CPU
 109#0、109#1 I/F
 111#0、111#1 バス
 201#0、201#1 MEM
 301 検出部
 302 判断部
 303 制御部
 304 アクセス部
 305 通信部
 306 通信部
 307 アクセス部
 308 停止部
 1301 検出部
 1302 判断部
 1303 制御部
 1304 アクセス部
 1305 通信部
 1306 通信部
 1307 アクセス部
 1308 実行部

Claims (9)

  1.  自装置のメモリにアクセスするアクセス手段と、
     他装置と通信する通信手段と、
     前記自装置内から発生したアクセス要求を検出する検出手段と、
     前記検出手段によって検出されたアクセス要求におけるアクセス対象データのアドレスが前記自装置のメモリに割り当てられたアドレスであるか否かを判断する判断手段と、
     前記判断手段によって判断された判断結果に基づいて、前記アクセス手段により前記アクセス要求に基づいて前記自装置のメモリにアクセスする処理、または前記通信手段により前記アクセス要求に基づいて前記他装置と通信する処理、のうちいずれか一方の処理を選択して実行させる制御手段と、
     を備えることを特徴とする通信装置。
  2.  プロセスを実行する実行手段をさらに備え、
     前記検出手段は、
     前記アクセス手段により前記アクセス要求として前記実行手段から発生した書き込み要求に応じる前記自装置のメモリへの書き込み結果を検出し、
     前記制御手段は、
     前記検出手段によって前記自装置のメモリへの書き込み結果が検出された場合、前記通信手段により前記書き込み結果に基づくコヒーレンシの実行要求を前記他装置に送信させることを特徴とする請求項1に記載の通信装置。
  3.  前記検出手段は、
     前記自装置と前記他装置との通信状態を検出し、
     前記制御手段は、
     前記検出手段により前記通信状態が遮断された状態から接続された状態に遷移したことが検出された場合、前記遮断された状態の間に前記アクセス手段によって前記自装置のメモリへの書き込み結果に基づくコヒーレンシの実行要求を前記通信手段により前記他装置に送信させることを特徴とする請求項2に記載の通信装置。
  4.  プロセスを実行する実行手段をさらに備え、
     前記制御手段は、
     前記アクセス要求として前記実行手段から発生した読み込み要求が前記判断手段によって前記自装置のメモリに割り当てられたアドレスでないと判断された場合、前記通信手段によって前記読み込み要求に基づいて前記他装置と通信し、
     前記アクセス手段は、
     前記通信手段によって前記読み込み要求に対応する読み込み結果を前記自装置のメモリに書き込み、
     前記実行手段は、
     前記アクセス手段によって書き込まれた前記読み込み結果を用いて前記プロセスを実行することを特徴とする請求項1に記載の通信装置。
  5.  前記実行手段は、
     前記自装置のメモリに割り当てられたアドレスでないと判断された読み込み要求を新たに発行する場合、前記アクセス手段によって新たに発行された読み込み要求に対する新たな読み込み結果が書き込まれるまでの間、前記自装置のメモリに書き込まれた読み込み結果を用いて前記プロセスを実行することを特徴とする請求項4に記載の通信装置。
  6.  前記制御手段は、
     前記通信手段により前記他装置からコヒーレンシの実行要求を受信した場合、前記アクセス手段により前記読み込み結果として前記自装置のメモリに書き込ませることを特徴とする請求項5に記載の通信装置。
  7.  前記検出手段は、
     前記自装置と前記他装置との通信状態を検出し、
     前記制御手段は、
     前記検出手段により前記通信状態が遮断されたことが検出された後、前記アクセス要求が前記判断手段によって前記自装置のメモリに割り当てられたアドレスでないと判断された場合に前記実行手段を停止させ、前記検出手段により前記通信状態が接続されたことが検出された場合に前記実行手段の停止を解除させることを特徴とする請求項4に記載の通信装置。
  8.  自装置のメモリにアクセスするアクセス手段および前記他装置と通信する通信手段を制御可能な前記自装置のプロセッサが、
     前記自装置内から発生したアクセス要求を検出する検出工程と、
     前記検出工程によって検出されたアクセス要求におけるアクセス対象データのアドレスが前記自装置のメモリに割り当てられたアドレスであるか否かを判断する判断工程と、
     前記判断工程によって判断された判断結果に基づいて、前記アクセス手段により前記アクセス要求に基づいて前記自装置のメモリにアクセスする処理、または前記通信手段により前記アクセス要求に基づいて前記他装置と通信する処理、のうちいずれか一方の処理を選択して実行させる制御工程と、
     を実行することを特徴とする通信方法。
  9.  第1の装置のメモリにアクセスするアクセス手段および前記第1の装置とは異なる第2の装置と通信する通信手段を制御可能な前記第1の装置のプロセッサに、
     前記第1の装置内から発生したアクセス要求を検出する検出工程と、
     前記検出工程によって検出されたアクセス要求におけるアクセス対象データのアドレスが前記第1の装置のメモリに割り当てられたアドレスであるか否かを判断する判断工程と、
     前記判断工程によって判断された判断結果に基づいて、前記アクセス手段により前記アクセス要求に基づいて前記第1の装置のメモリにアクセスする処理、または前記通信手段により前記アクセス要求に基づいて前記第2の装置と通信する処理、のうちいずれか一方の処理を選択して実行させる制御工程と、
     を実行させることを特徴とする通信プログラム。
PCT/JP2010/060687 2010-06-23 2010-06-23 通信装置、通信方法、および通信プログラム WO2011161787A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2012521220A JP5403160B2 (ja) 2010-06-23 2010-06-23 通信装置、通信方法、および通信プログラム
PCT/JP2010/060687 WO2011161787A1 (ja) 2010-06-23 2010-06-23 通信装置、通信方法、および通信プログラム
CN201080067646.1A CN102947817B (zh) 2010-06-23 2010-06-23 通信装置、通信方法以及通信程序
US13/724,949 US9565049B2 (en) 2010-06-23 2012-12-21 Communication apparatus, communication method, and computer product for sharing data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2010/060687 WO2011161787A1 (ja) 2010-06-23 2010-06-23 通信装置、通信方法、および通信プログラム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/724,949 Continuation US9565049B2 (en) 2010-06-23 2012-12-21 Communication apparatus, communication method, and computer product for sharing data

Publications (1)

Publication Number Publication Date
WO2011161787A1 true WO2011161787A1 (ja) 2011-12-29

Family

ID=45371000

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/060687 WO2011161787A1 (ja) 2010-06-23 2010-06-23 通信装置、通信方法、および通信プログラム

Country Status (4)

Country Link
US (1) US9565049B2 (ja)
JP (1) JP5403160B2 (ja)
CN (1) CN102947817B (ja)
WO (1) WO2011161787A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015148890A (ja) * 2014-02-05 2015-08-20 富士通株式会社 情報処理装置、情報処理システム、および情報処理システムの制御方法
JP2016513316A (ja) * 2013-02-06 2016-05-12 華為技術有限公司Huawei Technologies Co.,Ltd. データアクセスシステム、メモリ共有装置及びデータ読み取り方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022148552A (ja) * 2021-03-24 2022-10-06 本田技研工業株式会社 プログラム、情報処理方法、及びシステム
US20230096435A1 (en) * 2021-09-30 2023-03-30 Cisco Technology, Inc. Proactive indication of network session disruption

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10214259A (ja) * 1997-01-29 1998-08-11 Hitachi Ltd 並列計算機
JPH1166022A (ja) * 1997-08-12 1999-03-09 Hitachi Ltd クラスタシステム
JPH11203184A (ja) * 1998-01-09 1999-07-30 Nec Corp Nms2重化システムにおけるデータベース自動整合方法
JP2001167077A (ja) * 1999-12-09 2001-06-22 Nec Kofu Ltd ネットワークシステムにおけるデータアクセス方法、ネットワークシステムおよび記録媒体

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0877122A (ja) * 1994-08-31 1996-03-22 Fujitsu Ltd データ整合時間削減方法
JP3544476B2 (ja) * 1998-09-11 2004-07-21 富士通株式会社 メモリ管理テーブル作成方法
JP4326061B2 (ja) * 1999-04-01 2009-09-02 三菱電機株式会社 メモリ管理方法及びコンピュータ
JP2001167007A (ja) 1999-12-06 2001-06-22 Victor Co Of Japan Ltd ファイル送出方法
JP3949873B2 (ja) 2000-05-15 2007-07-25 株式会社東芝 分散制御システム
SG101985A1 (en) * 2000-07-12 2004-02-27 Distribution Systems Res Inst Integrated information communication system
JP2003330905A (ja) * 2002-05-14 2003-11-21 Nec Corp コンピュータシステム
KR100427551B1 (ko) * 2002-05-14 2004-04-28 에스케이 텔레콤주식회사 공중 무선랜과 셀룰러망 간의 로밍 방법
JP2004260274A (ja) 2003-02-24 2004-09-16 Nec Corp 携帯端末データメモリ共有システム及び携帯端末データメモリ共有機能を実現させるためのプログラム
JP3819368B2 (ja) * 2003-02-24 2006-09-06 株式会社東芝 通信制御装置、通信制御方法、通信制御付サーバ装置、通信制御付サーバ装置による通信制御方法及び通信制御プログラム
JP3897028B2 (ja) * 2004-03-19 2007-03-22 日本電気株式会社 情報処理システム、共有データ処理方法、共有データ処理プログラム
JP4339184B2 (ja) * 2004-06-07 2009-10-07 パナソニック株式会社 サーバ装置、通信機器、通信システム、通信方法、プログラム及び記録媒体
JP2007179255A (ja) * 2005-12-27 2007-07-12 Toshiba Corp 通信装置および通信制御方法
JP4878185B2 (ja) * 2006-03-17 2012-02-15 株式会社リコー データ通信回路および調停方法
WO2008001671A1 (fr) 2006-06-27 2008-01-03 Nec Corporation Système multiprocesseur et terminal portable l'utilisant
JP4840043B2 (ja) * 2006-09-21 2011-12-21 ソニー株式会社 無線通信システムおよび無線通信装置
JP4219950B2 (ja) * 2006-10-16 2009-02-04 シャープ株式会社 通信機器、通信方法、通信回路、携帯電話機、プログラム、およびプログラムを記録したコンピュータ読み取り可能な記録媒体
JP2008250572A (ja) 2007-03-29 2008-10-16 Kyocera Corp 通信端末装置、および通信端末装置間のデータ共有方法、ならびにデータ共有システム
CA2689479A1 (en) * 2007-06-04 2008-12-11 Bce Inc. Methods and systems for validating online transactions using location information
JP2008305201A (ja) 2007-06-07 2008-12-18 Nippon Telegr & Teleph Corp <Ntt> ノード間データ転送制御装置およびメモリ構成変更方法ならびにプログラム
US9146542B2 (en) * 2009-03-05 2015-09-29 Raja Singh Tuli Method for managing web access from a small footprint portable device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10214259A (ja) * 1997-01-29 1998-08-11 Hitachi Ltd 並列計算機
JPH1166022A (ja) * 1997-08-12 1999-03-09 Hitachi Ltd クラスタシステム
JPH11203184A (ja) * 1998-01-09 1999-07-30 Nec Corp Nms2重化システムにおけるデータベース自動整合方法
JP2001167077A (ja) * 1999-12-09 2001-06-22 Nec Kofu Ltd ネットワークシステムにおけるデータアクセス方法、ネットワークシステムおよび記録媒体

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016513316A (ja) * 2013-02-06 2016-05-12 華為技術有限公司Huawei Technologies Co.,Ltd. データアクセスシステム、メモリ共有装置及びデータ読み取り方法
US9594682B2 (en) 2013-02-06 2017-03-14 Huawei Technologies Co., Ltd. Data access system, memory sharing device, and data reading method
JP2015148890A (ja) * 2014-02-05 2015-08-20 富士通株式会社 情報処理装置、情報処理システム、および情報処理システムの制御方法

Also Published As

Publication number Publication date
JP5403160B2 (ja) 2014-01-29
CN102947817A (zh) 2013-02-27
US9565049B2 (en) 2017-02-07
JPWO2011161787A1 (ja) 2013-08-19
CN102947817B (zh) 2016-03-02
US20130117347A1 (en) 2013-05-09

Similar Documents

Publication Publication Date Title
US9390012B2 (en) Multi-core processor system, cache coherency control method, and computer product
JP5724477B2 (ja) 移行プログラム、情報処理装置、移行方法、及び情報処理システム
JP4843013B2 (ja) Vmmシステムにおけるユーザosがサービスosによって使用されている装置の電源を切らないようにするためのシステム及び方法
JP5403160B2 (ja) 通信装置、通信方法、および通信プログラム
JP2010079729A (ja) 情報処理システム及びその制御方法、並びに、コンピュータプログラム
JP2007018455A (ja) データマイグレーション方法又はデータマイグレーションシステム
JP5561334B2 (ja) データ転送装置
TW472193B (en) Method and apparatus for transferring data over a processor interface bus
JP2009217721A (ja) マルチプロセッサシステムにおけるデータ同期方法及びマルチプロセッサシステム
JP3404322B2 (ja) 割込処理方法、os支援システム、情報処理装置、記録媒体
JP2011013775A (ja) 情報処理装置、情報処理装置の制御方法及びプログラム
WO2013008326A1 (ja) ソフトウェア検証方法、およびソフトウェア検証システム
JP5780296B2 (ja) スレッド処理方法、およびスレッド処理システム
JP2013015990A (ja) 情報処理システム、情報処理プログラム、情報処理方法
JP2012116138A (ja) 制御装置、制御プログラム、画像形成装置
JPWO2012101759A1 (ja) プロセッサ処理方法、およびプロセッサシステム
JP2011013836A (ja) メモリ配置管理装置及びマイクロプロセッサ
CN111427816A (zh) 一种amp系统核间通讯方法、计算机设备及存储介质
JP2008165318A (ja) 計算機システム
JP2007264976A (ja) コンピュータシステム、データ退避方法、及び、プログラム
JP5614483B2 (ja) マルチコアプロセッサシステム、キャッシュコヒーレンシ制御方法、およびキャッシュコヒーレンシ制御プログラム
JP2009157880A (ja) サーバ装置及びファイルシステム
JP2016508650A (ja) リフレクティブメモリとのコヒーレンシの実施
JP5705185B2 (ja) 通信装置及びその制御方法、並びに、コンピュータプログラム
JP4030951B2 (ja) データ二重化装置及び方法

Legal Events

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

Ref document number: 201080067646.1

Country of ref document: CN

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

Ref document number: 10853647

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012521220

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: 10853647

Country of ref document: EP

Kind code of ref document: A1