TWI530795B - Method for sharing plug and play device and electronic apparatus using the same - Google Patents

Method for sharing plug and play device and electronic apparatus using the same Download PDF

Info

Publication number
TWI530795B
TWI530795B TW102142133A TW102142133A TWI530795B TW I530795 B TWI530795 B TW I530795B TW 102142133 A TW102142133 A TW 102142133A TW 102142133 A TW102142133 A TW 102142133A TW I530795 B TWI530795 B TW I530795B
Authority
TW
Taiwan
Prior art keywords
operating system
sub
network file
plug
child
Prior art date
Application number
TW102142133A
Other languages
Chinese (zh)
Other versions
TW201520771A (en
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 TW102142133A priority Critical patent/TWI530795B/en
Publication of TW201520771A publication Critical patent/TW201520771A/en
Application granted granted Critical
Publication of TWI530795B publication Critical patent/TWI530795B/en

Links

Description

分享隨插即用裝置的方法及其電子裝置 Method for sharing plug-and-play device and electronic device thereof

本發明是有關於一種分享裝置的方法及其電子裝置,且特別是有關於一種分享隨插即用裝置的方法及其電子裝置。 The present invention relates to a method of sharing a device and an electronic device thereof, and more particularly to a method of sharing a plug-and-play device and an electronic device therefor.

隨著科技的發展以及時代的進步,各式電腦裝置的運算能力已愈趨強大,因而可讓使用者們在電腦裝置上操作各種需要大量運算資源的程式。其中,為了滿足某些使用上的需求,使用者可透過在電腦裝置中安裝虛擬機器(Virtual Machine,VM)的方式來同時在此電腦上操作多個作業系統。亦即,除了電腦裝置本身具備的主作業系統(Host Operating System,Host OS)之外,使用者可更在電腦裝置上操作其他的子作業系統(Guest Operating System,Guest OS)。 With the development of technology and the advancement of the times, the computing power of various computer devices has become stronger, so that users can operate various programs that require a large amount of computing resources on the computer device. In order to meet certain usage requirements, the user can simultaneously operate multiple operating systems on the computer by installing a virtual machine (VM) in the computer device. That is, in addition to the host operating system (Host OS) provided in the computer device itself, the user can operate other guest operating systems (Guest OS) on the computer device.

當電腦裝置在組態子作業系統時,通常需一併組態其對應的硬體配置,這使得當使用者若在電腦裝置上掛載隨插即用(Plug and Play)裝置時,使用者將只能透過主作業系統來存取此隨插即用裝置,而無法透過子作業系統來存取此隨插即用裝置。 亦即,在電腦裝置完成子作業系統的組態之後,子作業系統將無法取得任何後來掛載於主作業系統上的隨插即用裝置的資訊。 When the computer device is configured in the sub-operation system, it is usually necessary to configure its corresponding hardware configuration, so that when the user mounts the Plug and Play device on the computer device, the user The plug-and-play device will only be accessible through the primary operating system, and the plug-and-play device will not be accessible through the child operating system. That is, after the computer device completes the configuration of the sub-operation system, the sub-operation system will not be able to obtain any information of the plug-and-play device that is later mounted on the main operating system.

有鑑於此,本發明提供一種分享隨插即用裝置的方法及其電子裝置,其可讓子作業系統存取主作業系統上所掛載的隨插即用裝置。 In view of the above, the present invention provides a method of sharing a plug-and-play device and an electronic device thereof, which allows a sub-operation system to access a plug-and-play device mounted on a main operating system.

本發明提供一種分享隨插即用裝置的方法,適於具有主作業系統以及子作業系統的電子裝置。所述方法包括下列步驟。首先,在組態子作業系統之後,建立主作業系統以及子作業系統之間的服務連線。當電子裝置上掛載對應於主作業系統的隨插即用裝置時,在主作業系統上啟動網路檔案系統伺服器,並透過服務連線發送第一通知訊息至子作業系統。接著,在子作業系統上啟動對應於網路檔案系統伺服器的網路檔案系統客戶端,並控制子作業系統依據第一通知訊息連接至網路檔案系統伺服器。之後,控制子作業系統透過網路檔案系統客戶端存取隨插即用裝置。 The present invention provides a method of sharing a plug-and-play device suitable for an electronic device having a primary operating system and a sub-operating system. The method includes the following steps. First, after configuring the child operating system, establish a service connection between the primary operating system and the child operating system. When the plug-and-play device corresponding to the main operating system is mounted on the electronic device, the network file system server is started on the main operating system, and the first notification message is sent to the child operating system through the service connection. Then, the network file system client corresponding to the network file system server is started on the child operating system, and the child operating system is controlled to connect to the network file system server according to the first notification message. Thereafter, the control sub-operation system accesses the plug-and-play device through the network file system client.

本發明提供一種電子裝置,包括儲存單元及處理單元。儲存單元儲存多個模組。處理單元連接至儲存單元,用於在主作業系統上組態子作業系統,並存取些模組以執行下列步驟:在組態子作業系統之後,建立主作業系統以及子作業系統之間的服務連線;當電子裝置上掛載對應於主作業系統的隨插即用裝置時,在主作業系統上啟動網路檔案系統伺服器,並透過服務連線發送 第一通知訊息至子作業系統;在子作業系統上啟動對應於網路檔案系統伺服器的網路檔案系統客戶端,並控制子作業系統依據第一通知訊息連接至網路檔案系統伺服器;控制子作業系統透過網路檔案系統客戶端存取隨插即用裝置。 The invention provides an electronic device comprising a storage unit and a processing unit. The storage unit stores a plurality of modules. The processing unit is connected to the storage unit for configuring the sub-operation system on the main operating system and accessing the modules to perform the following steps: after configuring the sub-operation system, establishing a relationship between the main operating system and the sub-operation system Service connection; when the plug-and-play device corresponding to the main operating system is mounted on the electronic device, the network file system server is started on the main operating system and sent through the service connection a first notification message to the child operating system; starting a network file system client corresponding to the network file system server on the child operating system, and controlling the child operating system to connect to the network file system server according to the first notification message; The control sub-operation system accesses the plug-and-play device through the network file system client.

基於上述,本發明實施例提出的分享隨插即用裝置的方法及其電子裝置可在主作業系統上被掛載隨插即用裝置時,在主作業系統上啟動網路檔案系統伺服器,並透過主作業系統及子作業系統之間的服務連線來通知子作業系統建立對應的網路檔案系統客戶端。如此一來,子作業系統即可透過網路檔案系統協定來存取掛載於主作業系統上的隨插即用裝置。 Based on the above, the method for sharing the plug-and-play device and the electronic device thereof according to the embodiments of the present invention can start the network file system server on the main operating system when the plug-and-play device is mounted on the main operating system. And through the service connection between the main operating system and the sub-operation system, the sub-operation system is notified to establish a corresponding network file system client. In this way, the sub-operating system can access the plug-and-play device mounted on the main operating system through the network file system protocol.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 The above described features and advantages of the invention will be apparent from the following description.

100‧‧‧電子裝置 100‧‧‧Electronic devices

110‧‧‧儲存單元 110‧‧‧ storage unit

120‧‧‧處理單元 120‧‧‧Processing unit

S210‧‧‧在組態子作業系統之後,建立主作業系統以及子作業 系統之間的服務連線 S210‧‧‧ After configuring the sub-operation system, establish the main operating system and sub-jobs Service connection between systems

S220‧‧‧當電子裝置上掛載對應於主作業系統的隨插即用裝置時,在主作業系統上啟動網路檔案系統伺服器,並透過服務連線發送第一通知訊息至子作業系統 S220‧‧‧ When the plug-and-play device corresponding to the main operating system is mounted on the electronic device, the network file system server is started on the main operating system, and the first notification message is sent to the sub-operation system through the service connection.

S230‧‧‧在子作業系統上啟動對應於網路檔案系統伺服器的網路檔案系統客戶端,並控制子作業系統依據第一通知訊息連接至網路檔案系統伺服器 S230‧‧‧ starts the network file system client corresponding to the network file system server on the child operating system, and controls the child operating system to connect to the network file system server according to the first notification message

S240‧‧‧控制子作業系統透過網路檔案系統客戶端存取隨插即用裝置 S240‧‧‧Control sub-operation system accesses plug-and-play device through network file system client

S310‧‧‧當偵測到對應於主作業系統的隨插即用裝置被卸載時,控制主作業系統透過服務連線發送第二通知訊息至子作業系統 S310‧‧‧ When detecting that the plug-and-play device corresponding to the main operating system is uninstalled, the control main operating system sends a second notification message to the sub-operation system through the service connection

S320‧‧‧當在子作業系統上接收第二通知訊息時,控制子作業系統終止網路檔案系統客戶端 S320‧‧‧ When the second notification message is received on the child operating system, the control sub-operation system terminates the network file system client

圖1是依據本發明之一實施例繪示的電子裝置示意圖。 1 is a schematic diagram of an electronic device according to an embodiment of the invention.

圖2是依據本發明之一實施例繪示的分享隨插即用裝置方法的流程圖。 2 is a flow chart of a method for sharing a plug-and-play device according to an embodiment of the invention.

圖3是依據本發明之一實施例繪示的分享隨插即用裝置方法的流程圖。 3 is a flow chart of a method for sharing a plug-and-play device according to an embodiment of the invention.

圖1是依據本發明之一實施例繪示的電子裝置示意圖。在本實施例中,電子裝置100包括儲存單元110以及處理單元120。電子裝置100例如是智慧型手機、平板電腦、個人數位助理(personal digital assistant,PDA)、個人電腦(Personal Computer,PC)、筆記型電腦(Notebook PC)、工作站或其他類似的電腦裝置。儲存單元110例如是記憶體、硬碟或是其他任何可用於儲存資料的元件,而可用以記錄多個模組。 1 is a schematic diagram of an electronic device according to an embodiment of the invention. In the embodiment, the electronic device 100 includes a storage unit 110 and a processing unit 120. The electronic device 100 is, for example, a smart phone, a tablet computer, a personal digital assistant (PDA), a personal computer (PC), a notebook computer (Notebook PC), a workstation, or the like. The storage unit 110 is, for example, a memory, a hard disk, or any other component that can be used to store data, and can be used to record a plurality of modules.

處理單元120耦接儲存單元110,其可為具有一或多個處理核心的中央處理單元(Central Processing Unit,CPU),或是其他可程式化之一般用途或特殊用途的微處理器、數位訊號處理器(Digital Signal Processor,DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits,ASIC)、可程式化邏輯裝置(Programmable Logic Device,PLD)或其他類似裝置或這些裝置的組合。處理單元120可用以存取儲存單元110中記錄的各個模組,用以執行本發明提出的分享隨插即用裝置的方法。 The processing unit 120 is coupled to the storage unit 110, which may be a central processing unit (CPU) having one or more processing cores, or other programmable general purpose or special purpose microprocessors, digital signals. Processor (Digital Signal Processor, DSP), programmable controller, Application Specific Integrated Circuits (ASIC), Programmable Logic Device (PLD) or other similar devices or devices combination. The processing unit 120 can be used to access various modules recorded in the storage unit 110 for performing the method for sharing the plug-and-play device proposed by the present invention.

在本實施例中,在電子裝置100開機之後,處理單元120可載入電子裝置100的主作業系統。並且,處理單元120可更藉由在主作業系統上運行虛擬機器的方式來在電子裝置100上組態子作業系統。主作業系統以及子作業系統分別可以是Windows、Linux、Mac、Android、iOS或其他類似的作業系統。 In this embodiment, after the electronic device 100 is powered on, the processing unit 120 can load the main operating system of the electronic device 100. Moreover, the processing unit 120 can further configure the sub-operation system on the electronic device 100 by running the virtual machine on the main operating system. The primary operating system and the secondary operating system may each be Windows, Linux, Mac, Android, iOS, or other similar operating system.

應注意的是,當處理單元120在組態子作業系統時,即必須確定子作業系統對應的硬體架構,因而使得子作業系統無法 存取之後掛載於主作業系統上的隨插即用裝置。然而,本發明實施例提出的方法及電子裝置可在主作業系統及子作業系統之間建立基於網路檔案系統(Network File System,NFS)協定的構通介面,使得子作業系統亦可存取掛載於主作業系統上的隨插即用裝置。本發明提出方法的細節詳述如下。 It should be noted that when the processing unit 120 is configuring the sub-operation system, it is necessary to determine the hardware architecture corresponding to the sub-operation system, thereby making the sub-operation system unable to A plug-and-play device that is mounted on the main operating system after access. However, the method and the electronic device provided by the embodiments of the present invention can establish a network interface system (NFS) protocol-based communication interface between the main operating system and the sub-operation system, so that the sub-operation system can also access Plug and play devices mounted on the main operating system. The details of the method proposed by the present invention are detailed below.

圖2是依據本發明之一實施例繪示的分享隨插即用裝置方法的流程圖。本實施例提出的方法可由圖1所示的電子裝置100來實施,以下即搭配圖1的各個元件來說明本實施例的步驟細節。 2 is a flow chart of a method for sharing a plug-and-play device according to an embodiment of the invention. The method proposed in this embodiment can be implemented by the electronic device 100 shown in FIG. 1. The following is a description of the steps of the embodiment in conjunction with the components of FIG.

在步驟S210中,在組態子作業系統之後,處理單元120可建立主作業系統(例如是Windows)以及子作業系統(例如是Linux)之間的服務連線。具體而言,處理單元130可在主作業系統上建立服務套接介面(Service socket),並在子作業系統建立對應於此服務套接介面的客戶套接介面(Client socket),以建立所述服務連線。 In step S210, after configuring the child operating system, the processing unit 120 may establish a service connection between the primary operating system (eg, Windows) and the child operating system (eg, Linux). Specifically, the processing unit 130 may establish a service socket on the main operating system, and establish a client socket corresponding to the service socket interface in the sub-operation system to establish the service socket. Service connection.

接著,在步驟S220中,當電子裝置100上掛載對應於主作業系統的隨插即用裝置(例如是隨身碟或其他的通用序列匯流排(Universal Serial Bus,USB)裝置等)時,處理單元120可在主作業系統上啟動網路檔案系統伺服器(NFS server),並透過服務連線發送第一通知訊息至子作業系統。所述第一通知訊息例如包括隨插即用裝置的身份資訊及關聯於NFS伺服器的網際網路協定位址(Internet Protocol address,IP address)及埠號(port number)。 Next, in step S220, when the plug-and-play device corresponding to the main operating system (for example, a flash drive or other universal serial bus (USB) device, etc.) is mounted on the electronic device 100, the processing is performed. The unit 120 can start a network file system server (NFS server) on the main operating system and send a first notification message to the child operating system through the service connection. The first notification message includes, for example, identity information of the plug-and-play device and an Internet Protocol address (IP address) and a port number associated with the NFS server.

在步驟S230中,處理單元120可在子作業系統上啟動對應於網路檔案系統伺服器的網路檔案系統客戶端(NFS client),並控制子作業系統依據第一通知訊息連接至網路檔案系統伺服器。具體而言,處理單元120可控制子作業系統依據網路檔案系統伺服器的IP位址(例如是127.0.0.1)及埠號(例如是1000)連接至網路檔案系統伺服器。在一實施例中,主作業系統上的NFS伺服器以及子作業系統上的NFS客戶端可採用相互對應的兩個套接介面對(socket pair)來實現,但本發明的可實施方式不限於此。 In step S230, the processing unit 120 may activate a network file system client (NFS client) corresponding to the network file system server on the child operating system, and control the child operating system to connect to the network file according to the first notification message. System server. Specifically, the processing unit 120 can control the sub-operation system to connect to the network file system server according to the IP address (for example, 127.0.0.1) and the nickname (for example, 1000) of the network file system server. In an embodiment, the NFS server on the primary operating system and the NFS client on the child operating system may be implemented by two socket pairs corresponding to each other, but the implementation manner of the present invention is not limited to this.

在其他實施例中,在子作業系統中的NFS客戶端連接至主作業系統中的NFS伺服器之後,處理單元120可在子作業系統上建立對應於隨插即用裝置的一資料夾,以讓使用者可便利地透過使用者介面存取隨插即用裝置中的內容。 In other embodiments, after the NFS client in the child operating system is connected to the NFS server in the primary operating system, the processing unit 120 can establish a folder corresponding to the Plug and Play device on the child operating system to The user can conveniently access the content in the plug-and-play device through the user interface.

之後,在步驟S240中,處理單元120可控制子作業系統透過網路檔案系統客戶端存取隨插即用裝置。詳細而言,子作業系統的網路檔案系統客戶端可透過網路檔案系統協定(NFS protocol)來與主作業系統上的網路檔案系統伺服器交換資料,進而存取所述隨插即用裝置中的資料。 Thereafter, in step S240, the processing unit 120 can control the sub-operation system to access the plug-and-play device through the network file system client. In detail, the network file system client of the child operating system can exchange data with the network file system server on the main operating system through the NFS protocol to access the plug and play. Information in the device.

透過上述實施例教示的內容,當使用者在電子裝置100的主作業系統上掛載隨插即用裝置時,即便子作業系統在組態時並未考慮到此隨插即用裝置,使用者仍可藉由主作業系統與子作業系統之間的網路檔案系統協定而在子作業系統上正常地存取所述隨插即用裝置中的資料。 Through the teachings of the above embodiments, when the user mounts the plug-and-play device on the main operating system of the electronic device 100, even if the child operating system does not take into account the plug-and-play device during configuration, the user The data in the plug-and-play device can still be normally accessed on the child operating system by a network file system agreement between the primary operating system and the child operating system.

此外,當使用者在電子裝置100的主作業系統上同時掛載多個隨插即用裝置時,處理單元120皆可在主作業系統及子作業系統上建立分別對應於這些隨插即用裝置的網路檔案伺服器及網路檔案系統客戶端。因此,使用者仍可在子作業系統中順利存取這些隨插即用裝置中的資料。 In addition, when the user simultaneously mounts a plurality of plug-and-play devices on the main operating system of the electronic device 100, the processing unit 120 can establish corresponding to the plug-and-play devices on the main operating system and the sub-operation system respectively. Network file server and network file system client. Therefore, the user can still smoothly access the data in these plug-and-play devices in the child operating system.

在其他實施例中,當使用者在主作業系統上卸載隨插即用裝置時,處理單元120可對應地執行下圖3所示的方法以讓使用者無法繼續在子作業系統上存取被卸載的隨插即用裝置。 In other embodiments, when the user uninstalls the plug-and-play device on the main operating system, the processing unit 120 can correspondingly perform the method shown in FIG. 3 below to prevent the user from continuing to access the sub-operating system. Unplugged plug-and-play device.

圖3是依據本發明之一實施例繪示的分享隨插即用裝置方法的流程圖。本實施例提出的方法可由圖1所示的電子裝置100來實施,以下即搭配圖1的各個元件來說明本實施例的步驟細節。 3 is a flow chart of a method for sharing a plug-and-play device according to an embodiment of the invention. The method proposed in this embodiment can be implemented by the electronic device 100 shown in FIG. 1. The following is a description of the steps of the embodiment in conjunction with the components of FIG.

在步驟S310中,當偵測到對應於主作業系統的隨插即用裝置被卸載時,處理單元120可控制主作業系統透過服務連線發送第二通知訊息至子作業系統。所述第二通知訊息例如是可用於通知子作業系統關聯於被卸載的隨插即用裝置的身份資訊的訊息。如同先前實施例中所教示的,處理單元120可透過主作業系統中的服務套接介面來發送所述第二通知訊息至子作業系統中的客戶套接介面,但本發明的可實施方式不限於此。 In step S310, when it is detected that the plug-and-play device corresponding to the main operating system is uninstalled, the processing unit 120 may control the main operating system to send the second notification message to the sub-operation system through the service connection. The second notification message is, for example, a message that can be used to notify the child operating system of the identity information associated with the uninstalled Plug and Play device. As taught in the previous embodiment, the processing unit 120 can send the second notification message to the client socket interface in the child operating system through the service socket interface in the main operating system, but the implementation manner of the present invention is not Limited to this.

接著,在步驟S320中,當處理單元120在子作業系統上接收第二通知訊息時,處理單元120可控制子作業系統終止網路檔案系統客戶端。具體而言,處理單元120可依據第二通知訊息中關聯於被卸載的隨插即用裝置的身份資訊而在子作業系統上移 除對應的網路檔案系統客戶端。在其他實施例中,處理單元120可在子作業系統中移除對應於被卸載的隨插即用裝置的資料夾,以讓使用者無法再對其進行存取。 Next, in step S320, when the processing unit 120 receives the second notification message on the child operating system, the processing unit 120 may control the child operating system to terminate the network file system client. Specifically, the processing unit 120 can move up the sub-work system according to the identity information of the second notification message associated with the unloaded plug-and-play device. In addition to the corresponding network file system client. In other embodiments, the processing unit 120 may remove the folder corresponding to the unloaded plug-and-play device in the child operating system so that the user can no longer access it.

綜上所述,本發明實施例提出的分享隨插即用裝置的方法及其電子裝置可在主作業系統上被掛載隨插即用裝置時,在主作業系統上啟動網路檔案系統伺服器,並透過主作業系統及子作業系統之間的服務連線來通知子作業系統建立對應的網路檔案系統客戶端。如此一來,子作業系統即可透過網路檔案系統協定來存取掛載於主作業系統上的隨插即用裝置。 In summary, the method for sharing a plug-and-play device proposed by the embodiment of the present invention and the electronic device thereof can start the network file system servo on the main operating system when the plug-and-play device is mounted on the main operating system. And notify the child operating system to establish a corresponding network file system client through a service connection between the main operating system and the child operating system. In this way, the sub-operating system can access the plug-and-play device mounted on the main operating system through the network file system protocol.

換言之,即便子作業系統在組態時並未考慮到後來掛載在主作業系統上的隨插即用裝置,透過本發明實施例提出的方法,使用者仍可順利地在子作業系統上存取到此隨插即用裝置中的資料。 In other words, even if the sub-operation system does not take into account the plug-and-play device that is later mounted on the main operating system, the user can still successfully save the sub-operation system through the method proposed by the embodiment of the present invention. Get the data from this plug-and-play device.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention, and any one of ordinary skill in the art can make some changes and refinements without departing from the spirit and scope of the present invention. The scope of the invention is defined by the scope of the appended claims.

S210‧‧‧在組態子作業系統之後,建立主作業系統以及子作業系統之間的服務連線 S210‧‧‧ After the configuration of the sub-operation system, establish the service connection between the main operating system and the sub-operation system

S220‧‧‧當電子裝置上掛載對應於主作業系統的隨插即用裝置時,在主作業系統上啟動網路檔案系統伺服器,並透過服務連線發送第一通知訊息至子作業系統 S220‧‧‧ When the plug-and-play device corresponding to the main operating system is mounted on the electronic device, the network file system server is started on the main operating system, and the first notification message is sent to the sub-operation system through the service connection.

S230‧‧‧在子作業系統上啟動對應於網路檔案系統伺服器的網路檔案系統客戶端,並控制子作業系統依據第一通知訊息連接至網路檔案系統伺服器 S230‧‧‧ starts the network file system client corresponding to the network file system server on the child operating system, and controls the child operating system to connect to the network file system server according to the first notification message

S240‧‧‧控制子作業系統透過網路檔案系統客戶端存取隨插即用裝置 S240‧‧‧Control sub-operation system accesses plug-and-play device through network file system client

Claims (10)

一種分享隨插即用裝置的方法,適於具有一主作業系統以及一子作業系統的一電子裝置,所述方法包括下列步驟:在組態該子作業系統之後,建立該主作業系統以及該子作業系統之間的一服務連線;當該電子裝置上掛載對應於該主作業系統的一隨插即用裝置時,在該主作業系統上啟動一網路檔案系統伺服器,並透過該服務連線發送一第一通知訊息至該子作業系統;在該子作業系統上啟動對應於該網路檔案系統伺服器的一網路檔案系統客戶端,並控制該子作業系統依據該第一通知訊息連接至該網路檔案系統伺服器;以及控制該子作業系統透過該網路檔案系統客戶端存取該隨插即用裝置。 A method for sharing a plug-and-play device, suitable for an electronic device having a main operating system and a sub-operating system, the method comprising the steps of: after configuring the sub-operating system, establishing the main operating system and the a service connection between the child operating systems; when a plug-and-play device corresponding to the main operating system is mounted on the electronic device, a network file system server is started on the main operating system, and The service connection sends a first notification message to the child operating system; a network file system client corresponding to the network file system server is started on the child operating system, and the child operating system is controlled according to the first A notification message is connected to the network file system server; and the sub-operation system is controlled to access the plug-and-play device through the network file system client. 如申請專利範圍第1項所述的方法,其中該第一通知訊息包括該隨插即用裝置的一身份資訊及關聯於該網路檔案系統伺服器的一網際網路協定位址及一埠號,且控制該子作業系統依據該第一通知訊息連接至該網路檔案系統伺服器的步驟包括:控制該子作業系統依據該網際網路協定位址及該埠號連接至該網路檔案系統伺服器。 The method of claim 1, wherein the first notification message includes an identity information of the plug-and-play device and an internet protocol address associated with the network file system server and a And controlling the sub-operation system to connect to the network file system server according to the first notification message comprises: controlling the sub-operation system to connect to the network file according to the internet protocol address and the nickname System server. 如申請專利範圍第1項所述的方法,其中在該子作業系統透過該網路檔案系統客戶端存取該隨插即用裝置的步驟之後,更包括: 當偵測到對應於該主作業系統的該隨插即用裝置被卸載時,控制該主作業系統透過該服務連線發送一第二通知訊息至該子作業系統;以及當在該子作業系統上接收該第二通知訊息時,控制該子作業系統終止該網路檔案系統客戶端。 The method of claim 1, wherein after the sub-operating system accesses the plug-and-play device through the network file system client, the method further comprises: When detecting that the plug-and-play device corresponding to the main operating system is uninstalled, controlling the main operating system to send a second notification message to the sub-operation system through the service connection; and when in the sub-operation system When receiving the second notification message, the sub-operation system is controlled to terminate the network file system client. 如申請專利範圍第1項所述的方法,其中該主作業系統建立該主作業系統以及該子作業系統之間的該服務連線的步驟包括:在該主作業系統上建立一服務套接介面,並在該子作業系統建立對應於該服務套接介面的一客戶套接介面。 The method of claim 1, wherein the step of establishing, by the main operating system, the service line between the main operating system and the sub-operation system comprises: establishing a service socket interface on the main operating system And establishing a client socket interface corresponding to the service socket interface in the child operating system. 如申請專利範圍第1項所述的方法,其中該子作業系統安裝於該電子裝置的一虛擬機器上。 The method of claim 1, wherein the sub-operation system is installed on a virtual machine of the electronic device. 一種電子裝置,包括:一儲存單元,儲存多個模組;一處理單元,連接至該儲存單元,在一主作業系統上組態一子作業系統,並存取該些模組以執行下列步驟:在組態該子作業系統之後,建立該主作業系統以及該子作業系統之間的一服務連線;當該電子裝置上掛載對應於該主作業系統的一隨插即用裝置時,在該主作業系統上啟動一網路檔案系統伺服器,並透過該服務連線發送一第一通知訊息至該子作業系統;在該子作業系統上啟動對應於該網路檔案系統伺服器的 一網路檔案系統客戶端,並控制該子作業系統依據該第一通知訊息連接至該網路檔案系統伺服器;以及控制該子作業系統透過該網路檔案系統客戶端存取該隨插即用裝置。 An electronic device comprising: a storage unit for storing a plurality of modules; a processing unit connected to the storage unit, configuring a sub-operation system on a main operation system, and accessing the modules to perform the following steps After configuring the sub-operation system, establishing a service connection between the main operation system and the sub-operation system; when the electronic device mounts a plug-and-play device corresponding to the main operation system, A network file system server is started on the main operating system, and a first notification message is sent to the child operating system through the service connection; and the server corresponding to the network file system server is started on the child operating system. a network file system client, and controlling the child operating system to connect to the network file system server according to the first notification message; and controlling the child operating system to access the plug-in through the network file system client Use the device. 如申請專利範圍第6項所述的電子裝置,其中該第一通知訊息包括該隨插即用裝置的一身份資訊及關聯於該網路檔案系統伺服器的一網際網路協定位址及一埠號,且該處理單控制該子作業系統依據該網際網路協定位址及該埠號連接至該網路檔案系統伺服器。 The electronic device of claim 6, wherein the first notification message includes an identity information of the plug-and-play device and an internet protocol address associated with the network file system server and a An nickname, and the processing unit controls the sub-operating system to connect to the network file system server according to the internet protocol address and the nickname. 如申請專利範圍第6項所述的電子裝置,其中當偵測到對應於該主作業系統的該隨插即用裝置被卸載時,該處理單元控制該主作業系統透過該服務連線發送一第二通知訊息至該子作業系統,並且當在該子作業系統上接收該第二通知訊息時,該處理單元控制該子作業系統終止該網路檔案系統客戶端。 The electronic device of claim 6, wherein the processing unit controls the main operating system to transmit a service connection through the service connection when the plug-and-play device corresponding to the main operating system is detected to be unloaded. The second notification message is sent to the child operating system, and when the second notification message is received on the child operating system, the processing unit controls the child operating system to terminate the network file system client. 如申請專利範圍第6項所述的電子裝置,其中該處理單元在該主作業系統上建立一服務套接介面,並在該子作業系統建立對應於該服務套接介面的一客戶套接介面。 The electronic device of claim 6, wherein the processing unit establishes a service socket interface on the main operating system, and establishes a client socket interface corresponding to the service socket interface in the child operating system. . 如申請專利範圍第6項所述的電子裝置,其中該子作業系統安裝於該電子裝置的一虛擬機器上。 The electronic device of claim 6, wherein the sub-operation system is installed on a virtual machine of the electronic device.
TW102142133A 2013-11-19 2013-11-19 Method for sharing plug and play device and electronic apparatus using the same TWI530795B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW102142133A TWI530795B (en) 2013-11-19 2013-11-19 Method for sharing plug and play device and electronic apparatus using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW102142133A TWI530795B (en) 2013-11-19 2013-11-19 Method for sharing plug and play device and electronic apparatus using the same

Publications (2)

Publication Number Publication Date
TW201520771A TW201520771A (en) 2015-06-01
TWI530795B true TWI530795B (en) 2016-04-21

Family

ID=53935010

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102142133A TWI530795B (en) 2013-11-19 2013-11-19 Method for sharing plug and play device and electronic apparatus using the same

Country Status (1)

Country Link
TW (1) TWI530795B (en)

Also Published As

Publication number Publication date
TW201520771A (en) 2015-06-01

Similar Documents

Publication Publication Date Title
US10778521B2 (en) Reconfiguring a server including a reconfigurable adapter device
US10282192B1 (en) Updating device code through a bus
TWI684859B (en) Method for remote system recovery
JP6514330B2 (en) System on chip with multiple compute subsystems
WO2016037503A1 (en) Configuration method and device of pcie topology
US7925795B2 (en) Method and system for configuring a plurality of network interfaces that share a physical interface
US10721309B2 (en) System and method for supporting data communication in a heterogeneous environment
US10127170B2 (en) High density serial over LAN management system
US10509758B1 (en) Emulated switch with hot-plugging
WO2015070640A1 (en) Remote accessing method for device, thin client, and virtual machine
WO2014071804A1 (en) Data transmission method and device of terminal equipment with android platform
EP3267314A2 (en) Crowd-sourced cloud computing resource validation
WO2011157138A2 (en) Multi-core router
US20150195213A1 (en) Request distribution method and information processing apparatus
US20150032925A1 (en) System Management through Direct Communication between System Management Controllers
US9319313B2 (en) System and method of forwarding IPMI message packets based on logical unit number (LUN)
WO2013075501A1 (en) Method and device for hot-plugging a node
US20160077986A1 (en) Electronic apparatus providing real-time switching and sharing of usb electronic devices among hosts
WO2022143717A1 (en) Method, apparatus, and system for migrating virtual machine
EP3259673A1 (en) System on a chip comprising an i/o steering engine
WO2012103768A1 (en) Method and apparatus for data processing, pci-e bus system and server
US10645166B2 (en) Network interface card
TWI530795B (en) Method for sharing plug and play device and electronic apparatus using the same
US20120324077A1 (en) Providing Resource Accessbility During a Sleep State
US10075398B2 (en) Systems and methods for enabling a host system to use a network interface of a management controller