CN104978174A - Method and system for switching network cards in plurality of operating systems - Google Patents

Method and system for switching network cards in plurality of operating systems Download PDF

Info

Publication number
CN104978174A
CN104978174A CN201410137125.9A CN201410137125A CN104978174A CN 104978174 A CN104978174 A CN 104978174A CN 201410137125 A CN201410137125 A CN 201410137125A CN 104978174 A CN104978174 A CN 104978174A
Authority
CN
China
Prior art keywords
network interface
interface card
card
microsoft loopback
loopback adapter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410137125.9A
Other languages
Chinese (zh)
Other versions
CN104978174B (en
Inventor
陆钢
邬小龙
高云伟
詹剑锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Institute of Computing Technology of CAS
Original Assignee
Huawei Technologies Co Ltd
Institute of Computing Technology of CAS
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 Huawei Technologies Co Ltd, Institute of Computing Technology of CAS filed Critical Huawei Technologies Co Ltd
Priority to CN201410137125.9A priority Critical patent/CN104978174B/en
Publication of CN104978174A publication Critical patent/CN104978174A/en
Application granted granted Critical
Publication of CN104978174B publication Critical patent/CN104978174B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a method and a system for switching between a target network card and a source network card in a plurality of operating systems. The method comprises the following steps that: a double-mode network card drive in a load operating system in the plurality of operating systems initializes the target network card according to a network card switching signal sent by a management operating system in the plurality of operating systems, so that the target network card can use a sharing buffer region occupied by the source network card; and after the target network card initialization is completed, the double-mode network card drive stops a source network card drive according to the received network card switching signal and starts the target network card drive. The system comprises the double-mode network card drive and the sharing buffer region, wherein the double-mode network card drive is used for initializing the target network card according to the network card switching signal sent by the management operating system in the plurality of operating systems to enable the target network card to use the sharing buffer region currently occupied by the source network card, and after the initialization is completed, stopping the source network card drive according to the received network card switching signal, and starting the target network card drive; and the sharing buffer region is used for buffering data transmitted by the target network card and the source network card. The method and the system provided by the embodiment of the invention have the advantage that the stable and efficient switching from the source network card to the target network card in the plurality of operating systems can be effectively realized.

Description

Changing method in multiple operating system between network interface card and system
Technical field
Embodiments of the invention relate to computer operating system field, particularly relate to the changing method in a kind of multiple operating system between network interface card and system.
Background technology
Along with the computing power of hardware and the raising year by year of storage capacity, risen the hardware resource technology utilizing many kernels multiple operating system calling system in existing computer operating system field, this technology better can ensure operating system efficiency utilization hardware resource.This many kernels multiple operating system often appears at SMP(Symmetric Multi-Processing, symmetric multi-processors) and many core (Many Core) platform in.
In many kernels multiple operating system, by also outwards providing unified IP address to the binding of multiple physical network card, many physical network cards can be realized and share, improve handling capacity and network In-commission Rate.Meanwhile, for single operating kernel, can arrange physical network card and Microsoft Loopback Adapter therein, when losing efficacy for one, another adapter, improved the stability of information transmission simultaneously.
In order to realize such technique effect, the gordian technique of this design is exactly the switching at runtime that operating system needs to realize according to the different demands of operating system to data processing physical network card and Microsoft Loopback Adapter in single operating.
Prior art proposes the pattern being separated trawl performance: physical network card drives and Microsoft Loopback Adapter driving uses different data structures respectively, and global variable and transmitting-receiving function define different trawl performance and physical memory buffer zone.When operating system is received by the physical network card of its management or is sent data, data carry out data transmission by the direct memory access control register (Direct MemoryAccess is called for short " DMA register ") of physical memory buffer zone and physical network card under the control of physical network card driving; When operating system is received by the Microsoft Loopback Adapter of its management or sent data, data carry out data transmission by the direct memory access DMA register of virtual memory buffer zone and physical network card under the control of Microsoft Loopback Adapter driving front and back end.
At present, although this technical scheme can ensure the transmission of operating system data when physical network card pattern and Microsoft Loopback Adapter pattern, in the switching of physical network card and Microsoft Loopback Adapter, there is certain defect in prior art.First, in the handoff procedure of physical network card and Microsoft Loopback Adapter, trawl performance will re-establish the connection with target network interface card, and source network interface card connection before can be lost efficacy and cause loss of data.Secondly, the target network calorie requirement preheating after switching and extra resource distribution work, can cause the temporary interruption of information transmission.These two shortcomings of prior art directly can have influence on the speed and efficiency that network interface card switches, influence technique scheme realize effect.
Summary of the invention
The embodiment of embodiments of the invention provides changing method in a kind of multiple operating system between network interface card and system, effectively can realize the switching of source network interface card to object network interface card high-speed and high-efficiency.
An aspect of of the present present invention provides the changing method of source network interface card and target network interface card in a kind of multiple operating system, the method comprises: described target network card is carried out initialization by the network interface card switching signal that in described multiple operating system, the double mode trawl performance of load operation system sends according to MOS in described multiple operating system, the shared buffer enabling described target network interface card use described source network interface card to take; After described target network card initialization completes, described double mode trawl performance stops source trawl performance according to received network interface card switching signal and starts target trawl performance.
Invention further discloses, when the method is used for the switching between physical network card and Microsoft Loopback Adapter, described double mode trawl performance according in described multiple operating system MOS send network interface card switching signal by described target network card initialization, comprise: described double mode trawl performance is resolved described network interface card switching signal, determine the type of described source network interface card and the type of described target network interface card; When determining that the type of described source network interface card is physical network card and the type of described target network interface card is Microsoft Loopback Adapter, described double mode trawl performance, by described Microsoft Loopback Adapter initialization, enables described Microsoft Loopback Adapter use the current shared buffer taken of described physical network card; When determining that the type of described source network interface card is Microsoft Loopback Adapter and the type of described target network interface card is physical network card, described double mode trawl performance, by described physical network card initialization, enables described physical network card use the current shared buffer taken of described Microsoft Loopback Adapter.
Invention further discloses, described double mode trawl performance, by described Microsoft Loopback Adapter initialization, comprising: described double mode trawl performance sends to described MOS and creates Microsoft Loopback Adapter driving back end signal; After treating that Microsoft Loopback Adapter drives rear end to create, described double mode trawl performance drives the address information of transmission shared buffer, rear end to described Microsoft Loopback Adapter, enables described Microsoft Loopback Adapter drive rear end to call the shared buffer shared by physical network card according to described address information.
Invention further discloses, described double mode trawl performance is by described physical network card initialization, comprise: double mode trawl performance arranges the direct memory access controller of to be switched physical network card according to the address information of described shared buffer, enable the direct memory access controller of to be switched physical network card call shared buffer shared by Microsoft Loopback Adapter.
Invention further discloses, when the method is used for the switching between physical network card and Microsoft Loopback Adapter, described double mode trawl performance stops source trawl performance according to received network interface card switching signal and starts target trawl performance, comprise: when determining that the type of described source network interface card is physical network card and the type of described target network interface card is Microsoft Loopback Adapter, described double mode trawl performance is closed physics trawl performance and is also opened the operation that Microsoft Loopback Adapter drives front-end and back-end; When determining that the type of described source network interface card is Microsoft Loopback Adapter and the type of described target network interface card is physical network card, double mode trawl performance is closed Microsoft Loopback Adapter and is driven and open physical network card driving.
Another aspect provides a kind of switched system being applied to source network interface card and target network interface card in multiple operating system, this system comprises: double mode trawl performance, described target network card is carried out initialization by the network interface card switching signal for sending according to MOS in described multiple operating system, enable described target network interface card use the current shared buffer taken of described source network interface card, and after initialization completes, stop source trawl performance according to the network interface card switching signal of described reception and start target trawl performance; Shared buffer, for cushioning described target network interface card and described source data that network interface card transmits.
Invention further discloses, when this system is only applicable to the switching between physical network card and Microsoft Loopback Adapter, it is characterized in that, described double mode trawl performance, comprise: parsing module, for resolving described network interface card switching signal, determine the type information of described source network interface card and the type of described target network interface card.Initialization module, for: when described parsing module determines that the type of described source network interface card is physical network card and the type of described target network interface card is Microsoft Loopback Adapter, described Microsoft Loopback Adapter is carried out initialization, enables described Microsoft Loopback Adapter use the current shared buffer taken of described physical network card; When described parsing module determines that the type of described source network interface card is Microsoft Loopback Adapter and the type of described target network interface card is physical network card, by physical network card initialization, described physical network card is enable to use the current shared buffer taken of described Microsoft Loopback Adapter.
Invention further discloses, described initialization module, comprise: Microsoft Loopback Adapter initialization module, Microsoft Loopback Adapter for creating to described MOS drives the address information of transmission shared buffer, rear end, enables described Microsoft Loopback Adapter drive rear end to call the shared buffer shared by physical network card according to described address information; Physical network card initialization module, for arranging the direct memory access controller of to be switched physical network card according to the address information of described shared buffer, the direct memory access controller of to be switched physical network card is enable to call shared buffer shared by Microsoft Loopback Adapter.
Invention further discloses, also comprise in described double mode trawl performance: execution module, for: when described parsing module determines that the type of described source network interface card is physical network card and the type of described target network interface card is Microsoft Loopback Adapter and after described initialization module completes initialization, close physics trawl performance and also start Microsoft Loopback Adapter and drive front-end and back-end; When described parsing module determines that the type of described source network interface card is Microsoft Loopback Adapter and the type of described target network interface card is physical network card and after described initialization module completes initialization, close Microsoft Loopback Adapter and drive front-end and back-end also to open physical network card to drive.
Based on technique scheme, the changing method of source network interface card and target network interface card and system in the multiple operating system of the embodiment of the present invention, by to by network interface card switch perform before, described target network card is carried out initialization according to network interface card switching signal by double mode trawl performance, enable described target network interface card use the shared buffer of described source network interface card, thus effectively can realize the switching of source network interface card to object network interface card stability and high efficiency.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, be briefly described to the accompanying drawing used required in the embodiment of the present invention below, apparently, accompanying drawing described is below only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic block diagram be described typical many kernels multiple operating system.
Fig. 2 is the schematic block diagram of the switched system of source network interface card and target network interface card in the multiple operating system according to the embodiment of the present invention.
Fig. 3 be when the network interface card mutually switched be physical network card and Microsoft Loopback Adapter time, the schematic block diagram of double mode trawl performance.
Fig. 4 is parsing module and the initialization module schematic block diagram of initialization module in double mode trawl performance.
Fig. 5 is the execution module schematic block diagram of initialization module in double mode trawl performance.
Fig. 6 shows the indicative flowchart of the changing method of source network interface card and target network interface card in the multiple operating system according to the embodiment of the present invention.
Fig. 7 shows double mode trawl performance according to the indicative flowchart of network interface card switching signal by the method for target network card initialization.
Fig. 8 shows double mode trawl performance by the indicative flowchart of initialized for Microsoft Loopback Adapter method.
Fig. 9 shows double mode trawl performance by the indicative flowchart of initialized for physical network card method.
Figure 10 be when the network interface card mutually switched be physical network card and Microsoft Loopback Adapter time, double mode trawl performance stops source trawl performance according to received network interface card switching signal and starts the indicative flowchart of the method for target trawl performance.
Embodiment
In the description of this programme, some computer operating system fields can be related to, the particularly technical term in multiple operating system field and virtual field and technology, although these terms and technology are state of the art, but in order to instructions reader reading just, special at this, summary is done to wherein key concept.
First, the front-end and back-end that the Microsoft Loopback Adapter involved by embodiments of the invention drives are the technological concepts in virtual field.Its function of front end that Microsoft Loopback Adapter drives is the input and output of analog physical network interface card, and the front end that drives of Microsoft Loopback Adapter provides the service being similar to physical network card and driving for load operation system in an embodiment of the present invention.Microsoft Loopback Adapter drives its function of rear end to be process and the data of distributing Microsoft Loopback Adapter driving front end delivery, in the embodiment of embodiments of the invention, Microsoft Loopback Adapter drives rear end to be connected with the bridge of MOS, thus ensures that the data that front end is transmitted carry out input and output eventually through bridge.
Secondly, this multiple operating system involved by embodiments of the invention is often implemented in SMP(Symmetric Multi-Processing, symmetric multi-processors) and many core (Many Core) platform in.Under normal circumstances, this multiple operating system is by a MOS and at least one load operation System's composition.Below in conjunction with the schematic block diagram that Fig. 1 is described a typical multiple operating system.As shown in Figure 1, many kernels multiple operating system is by a MOS 100, and load operation system 200, physical buffer district module 300 and physical network card module 400 are formed.
MOS 100 is general-purpose operating systems of the functions such as distribution to managed software and hardware device resource, recovery, virtual and coordination.In the process run, it is the operating system that first starts on system hardware.
Load operation system 200 is the lightweight operating system based on the customization that MOS 100 creates.Load operation system function in example of the present invention sends supervisory control signals according to MOS manage physical buffer district module 300 and physical network card module 400 and control.In many kernels platform of multiple operating systems, load operation system generally has one at least.In this example, load operation system has N number of.
The buffering of physical buffer district module 300 pairs of network interface card transmission data.This module upwards connects the downward connection network card module 400 of load operation system 200 trawl performance.
Interface module 400 is depicted as the set of the network interface card that many kernels multiple operating system manages.In example of the present invention, interface module can be multiple physical network card set, also can be the set of multiple Microsoft Loopback Adapter and physical network card.
Should note, switching between switching between Microsoft Loopback Adapter and physical network card compared with physical network card is more complicated, those skilled in the art, after the switching that understanding of Microsoft Loopback Adapter and physical network card, under the prerequisite not making creative work, can obtain the method and system switched between physical network card equally.Therefore, in example of the present invention, the system and method switched between physical network card and Microsoft Loopback Adapter will be introduced.
Should be understood that many kernels multiple operating system is that this system can according to the quantity of the network interface card that works in the flexible in size adjustment interface module 400 of web database technology and pattern in the advantage of network data.When pending web database technology exceedes the processing power of work at present network interface card, load operation system can be called more idle physical network card and carry out high performance Internet Transmission and process; When pending web database technology is less than the processing power of work network interface card, in order to save system resource, load operation system release physical network interface card and transmit data by the mode of Microsoft Loopback Adapter.
In order to meet the above demand, for single load operation system, carry out the ability of network interface card switching with just must possessing high-speed and high-efficiency.But as background technology introduction, present technical scheme, owing to there is network interface card Preheating to be called and data loss problem, causes that current scheme switch speed is slow and switching efficiency is low.Embodiments of the invention scheme proposes based on such technical background and current demand just.
It is more than the introduction to trawl performance front and back end and these two key concepts of many kernels multiple operating system, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is a part of embodiment of the present invention, instead of whole embodiment.In this example, only exemplifying management operations system management control first load operation system carries out the system and method for network interface card switching, and should understand MOS other load operation systems of control and management can carry out similar network interface card switching in a similar fashion.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under the prerequisite not making creative work, all should belong to the scope of protection of the invention.
Fig. 2 shows the schematic block diagram of the switched system of source network interface card and target network interface card in the multiple operating system according to the embodiment of the present invention, and this system comprises:
MOS 100, this system comprises a MOS resource management module 110;
MOS resource management module 110, this module is connected with the resource management module of load operation system, for receiving and send the signal between MOS 100 and load operation system 200.In this accompanying drawing, illustrate the connection status of MOS resource management module 100 and the first load operation system resource management module 212;
First load operation system 210, this system contains load operation system resource management module 212 and double mode trawl performance 211;
Load operation system resource management module 212, this module is connected with double mode trawl performance 211 with MOS resource management module 110 respectively, for receiving and send this their input and output signal;
Double mode trawl performance 210, carries out initialization for the network interface card switching signal sent according to MOS by the target network interface card 420 in figure, target network interface card 420 can be used shared buffer 120 that in figure, source network interface card is current.And after initialization completes, stop source trawl performance and start target trawl performance;
Physical buffer district module 300, this module comprises multiple shared buffer, for the buffering transmitting data between load operation system and network interface card.In this accompanying drawing, illustrate the first load operation system 210 the shared buffer 120 distributing and manage;
Shared buffer 120, for target network interface card 420 and source network interface card 410 transmit data and cushion.It should be noted that this shared buffer 120, be not simultaneously to target network interface card 420 and source network interface card 410 transmit data and cushion.Specifically, before the initialization of double mode trawl performance 110 starts, shared buffer 120 is connected with source network interface card 410, to source network interface card 410 transmit data and cushion; After this initialization completes, shared buffer 120 is still connected with source network interface card 410, to source network interface card 410 transmit data and cushion.Target network interface card 420 only sets up initialized connection with shared buffer 120 after initialization completes, and does not perform read-write to shared buffer 120; After initialization completes and double mode trawl performance 211 stops source trawl performance and after starting target trawl performance, source network interface card 410 stops reading and writing target network interface card 420 simultaneously to shared buffer 120 and opens and read and write shared buffer 120.
Be more than the introduction to comprising modules function each in Fig. 1 and annexation, below in conjunction with the handoff procedure of source network interface card 410 to target network interface card 420, double mode trawl performance 211 and shared buffer 120 be described in further detail.
Should be understood that double mode trawl performance 211 does not carry out the switching of source network interface card 410 to target network interface card 420 immediately after receiving network interface card switching signal, but while guarantee source network interface card 410 works on, initialization is carried out to target network interface card 420.Such one side is used for ensureing that target network interface card 420 carries out necessary preheating before activation, be used on the other hand configuring target network interface card 420 parameter, ensure that target network interface card 420 directly can use the physical memory buffer zone of source network interface card 410 correspondence upon actuation, the shared buffer 120 namely shown in embodiments of the invention.After this initialization (i.e. the preheating of target network interface card and target network interface card parameter configuration) completes, double mode trawl performance 211 just can open the operation of target network interface card 420 immediately while cutting off source network interface card 410.Visible, the design of this double mode trawl performance 211 and shared buffer 120 effectively can ensure the initialization procedure that source network interface card is necessary before the switching of target network interface card, thus improves the speed and efficiency that switch between network interface card.
Will also be understood that, shared buffer 120 is one section of physical memory buffer zone that multiple operating system manages, this section of buffer zone before the handover after can be called respectively by source network interface card 410 and target network interface card 420, make double mode trawl performance 211 can read same section of internal storage data before the handover afterwards, with make transmission data not because network interface card switch and lose.Reach described functional effect, the mode of same global variable can be used afterwards realize before the handover by double mode trawl performance 211.Such as, when shared buffer reception and send data structure adopt two annular chain meter forms, so, double mode trawl performance 211 needs all to use following 8 global variables before the handover:
static unit8_t rx_buf[RX_BUF_SIZE+1500];
static unit8_t tx_buf[4][TX_BUF_SIZE]_attribute_((aligned(4)));
static unit32_t_cur_tx;
static unit32_t_cur_rx;
static unit32_t tx_start;
static unit32_t tx_end;
static unit32_t rx_start;
static unit32_t rx_end。
Wherein, static unit8_t rx_buf [RX_BUF_SIZE+1500] and static unit8_ttx_buf [4] [TX_BUF_SIZE] _ attribute_ ((aligned (4))) is for representing reception buffer zone respectively and sending the actual physical address of buffer zone in shared buffer 120.Static unit32_t_cur_tx and static unit32_t_cur_rx is the pointer pointing to the current read position receiving and send circle queue, the dynamic mobile along with digital independent, for representing the position that reception buffer zone and transmission buffer data read.Static unit32_t tx_start, static unit32_t tx_end, static unit32_t rx_start and staticunit32_t rx_end represent the start address and the end address that receive and send buffer zone respectively.Above 8 global variables can indicate the data structure of shared buffer 120 under annular chain meter form.In network interface card switches, these 8 global variables are passed to target trawl performance from source trawl performance, target trawl performance just can utilize the realization of these variablees to the addressing of source network interface card physical memory and call.Should understand, the implementation of shared buffer data structure has multiple, also have multiple to the definition mode of the start address of data, end address and current location, ensure that double mode trawl performance 211 uses identical global variable to be described shared buffer data structure in the implementation.
In the embodiment depicted in figure 2, target network interface card and source network interface card can be respectively physical network card or Microsoft Loopback Adapter, also can be physical network card or be Microsoft Loopback Adapter.In real world applications, the many demands of the scene that physical network card and Microsoft Loopback Adapter switch mutually are large, therefore, below by when target network interface card and source network interface card are respectively physical network card or Microsoft Loopback Adapter, the composition of double mode trawl performance 211 and connected mode are further detailed.
As shown in Figure 3, when the network interface card mutually switched be physical network card and Microsoft Loopback Adapter time, double mode trawl performance 211 comprises:
Parsing module 2111, for resolving the network interface card switching signal received, determines the type information of source network interface card and the type of target network interface card.
Initialization module 2112, for:
When described parsing module 2111 determines that the type of described source network interface card is physical network card 401 and the type of described target network interface card is Microsoft Loopback Adapter 402, Microsoft Loopback Adapter 402 is carried out initialization;
When described parsing module 2111 determines that the type of described source network interface card is Microsoft Loopback Adapter 402 and the type of described target network interface card is physical network card 401, by physical network card 401 initialization.
Should understand, parsing module 2111 receives the network interface card switching signal from load operation system resource management module 212, and judged by the logical function of parsing module: if handover information is physical network card 401 switch to Microsoft Loopback Adapter 402, then this module sends to initialization module 2112 and carries out initialized signal to Microsoft Loopback Adapter 402; If switching signal is Microsoft Loopback Adapter 402 switch to physical network card 401, then this module sends to initialization module 2112 and carries out initialized signal to physical network card 401.Should also be understood that parsing module 2111 can receive the switching signal coming from load operation system resource management module 212 and send, also can receive the switching signal coming from MOS resource management module 110 and send.
Citing, the method that the resource management module 110 of MOS sends switching signal to load operation system can pass through existing IPI (Intelligent Peripheral Interface, be called for short " IPI ") realize, also can be completed by the communication strategy between other operating systems.After parsing module 2111 receives handover information, parsing module 2111 can by the judgement of Logic judgment function realization to handover information, as used the if(in C language) function, network interface card switch mode can adopt integer variable intmode to represent: int mode=1 represents the switching of Microsoft Loopback Adapter to physical network card; Int mode=0 represents the switching of physical network card to Microsoft Loopback Adapter.As if() the statement signal that judges to receive is when being int mode=1, then parsing module 2111 notifies the initialization of initialization module 2112 pairs of Microsoft Loopback Adapters 402; As if() the statement signal that judges to receive is when being int mode=0, then parsing module 2111 notifies the initialization of initialization module 2112 pairs of physical network cards 401.
Should also be understood that initialization module 2112, different with the transfer sequence of Microsoft Loopback Adapter 402 according to physical network card 401, realize the initialization of initialization to Microsoft Loopback Adapter 402 and physical network card 401 respectively.This initialized constituted mode has multiple, is described the implementation of example of the present invention below in conjunction with Fig. 3 and Fig. 4.
As shown in Figure 4, the initialization module 2112 in Fig. 3 comprises:
Microsoft Loopback Adapter initialization module 21121, drive rear end 130 to send the address information of shared buffer 120 for the Microsoft Loopback Adapter that creates to MOS 100, make described Microsoft Loopback Adapter drive rear end 130 can call shared buffer 120 shared by physical network card 401 according to described address information;
Physical network card initialization module 21122, for arranging the dma controller of to be switched physical network card 401 according to the address information of described shared buffer 120, the dma controller of to be switched physical network card 401 is enable to call shared buffer 120 shared by Microsoft Loopback Adapter 402.
Below in conjunction with Fig. 3 and Fig. 4, Microsoft Loopback Adapter initialization module 21121 working method and connected mode are described in detail.
First, to MOS resource management module 110, Microsoft Loopback Adapter initialization module 21121, inquires whether MOS 100 completes the building work that Microsoft Loopback Adapter drives rear end 130 by load operation system resource management module 212.The constructive process of virtual driving rear end 130 is: MOS 100 carries out physical network card 401 after Microsoft Loopback Adapter 402 switching in decision, arranges Microsoft Loopback Adapter therein and drives rear end 130, and make it be connected with the bridge 120 of MOS.
Secondly, drive rear end 130 to create if MOS resource management module 110 feeds back Microsoft Loopback Adapter to Microsoft Loopback Adapter initialization module 21121, Microsoft Loopback Adapter initialization module 21121 drives rear end 130 to send the address of shared buffer to Microsoft Loopback Adapter.It should be noted that the connected mode of Microsoft Loopback Adapter initialization module 21121 and Microsoft Loopback Adapter driving rear end 130 is: be connected by intercommunication mechanism between Microsoft Loopback Adapter initialization module 21121 with load operation system resource management module 212; MOS resource management module 110 and Microsoft Loopback Adapter are driven between rear end 130 and are also connected by intercommunication mechanism; MOS resource management module 110 and load operation system resource management module 212 can be realized by existing IPI technology.In a word, in example of the present invention, intermodule communication mode is all prior aries, does not remake detailed regulation and explanation in this example.
Finally, Microsoft Loopback Adapter drives rear end 130 after the address information receiving shared buffer 120, Microsoft Loopback Adapter 402 page table of shared buffer 120 will be mapped, so that can make processor directly call and read shared buffer 120 information shared by physical network card 401 by Microsoft Loopback Adapter driving rear end 130 upon actuation.
Citing, Microsoft Loopback Adapter initialization module 21121 drives rear end 130 to send the address of shared buffer to Microsoft Loopback Adapter, and different according to the data structure of shared buffer, the address variable transmitted is also different.。Such as, when shared buffer 120 reception and send data structure adopt two annular chain meter forms, so the address of shared buffer can represent with 8 global variables.Above, Fig. 2, to having carried out concrete introduction in the description of shared buffer 120, repeats no more these 8 global variables described herein.Microsoft Loopback Adapter drives rear end 130 after receiving these address informations, can pass through memory-mapped function as the CreateFileMapping function under Win32 environment, by mapping address information in the physical memory addresses of correspondence.Like this, Microsoft Loopback Adapter is after formal startup, and processor just directly can call and read the shared buffer information shared by physical network card by Microsoft Loopback Adapter driving rear end 130.
In a word, embodiments of the invention by setting up the rear end of Microsoft Loopback Adapter and the address mapping shared buffer makes Microsoft Loopback Adapter directly can read information in shared buffer upon actuation, thus ensure that the data of shared drive can not be lost to the switching of Microsoft Loopback Adapter because of physical network card.
After it should be noted that page table that Microsoft Loopback Adapter drives rear end 130 to map shared buffer 120 completes, the initialization module 220 in described double mode trawl performance 110 just finishes Microsoft Loopback Adapter initialization procedure.Should note, Microsoft Loopback Adapter drives rear end 130 only to map shared buffer page table and should not open the operation that Microsoft Loopback Adapter drives rear end 130, in order to avoid the Microsoft Loopback Adapter of MOS drives the physical network card 401 of rear end 130 and load operation system read shared buffer 120 and cause the confusion of shared buffer 120 internal data simultaneously.
Equally, below in conjunction with Fig. 3 and Fig. 4, physical network card initialization module 21122 working method and connected mode are described in detail.
First, physical network card initialization module 21122 inquires the configuration information of to be switched physical network card 401 to MOS resource management module 110, as the media access control address (MAC Address) of physical network card, and the configuration informations such as interface parameters.
Secondly, after the configuration information receiving physical network card 401, physical network card initialization module 21122 starts the physical network card initialization function matched with physical network card configuration information therein.Should note, drive from common physical network card that to start physical network card mode different, not to be operating system create according to configuration information this physical network card initialization function, but physical network card initialization module 21122 is in existing physical network card initialization function itself according to physical network card configuration information match selection.
Finally, this initialization function arranges the DMA register in physical network card, enables this register call shared buffer 120 shared by Microsoft Loopback Adapter 402.Specifically, in this step, physical network card initialization function drives front end to obtain the address, shared buffer 120 of transmitting data by Microsoft Loopback Adapter.This address is different and different according to the data structure of shared buffer 120, and such as, when the reception of shared buffer 120 and transmission data structure adopt two annular chain meter forms, so the address of shared buffer can represent with 8 global variables.Above, Fig. 2, to having carried out concrete introduction in the description of shared buffer 120, repeats no more these 8 global variables described herein.Physical network card initialization function is after receiving these address informations, and the register arranging dma controller points to the internal memory start address of shared buffer, arranges the running parameter of some other necessity afterwards again.Like this, physical card is after formal startup, and processor just directly can drive by physical network card the shared buffer information called and read shared by Microsoft Loopback Adapter.
In a word, embodiments of the invention select corresponding physical network card initialization function by physical network card initialization module 21122, and utilize this function to set up the direct call relation of physical network card and shared drive, make physical network card 401 directly can read information in shared buffer 120 upon actuation, ensure that the data of shared drive can not be lost to the switching of physical network card because of Microsoft Loopback Adapter.
After it should be noted that the DMA register of physical network card points to the physical address of the transmitting-receiving buffer zone that double mode network interface card uses, the initialization procedure of physical network card initialization module 21122 pairs of physical network cards is complete.Should note, the DMA register of physical network card points to the physical address of shared buffer 120, and should not open the operation of physical network card driving, in order to avoid the Microsoft Loopback Adapter 402 that this physical network card 401 and load operation system are being run reads shared buffer 120 and causes the confusion of shared buffer 120 internal data simultaneously.
Parsing module 210 and initialization module 220 complete to the parsing of switching signal and to the initialization of source network interface card and target network interface card after, while source network interface card works on, target network interface card has pointed to physical memory buffer zone corresponding to source network interface card.As realized the complete switching of source network interface card to target network interface card further, then needing after the initialization module 220 of double mode trawl performance is finished the work, stopping source trawl performance and starting target trawl performance.This double mode trawl performance stops source trawl performance and the mode starting target trawl performance has multiple, stops source trawl performance and the realization starting target trawl performance is described below in conjunction with Fig. 5 to double mode trawl performance 110.
As shown in Figure 5, double mode trawl performance 211 also comprises:
Execution module 2113, for:
When described parsing module 210 determines that the type of source network interface card 410 is physical network card 401 and the type of described target network interface card 420 is Microsoft Loopback Adapter 402 and after described initialization module 2112 completes initialization, close physics trawl performance and also start Microsoft Loopback Adapter and drive front-end and back-end 130;
When described parsing module 210 determines that the type of described source network interface card is Microsoft Loopback Adapter 402 and the type of described target network interface card is physical network card 401 and after described initialization module 110 completes initialization, close Microsoft Loopback Adapter and drive front-end and back-end 130 also to open physical network card to drive.
Should understand, parsing module 2111 is receiving after initialization that initialization module sends completes information, and the difference according to physical network card and Microsoft Loopback Adapter transfer sequence is called different execution functions to close source network interface card and to open target network interface card by execution module 2113.
Specifically, described execution module generally comprises control function and receives and sends out handling function composition.Control function can adopt mod function, and this function receives the shaping variable i nt mode coming from initialization module 2112 and send.When physical network card switches to Microsoft Loopback Adapter, mod function is after receiving shaping variable i nt mode, stop Microsoft Loopback Adapter reception and transmit operation function (as shared_memory_rx, shared_memory_rx) and call physical network card receive and transmit operation function (as pnet_rx, pnet_tx); When Microsoft Loopback Adapter switches to physical network card, mod function stops physical network card reception and transmit operation function (as pnet_rx, pnet_tx) and call Microsoft Loopback Adapter receive and transmit operation function (as shared_memory_rx, shared_memory_rx).Double mode network interface card execution module 2113 utilizes mod function to call handling function, controls the opening and closing of respective physical trawl performance and Microsoft Loopback Adapter driving.Should note, in Microsoft Loopback Adapter receives and transmit operation function control Microsoft Loopback Adapter drives, this function not only wants Microsoft Loopback Adapter in control load operating system to drive the opening and closing of front end, switching signal will be passed to the Microsoft Loopback Adapter driving rear end 130 that MOS controls by this function simultaneously, so that rear end is opened or closed himself handling function.After execution module 2113 opens and closes corresponding trawl performance, whole source network interface card is just finished to the handoff procedure of target network interface card.Wherein, when source network interface card and target network interface card are respectively physical network card 401 and Microsoft Loopback Adapter 402, after switching completes, physical network card 401 stops the read-write to shared buffer 120; Virtual net drives the read-write of front and back end unlatching to shared buffer 120.Otherwise when source network interface card and target network interface card are respectively Microsoft Loopback Adapter 402 and physical network card 401, after switching completes, virtual net front and back end stops the read-write to shared buffer 120; Physical network card opens the read-write to shared buffer 120.
Above composition graphs 2 to Fig. 5, describes the switched system of source network interface card and target network interface card multiple operating system from the angle of system, below in conjunction with Fig. 6 to Fig. 9, start with introduce the changing method of source network interface card and target network interface card multiple operating system from changing method.
Fig. 6 shows the indicative flowchart of the changing method of source network interface card and target network interface card in the multiple operating system according to the embodiment of the present invention, and the method comprises:
S610, target network interface card 420 is carried out initialization by the network interface card switching signal that in multiple operating system, the double mode trawl performance 211 of load operation system 200 sends according to MOS in multiple operating system 100, makes the shared buffer 120 that target network interface card 420 can use source network interface card 410 to take;
S620, after target network interface card 420 initialization completes, double mode trawl performance 211 stops source trawl performance according to received network interface card switching signal and starts target trawl performance.
In order to effectively improve the efficiency that target network interface card and source network interface card switch mutually, avoid network interface card institute loss of transmitted data in handoff procedure, the double mode trawl performance 211 of load operation system is after receiving switching signal, while maintenance source network interface card normally works, initialization is carried out to target network card, makes described target network interface card 420 can use the shared buffer 120 of described source network interface card 410.After target network interface card 420 initialization completes, double mode trawl performance 211 stops the work of source network interface card 410 again and opens target network interface card 420.This initialized process effectively can ensure that source network interface card 410 carries out necessary preheating before transmitting the data and prepares, and improves switching efficiency; Ensure that target network interface card and source network interface card use same shared buffer simultaneously, avoid the loss of network interface card transmission data in network interface card handoff procedure.
Should be understood that in embodiments of the present invention, target network interface card and source network interface card can be respectively physical network card or Microsoft Loopback Adapter, also can be physical network card or be Microsoft Loopback Adapter.
In S610, the initialized method of described target network interface card 420 has multiple by the network interface card switching signal that double mode trawl performance 211 sends according to MOS in described multiple operating system.In realizing further S610, the embodiment of the present invention is described when being respectively physical network card or Microsoft Loopback Adapter with target network interface card and Microsoft Loopback Adapter.Below in conjunction with Fig. 7, the process of double mode trawl performance 211 initialized target network interface card is described in detail.
Fig. 7 shows double mode trawl performance 211 according to the indicative flowchart of network interface card switching signal by the method for target network card initialization.As shown in Figure 7, the method comprises:
The double mode trawl performance of S710 211 pairs of network interface card switching signals are resolved, and determine the type of source network interface card and the type of target network interface card;
S720 is when determining that the type of source network interface card is physical network card and the type of target network interface card is Microsoft Loopback Adapter, and double mode trawl performance, by Microsoft Loopback Adapter 402 initialization, makes Microsoft Loopback Adapter 402 can use the current shared buffer 120 taken of physical network card 401;
S730 is when determining that the type of source network interface card is Microsoft Loopback Adapter and the type of target network interface card is physical network card, and double mode trawl performance, by physical network card 401 initialization, makes physical network card 401 can use the current shared buffer 120 taken of Microsoft Loopback Adapter 402.
Should be understood that in S710, described double mode trawl performance 211 receives the switching signal coming from MOS resource management module 110 and sent by IPI communication strategy.This switching signal is generally divided into two kinds: physical network card is to the switching of Microsoft Loopback Adapter and Microsoft Loopback Adapter to the switching of physical network card.Alternatively, described double mode trawl performance 211 receives the switching signal coming from MOS resource management module 110 and sent by operating system IPI communication strategy, also can receive the switching signal coming from load operation system resource management module 212 and send.After parsing module 2111 receives handover information, parsing module 2111 can by the judgement of Logic judgment function realization to handover information, as used the if(in C language) function, network interface card switch mode can adopt integer variable int mode to represent: int mode=1 represents the switching of Microsoft Loopback Adapter to physical network card, and int mode=0 represents the switching of physical network card to Microsoft Loopback Adapter.As if() the statement signal that judges to receive is when being int mode=1, then call the initialization module to Microsoft Loopback Adapter; As if() the statement signal that judges to receive is when being int mode=0, then call the initialization module to physical network card.
Should understand, in S720, when S710 determines that the type of described source network interface card is physical network card and the type of described target network interface card is Microsoft Loopback Adapter, double mode trawl performance, by the initialization of described Microsoft Loopback Adapter 402, enables described Microsoft Loopback Adapter use the current shared buffer taken of physical network card 402; In S730, when S710 determines that the type of described source network interface card is Microsoft Loopback Adapter and the type of target network interface card is physical network card, double mode trawl performance, by physical network card 402 initialization, makes physical network card 402 can use the current shared buffer taken of Microsoft Loopback Adapter 401.The initialization procedure of S720 and S730 to Microsoft Loopback Adapter 402 and physical network card 401 illustrates according to Fig. 8 and Fig. 9.
Fig. 8 shows, and in S720, double mode trawl performance 211 is by the indicative flowchart of initialized for Microsoft Loopback Adapter 402 method.As shown in Figure 8, the method comprises:
To MOS, the double mode trawl performance 211 of S721 confirms that Microsoft Loopback Adapter drives rear end 130 to create;
After S722 treats that Microsoft Loopback Adapter drives rear end 130 to create, double mode trawl performance drives rear end 130 to send the address information of shared buffer 120 to Microsoft Loopback Adapter, makes described Microsoft Loopback Adapter drive rear end 130 can call shared buffer 120 shared by physical network card 401 according to described address information.
Its detailed process is as follows, first, to MOS resource management module 110, Microsoft Loopback Adapter initialization module 21121, inquires whether confirmation MOS 100 completes the building work that Microsoft Loopback Adapter drives rear end 130 by load operation system resource management module 212.The constructive process of virtual driving rear end 130 is: MOS 100 carries out physical network card 401 after Microsoft Loopback Adapter 402 switching in decision, arranges Microsoft Loopback Adapter therein and drives rear end 130, and make it be connected with the bridge 120 of MOS.
Secondly, drive rear end 130 to create if MOS resource management module 110 feeds back Microsoft Loopback Adapter to Microsoft Loopback Adapter initialization module 21121, Microsoft Loopback Adapter initialization module 21121 drives rear end 130 to send the address of shared buffer 120 to Microsoft Loopback Adapter.
Finally, Microsoft Loopback Adapter drives rear end 130 after the address information receiving shared buffer 120, Microsoft Loopback Adapter 402 page table of shared buffer 120 will be mapped, so that can make processor directly call and read shared buffer 120 information shared by physical network card by Microsoft Loopback Adapter driving rear end 130 upon actuation.
Citing, Microsoft Loopback Adapter initialization module 21121 drives rear end 130 to send the address of shared buffer to Microsoft Loopback Adapter, and different according to the data structure of shared buffer, the address variable transmitted is also different.。Such as, when shared buffer reception and send data structure adopt two annular chain meter forms, so the address of shared buffer can represent with 8 global variables.Above, Fig. 2, to having carried out concrete introduction in the description of shared buffer 120, repeats no more these 8 global variables described herein.Microsoft Loopback Adapter drives rear end 130 after receiving these address informations, can pass through memory-mapped function as the CreateFileMapping function under Win32 environment, by mapping address information in the physical memory addresses of correspondence.Like this, Microsoft Loopback Adapter 402 is after formal startup, and processor just directly can call and read shared buffer 120 information shared by physical network card by Microsoft Loopback Adapter driving rear end 130.
In a word, embodiments of the invention by setting up the rear end of Microsoft Loopback Adapter and the address mapping shared buffer makes Microsoft Loopback Adapter directly can read information in shared buffer after the later stage starts, thus ensure that the data of shared drive can not be lost to the switching of Microsoft Loopback Adapter because of physical network card.
It should be noted that after driving rear end 130 to map by Microsoft Loopback Adapter shared buffer page table completing, double mode trawl performance just complete described by S720 and Fig. 8 to Microsoft Loopback Adapter initialization procedure.Should note, Microsoft Loopback Adapter drives rear end 130 only map shared buffer page table and should not open the operation of rear end network interface card, in order to avoid the Microsoft Loopback Adapter of MOS drives the physical network card of rear end 130 and load operation system read shared buffer 120 and cause the confusion of shared buffer 120 internal data simultaneously.
Fig. 9 shows, and in S730, double mode trawl performance 211 is by the indicative flowchart of initialized for physical network card 401 method.As shown in Figure 9, the method comprises:
The double mode trawl performance of S731 211 inquires the configuration information of to be switched physical network card 401 to MOS resource management module 110;
S732 is after the configuration information receiving physical network card 401, and double mode trawl performance 211 starts the physical network card initialization function matched with physical network card configuration information therein;
This initialization function of S733 arranges the DMA register in physical network card according to the address information of described shared buffer, enable this register call shared buffer 120 shared by Microsoft Loopback Adapter.
In a word, double mode trawl performance arranges the dma controller of to be switched physical network card according to the address information of described shared buffer, enables the direct memory access controller of to be switched physical network card call shared buffer shared by Microsoft Loopback Adapter.The initialization of double mode trawl performance to physical network card is just completed by above three steps.
Above three its detailed processes of step are as follows,
First, physical network card initialization module 21122 inquires the configuration information of to be switched physical network card 401 to MOS resource management module 110, as the media access control address (MAC Address) of physical network card, and the configuration informations such as interface parameters.
Secondly, after the configuration information receiving physical network card 401, physical network card initialization module 21122 starts the physical network card initialization function matched with physical network card configuration information therein.Should note, drive from common physical network card that to start physical network card mode different, not to be operating system create according to configuration information this physical network card initialization function, but physical network card initialization module 21122 is in existing physical network card initialization function itself according to physical network card configuration information match selection.
Finally, this initialization function arranges the register of the dma controller in physical network card 401, enables this register call shared buffer 120 shared by Microsoft Loopback Adapter 402.Specifically, in this step, physical network card initialization function drives front end to obtain the shared buffer regional address transmitting data by Microsoft Loopback Adapter.This address is different and different according to the data structure of shared buffer, and such as, when the reception of shared buffer and transmission data structure adopt two annular chain meter forms, so the address of shared buffer can represent with 8 global variables.Above, Fig. 2, to having carried out concrete introduction in the description of shared buffer 120, repeats no more these 8 global variables described herein.Physical network card initialization function is after receiving these address informations, and the register arranging dma controller points to the internal memory start address of shared buffer, arranges the running parameter of some other necessity afterwards again.Like this, physical card is after formal startup, and processor just directly can drive by physical network card shared buffer 120 information called and read shared by Microsoft Loopback Adapter.
In a word, embodiments of the invention select corresponding physical network card initialization function by physical network card initialization module 21122, and utilize this function to set up the direct call relation of physical network card and shared drive, make physical network card directly can read information in shared buffer upon actuation, ensure that the data of shared drive can not be lost to the switching of physical network card because of Microsoft Loopback Adapter.
After it should be noted that the DMA register of physical network card points to the physical address of the transmitting-receiving buffer zone that double mode network interface card uses, the initialization procedure of physical network card initialization module 21122 pairs of physical network cards 401 is complete.Should note, the DMA register of physical network card points to the physical address of shared buffer, and should not open the operation of physical network card driving, in order to avoid the Microsoft Loopback Adapter that this physical network card and load operation system are being run reads shared buffer 120 and causes the confusion of shared buffer 120 internal data simultaneously.
At double mode trawl performance according to network interface card switching signal by after after the completing of described target network card initialization, while the source network interface card of making works on, target network interface card has pointed to physical memory buffer zone corresponding to source network interface card.As realized the complete switching of source network interface card to target network interface card further, then needing after the initialization module of double mode trawl performance is finished the work, stopping source trawl performance and starting target trawl performance.
This double mode trawl performance stops source trawl performance and the method starting target trawl performance all can be carried out after the method described by above-mentioned Fig. 7, Fig. 8 or Fig. 9 completes, and this example stops source trawl performance to double mode trawl performance and the method starting target trawl performance is described in detail by being combined in Figure 10 that Fig. 7 basis is drawn.
As shown in Figure 10, when source network interface card and target network interface card be physical network card 401 or Microsoft Loopback Adapter 402 time, double mode trawl performance stops source trawl performance according to received network interface card switching signal and starts the method for target trawl performance, comprising:
S1010 is when determining that the type of source network interface card is physical network card 401 and the type of target network interface card is Microsoft Loopback Adapter 402, and double mode trawl performance is closed physics trawl performance and also opened the operation that Microsoft Loopback Adapter drives front-end and back-end 130;
S1020 is when determining that the type of source network interface card is Microsoft Loopback Adapter 402 and the type of target network interface card is physical network card 401, and double mode trawl performance is closed Microsoft Loopback Adapter and driven and open physical network card driving.
Should be understood that double mode trawl performance completes after Microsoft Loopback Adapter or physical network card initialization procedure, double mode trawl performance will perform stopping source trawl performance and opens the step of target trawl performance.
Specifically, performing stopping source trawl performance and opening in the process of target trawl performance.The execution module 2113 of double mode trawl performance performs calling its control function and reception number of sending a letter respectively.Control function can adopt mod function, and this function receives the shaping variable i nt mode coming from initialization module and send.When physical network card switches to Microsoft Loopback Adapter, mod function is after receiving shaping variable i nt mode, stop Microsoft Loopback Adapter reception and transmit operation function (as shared_memory_rx, shared_memory_rx) and call physical network card receive and transmit operation function (as pnet_rx, pnet_tx); When Microsoft Loopback Adapter switches to physical network card, mod function stops physical network card reception and transmit operation function (as pnet_rx, pnet_tx) and call Microsoft Loopback Adapter receive and transmit operation function (as shared_memory_rx, shared_memory_rx).Double mode network interface card execution module 2113 utilizes mod function to call handling function, controls the opening and closing of respective physical trawl performance and Microsoft Loopback Adapter driving.Should note, in Microsoft Loopback Adapter receives and transmit operation function control Microsoft Loopback Adapter drives, this function not only wants Microsoft Loopback Adapter in control load operating system to drive the opening and closing of front end, switching signal will be passed to the Microsoft Loopback Adapter driving rear end 130 that MOS controls by this function simultaneously, so that rear end is opened or closed himself handling function.
In a word, after execution module opens and closes corresponding trawl performance, whole source network interface card is just finished to the handoff procedure of target network interface card.Wherein, when source network interface card and target network interface card are respectively physical network card and Microsoft Loopback Adapter, after switching completes, physical network card stops the read-write to shared buffer; The read-write to shared buffer is opened in virtual net front and back end.Otherwise when source network interface card and target network interface card are respectively Microsoft Loopback Adapter and physical network card, after switching completes, virtual net front and back end stops the read-write to shared buffer; Physical network card opens the read-write to shared buffer.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the process flow diagram of the method for the embodiment of the present invention, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.Obviously, those skilled in the art can carry out various change and modification to the embodiment of the present invention and not depart from the spirit and scope of the embodiment of the present invention.Like this, if these amendments of the embodiment of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (9)

1. the changing method of source network interface card and target network interface card in multiple operating system, is characterized in that, comprising:
Described target network card is carried out initialization by the network interface card switching signal that in described multiple operating system, the double mode trawl performance of load operation system sends according to MOS in described multiple operating system, the shared buffer enabling described target network interface card use described source network interface card to take;
After described target network card initialization completes, described double mode trawl performance stops source trawl performance according to received network interface card switching signal and starts target trawl performance.
2. method according to claim 1, when the method is used for the switching between physical network card and Microsoft Loopback Adapter, it is characterized in that, described double mode trawl performance, comprising described target network card initialization according to the network interface card switching signal of MOS transmission in described multiple operating system:
Described double mode trawl performance is resolved described network interface card switching signal, determines the type of described source network interface card and the type of described target network interface card;
When determining that the type of described source network interface card is physical network card and the type of described target network interface card is Microsoft Loopback Adapter, described double mode trawl performance, by described Microsoft Loopback Adapter initialization, enables described Microsoft Loopback Adapter use the current shared buffer taken of described physical network card;
When determining that the type of described source network interface card is Microsoft Loopback Adapter and the type of described target network interface card is physical network card, described double mode trawl performance, by described physical network card initialization, enables described physical network card use the current shared buffer taken of described Microsoft Loopback Adapter.
3. method according to claim 2, is characterized in that, described double mode trawl performance, by described Microsoft Loopback Adapter initialization, comprising:
Described double mode trawl performance sends to described MOS and creates Microsoft Loopback Adapter driving back end signal;
After treating that Microsoft Loopback Adapter drives rear end to create, described double mode trawl performance drives the address information of transmission shared buffer, rear end to described Microsoft Loopback Adapter, enables described Microsoft Loopback Adapter drive rear end to call the shared buffer shared by physical network card according to described address information.
4. method according to claim 2, is characterized in that, described double mode trawl performance, by described physical network card initialization, comprising:
Double mode trawl performance arranges the direct memory access controller of to be switched physical network card according to the address information of described shared buffer, enables the direct memory access controller of to be switched physical network card call shared buffer shared by Microsoft Loopback Adapter.
5. the method according to claim 2,3 and 4, is characterized in that, described double mode trawl performance stops source trawl performance according to received network interface card switching signal and starts target trawl performance, comprising:
When determining that the type of described source network interface card is physical network card and the type of described target network interface card is Microsoft Loopback Adapter, described double mode trawl performance is closed physics trawl performance and is also opened the operation that Microsoft Loopback Adapter drives front-end and back-end;
When determining that the type of described source network interface card is Microsoft Loopback Adapter and the type of described target network interface card is physical network card, double mode trawl performance is closed Microsoft Loopback Adapter and is driven and open physical network card driving.
6. be applied to a switched system for source network interface card and target network interface card in multiple operating system, it is characterized in that, comprising:
Double mode trawl performance, described target network card is carried out initialization by the network interface card switching signal for sending according to MOS in described multiple operating system, enable described target network interface card use the current shared buffer taken of described source network interface card, and after initialization completes, stop source trawl performance according to the network interface card switching signal of described reception and start target trawl performance;
Shared buffer, for cushioning described target network interface card and described source data that network interface card transmits.
7. system according to claim 6, when this system is only applicable to the switching between physical network card and Microsoft Loopback Adapter, is characterized in that, described double mode trawl performance, comprising:
Parsing module, for resolving described network interface card switching signal, determines the type information of described source network interface card and the type of described target network interface card.
Initialization module, for:
When described parsing module determines that the type of described source network interface card is physical network card and the type of described target network interface card is Microsoft Loopback Adapter, described Microsoft Loopback Adapter is carried out initialization, enables described Microsoft Loopback Adapter use the current shared buffer taken of described physical network card;
When described parsing module determines that the type of described source network interface card is Microsoft Loopback Adapter and the type of described target network interface card is physical network card, by physical network card initialization, described physical network card is enable to use the current shared buffer taken of described Microsoft Loopback Adapter.
8. system according to claim 7, is characterized in that, described initialization module, comprising:
Microsoft Loopback Adapter initialization module, Microsoft Loopback Adapter for creating to described MOS drives the address information of transmission shared buffer, rear end, enables described Microsoft Loopback Adapter drive rear end to call the shared buffer shared by physical network card according to described address information;
Physical network card initialization module, for arranging the direct memory access controller of to be switched physical network card according to the address information of described shared buffer, the direct memory access controller of to be switched physical network card is enable to call shared buffer shared by Microsoft Loopback Adapter.
9. the system according to claim 7 and 8, is characterized in that, also comprises in described double mode trawl performance:
Execution module, for:
When described parsing module determines that the type of described source network interface card is physical network card and the type of described target network interface card is Microsoft Loopback Adapter and after described initialization module completes initialization, close physics trawl performance and also start Microsoft Loopback Adapter and drive front-end and back-end;
When described parsing module determines that the type of described source network interface card is Microsoft Loopback Adapter and the type of described target network interface card is physical network card and after described initialization module completes initialization, close Microsoft Loopback Adapter and drive front-end and back-end also to open physical network card to drive.
CN201410137125.9A 2014-04-08 2014-04-08 Switching method and system in multiple operating system between network interface card Active CN104978174B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410137125.9A CN104978174B (en) 2014-04-08 2014-04-08 Switching method and system in multiple operating system between network interface card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410137125.9A CN104978174B (en) 2014-04-08 2014-04-08 Switching method and system in multiple operating system between network interface card

Publications (2)

Publication Number Publication Date
CN104978174A true CN104978174A (en) 2015-10-14
CN104978174B CN104978174B (en) 2018-04-27

Family

ID=54274713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410137125.9A Active CN104978174B (en) 2014-04-08 2014-04-08 Switching method and system in multiple operating system between network interface card

Country Status (1)

Country Link
CN (1) CN104978174B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109474466A (en) * 2018-11-13 2019-03-15 天津津航计算技术研究所 The method of dual redundant network interface card switching is realized on DDS middleware
CN109474475A (en) * 2018-12-07 2019-03-15 天津津航计算技术研究所 The switching system of dual redundant network interface card under windows XPE
WO2019071800A1 (en) * 2017-10-13 2019-04-18 广州视源电子科技股份有限公司 Electronic device and network sharing method and device
CN109728915A (en) * 2018-12-07 2019-05-07 天津津航计算技术研究所 The switching method of dual redundant network interface card under windows XPE
CN109842585A (en) * 2017-11-27 2019-06-04 中国科学院沈阳自动化研究所 Network information security protective unit and means of defence towards industrial embedded system
CN112540801A (en) * 2019-09-23 2021-03-23 西安中兴新软件有限责任公司 Network card configuration method, host device, network card device, and storage medium
CN114244804A (en) * 2020-09-08 2022-03-25 成都鼎桥通信技术有限公司 Network device starting method, equipment and storage medium based on dual systems

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488918A (en) * 2009-01-09 2009-07-22 杭州华三通信技术有限公司 Multi-network card server access method and system
CN101753284A (en) * 2009-12-25 2010-06-23 中国船舶重工集团公司第七○九研究所 10/100M Ethernet double interface switching method based upon carrier detect and device thereof
CN102104470A (en) * 2009-12-17 2011-06-22 研祥智能科技股份有限公司 Multi-network-card double-redundancy device and system under VxWorks system
CN102609298A (en) * 2012-01-11 2012-07-25 中国科学技术大学苏州研究院 Network card virtualizing system and network card virtualizing method on basis of hardware array expansion
CN103514121A (en) * 2012-06-29 2014-01-15 中国船舶重工集团公司第七0九研究所 Next network card redundancy switching method of Windows Xp operating system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488918A (en) * 2009-01-09 2009-07-22 杭州华三通信技术有限公司 Multi-network card server access method and system
CN102104470A (en) * 2009-12-17 2011-06-22 研祥智能科技股份有限公司 Multi-network-card double-redundancy device and system under VxWorks system
CN101753284A (en) * 2009-12-25 2010-06-23 中国船舶重工集团公司第七○九研究所 10/100M Ethernet double interface switching method based upon carrier detect and device thereof
CN102609298A (en) * 2012-01-11 2012-07-25 中国科学技术大学苏州研究院 Network card virtualizing system and network card virtualizing method on basis of hardware array expansion
CN103514121A (en) * 2012-06-29 2014-01-15 中国船舶重工集团公司第七0九研究所 Next network card redundancy switching method of Windows Xp operating system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019071800A1 (en) * 2017-10-13 2019-04-18 广州视源电子科技股份有限公司 Electronic device and network sharing method and device
CN109842585A (en) * 2017-11-27 2019-06-04 中国科学院沈阳自动化研究所 Network information security protective unit and means of defence towards industrial embedded system
CN109842585B (en) * 2017-11-27 2021-04-13 中国科学院沈阳自动化研究所 Network information safety protection unit and protection method for industrial embedded system
CN109474466A (en) * 2018-11-13 2019-03-15 天津津航计算技术研究所 The method of dual redundant network interface card switching is realized on DDS middleware
CN109474475A (en) * 2018-12-07 2019-03-15 天津津航计算技术研究所 The switching system of dual redundant network interface card under windows XPE
CN109728915A (en) * 2018-12-07 2019-05-07 天津津航计算技术研究所 The switching method of dual redundant network interface card under windows XPE
CN109728915B (en) * 2018-12-07 2020-12-01 天津津航计算技术研究所 Switching method of dual-redundancy network card under windows XPE
CN109474475B (en) * 2018-12-07 2020-12-01 天津津航计算技术研究所 Switching system of dual-redundancy network card under windows XPE
CN112540801A (en) * 2019-09-23 2021-03-23 西安中兴新软件有限责任公司 Network card configuration method, host device, network card device, and storage medium
CN114244804A (en) * 2020-09-08 2022-03-25 成都鼎桥通信技术有限公司 Network device starting method, equipment and storage medium based on dual systems
CN114244804B (en) * 2020-09-08 2023-03-21 成都鼎桥通信技术有限公司 Network device starting method, equipment and storage medium based on dual systems

Also Published As

Publication number Publication date
CN104978174B (en) 2018-04-27

Similar Documents

Publication Publication Date Title
CN104978174A (en) Method and system for switching network cards in plurality of operating systems
KR101057452B1 (en) Smart card embedded operation system and work processing method
CN102375761A (en) Business management method, device and equipment
CN101128807B (en) Systems and methods for an augmented interrupt controller and synthetic interrupt sources
RU2429530C2 (en) Managing state of allocated hardware in virtual machines
CN101288049A (en) Use of a data engine within a data processing apparatus
CN103699428A (en) Method and computer device for affinity binding of interrupts of virtual network interface card
CN102662740B (en) Asymmetric multi-core system and realization method thereof
CN106648896B (en) Method for dual-core sharing of output peripheral by Zynq chip under heterogeneous-name multiprocessing mode
CN107690622A (en) Realize the method, apparatus and system of hardware-accelerated processing
CN110636139B (en) Optimization method and system for cloud load balancing
CN103678201B (en) PCI EXPRESS switch with logical device ability
CN104714846A (en) Resource processing method, operating system and equipment
CN104657308A (en) Method for realizing server hardware acceleration by using FPGA
CN102467415A (en) Service facade task processing method and equipment
CN107678752A (en) A kind of task processing method and device towards isomeric group
CN105183698A (en) Control processing system and method based on multi-kernel DSP
CN102567090A (en) Method and system for creating a thread of execution in a computer processor
CN109884915A (en) A kind of embedded software running platform designing method and its emulation platform based on DDS
CN104156255A (en) Virtual machine migration method, virtual machine migration device and source physical host
CN201583943U (en) IP structure of high-performance low-power consumption DMA of audio SOC chip
CN101169737A (en) Task switching control method and computer system
CN102759980B (en) Multi-core electronic system and rate adjustment device thereof
CN103440159B (en) Method and system for scheduling processes
US9569241B2 (en) Sharing devices assigned to virtual machines using runtime exclusion

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant