TWI507986B - Method and system for executing application programs - Google Patents

Method and system for executing application programs Download PDF

Info

Publication number
TWI507986B
TWI507986B TW099122523A TW99122523A TWI507986B TW I507986 B TWI507986 B TW I507986B TW 099122523 A TW099122523 A TW 099122523A TW 99122523 A TW99122523 A TW 99122523A TW I507986 B TWI507986 B TW I507986B
Authority
TW
Taiwan
Prior art keywords
application
storage device
external memory
operating system
memory storage
Prior art date
Application number
TW099122523A
Other languages
Chinese (zh)
Other versions
TW201203116A (en
Inventor
Chien Fu Lee
Original Assignee
Phison Electronics Corp
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 Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to TW099122523A priority Critical patent/TWI507986B/en
Publication of TW201203116A publication Critical patent/TW201203116A/en
Application granted granted Critical
Publication of TWI507986B publication Critical patent/TWI507986B/en

Links

Description

應用程式執行方法與系統Application execution method and system

本發明是有關於一種應用程式執行方法與系統,且特別是有關於一種能夠在主機系統的作業系統中自動地執行儲存在外接式儲存裝置中之應用程式的應用程式執行方法與系統。The present invention relates to an application execution method and system, and more particularly to an application execution method and system capable of automatically executing an application stored in an external storage device in an operating system of a host system.

數位相機、手機與MP3在這幾年來的成長十分迅速,使得消費者對儲存媒體的需求也急速增加。由於快閃記憶體(Flash Memory)具有資料非揮發性、省電、體積小與無機械結構等的特性,最適合用作為外接式記憶體儲存裝置(例如,隨身碟)。此外,隨著即插即用之連接介面(例如,通用序列匯流排(Universal Serial Bus,USB))的發展,使得外接式記憶體儲存裝置已廣泛應用於數位內容的儲存上。Digital cameras, mobile phones and MP3s have grown very rapidly in recent years, and the demand for storage media has increased rapidly. Flash memory is most suitable for use as an external memory storage device (for example, a flash drive) because of its non-volatile data, power saving, small size, and no mechanical structure. In addition, with the development of plug-and-play connection interfaces (for example, Universal Serial Bus (USB)), external memory storage devices have been widely used for storage of digital content.

特別是,企業資訊部門的電腦管理者為了解決電腦可能發生的問題而會將多個電腦維護應用程式(例如,掃毒軟體)儲存於隨身碟中以方便維護或維修電腦時使用。一般而言,當欲執行儲存於隨身碟中的某一應用程式時,使用者需要透過電腦的輸出裝置(例如,液晶螢幕)與輸入裝置(例如,滑鼠)來於作業系統所執行之檔案總管中點選欲執行之應用程式的執行檔,由此使欲執行之應用程式於作業系統中運轉。In particular, computer managers in the Corporate Information Department use multiple computer maintenance applications (for example, anti-virus software) in a flash drive to facilitate maintenance or repair of the computer in order to solve problems that may occur on the computer. In general, when an application stored on a flash drive is to be executed, the user needs to use the output device (for example, a liquid crystal screen) of the computer and the input device (for example, a mouse) to execute the file executed by the operating system. The executive selects the executable file of the application to be executed, thereby causing the application to be executed to operate in the operating system.

然而,對於不具輸入/輸出裝置的伺服器或工業用電腦來說,使用者無法透過上述方式來於隨身碟中選擇與執行欲執行的應用程式。例如,當不具輸入/輸出裝置的伺服器或工業用電腦,電腦管理者無法藉由執行儲存於隨身碟中的防毒軟體來進行掃毒。However, for a server or an industrial computer that does not have an input/output device, the user cannot select and execute the application to be executed on the flash drive in the above manner. For example, when a server or an industrial computer does not have an input/output device, the computer administrator cannot perform the virus removal by executing the antivirus software stored in the flash drive.

本發明提供一種應用程式執行方法與系統,其能夠根據使用者的需求自動地執行儲存於外接式記憶體儲存裝置中的多個應用程式。The present invention provides an application execution method and system that can automatically execute a plurality of applications stored in an external memory storage device according to a user's needs.

本發明範例實施例提出一種應用程式執行方法,用於在主機系統的作業系統中自動地運轉儲存於外接式記憶體儲存裝置之記憶體模組中的多個應用程式。本應用程式執行方法包括在此外接式記憶體儲存裝置上配置一選擇開關,其中此選擇開關耦接至外接式記憶體儲存裝置的記憶體控制器,此選擇開關可被設定於多個運作模式其中之一並且每一運作模式各別地對應此些應用程式的其中之一。本應用程式執行方法也包括將此外接式記憶體儲存裝置耦接至主機系統;由記憶體控制器偵測此選擇開關目前所處的運作模式;並且將選擇旗標標記為此運作模式。本應用程式執行方法亦包括於主機系統中運轉一導引程式;由此導引程式向此外接式記憶體儲存裝置請求此選擇旗標並從此記憶體控制器中接收此選擇旗標;以及由此導引程式根據所接收的選擇旗標於作業系統中運轉對應選擇開關之目前運作模式的應用程式。An exemplary embodiment of the present invention provides an application execution method for automatically running a plurality of applications stored in a memory module of an external memory storage device in an operating system of the host system. The application execution method includes configuring a selection switch on the external memory storage device, wherein the selection switch is coupled to the memory controller of the external memory storage device, and the selection switch can be set in multiple operation modes. One of them and each mode of operation corresponds to one of these applications. The application execution method also includes coupling the external memory storage device to the host system; the memory controller detects the current mode of operation of the selection switch; and marks the selection flag as the operation mode. The application execution method also includes running a boot program in the host system; the boot program requests the selection flag from the external memory storage device and receives the selection flag from the memory controller; The program is based on the received selection flag in the operating system to operate the application corresponding to the current mode of operation of the selection switch.

在本發明之一實施例中,上述之應用程式包括第一應用程式與第二應用程式,上述之運作模式包括對應此第一應用程式的第一運作模式與對應此第二應用程式的第二運作模式。在此,上述之由導引程式根據選擇旗標於作業系統中運轉對應選擇開關之目前運作模式的應用程式的步驟包括:當目前運作模式為第一運作模式時,由導引程式於作業系統中運轉第一應用程式;以及當目前運作模式為第二運作模式時,由導引程式於該作業系統中運轉第二應用程式。In an embodiment of the present invention, the application includes a first application and a second application, and the operation mode includes a first operation mode corresponding to the first application and a second operation mode corresponding to the second application. Mode of operation. Here, the step of the application program for operating the corresponding operation mode of the corresponding selection switch in the operating system according to the selection flag includes: guiding the program to the operating system when the current operation mode is the first operation mode Running the first application; and when the current operating mode is the second operating mode, the second application is run by the guiding program in the operating system.

在本發明之一實施例中,上述之應用程式執行方法更包括在由導引程式於作業系統中運轉第一應用程式之前判斷在作業系統中第二應用程式是否已被運轉;以及當在作業系統中第二應用程式已被運轉時,由導引程式於作業系統中終止第二應用程式。In an embodiment of the present invention, the application execution method further includes determining whether the second application has been run in the operating system before running the first application in the operating system by the guiding program; and when in the job When the second application in the system has been run, the second application is terminated by the boot program in the operating system.

在本發明之一實施例中,上述之由導引程式向外接式記憶體儲存裝置請求選擇旗標並從記憶體控制器中接收該選擇旗標的步驟包括:由導引程式週期地向外接式記憶體儲存裝置請求選擇旗標並從記憶體控制器中接收選擇旗標。In an embodiment of the present invention, the step of requesting the selection flag by the boot program to the external memory storage device and receiving the selection flag from the memory controller includes: periodically connecting the boot program by the boot program The memory storage device requests selection of a flag and receives a selection flag from the memory controller.

在本發明之一實施例中,上述之應用程式執行方法更包括:由上述導引程式偵測上述外接式記憶體儲存裝置是否被重新耦接至上述主機系統;以及當此外接式記憶體儲存裝置被重新耦接至主機系統時,由導引程式向外接式記憶體儲存裝置請求選擇旗標並從記憶體控制器中接收選擇旗標。In an embodiment of the present invention, the application execution method further includes: detecting, by the guiding program, whether the external memory storage device is recoupled to the host system; and when the external memory is stored When the device is recoupled to the host system, the boot program requests the selection flag from the external memory storage device and receives the selection flag from the memory controller.

在本發明之一實施例中,上述之應用程式執行方法更包括:將記憶體模組邏輯地分割為一分割區,並且將此分割區模擬為一光碟分割區。此外,上述之應用程式執行方法更包括將一自動執行檔、上述導引程式與上述應用程式儲存至此分割區中,其中此自動執行檔用以自動地執行此導引程式,並且其中當上述外接式記憶體儲存裝置耦接至主機系統時此自動執行檔會被上述作業系統自動地運轉。In an embodiment of the present invention, the application execution method further includes: logically dividing the memory module into a partition, and simulating the partition as a disc partition. In addition, the application execution method further includes storing an automatic execution file, the navigation program and the application program into the partition, wherein the automatic execution file is used to automatically execute the guidance program, and wherein the external connection is performed. When the memory storage device is coupled to the host system, the automatic execution file is automatically operated by the operating system.

本發明範例實施例提出一種應用程式執行系統,用以在作業系統中自動地運轉多個應用程式。此應用程式執行系統包括主機系統與外接式記憶體儲存裝置。主機系統具有內建式儲存裝置,其中此內建式儲存裝置安裝有此作業系統並且導引程式被運轉於此作業系統中。外接式記憶體儲存裝置包括選擇開關、連接器、記憶體模組與記憶體控制器。選擇開關可被設定於多個運作模式其中之一並且每一運作模式各別地對應此些應用程式的其中之一。連接器用以耦接至此主機系統。記憶體模組用以儲存此些應用程式。記憶體控制器耦接至此選擇開關、記憶體模組與連接器,其中記憶體控制器用以偵測此選擇開關所處的目前運作模式並且將選擇旗標標記為此目前運作模式。在此,當外接式記憶體儲存裝置耦接至主機系統時,此導引程式向外接式記憶體儲存裝置請求此選擇旗標並從此記憶體控制器中接收此選擇旗標。此外,導引程式會根據所接收的選擇旗標於作業系統中運轉對應此目前運作模式的應用程式。An exemplary embodiment of the present invention provides an application execution system for automatically running a plurality of applications in an operating system. The application execution system includes a host system and an external memory storage device. The host system has a built-in storage device in which the built-in storage device is installed and the pilot program is run in the operating system. The external memory storage device includes a selection switch, a connector, a memory module, and a memory controller. The selection switch can be set to one of a plurality of operational modes and each operational mode individually corresponds to one of the applications. A connector is coupled to the host system. The memory module is used to store such applications. The memory controller is coupled to the selection switch, the memory module and the connector, wherein the memory controller is configured to detect the current mode of operation of the selection switch and mark the selection flag as the current mode of operation. Here, when the external memory storage device is coupled to the host system, the navigation program requests the selection flag from the external memory storage device and receives the selection flag from the memory controller. In addition, the pilot program will run the application corresponding to the current operating mode in the operating system according to the received selection flag.

在本發明之一實施例中,上述之記憶體模組包括一分割區,並且此分割區儲存一自動執行檔、上述導引程式與上述應用程式,其中此自動執行檔用以自動地執行此導引程式。在此,上述之記憶體控制器將此分割區模擬為一光碟分割區,其中當上述外接式記憶體儲存裝置耦接至主機系統時此自動執行檔會被上述作業系統自動地運轉。In an embodiment of the present invention, the memory module includes a partition, and the partition stores an automatic execution file, the guiding program, and the application, wherein the automatic execution file is used to automatically execute the Guide program. Here, the memory controller simulates the partition as a disc partition, wherein the auto-execution file is automatically operated by the operating system when the external memory storage device is coupled to the host system.

本發明範例實施例提出一種應用程式執行方法,用於在一主機系統的一作業系統中自動地運轉儲存於一外接式記憶體儲存裝置之一記憶體模組中的多個應用程式。本應用程式執行方法包括:當此外接式記憶體儲存裝置耦接至主機系統時,由主機系統主動請求此外接式記憶體儲存裝置傳送一選擇開關的一運作模式;以及由此主機系統依據此選擇開關的運作模式執行此些應用程式的其中之一。An exemplary embodiment of the present invention provides an application execution method for automatically running a plurality of applications stored in a memory module of an external memory storage device in an operating system of a host system. The application execution method includes: when the external memory storage device is coupled to the host system, the host system actively requests the external memory storage device to transmit an operation mode of the selection switch; and thereby the host system is configured according to the Selecting the mode of operation of the switch performs one of these applications.

本發明範例實施例提出一種外接式記憶體儲存裝置,包括連接器、記憶體模組、選擇開關與記憶體控制器。連接器用以耦接至主機系統。記憶體模組儲存複數個應用程式。選擇開關可被設定於多個運作模式的其中任一並且每一運作模式各別地對應此些應用程式的其中之一。記憶體控制器耦接至選擇開關、記憶體模組與連接器,其中此記憶體控制器用以偵測此選擇開關所設定的運作模式。並且,當此外接式記憶體儲存裝置耦接至主機系統時,此外接式記憶體儲存裝置傳送此些運作模式之中此選擇開關被設定的運作模式至主機系統,藉此,此主機系統運轉對應被設定的運作模式的應用程式。An exemplary embodiment of the present invention provides an external memory storage device including a connector, a memory module, a selection switch, and a memory controller. The connector is for coupling to the host system. The memory module stores a plurality of applications. The selection switch can be set to any of a plurality of operational modes and each operational mode individually corresponds to one of the applications. The memory controller is coupled to the selection switch, the memory module and the connector, wherein the memory controller is configured to detect an operation mode set by the selection switch. Moreover, when the external memory storage device is coupled to the host system, the external memory storage device transmits an operation mode in which the selection switch is set to the host system, whereby the host system operates The application corresponding to the set operation mode.

基於上述,本發明範例實施例的應用程式執行方法與系統能夠根據選擇開關的位置自動地執行儲存於外接式記憶體儲存裝置中的多個應用程式。Based on the above, the application execution method and system of the exemplary embodiment of the present invention can automatically execute a plurality of applications stored in the external memory storage device according to the position of the selection switch.

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

圖1是根據本發明範例實施例所繪示的應用程式執行系統的概要方塊圖。FIG. 1 is a schematic block diagram of an application execution system according to an exemplary embodiment of the invention.

請參照圖1,應用程式執行系統1000包括主機系統1100與外接式記憶體儲存裝置100。Referring to FIG. 1 , the application execution system 1000 includes a host system 1100 and an external memory storage device 100 .

主機系統1100包括電腦主機1110與輸入/輸出(input/output,I/O)裝置1150。The host system 1100 includes a host computer 1110 and an input/output (I/O) device 1150.

在本範例實施例中,電腦主機1110為桌上型個人電腦。必須瞭解的是,本發明不限於此,在本發明另一範例實施例中,電腦主機1110亦可以是筆記型電腦、伺服器或其他任何能夠執行地電腦應用程式的主機系統。電腦主機1110包括中央處理單元(Central Processing Unit,CPU)1112、主記憶體1114、系統匯流排1116、資料傳輸介面1118、內建式儲存裝置1120及安裝在內建式儲存裝置1120中的作業系統1122。In the present exemplary embodiment, the computer main body 1110 is a desktop personal computer. It should be understood that the present invention is not limited thereto. In another exemplary embodiment of the present invention, the host computer 1110 may also be a notebook computer, a server, or any other host system capable of executing a computer application. The host computer 1110 includes a central processing unit (CPU) 1112, a main memory 1114, a system bus 1116, a data transmission interface 1118, a built-in storage device 1120, and an operating system installed in the built-in storage device 1120. 1122.

中央處理單元1112用以解釋電腦指令以及處理電腦軟體中的資料。The central processing unit 1112 is used to interpret computer instructions and process data in the computer software.

主記憶體1114是經由系統匯流排1116耦接至中央處理單元1112並且用以載入各式各樣的程式與資料以供中央處理單元1112直接執行與運用。具體來說,主記憶體1114具可隨時讀寫且較快之讀寫速度等特性,因此主記憶體1114是用以作為作業系統1122或其他正在執行中的程式的臨時資料儲存媒介。在本範例實施例中,主記憶體1114為動態隨機存取記憶體(Dynamic Random Access Memory,DRAM)。此外,必須瞭解的是,在本發明另一範例實施例中,作業系統亦可藉由儲存裝置的儲存空間所模擬的虛擬記憶體來作為執行應用程式之臨時資料儲存媒介,在此例子中,主記憶體更包括此類虛擬記憶體。The main memory 1114 is coupled to the central processing unit 1112 via the system bus 1116 and is used to load a variety of programs and data for direct execution and operation by the central processing unit 1112. Specifically, the main memory 1114 has characteristics such as read and write speeds that can be read and written at a high speed, and thus the main memory 1114 is a temporary data storage medium used as the operating system 1122 or other programs being executed. In the present exemplary embodiment, the main memory 1114 is a Dynamic Random Access Memory (DRAM). In addition, it should be understood that, in another exemplary embodiment of the present invention, the operating system may also use the virtual memory simulated by the storage space of the storage device as a temporary data storage medium for executing the application, in this example, The main memory further includes such virtual memory.

資料傳輸介面1118經由系統匯流排1116耦接至中央處理單元1112,用以耦接外接式記憶體儲存裝置100。在本範例實施例中,資料傳輸介面為通用序列匯流排(Universal Serial Bus,USB)介面。然而,必須瞭解的是本發明不限於此,資料傳輸介面1118亦可以是其他適合即插即用介面。The data transmission interface 1118 is coupled to the central processing unit 1112 via the system bus 1116 for coupling to the external memory storage device 100. In this exemplary embodiment, the data transmission interface is a Universal Serial Bus (USB) interface. However, it must be understood that the present invention is not limited thereto, and the data transmission interface 1118 may be other suitable plug and play interfaces.

內建式儲存裝置1120經由系統匯流排1116耦接至中央處理器單元1112用以作為電腦主機1110的主要儲存裝置。在本範例實施例中,內建式儲存裝置1120為硬碟(Hard Disk),然而,必須瞭解的是,本發明不限於此。內建式儲存裝置1120安裝有作業系統1122,作業系統1122是用以管理電腦硬體(Computer hardware)與電腦軟體(Computer software)資源的程式。具體來說,作業系統1122用以管理與配置主記憶體1114、決定系統資源(例如,中央處理單元1112、主記憶體1114、輸入/輸出裝置1150)供需的優先次序、控制輸入/輸出裝置1150、管理檔案系統等運作。在本範例實施例中,作業系統1122為微軟(Microsoft)公司的視窗(Windows)作業系統。然而,必須瞭解的是,本發明不限於此,本發明亦可應用於Linux、Mac或其他作業系統中。The built-in storage device 1120 is coupled to the central processing unit 1112 via the system bus 1116 for use as the primary storage device of the computer host 1110. In the present exemplary embodiment, the built-in storage device 1120 is a Hard Disk. However, it must be understood that the present invention is not limited thereto. The built-in storage device 1120 is equipped with an operating system 1122, which is a program for managing computer hardware and computer software resources. Specifically, the operating system 1122 is configured to manage and configure the main memory 1114, determine the priority of supply and demand of system resources (eg, the central processing unit 1112, the main memory 1114, and the input/output device 1150), and control the input/output device 1150. Management of file systems and other operations. In the present exemplary embodiment, the operating system 1122 is a Windows (Windows) operating system of Microsoft Corporation. However, it must be understood that the present invention is not limited thereto, and the present invention is also applicable to Linux, Mac or other operating systems.

輸入/輸出裝置1150是耦接至電腦主機1110。在本範例實施例中,輸入/輸出裝置1150包括滑鼠2202、鍵盤2204、顯示器2206與印表機2208(如圖2所示)。必須瞭解的是,輸入/輸出裝置1150不限於圖2所示的裝置,輸入/輸出裝置1150可更包括其他裝置。此外,在本發明另一範例實施例中,主機系統1100亦可不配備有輸入輸出裝置1150The input/output device 1150 is coupled to the computer host 1110. In the present exemplary embodiment, the input/output device 1150 includes a mouse 2202, a keyboard 2204, a display 2206, and a printer 2208 (shown in FIG. 2). It must be understood that the input/output device 1150 is not limited to the device shown in FIG. 2, and the input/output device 1150 may further include other devices. In addition, in another exemplary embodiment of the present invention, the host system 1100 may not be equipped with the input/output device 1150.

外接式記憶體儲存裝置100是即插即用記憶體儲存裝置,並且以可移除的方式耦接至主機系統1100。例如,外接式記憶體儲存裝置100為隨身碟2210或固態硬碟2212(如圖2所示)。外接式記憶體儲存裝置100包括連接器102、記憶體控制器104、記憶體模組106與選擇開關108。The external memory storage device 100 is a plug-and-play memory storage device and is removably coupled to the host system 1100. For example, the external memory storage device 100 is a flash drive 2210 or a solid state drive 2212 (shown in FIG. 2). The external memory storage device 100 includes a connector 102, a memory controller 104, a memory module 106, and a selection switch 108.

連接器102為通用序列匯流排(Universal Serial Bus,USB)連接器。然而,必須瞭解的是,本發明不限於此,連接器102亦可以其他適合即插即用連接器。The connector 102 is a universal serial bus (USB) connector. However, it must be understood that the present invention is not limited thereto, and the connector 102 may be other suitable plug-and-play connectors.

記憶體控制器104用以執行以硬體型式或韌體型式實作的多個邏輯閘或控制指令,並且根據主機系統1100的指令在記憶體模組106中進行資料的寫入、讀取與抹除等運作。The memory controller 104 is configured to execute a plurality of logic gates or control commands implemented in a hard type or a firmware type, and write and read data in the memory module 106 according to an instruction of the host system 1100. Erase and other operations.

記憶體模組106是耦接至記憶體控制器104,並且用以儲存資料。The memory module 106 is coupled to the memory controller 104 and is used to store data.

記憶體模組106包括多個實體區塊,並且各實體區塊分別具有複數個頁面,其中屬於同一個實體區塊之實體頁面可被獨立地寫入且被同時地抹除。在本範例實施例中,實體區塊為抹除之最小單位。亦即,每一實體區塊含有最小數目之一併被抹除之記憶胞。而實體頁面為寫入的最小單元。即,實體頁面為寫入資料的最小單元。然而,必須瞭解的是,在本發明另一範例實施例中,寫入資料的最小單位亦可以是扇區(Sector)或其他大小。The memory module 106 includes a plurality of physical blocks, and each physical block has a plurality of pages, respectively, wherein the physical pages belonging to the same physical block can be independently written and erased simultaneously. In this exemplary embodiment, the physical block is the smallest unit of erasure. That is, each physical block contains one of the smallest number of erased memory cells. The physical page is the smallest unit of writing. That is, the physical page is the smallest unit for writing data. However, it must be understood that in another exemplary embodiment of the present invention, the minimum unit for writing data may also be a sector or other size.

在本範例實施例中,記憶體模組106為可複寫式非揮發性記憶體模組。例如,記憶體模組106為多層記憶胞(Multi Level Cell,MLC)NAND快閃記憶體模組。然而,本發明不限於此,記憶體模組106亦可是單層記憶胞(Single Level Cell,SLC)NAND快閃記憶體模組、其他快閃記憶體模組或其他具有相同特性的記憶體模組。In the exemplary embodiment, the memory module 106 is a rewritable non-volatile memory module. For example, the memory module 106 is a multi-level cell (MLC) NAND flash memory module. However, the present invention is not limited thereto, and the memory module 106 may also be a single level cell (SLC) NAND flash memory module, other flash memory modules, or other memory modules having the same characteristics. group.

記憶體模組106的儲存位址會被邏輯地劃分為分割區180並且分割區180中儲存有第一應用程式182與第二應用程式184。必須瞭解的是,在本發明另一範例實施例中,記憶體模組106亦可被劃分為更多分割區。The storage address of the memory module 106 is logically divided into partitions 180 and the first application 182 and the second application 184 are stored in the partition 180. It should be understood that, in another exemplary embodiment of the present invention, the memory module 106 may also be divided into more partitions.

選擇開關108是耦接至記憶體控制器104,並且可設定於多個運作模式其中之一。具體來說,選擇開關108的一部份是暴露於外接式記憶體儲存裝置100的外殼表面上,用於設定外接式記憶體儲存裝置100被耦接至主機系統110的運作方式。特別是,主機系統1100會依選擇開關108目前被設定之運作模式來執行一儲存於記憶體模組106中相對應的應用程式。在本範例實施例中,選擇開關108可於多個位置之間移動。也就是說,使用者可將選擇開關108選擇地定位在其中一個位置上。在本範例實施例中,選擇開關108可被定位在第一位置或第二位置。在另一範例實施例中,選擇開關108亦可依據所接收的訊息,如預定的激發訊號,或激發訊號的次數,來設定其運作模式。特別是,記憶體控制器104會儲存一選擇旗標並且根據選擇開關108的運作模式來標記此選擇旗標以記錄選擇開關108的運作模式。例如,當選擇開關108處於第一運作模式時,記憶體控制器104會將此選擇旗標標記為第一運作模式,並且當選擇開關108處於第二運作模式時,記憶體控制器104會將此選擇旗標標記為第二運作模式。The selection switch 108 is coupled to the memory controller 104 and can be set to one of a plurality of operational modes. Specifically, a portion of the selection switch 108 is exposed to the surface of the housing of the external memory storage device 100 for setting the operation mode in which the external memory storage device 100 is coupled to the host system 110. In particular, the host system 1100 executes a corresponding application stored in the memory module 106 in accordance with the mode of operation in which the selection switch 108 is currently set. In the present exemplary embodiment, the selector switch 108 is movable between a plurality of positions. That is, the user can selectively position the selector switch 108 in one of the positions. In the present exemplary embodiment, the selection switch 108 can be positioned in a first position or a second position. In another exemplary embodiment, the selection switch 108 can also set its operation mode according to the received message, such as a predetermined excitation signal or the number of times the signal is excited. In particular, the memory controller 104 stores a selection flag and marks the selection flag in accordance with the mode of operation of the selection switch 108 to record the mode of operation of the selection switch 108. For example, when the select switch 108 is in the first mode of operation, the memory controller 104 will mark the selection flag as the first mode of operation, and when the select switch 108 is in the second mode of operation, the memory controller 104 will This selection flag is marked as the second mode of operation.

圖3是根據本發明範例實施例所繪示的記憶體控制器的概要方塊圖。FIG. 3 is a schematic block diagram of a memory controller according to an exemplary embodiment of the invention.

請參照圖3,記憶體控制器104包括記憶體管理電路202、主機介面204與記憶體介面206。Referring to FIG. 3, the memory controller 104 includes a memory management circuit 202, a host interface 204, and a memory interface 206.

記憶體管理電路202用以控制記憶體控制器104的整體運作。具體來說,記憶體管理電路202具有多個控制指令,並且在外接式記憶體儲存裝置100運作時,此些控制指令會被執行以對記憶體模組106進行資料寫入、讀取、抹除等運作。The memory management circuit 202 is used to control the overall operation of the memory controller 104. Specifically, the memory management circuit 202 has a plurality of control commands, and when the external memory storage device 100 operates, the control commands are executed to write, read, and erase data to the memory module 106. In addition to waiting for the operation.

在本範例實施例中,記憶體管理電路202的控制指令是以韌體型式來實作。例如,記憶體管理電路202具有微處理器單元(未繪示)與唯讀記憶體(未繪示),並且此些控制指令是被燒錄至此唯讀記憶體中。當外接式記憶體儲存裝置100運作時,此些控制指令會由微處理器單元來執行以完成資料寫入、讀取、抹除等運作。In the present exemplary embodiment, the control instructions of the memory management circuit 202 are implemented in a firmware version. For example, the memory management circuit 202 has a microprocessor unit (not shown) and a read-only memory (not shown), and such control instructions are programmed into the read-only memory. When the external memory storage device 100 is in operation, such control commands are executed by the microprocessor unit to perform data writing, reading, erasing, and the like.

在本發明另一範例實施例中,記憶體管理電路202的控制指令亦可以程式碼型式儲存於記憶體模組106的特定區域(例如,記憶體模組中專用於存放系統資料的系統區)中。此外,記憶體管理電路202具有微處理器單元(未繪示)、唯讀記憶體(未繪示)及隨機存取記憶體(未繪示)。特別是,此唯讀記憶體具有驅動碼段,並且當記憶體控制器104被致能時,微處理器單元會先執行此驅動碼段來將儲存於記憶體模組106中之控制指令載入至記憶體管理電路202的隨機存取記憶體中。之後,微處理器單元會運轉此些控制指令以執行資料寫入、讀取、抹除等運作。此外,在本發明另一範例實施例中,記憶體管理電路202的控制指令亦可以一硬體型式來實作。In another exemplary embodiment of the present invention, the control command of the memory management circuit 202 can also be stored in a specific area of the memory module 106 (for example, a system area dedicated to storing system data in the memory module). in. In addition, the memory management circuit 202 has a microprocessor unit (not shown), a read-only memory (not shown), and a random access memory (not shown). In particular, the read-only memory has a drive code segment, and when the memory controller 104 is enabled, the microprocessor unit executes the drive code segment to load the control command stored in the memory module 106. The memory is entered into the random access memory of the memory management circuit 202. After that, the microprocessor unit will run these control commands to perform data writing, reading, erasing and the like. In addition, in another exemplary embodiment of the present invention, the control command of the memory management circuit 202 can also be implemented in a hardware format.

在本範例實施例中,記憶體控制器104的記憶體管理電路202更用以執行偵測選擇開關108的目前運作模式並且根據主機系統1100的請求將關於選擇開關108的目前運作模式之資訊傳送給主機系統1100。具體來說,記憶體管理電路202會偵測選擇開關108目前所處的運作模式並且標記上述選擇旗標以記錄選擇開關108的運作模式。此外,記憶體管理電路202會識別來自於主機系統1100的用於請求此選擇旗標的指令(例如,製造商指令(Vender Command))並且將上述選擇旗標或其相對應之訊息傳送給主機系統1100以回應此指令。In the present exemplary embodiment, the memory management circuit 202 of the memory controller 104 is further configured to perform the current operation mode of the detection selection switch 108 and transmit information about the current operation mode of the selection switch 108 according to the request of the host system 1100. To the host system 1100. Specifically, the memory management circuit 202 detects the mode of operation in which the selection switch 108 is currently located and marks the selection flag to record the mode of operation of the selection switch 108. In addition, the memory management circuit 202 identifies an instruction from the host system 1100 for requesting the selection flag (eg, a Vender Command) and transmits the selection flag or its corresponding message to the host system. 1100 in response to this directive.

圖4是根據本發明範例實施例所繪示之主機系統自動地運轉儲存於外接式記憶體儲存裝置之應用程式的流程圖。4 is a flow chart of a host system automatically operating an application stored in an external memory storage device according to an exemplary embodiment of the invention.

請參照圖4,當外接式記憶體儲存裝置100耦接至主機系統1100時,在步驟S401中主機系統1100會主動請求外接式記憶體儲存裝置100傳送選擇開關108的目前運作模式。例如,能夠傳送此用於請求此選擇旗標之指令的導引程式1124會事先地運轉於主機系統1100的作業系統中,並且當使用者將外接式記憶體儲存裝置100耦接至主機系統1100時,導引程式1124會向外接式記憶體儲存裝置100下達用於請求此選擇旗標的指令。並且,當接收到用於請求此選擇旗標的指令時,記憶體控制器104的記憶體管理電路202會將所儲存之選擇旗標傳送給導引程式1124。例如,當選擇開關108處於第一位置時,記憶體管理電路202會將標記為第一運作模式的選擇旗標傳送給導引程式1124,並且當選擇開關108處於第二位置時,記憶體控制器104會將標記為第二運作模式的選擇旗標傳送給導引程式1124。Referring to FIG. 4, when the external memory storage device 100 is coupled to the host system 1100, the host system 1100 actively requests the external memory storage device 100 to transmit the current operation mode of the selection switch 108 in step S401. For example, the boot program 1124 capable of transmitting the command for requesting the selection flag is previously operated in the operating system of the host system 1100, and when the user couples the external memory storage device 100 to the host system 1100. The pilot program 1124 will issue an instruction to the external memory storage device 100 for requesting the selection flag. And, upon receiving an instruction to request the selection flag, the memory management circuit 202 of the memory controller 104 transmits the stored selection flag to the vector 1124. For example, when the selection switch 108 is in the first position, the memory management circuit 202 transmits a selection flag labeled as the first mode of operation to the pilot program 1124, and when the selection switch 108 is in the second position, the memory control The selector 104 transmits a selection flag labeled as the second mode of operation to the pilot 1124.

之後,在步驟S403中主機系統1100會依據選擇開關108的目前運作模式執行所儲存之應用程式的其中之一。例如,當接收到選擇旗標時,導引程式1124會根據選擇旗標的標記運轉(Run)儲存於記憶體模組106中的應用程式。具體來說,當接收到標記為第一運作模式的選擇旗標時,導引程式1124會在作業系統1122中運轉第一應用程式182。並且,當接收到標記為第二運作模式的選擇旗標時,導引程式1124會在作業系統1122中運轉第二應用程式184。Thereafter, in step S403, the host system 1100 executes one of the stored applications in accordance with the current mode of operation of the selection switch 108. For example, when a selection flag is received, the navigation program 1124 will run the application stored in the memory module 106 in accordance with the flag of the selection flag. Specifically, the daemon 1124 runs the first application 182 in the operating system 1122 when a selection flag labeled the first mode of operation is received. And, when receiving the selection flag labeled as the second mode of operation, the pilot program 1124 runs the second application 184 in the operating system 1122.

值得一提的是,導引程式1124會週期地向記憶體儲存裝置100輪詢(polling)此選擇旗標,以識別選擇旗標的狀態是否已被改變。例如,每隔一段時間(例如,5秒),導引程式1124就會下達用於請求此選擇旗標的指令給記憶體儲存裝置100。It is worth mentioning that the pilot program 1124 periodically polls the memory storage device 100 for the selection flag to identify whether the state of the selection flag has been changed. For example, at intervals (e.g., 5 seconds), the pilot program 1124 issues an instruction to request the selection flag to the memory storage device 100.

此外,在本發明另一範例實施例中,導引程式1124偵測到記憶體儲存裝置100被重新耦接至主機系統1100(即,記憶體儲存裝置100被切斷與主機系統1100之間的電性連接之後再次被電性連接至主機系統1100)時,導引程式1124會再次下達用於請求此選擇旗標的指令給記憶體儲存裝置100。In addition, in another exemplary embodiment of the present invention, the boot program 1124 detects that the memory storage device 100 is recoupled to the host system 1100 (ie, the memory storage device 100 is disconnected from the host system 1100). When the electrical connection is again electrically connected to the host system 1100), the pilot program 1124 again issues an instruction for requesting the selection flag to the memory storage device 100.

值得一提的是,當選擇旗標的狀態被改變時,導引程式1124會再根據選擇旗標的狀態來執行對應的應用程式。It is worth mentioning that when the state of the selection flag is changed, the guide program 1124 will execute the corresponding application according to the state of the selection flag.

例如,假設在選擇開關108的位置被定位在第一位置的狀態下記憶體儲存裝置100被耦接至主機系統1100時,導引程式1124會根據所接收的選擇旗標在作業系統1122中運轉第一應用程式182。此時,倘若使用者將選擇開關108的位置設定成第二位置時,由於選擇旗標的標記已改變為第二運作模式,因此導引程式1124會根據所接收的選擇旗標在作業系統1122中運轉第二應用程式184。也就是說,在此例子中,第一應用程式182與第二應用程式184皆會在作業系統1122中被運轉。For example, assuming that the memory storage device 100 is coupled to the host system 1100 in a state where the position of the selection switch 108 is positioned at the first position, the guidance program 1124 operates in the operating system 1122 according to the received selection flag. The first application 182. At this time, if the user sets the position of the selection switch 108 to the second position, since the flag of the selection flag has been changed to the second operation mode, the guidance program 1124 will be in the operating system 1122 according to the received selection flag. The second application 184 is run. That is, in this example, both the first application 182 and the second application 184 will be run in the operating system 1122.

值得一提的是,除了同時運轉儲存於外接式記憶體儲存裝置100的多個應用程式之外,在本發明另一範例實施例中導引程式1124亦可於同一時間僅讓其中一個應用程式被運轉。例如,在本發明另一範例實施例中,當使用者將選擇開關108的位置設定成第二位置時,導引程式1124會在運轉第二應用程式184之前先判斷在作業系統1122中第一應用程式182是否已被運轉。並且,當第一應用程式182已被運轉時,導引程式1124會終止第一應用程式182的運轉,並且之後再運轉第二應用程式184。反之,當使用者將選擇開關108的位置設定成第一位置時,導引程式1124會在運轉第一應用程式182之前先判斷在作業系統1122中第二應用程式184是否已被運轉。並且,當第二應用程式184已被運轉時,導引程式1124會終止第二應用程式184的運轉,並且之後再運轉第一應用程式182。It is worth mentioning that, in addition to running a plurality of applications stored in the external memory storage device 100 at the same time, in another exemplary embodiment of the present invention, the guiding program 1124 can also only have one of the applications at the same time. Being operated. For example, in another exemplary embodiment of the present invention, when the user sets the position of the selection switch 108 to the second position, the guiding program 1124 first determines the first in the operating system 1122 before running the second application 184. Whether the application 182 has been run. Moreover, when the first application 182 has been run, the boot program 1124 terminates the operation of the first application 182 and then runs the second application 184. On the other hand, when the user sets the position of the selection switch 108 to the first position, the guiding program 1124 determines whether the second application 184 has been operated in the operating system 1122 before running the first application 182. Moreover, when the second application 184 has been run, the navigation program 1124 terminates the operation of the second application 184 and then runs the first application 182.

在本範例實施例中,預先運轉於主機系統1100的導引程式1124是預先儲存於內建式儲存裝置1120中。然而,本發明不限於此。例如,在本發明另一範例實施例中,導引程式1124與用以自動地運轉導引程式1124的自動執行檔(例如,檔名為"Autorun.inf"的描述檔(script file))會被儲存在記憶體模組106的分割區180中,並且記憶體控制器104會將分割區模擬為光碟分割區。In the present exemplary embodiment, the pilot program 1124 that is pre-running on the host system 1100 is pre-stored in the built-in storage device 1120. However, the invention is not limited thereto. For example, in another exemplary embodiment of the present invention, the navigation program 1124 and the automatic execution file for automatically running the navigation program 1124 (for example, a script file named "Autorun.inf") will It is stored in the partition 180 of the memory module 106, and the memory controller 104 simulates the partition as a disc partition.

也就是說,當使用者將記憶體儲存裝置100耦接至主機系統1100並且主機系統1100向外接式記憶體儲存裝置100詢問其媒體特徵時,記憶體管理電路202會將向主機系統1100宣告分割區180為光碟分割區。之後,作業系統1122會自動地運轉儲存於分割區180中的自動執行檔,並且所運轉的自動執行檔會於作業系統1122中自動地運轉導引程式1124。基此,在此範例實施例中,導引程式1124無需預先儲存於內建式儲存裝置1120中。That is, when the user couples the memory storage device 100 to the host system 1100 and the host system 1100 queries the external memory storage device 100 for its media feature, the memory management circuit 202 will announce the segmentation to the host system 1100. The area 180 is a disc division area. Thereafter, the operating system 1122 automatically operates the automatic execution file stored in the partition 180, and the operated automatic execution file automatically runs the guidance program 1124 in the operating system 1122. Therefore, in this exemplary embodiment, the navigation program 1124 need not be stored in the built-in storage device 1120 in advance.

主機介面204是耦接至記憶體管理電路202並且用以接收與識別主機系統1100所傳送的指令與資料。也就是說,主機系統1100所傳送的指令與資料會透過主機介面204來傳送至記憶體管理電路202。在本範例實施例中,主機介面204是對應連接器102為USB介面。然而,必須瞭解的是本發明不限於此,主機介面204亦可以是其他適合即插即用資料傳輸介面。The host interface 204 is coupled to the memory management circuit 202 and is configured to receive and identify instructions and data transmitted by the host system 1100. That is to say, the instructions and data transmitted by the host system 1100 are transmitted to the memory management circuit 202 through the host interface 204. In the exemplary embodiment, the host interface 204 is a USB interface of the corresponding connector 102. However, it must be understood that the present invention is not limited thereto, and the host interface 204 may be other suitable plug and play data transmission interfaces.

記憶體介面206是耦接至記憶體管理電路202並且用以存取記憶體模組106。也就是說,欲寫入至記憶體模組106的資料會經由記憶體介面206轉換為記憶體模組106所能接受的格式。The memory interface 206 is coupled to the memory management circuit 202 and used to access the memory module 106. That is, the data to be written to the memory module 106 is converted to a format acceptable to the memory module 106 via the memory interface 206.

在本發明一範例實施例中,記憶體控制器104還包括緩衝記憶體252。緩衝記憶體252是耦接至記憶體管理電路202並且用以暫存來自於主機系統1100的資料與指令或來自於記憶體模組106的資料。例如,上述選擇旗標會被儲存於緩衝記憶體252中。In an exemplary embodiment of the invention, the memory controller 104 further includes a buffer memory 252. The buffer memory 252 is coupled to the memory management circuit 202 and is used to temporarily store data and instructions from the host system 1100 or data from the memory module 106. For example, the selection flag described above will be stored in the buffer memory 252.

在本發明一範例實施例中,記憶體控制器104還包括電源管理電路254。電源管理電路254是耦接至記憶體管理電路202並且用以控制外接式記憶體儲存裝置100的電源。In an exemplary embodiment of the invention, the memory controller 104 further includes a power management circuit 254. The power management circuit 254 is coupled to the memory management circuit 202 and is used to control the power of the external memory storage device 100.

在本發明一範例實施例中,記憶體控制器104還包括錯誤檢查與校正電路256。錯誤檢查與校正電路256是耦接至記憶體管理電路202並且用以執行一錯誤檢查與校正程序以確保資料的正確性。具體來說,當記憶體管理電路202從主機系統1100中接收到寫入指令時,錯誤檢查與校正電路256會為對應此寫入指令的資料產生對應的錯誤檢查與校正碼(Error Checking and Correcting Code,ECC Code),並且記憶體管理電路202會將對應此寫入指令的資料與對應的錯誤檢查與校正碼寫入至記憶體模組106中。之後,當記憶體管理電路202從記憶體模組106中讀取資料時會同時讀取此資料對應的錯誤檢查與校正碼,並且錯誤檢查與校正電路256會依據此錯誤檢查與校正碼對所讀取的資料執行錯誤校正程序。In an exemplary embodiment of the invention, the memory controller 104 further includes an error checking and correction circuit 256. The error checking and correction circuit 256 is coupled to the memory management circuit 202 and is used to perform an error checking and correction procedure to ensure the correctness of the data. Specifically, when the memory management circuit 202 receives a write command from the host system 1100, the error check and correction circuit 256 generates a corresponding error check and correction code for the data corresponding to the write command (Error Checking and Correcting). Code, ECC Code), and the memory management circuit 202 writes the data corresponding to the write command and the corresponding error check and correction code into the memory module 106. After that, when the memory management circuit 202 reads the data from the memory module 106, the error check and correction code corresponding to the data is simultaneously read, and the error check and correction circuit 256 checks the error check and the correction code according to the error check and correction code. The read data performs an error correction procedure.

圖5是根據本發明範例實施例所繪示的應用程式執行方法的流程圖。FIG. 5 is a flowchart of an application execution method according to an exemplary embodiment of the present invention.

請參照圖5,步驟S501為在外接式記憶體儲存裝置100中配置可被設定於多個運作模式其中之一的選擇開關108。在此,選擇開關108之運作模式的數目可根據欲儲存於記憶體儲存裝置100中的應用程式的數目而定,其中每一運作模式會各別地對應其中一個應用程式。Referring to FIG. 5, step S501 is to arrange a selection switch 108 that can be set in one of a plurality of operation modes in the external memory storage device 100. Here, the number of modes of operation of the selection switch 108 may depend on the number of applications to be stored in the memory storage device 100, wherein each mode of operation will correspond to one of the applications.

步驟S503為在主機系統1100的作業系統1122中運轉導引程式1124。之後,步驟S505為將外接式記憶體儲存裝置100耦接至主機系統1100。值得一提的是,在導引程式1124是儲存於外接式儲存裝置1000之模擬光碟分割區的例子中,導引程式1124是在外接式記憶體儲存裝置100被耦接至主機系統1100之後才被運轉於作業系統1122中。Step S503 is to run the navigation program 1124 in the operating system 1122 of the host system 1100. Thereafter, step S505 is to couple the external memory storage device 100 to the host system 1100. It is worth mentioning that in the example where the boot program 1124 is stored in the analog disc partition of the external storage device 1000, the boot program 1124 is only after the external memory storage device 100 is coupled to the host system 1100. It is operated in the operating system 1122.

在步驟S507中記憶體控制器204會偵測選擇開關108所處的目前運作模式並且將選擇旗標標記為此目前運作模式。標記選擇旗標的方式已描述如上,在此不再重複描述。In step S507, the memory controller 204 detects the current mode of operation in which the selection switch 108 is located and marks the selection flag as the current mode of operation. The manner of marking the selection flag has been described above, and the description will not be repeated here.

之後,在步驟S509中導引程式1124向外接式記憶體儲存裝置請求選擇旗標並從記憶體控制器204中接收選擇旗標。Thereafter, in step S509, the navigation program 1124 requests the selection memory from the external memory storage device and receives the selection flag from the memory controller 204.

然後,在步驟S511中導引程式1124會根據所接收的選擇旗標於作業系統1122中運轉對應的應用程式。根據選擇旗標所標記的運作模式來運轉對應的應用程式的方式已描述如上,在此不再重複描述。Then, in step S511, the pilot program 1124 runs the corresponding application in the operating system 1122 according to the received selection flag. The manner in which the corresponding application is run according to the operation mode marked by the selection flag has been described above, and the description will not be repeated here.

必須瞭解的是,儘管未繪示於圖式中,在本發明另一範例實施例中,應用程式執行方法更包括週期地向記憶體儲存裝置100請求選擇旗標或者偵測到記憶體儲存裝置100重新耦接至主機系統1100時向記憶體儲存裝置100再次請求選擇旗標,同時根據旗標的變動來運轉儲存於記憶體儲存裝置100中對應的應用程式。It should be understood that, although not shown in the drawings, in another exemplary embodiment of the present invention, the application execution method further includes periodically requesting a selection flag or detecting a memory storage device from the memory storage device 100. When 100 is recoupled to the host system 1100, the selection flag is again requested to the memory storage device 100, and the corresponding application stored in the memory storage device 100 is operated according to the change of the flag.

綜上所述,本發明範例實施例的應用程式執行方法與系統能夠根據選擇開關的位置自動地執行儲存於記憶體儲存裝置的多個應用程式,由此可讓使用者於無輸入/輸出裝置的主機系統中運轉儲存於記憶體儲存裝置的特定應用程式。In summary, the application execution method and system of the exemplary embodiment of the present invention can automatically execute a plurality of applications stored in the memory storage device according to the position of the selection switch, thereby allowing the user to have no input/output device. The host system runs a particular application stored in the memory storage device.

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

1000...應用程式執行系統1000. . . Application execution system

1100...主機系統1100. . . Host system

1110...電腦主機1110. . . Computer host

1112...中央處理器單元1112. . . Central processor unit

1114...主記憶體1114. . . Main memory

1116...系統匯流排1116. . . System bus

1118...資料傳輸介面1118. . . Data transmission interface

1120...內建式儲存裝置1120. . . Built-in storage device

1122...作業系統1122. . . working system

1124...導引程式1124. . . Boot program

1150...輸入/輸出裝置1150. . . Input/output device

100...外接式記憶體儲存裝置100. . . External memory storage device

102...連接器102. . . Connector

104...記憶體控制器104. . . Memory controller

106...記憶體模組106. . . Memory module

108...選擇開關108. . . switch

180...分割區180. . . Partition

182...第一應用程式182. . . First application

184...第二應用程式184. . . Second application

2202...滑鼠2202. . . mouse

2204...鍵盤2204. . . keyboard

2206...顯示器2206. . . monitor

2208...印表機2208. . . Printer

2210...隨身碟2210. . . Flash drive

2212...固態硬碟2212. . . Solid state hard drive

202...記憶體管理電路202. . . Memory management circuit

204...主機介面204. . . Host interface

206...記憶體介面206. . . Memory interface

252...緩衝記憶體252. . . Buffer memory

254...電源管理電路254. . . Power management circuit

256...錯誤檢查與校正電路256. . . Error checking and correction circuit

S401、S403...運轉應用程式的步驟S401, S403. . . Steps to run the app

S501、S503、S505、S507、S509、S511...運轉應用程式的步驟S501, S503, S505, S507, S509, S511. . . Steps to run the app

圖1是根據本發明第一範例實施例所繪示的應用程式執行系統的概要方塊圖。FIG. 1 is a schematic block diagram of an application execution system according to a first exemplary embodiment of the present invention.

圖2是根據本發明範例實施例所繪示的電腦、輸入/輸出裝置與快閃記憶體儲存裝置的示意圖。2 is a schematic diagram of a computer, an input/output device, and a flash memory storage device according to an exemplary embodiment of the invention.

圖3是根據本發明範例實施例所繪示的記憶體控制器的概要方塊圖。FIG. 3 is a schematic block diagram of a memory controller according to an exemplary embodiment of the invention.

圖4是根據本發明範例實施例所繪示之主機系統自動地運轉儲存於外接式記憶體儲存裝置之應用程式的流程圖。4 is a flow chart of a host system automatically operating an application stored in an external memory storage device according to an exemplary embodiment of the invention.

圖5是根據本發明範例實施例所繪示的應用程式執行方法的流程圖。FIG. 5 is a flowchart of an application execution method according to an exemplary embodiment of the present invention.

S401、S403...運轉應用程式的步驟S401, S403. . . Steps to run the app

Claims (16)

一種應用程式執行方法,用於在一主機系統的一作業系統中自動地運轉儲存於一外接式記憶體儲存裝置之一記憶體模組中的多個應用程式,該應用程式執行方法包括:在該外接式記憶體儲存裝置上配置一選擇開關,其中該選擇開關耦接至該外接式記憶體儲存裝置的一記憶體控制器,該選擇開關可被設定於多個運作模式其中之一並且每一該些運作模式各別地對應該些應用程式的其中之一;將該外接式記憶體儲存裝置耦接至該主機系統;由該記憶體控制器偵測該選擇開關所處的一目前運作模式並且將一選擇旗標標記為該目前運作模式,其中該目前運作模式為該些運作模式的其中之一;於該主機系統運轉一導引程式;由該導引程式向該外接式記憶體儲存裝置請求該選擇旗標並從該記憶體控制器中接收該選擇旗標;以及由該導引程式根據該選擇旗標於該作業系統中運轉對應該目前運作模式的應用程式。 An application execution method for automatically running a plurality of applications stored in a memory module of an external memory storage device in an operating system of a host system, the application execution method comprising: A selection switch is disposed on the external memory storage device, wherein the selection switch is coupled to a memory controller of the external memory storage device, and the selection switch can be set in one of a plurality of operation modes and each One of the operating modes respectively corresponds to one of the applications; the external memory storage device is coupled to the host system; and the memory controller detects a current operation of the selection switch And selecting a selection flag as the current mode of operation, wherein the current mode of operation is one of the modes of operation; wherein the host system runs a boot program; and the boot program is directed to the external memory The storage device requests the selection flag and receives the selection flag from the memory controller; and the guidance program is based on the selection flag The system should operate on the current mode of operation of the application. 如申請專利範圍第1項所述之應用程式執行方法,其中該些應用程式包括一第一應用程式與一第二應用程式,該些運作模式包括對應該第一應用程式的一第一運作模式與對應該第二應用程式的一第二運作模式,其中由該導引程式根據該選擇旗標於該作業系統中運轉對應該目前運作模式的應用程式的步驟包括:當該目前運作模式為該第一運作模式時,由該導引程 式於該作業系統中運轉該第一應用程式;以及當該目前運作模式為該第二運作模式時,由該導引程式於該作業系統中運轉該第二應用程式。 The application execution method of claim 1, wherein the application comprises a first application and a second application, the operation modes including a first operation mode corresponding to the first application And a second operation mode corresponding to the second application, wherein the step of the application running the application corresponding to the current operation mode in the operating system according to the selection flag comprises: when the current operation mode is The first mode of operation, by the lead Running the first application in the operating system; and when the current operating mode is the second operating mode, the guiding program runs the second application in the operating system. 如申請專利範圍第2項所述之應用程式執行方法,其中在該作業系統中該第一應用程式與該第二應用程式同時被運轉。 The application execution method of claim 2, wherein the first application is operated simultaneously with the second application in the operating system. 如申請專利範圍第2項所述之應用程式執行方法,更包括:在由該導引程式於該作業系統中運轉該第一應用程式之前判斷在該作業系統中該第二應用程式是否已被運轉;以及當在該作業系統中該第二應用程式已被運轉時,由該導引程式於該作業系統中終止該第二應用程式。 The application execution method of claim 2, further comprising: determining whether the second application has been used in the operating system before the first application is run by the guiding program in the operating system Running; and when the second application has been run in the operating system, the second application is terminated by the guiding program in the operating system. 如申請專利範圍第1項所述之應用程式執行方法,其中由該導引程式向該外接式記憶體儲存裝置請求該選擇旗標並從該記憶體控制器中接收該選擇旗標的步驟包括:由該導引程式週期地向該外接式記憶體儲存裝置請求該選擇旗標並從該記憶體控制器中接收該選擇旗標。 The application execution method of claim 1, wherein the step of requesting the selection flag from the external memory storage device and receiving the selection flag from the memory controller comprises: The selection flag is periodically requested from the boot memory to the external memory storage device and the selection flag is received from the memory controller. 如申請專利範圍第1項所述之應用程式執行方法,更包括:由該導引程式偵測該外接式記憶體儲存裝置是否被重新耦接至該主機系統;以及當該外接式記憶體儲存裝置被重新耦接至該主機系 統時,由該導引程式向該外接式記憶體儲存裝置請求該選擇旗標並從該記憶體控制器中接收該選擇旗標。 The application execution method of claim 1, further comprising: detecting, by the boot program, whether the external memory storage device is recoupled to the host system; and when the external memory is stored The device is recoupled to the host system In the system, the selection program requests the selection flag from the external memory storage device and receives the selection flag from the memory controller. 如申請專利範圍第1項所述之應用程式執行方法,更包括:將該記憶體模組邏輯地分割為一分割區,並且將該分割區模擬為一光碟分割區;以及將一自動執行檔、該導引程式與該些應用程式儲存至該分割區中,其中該自動執行檔用以自動地執行該導引程式,其中當該外接式記憶體儲存裝置耦接至該主機系統時該自動執行檔會被該作業系統自動地運轉。 The application execution method of claim 1, further comprising: logically dividing the memory module into a partition, and simulating the partition as a disc partition; and automatically executing the file The boot program and the application are stored in the partition, wherein the automatic executable is used to automatically execute the boot program, wherein the external memory storage device is automatically coupled to the host system The execution file will be automatically operated by the operating system. 一種應用程式執行系統,用以在一作業系統中自動地運轉多個應用程式,該應用程式執行系統包括:一主機系統,具有一內建式儲存裝置,其中該內建式儲存裝置安裝有該作業系統並且一導引程式被運轉於該作業系統中;以及一外接式記憶體儲存裝置,包括:一選擇開關,其中該選擇開關可被設定於多個運作模式其中之一並且每一該些運作模式各別地對應該些應用程式的其中之一;一連接器,用以耦接至該主機系統;一記憶體模組,儲存該些應用程式;以及一記憶體控制器,耦接至該選擇開關、該記憶體模組與該連接器,其中該記憶體控制器用以偵測該選 擇開關所處的一目前運作模式並且將一選擇旗標標記為該目前運作模式,其中該目前運作模式為該些該些運作模式的其中之一,其中當該外接式記憶體儲存裝置耦接至該主機系統時,該導引程式向該外接式記憶體儲存裝置請求該選擇旗標並從該記憶體控制器中接收該選擇旗標,其中該導引程式根據該選擇旗標於該作業系統中運轉對應該目前運作模式的應用程式。 An application execution system for automatically running a plurality of applications in an operating system, the application execution system comprising: a host system having a built-in storage device, wherein the built-in storage device is mounted An operating system and a guiding program are operated in the operating system; and an external memory storage device comprising: a selection switch, wherein the selection switch can be set in one of a plurality of operating modes and each of the plurality of operating modes Each of the operating modes corresponds to one of the applications; a connector for coupling to the host system; a memory module for storing the applications; and a memory controller coupled to the The selection switch, the memory module and the connector, wherein the memory controller is configured to detect the selection Selecting a current mode of operation in which the switch is located and marking a selection flag as the current mode of operation, wherein the current mode of operation is one of the modes of operation, wherein the external memory storage device is coupled to In the host system, the guiding program requests the selection flag from the external memory storage device and receives the selection flag from the memory controller, wherein the guiding program is based on the selection flag in the operating system Run an application that corresponds to the current mode of operation. 如申請專利範圍第8項所述之應用程式執行系統,其中該些應用程式包括一第一應用程式與一第二應用程式,該些運作模式包括對應該第一應用程式的一第一運作模式與對應該第二應用程式的一第二運作模式,其中當該目前運作模式為該第一運作模式時,該導引程式於該作業系統中運轉該第一應用程式,其中當該目前運作模式為該第二運作模式時,該導引程式於該作業系統中運轉該第二應用程式。 The application execution system of claim 8, wherein the application comprises a first application and a second application, the operation modes including a first operation mode corresponding to the first application And a second mode of operation corresponding to the second application, wherein when the current mode of operation is the first mode of operation, the driver runs the first application in the operating system, wherein the current mode of operation In the second mode of operation, the pilot program runs the second application in the operating system. 如申請專利範圍第9項所述之應用程式執行系統,其中在該作業系統中該第一應用程式與該第二應用程式同時被運轉。 The application execution system of claim 9, wherein the first application is run concurrently with the second application in the operating system. 如申請專利範圍第9項所述之應用程式執行系統,其中於該作業系統中運轉該第一應用程式之前該導引程式判斷在該作業系統中該第二應用程式是否已被運轉, 其中當在該作業系統中該第二應用程式已被運轉時,由該導引程式於該作業系統中終止該第二應用程式。 The application execution system of claim 9, wherein the navigation program determines whether the second application has been operated in the operating system before the first application is run in the operating system, When the second application is already running in the operating system, the second application is terminated by the guiding program in the operating system. 如申請專利範圍第9項所述之應用程式執行系統,其中該導引程式週期地向該外接式記憶體儲存裝置請求該選擇旗標並從該記憶體控制器中接收該選擇旗標。 The application execution system of claim 9, wherein the guidance program periodically requests the selection flag from the external memory storage device and receives the selection flag from the memory controller. 如申請專利範圍第9項所述之應用程式執行系統,其中該導引程式更用以偵測該外接式記憶體儲存裝置是否被重新耦接至該主機系統,並且當該外接式記憶體儲存裝置被重新耦接至該主機系統時,該導引程式向該外接式記憶體儲存裝置請求該選擇旗標並從該記憶體控制器中接收該選擇旗標。 The application execution system of claim 9, wherein the boot program is further configured to detect whether the external memory storage device is recoupled to the host system, and when the external memory is stored When the device is recoupled to the host system, the vector program requests the selection flag from the external memory storage device and receives the selection flag from the memory controller. 如申請專利範圍第9項所述之應用程式執行系統,其中該記憶體模組包括一分割區,該分割區儲存一自動執行檔、該導引程式與該些應用程式,其中該自動執行檔用以自動地執行該導引程式,其中該記憶體控制器將該分割區模擬為一光碟分割區,其中當該外接式記憶體儲存裝置耦接至該主機系統時該自動執行檔會被該作業系統自動地運轉。 The application execution system of claim 9, wherein the memory module includes a partition, the partition stores an automatic execution file, the navigation program and the applications, wherein the automatic execution file For automatically executing the boot program, wherein the memory controller simulates the partition as a disc partition, wherein the auto-execution file is when the external memory storage device is coupled to the host system The operating system operates automatically. 一種應用程式執行方法,用於在一主機系統的一作業系統中自動地運轉儲存於一外接式記憶體儲存裝置之一記憶體模組中的多個應用程式,該應用程式執行方法包括: 當該外接式記憶體儲存裝置耦接至該主機系統時,由該主機系統主動請求該外接式記憶體儲存裝置傳送一選擇開關的一運作模式;以及由該主機系統依據該選擇開關的該運作模式執行該些應用程式的其中之一。 An application execution method for automatically running a plurality of applications stored in a memory module of an external memory storage device in an operating system of a host system, the application execution method comprising: When the external memory storage device is coupled to the host system, the host system actively requests the external memory storage device to transmit an operation mode of a selection switch; and the host system performs the operation according to the selection switch. The mode executes one of these applications. 一種外接式記憶體儲存裝置,包括:一連接器,用以耦接至一主機系統;一記憶體模組,儲存複數個應用程式;一選擇開關,可被設定於多個運作模式的其中任一並且每一該些運作模式各別地對應該些應用程式的其中之一;以及一記憶體控制器,耦接至該選擇開關、該記憶體模組與該連接器,其中該記憶體控制器用以偵測該選擇開關所設定的運作模式;其中當該外接式記憶體儲存裝置耦接至該主機系統時,該外接式記憶體儲存裝置傳送該些運作模式之中該選擇開關被設定的一運作模式至該主機系統,藉此,該主機系統運轉對應被設定的該運作模式的該些應用程式的其中之一。 An external memory storage device includes: a connector for coupling to a host system; a memory module for storing a plurality of applications; and a selection switch capable of being set in any of a plurality of modes of operation And each of the operational modes individually corresponds to one of the applications; and a memory controller coupled to the selection switch, the memory module and the connector, wherein the memory control The device is configured to detect an operation mode set by the selection switch. When the external memory storage device is coupled to the host system, the external memory storage device transmits the selection switch among the operation modes. An operation mode is to the host system, whereby the host system operates one of the applications corresponding to the set operation mode.
TW099122523A 2010-07-08 2010-07-08 Method and system for executing application programs TWI507986B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW099122523A TWI507986B (en) 2010-07-08 2010-07-08 Method and system for executing application programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099122523A TWI507986B (en) 2010-07-08 2010-07-08 Method and system for executing application programs

Publications (2)

Publication Number Publication Date
TW201203116A TW201203116A (en) 2012-01-16
TWI507986B true TWI507986B (en) 2015-11-11

Family

ID=46756320

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099122523A TWI507986B (en) 2010-07-08 2010-07-08 Method and system for executing application programs

Country Status (1)

Country Link
TW (1) TWI507986B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI273422B (en) * 2005-06-24 2007-02-11 Wen-Bin Chen Portable device capable of switching access modes and system thereof
TW200807434A (en) * 2006-07-21 2008-02-01 Ours Technology Inc USB storage apparatus and method of switching the media types
TW200931412A (en) * 2008-01-07 2009-07-16 Phison Electronics Corp Flash memory storage apparatus, flash memory controller and switching method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI273422B (en) * 2005-06-24 2007-02-11 Wen-Bin Chen Portable device capable of switching access modes and system thereof
TW200807434A (en) * 2006-07-21 2008-02-01 Ours Technology Inc USB storage apparatus and method of switching the media types
TW200931412A (en) * 2008-01-07 2009-07-16 Phison Electronics Corp Flash memory storage apparatus, flash memory controller and switching method thereof

Also Published As

Publication number Publication date
TW201203116A (en) 2012-01-16

Similar Documents

Publication Publication Date Title
US9728277B2 (en) Method of repairing non-volatile memory based storage device and method of operating electronic system including the storage device
US9778844B2 (en) Installation of operating system on host computer using virtual storage of BMC
KR102549611B1 (en) Storage device and event notivication method thereof
US7234049B2 (en) Computer system with NAND flash memory for booting and storage
US11126602B2 (en) Key-value storage device and operating method thereof
US8897092B2 (en) Memory storage device, memory controller and controlling method
KR20100039182A (en) Solid state disk, computing system including the same and operating method thereof
US20080091935A1 (en) Hard disk drive with disk embedded dos boot image and firmware download method
US8667242B2 (en) Data access method and system, storage medium controller and storage system
KR20200008710A (en) Data Storage Device and Operation Method Thereof, Storage System Having the Same
KR20160007988A (en) Storage system managing run-time bad cells
KR20190010335A (en) Storage device storing latency information, processor and computing system
KR20210098717A (en) Controller, operating method thereof and storage device including the same
US20110231621A1 (en) System recovery method, and storage medium controller and storage system using the same
KR20200005220A (en) Data Storage Device and Operation Method Thereof, Server for Providing Firmware Therefor
KR102560251B1 (en) Semiconductor device and semiconductor system
KR20200089939A (en) Memory system and operating method thereof
JP2007034467A (en) Device controller
CN110825421B (en) Firmware upgrading method, system and readable storage medium
KR20140080948A (en) Operating method for data storage device
US20130097412A1 (en) Performing A Boot Sequence In A Multi-Processor System
KR102474937B1 (en) Data storage device and operating method thereof
US8024362B2 (en) System and method for erasing and writing desktop management interface data under a linux system
TWI507986B (en) Method and system for executing application programs
KR20210068734A (en) Data storage device and operating method thereof