TW201820131A - Process management method and apparatus - Google Patents

Process management method and apparatus Download PDF

Info

Publication number
TW201820131A
TW201820131A TW106126766A TW106126766A TW201820131A TW 201820131 A TW201820131 A TW 201820131A TW 106126766 A TW106126766 A TW 106126766A TW 106126766 A TW106126766 A TW 106126766A TW 201820131 A TW201820131 A TW 201820131A
Authority
TW
Taiwan
Prior art keywords
program
sub
function
dynamic link
link library
Prior art date
Application number
TW106126766A
Other languages
Chinese (zh)
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 香港商阿里巴巴集團服務有限公司
Publication of TW201820131A publication Critical patent/TW201820131A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Abstract

Disclosed in the present application are a method and apparatus for process management, comprising: initiating an agent process, said agent process loading a dynamic link library linked by the agent process to a memory; said agent process creating a first sub-process, said first sub-process loading a first program by means of invoking an entry function of said program; said agent process creating a second sub-process, said second sub-process loading a second program by means of invoking an entry function of said second program. Said first and second programs share the memory occupied by said dynamic link library.

Description

進程管理方法及裝置    Process management method and device   

本案涉及電腦技術領域,尤其涉及一種進程管理方法及裝置。 This case relates to the field of computer technology, and in particular, to a method and device for process management.

進程(Process)是電腦中的程式關於某資料集合上的一次執行活動,是系統進行資源配置和調度的基本單位,是作業系統結構的基礎。程式是指令、資料及其組織形式的描述,進程是程式的實體。 Process (Process) is an execution activity of a program in a computer about a certain data collection. It is the basic unit for resource allocation and scheduling of the system and the basis of the operating system structure. A program is a description of instructions, data, and its organizational form, and a process is the entity of a program.

在Linux系統中,init進程是Linux系統中所有進程的父進程。init進程由Linux內核引導執行,是系統中的第一個進程。init進程產生子進程,此時子進程共用父進程的記憶體空間,一旦父進程或子進程修改了某頁記憶體,則Linux內核會創建該頁記憶體專屬於該進程的副本,這樣父子進程即可共用內容相同的記憶體頁,又互不干擾。 In a Linux system, the init process is the parent process of all processes in the Linux system. The init process is guided by the Linux kernel and is the first process in the system. The init process generates a child process. At this time, the child process shares the memory space of the parent process. Once the parent process or the child process modifies a page of memory, the Linux kernel creates a copy of the page memory that is exclusive to the process. You can share pages with the same content without disturbing each other.

本案實施例提供了一種進程管理方法及裝置。 The embodiment of the present case provides a method and a device for process management.

本案實施例提供的方法,包括:啟動代理進程,所述代理進程載入所述代理進程所鏈接的動態鏈接程式庫到記 憶體;所述代理進程創建第一子進程,所述第一子進程藉由調用所述第一程式的入口函數,載入所述第一程式;所述代理進程創建第二子進程,所述第二子進程藉由調用所述第二程式的入口函數,載入所述第二程式;其中,所述第一程式和所述第二程式共用所述動態鏈接程式庫佔用的記憶體。 The method provided by the embodiment of the present case includes: starting an agent process, the agent process loading a dynamic link library linked to the agent process into memory; the agent process creating a first child process, the first child process The first program is loaded by calling the entry function of the first program; the proxy process creates a second sub-process, and the second sub-process is loaded by calling the entry function of the second program The second program; wherein the first program and the second program share a memory occupied by the dynamic link library.

601‧‧‧啟動模組 601‧‧‧Activation module

602‧‧‧進程創建模組 602‧‧‧Process Creation Module

700‧‧‧裝置 700‧‧‧ device

701‧‧‧系統控制邏輯 701‧‧‧system control logic

702‧‧‧處理器 702‧‧‧ processor

703‧‧‧系統記憶體 703‧‧‧system memory

704‧‧‧NVM/記憶體 704‧‧‧NVM / Memory

705‧‧‧輸入/輸出裝置 705‧‧‧input / output device

706‧‧‧網路介面 706‧‧‧Interface

710‧‧‧指令 710‧‧‧Instruction

圖1為現有技術中Linux系統載入程式的過程示意圖;圖2為現有技術中Linux系統載入程式後的記憶體分佈示意圖;圖3為本案實施例中Linux系統載入程式的過程示意圖;圖4為本案實施例中Linux系統載入程式後的記憶體分佈示意圖;圖5為本案實施例中應用程式的啟動流程示意圖;圖6為本案實施例提供的裝置的結構示意圖;圖7為本案另外的實施例提供的裝置的結構示意圖。 FIG. 1 is a schematic diagram of a process of loading a program in a Linux system in the prior art; FIG. 2 is a schematic diagram of a memory distribution after a program is loaded in a Linux system in the prior art; 4 is a schematic diagram of the memory distribution after the Linux system loads a program in the embodiment of the present case; FIG. 5 is a schematic diagram of the startup process of the application in the embodiment of the present case; FIG. 6 is a schematic structural diagram of the device provided by the embodiment of the present case; The structure diagram of the device provided by the embodiment.

雖然本案的概念易於進行各種修改和替代形式,但是其具體實施例已經藉由附圖中的示例示出並且將在本文中詳細描述。然而,應當理解,沒有意圖將本案的概念限制為所公開的特定形式,而是相反,意圖是覆蓋與本案以及 所附申請專利範圍一致的所有修改、等同物和替代物。 Although the concept of this case is susceptible to various modifications and alternative forms, specific embodiments thereof have been shown by way of example in the drawings and will be described in detail herein. It should be understood, however, that there is no intention to limit the concept of the present case to the particular form disclosed, but to the contrary, the intention is to cover all modifications, equivalents, and alternatives consistent with the scope of this case and the appended patent applications.

說明書中對“一個實施例”、“實施例”、“說明性實施例”等的引用,指示所描述的實施例可包括特定特徵、結構或特性,但是每個實施例可以或可以不必包括特定特徵、結構或特性。此外,這樣的短語不一定指的是相同的實施例。進一步地,認為在本領域技術人員的知識範圍內,當結合實施例描述特定特徵、結構或特性時,結合無論是否明確描述的其它實施例影響這樣的特徵,結構或特性。另外,應當理解,以“A,B和C中的至少一個”的形式包括在列表中的專案可以表示(A);(B);(C);(A和B);(A和C);(B和C);或(A,B和C)。類似地,以“A,B或C中的至少一個”的形式列出的專案可以表示(A);(B);(C);(A和B);(A和C);(B和C)或(A,B和C)。 References in the specification to "one embodiment", "an embodiment", "illustrative embodiment", etc. indicate that the described embodiments may include specific features, structures, or characteristics, but each embodiment may or may not necessarily include a specific feature A feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, it is believed that, within the knowledge of those skilled in the art, when a specific feature, structure or characteristic is described in conjunction with an embodiment, such a feature, structure or characteristic is affected in conjunction with other embodiments whether explicitly described or not. In addition, it should be understood that projects included in the list in the form of "at least one of A, B, and C" may represent (A); (B); (C); (A and B); (A and C) ; (B and C); or (A, B and C). Similarly, projects listed in the form of "at least one of A, B, or C" can represent (A); (B); (C); (A and B); (A and C); (B and C) or (A, B and C).

在一些情況下,所公開的實施例可以在硬體、韌體、軟體或其任何組合中實現。所公開的實施例還可以被實現為由一個或多個暫時性或非暫時性機器可讀(例如,電腦可讀)儲存媒體攜帶或儲存的指令,其可以由一個或多個處理器讀取和執行。機器可讀儲存媒體可以實施為用於以機器可讀形式(例如,易失性或非易失性記憶體、磁碟或其他媒體)儲存或傳輸資訊的任何存放裝置,機制或其他物理結構的設備)。 In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored by one or more temporary or non-transitory machine-readable (e.g., computer-readable) storage media, which may be read by one or more processors And execute. A machine-readable storage medium may be implemented as any storage device, mechanism, or other physical structure for storing or transmitting information in a machine-readable form (for example, volatile or nonvolatile memory, diskette, or other media). device).

在附圖中,一些結構或方法特徵可以以特定佈置和/或順序示出。然而,應當理解,可能不需要這樣的具體佈 置和/或排序。相反,在一些實施例中,這些特徵可以以與說明性附圖中所示不同的方式和/或順序來佈置。另外,在特定圖中包括結構或方法特徵並不意味著暗示這種特徵在所有實施例中都是需要的,並且在一些實施例中可以不包括或可以與其他特徵組合。 In the drawings, some structural or method features may be shown in a specific arrangement and / or order. It should be understood, however, that such a specific arrangement and / or ordering may not be required. Rather, in some embodiments these features may be arranged in a different manner and / or order than that shown in the illustrative figures. In addition, including a structural or method feature in a particular figure does not imply that such a feature is required in all embodiments, and in some embodiments may not be included or may be combined with other features.

參見圖1,為目前Linux系統中,由init進程啟動程式a和程式b的示意圖。如圖所示,系統首先啟動init進程,init進程調用fork函數以產生子進程a,子進程a調用exec函數以載入程式a。程式b的載入過程類似。 Refer to FIG. 1, which is a schematic diagram of a program a and a program b started by an init process in a current Linux system. As shown in the figure, the system first starts the init process. The init process calls the fork function to generate the child process a, and the child process a calls the exec function to load the program a. The loading process of program b is similar.

子進程調用exec函數載入一個新程式時,該子進程的記憶體空間會被完全清除並重建,即該子進程與init進程不再存在共用的記憶體頁。目前所有的Linux系統中的init進程創建新程式時均藉由調用exec函數實現。圖2示出了程式a和程式b啟動後系統中的記憶體分佈示意圖,可以看到動態鏈接程式庫記憶體在程式a、程式b兩個子進程中都有一份副本。 When a child process calls the exec function to load a new program, the memory space of the child process is completely cleared and rebuilt, that is, the memory page shared by the child process and the init process no longer exists. The init process in all current Linux systems creates a new program by calling the exec function. Figure 2 shows a schematic diagram of the memory distribution in the system after program a and program b are started. It can be seen that the dynamic link library memory has a copy in two sub-processes of program a and program b.

其中,動態鏈接程式庫是實現共用函式程式庫的一種方式,使進程可以調用不屬於其可執行代碼的函數。系統中存在大量動態鏈接程式庫,大部分可執行程式均會使用動態鏈接程式庫。這些動態鏈接程式庫佔用大量記憶體。因此,如何減少動態鏈接程式庫的記憶體開銷是目前需要解決的問題。 Among them, the dynamic link library is a way to implement a shared function library, so that a process can call a function that does not belong to its executable code. There are a large number of dynamic link libraries in the system, and most executable programs use dynamic link libraries. These dynamic link libraries take up a lot of memory. Therefore, how to reduce the memory overhead of dynamic link libraries is a problem that needs to be solved at present.

由於在Linux系統中,init進程無法鏈接動態鏈接程式庫,因此本案實施例中使用代理進程(稱為cinit進程)鏈 接動態鏈接程式庫,由該代理進程創建子進程,由代理進程創建的子進程調用程式的入口函數來載入程式,由於由代理進程創建的子進程藉由調用程式的入口函數來載入程式,而非調用exec()函數來載入程式,因此不同程式的記憶體避免了被完全隔離;又由於該代理進程鏈接了動態鏈接程式庫,在代理進程啟動時該動態鏈接程式庫被載入到記憶體,因此藉由上述方式載入的多個程式可以共用代理進程所載入的動態鏈接程式庫的記憶體,從而與現有技術中每個程式均需保存動態鏈接程式庫的副本相比,減少了動態鏈接程式庫的記憶體開銷。 In the Linux system, the init process cannot link the dynamic link library. Therefore, in the embodiment of this case, a proxy process (called a cinit process) is used to link the dynamic link library. The proxy process creates a child process, and the child process creates a child process. Call the program's entry function to load the program. Since the child process created by the agent process loads the program by calling the program's entry function instead of calling the exec () function to load the program, the memory of different programs is avoided Is completely isolated; and because the agent process is linked to the dynamic link library, the dynamic link library is loaded into memory when the agent process starts, so multiple programs loaded by the above method can share the load of the agent process The memory of the dynamic link library is reduced, compared with the prior art, where each program needs to save a copy of the dynamic link library, the memory overhead of the dynamic link library is reduced.

本案實施例提供的原理,可程式於Linux系統,也可程式於有類似需求的其他系統。 The principle provided by the embodiment of the present case can be programmed in a Linux system, and can also be programmed in other systems having similar requirements.

下面以在Linux系統中應用本案實施例為例,對本案實施例的具體實現過程進行描述。 The following uses the embodiment of the present case as an example to describe the specific implementation process of the embodiment of the present case.

當電腦開機的時候,系統內核(kernel)只建立了一個init進程。Linux內核並不提供直接建立新進程的系統調用,其他的所有進程都是init進程藉由fork機制建立的。fork是一個系統調用,藉由調用fork函數,老進程(父進程)可藉由複製自身得到新進程(子進程)。進程存活於記憶體中,每個進程都在記憶體中分配有屬於自己的位址空間(address space)。當調用fork函數的時候,Linux在記憶體中開闢出新的記憶體空間給新進程,並將老進程記憶體空間中的內容複製到該新的空間中,此後兩個進程同時執行。 When the computer was turned on, the system kernel created only one init process. The Linux kernel does not provide system calls to create new processes directly. All other processes are created by the init process through the fork mechanism. Fork is a system call. By calling the fork function, the old process (parent process) can get the new process (child process) by copying itself. Processes live in memory, and each process allocates its own address space in memory. When the fork function is called, Linux creates a new memory space in the memory for the new process, and copies the contents of the memory space of the old process to the new space, after which the two processes execute simultaneously.

由於init進程無法鏈接動態鏈接程式庫,因此本案實施例中引入了代理進程(稱為cinit進程)。代理進程在編譯時鏈接了動態鏈接程式庫,該動態鏈接程式庫可以包括Linux系統提供的基本動態鏈接程式庫,一般應用程式執行時均會用到。在init進程啟動的過程中,該代理進程被啟動,從而將該代理進程所鏈接的動態鏈接程式庫載入到記憶體中。系統中其他的程式可由該代理進程啟動。 Since the init process cannot link the dynamic link library, an agent process (called a cinit process) is introduced in the embodiment of the present case. The agent process links the dynamic link library at compile time. The dynamic link library can include the basic dynamic link library provided by the Linux system, which is usually used when the application is executed. During the startup process of the init process, the agent process is started, so that the dynamic link library linked by the agent process is loaded into the memory. Other programs in the system can be started by this agent process.

當需要載入新的程式時(比如使用者透過移動終端的螢幕觸摸操作,點擊了一個應用程式的圖示,或者發生了其他觸發載入應用程式的操作),由代理進程創建子進程,該子進程藉由調用該程式的入口函數,載入該程式。 When a new program needs to be loaded (for example, the user touches the screen of a mobile terminal, clicks an application icon, or another operation that triggers the loading of an application occurs), the child process is created by the proxy process. The child process loads the program by calling its entry function.

該過程中,代理進程仍可藉由調用fork函數創建子進程。當代理進程調用fork函數後,系統給新的進程(子進程)分配資源,比如Linux在記憶體中開闢出一片新的記憶體空間給新的進程,用於儲存資料和代碼,並將老的進程空間中的內容複製到新的空間中,其中,只有少數參數與老進程的參數不同,這樣,新的進程和老的進程可實現基本相同的功能。當然,調用fork函數時輸入的初始參數或者傳入的變量也可以不同,這樣,新的進程和老的進程可實現不同的功能。 In this process, the agent process can still create a child process by calling the fork function. When the agent process calls the fork function, the system allocates resources to the new process (child process). For example, Linux creates a new memory space in the memory for the new process, which is used to store data and code. The content in the process space is copied into the new space, of which only a few parameters are different from the parameters of the old process, so that the new process and the old process can achieve basically the same function. Of course, the initial parameters or variables passed in when the fork function is called can also be different. In this way, the new process and the old process can implement different functions.

新創建得到的進程作為代理進程的子進程,獲取應用程式的入口函數的位址,調用該應用程式的入口函數,從而載入該應用程式。其中,應用程式通常具有main函數,它是應用程式的入口函數,是啟動應用程式時首先被調用 的函數,從而開始執行該應用程式。在另外的一些實施例中,啟動應用程式時,可先於該應用程式的main函數而執行其他函數,比如gcc編譯器編譯的可執行程式中都存在__libc_start_main函數,該函式呼叫了main函數,即該函數先於main函數執行。在這種情況下,代理進程創建子進程後,該子進程可藉由調用應用程式的__libc_start_main函數來載入該應用程式。 The newly created process is a child process of the proxy process, obtains the address of the entry function of the application program, calls the entry function of the application program, and loads the application program. Among them, an application usually has a main function, which is an entry function of the application, and is a function that is called first when the application is started, thereby starting the execution of the application. In other embodiments, when the application is started, other functions can be executed before the main function of the application. For example, the __libc_start_main function exists in the executable program compiled by the gcc compiler. This function calls the main function. That is, the function is executed before the main function. In this case, after the agent process creates a child process, the child process can load the application by calling the application's __libc_start_main function.

其中,入口函數的位址可從經過編譯和鏈接的可執行程式中獲得。應用程式的原始程式碼需要經過編譯器進行編譯以及鏈接器進行鏈接後,形成可執行程式,可執行程式通常以可執行和可鏈接格式(Executable and Linkable Format,簡稱ELF)文件儲存。ELF文件中包括編譯後的機器指令代碼、資料、符號表、調試資訊、字串等。一般ELF文件將這些文件資訊按不同的屬性,以“段”或“節”的形式儲存。其中,ELF文件中的dynsym段主要用於儲存作業系統相關的資訊,比如變量名、函數名等。可藉由調用dlsym函數獲得ELF文件中的dynsym段中的main函數位址。 The address of the entry function can be obtained from the compiled and linked executable program. The source code of an application program needs to be compiled by a compiler and linked by a linker to form an executable program. The executable program is usually stored in an executable and linkable format (ELF) file. The ELF file includes compiled machine instruction code, data, symbol tables, debugging information, strings, and so on. General ELF files store these file information in the form of "segments" or "sections" according to different attributes. Among them, the dynsym section in the ELF file is mainly used to store information related to the operating system, such as variable names and function names. The main function address in the dynsym section of the ELF file can be obtained by calling the dlsym function.

預設情況下,在將原始程式碼編譯為可執行文件時,main函數的位址不匯出到dynsym段中,也就是說,無法藉由調用dlsym函數得到main函數的位址。本案實施例中,可藉由修改鏈接器,使鏈接器進行鏈接時將main函數的位址匯出到dynsym段中。針對不同的鏈接器,其修改方法不盡相同。當然也可以採用其他任何能夠匯出main函數的位 址的方法。本案實施例對獲得入口函數的位址的方法不作限制。 By default, when compiling the source code into an executable file, the address of the main function is not exported to the dynsym section, that is, the address of the main function cannot be obtained by calling the dlsym function. In the embodiment of the present case, the linker may be modified to export the address of the main function to the dynsym segment when the linker performs linking. The modification methods are different for different linkers. Of course, any other method that can export the address of the main function can also be used. The embodiment of this case does not limit the method for obtaining the address of the entry function.

進一步地,在一些實施例中,由代理進程創建的子進程調用程式的入口函數之前,將該子進程的名稱修改為與該程式的名稱相同。在Linux系統中,預設情況下,子進程的名稱與父進程(這裡為代理進程cinit)的名稱相同,否則進程名會顯示錯誤。具體可藉由以下方式修改進程的名稱: Further, in some embodiments, before the child process created by the agent process calls the entry function of the program, the name of the child process is modified to be the same as the name of the program. In the Linux system, by default, the name of the child process is the same as the name of the parent process (here, the agent process cinit), otherwise the process name will display an error. You can modify the name of the process in the following ways:

方式1:子進程調用用於修改進程名稱的系統調用函數。在Linux系統中,prctl函數為系統調用函數,具有較高的權限,可用於設置進程的名稱。因此該子進程可向作業系統內核請求調用prctl函數,藉由執行prctl函數對該子進程的名稱進行設置。 Method 1: The child process calls a system call function for modifying the process name. In the Linux system, the prctl function is a system call function, which has higher authority and can be used to set the name of the process. Therefore, the child process may request the prctl function from the operating system kernel, and set the name of the child process by executing the prctl function.

方式2:子進程獲取該子進程中用於儲存進程名稱的記憶體區域的位址,並修改該位址對應的記憶體區域中儲存的參數值(即將進程名稱修改為應用程式的名稱)。本案實施例中,子進程記憶體空間中,在位址為argv[0]的區域儲存有該子進程的名稱,如果該區域中儲存的參數值改變,則該子進程的名稱也會改變。因此,如果將子進程中位址為argv[0]的區域中儲存的參數值修改為需要啟動的應用程式的名稱,則可以使得該子進程的名稱與應用程式的名稱相同。後續創建的子進程,均可在該子進程中修改位址為argv[0]的區域中儲存的參數值,這樣每個子進程都可以設置自己的名稱,而不干擾其他子進程。 Method 2: The child process obtains the address of the memory area used to store the process name in the child process, and modifies the parameter value stored in the memory area corresponding to the address (ie, changes the process name to the name of the application). In the embodiment of the present case, in the memory space of the sub-process, the name of the sub-process is stored in the area with the address argv [0]. If the parameter value stored in the area changes, the name of the sub-process will also change. Therefore, if the parameter value stored in the area with the address argv [0] in the child process is modified to the name of the application to be started, the name of the child process can be made the same as the name of the application. Subsequent created child processes can modify the parameter values stored in the area with the address argv [0] in this child process, so that each child process can set its own name without disturbing other child processes.

進一步地,在一些實施例中,在應用程式啟動後,如果需要修改應用程式名稱(比如需要在使用者介面中為當前應用程式顯示一個特別的名稱時),即修改該應用程式的進程名稱,則還可以採用以下方式進行修改:該應用程式的進程從該進程獨有的記憶體中儲存的啟動參數中,獲得用於儲存進程名稱的記憶體區域的位址(該記憶體區域的位址為變量argv[0]的取值),並修改該位址對應的記憶體區域中儲存的參數值(即將進程名稱修改為應用程式的新名稱)。 Further, in some embodiments, after the application is started, if the application name needs to be modified (for example, when a special name needs to be displayed for the current application in the user interface), the process name of the application is modified. It can also be modified in the following way: The process of the application obtains the address of the memory area (the address of the memory area) for storing the process name from the startup parameters stored in the memory unique to the process. Is the value of the variable argv [0]), and modify the parameter value stored in the memory area corresponding to the address (that is, change the process name to the new name of the application).

進一步地,在一些實施例中,有些環境變量與進程相關,在啟動新程式時需要重置,具體哪些環境變量需要重置則可視平台而定。本案實施例中,代理進程創建子進程後,該子進程可重置該子進程對應的程式所使用的環境變量,子進程重置環境變量的操作可在調用入口函數之前或者在其他需要修改環境變量的時候。比如,有一個環境變量的值是該應用在系統中存放的文件名,顯然每個應用對應的文件是不一樣的,需要對每個應用重設該環境變量。 Further, in some embodiments, some environment variables are related to a process and need to be reset when a new program is started. The specific environment variables that need to be reset may depend on the platform. In the embodiment of the present case, after the agent process creates a child process, the child process can reset the environment variables used by the program corresponding to the child process. The operation of resetting the environment variable of the child process can be performed before the entry function is called or other environments need to be modified. Variable. For example, there is an environment variable whose value is the file name stored by the application in the system. Obviously, the file corresponding to each application is different. You need to reset the environment variable for each application.

進一步地,在一些實施例中,考慮到某些不能被繼承的資源若被子進程繼承,則會產生錯誤,比如文件描述符這樣的資源。因此,本案實施例中,代理進程在創建子進程之前,可關閉不能被該子進程繼承的資源。其中,代理進程可確定哪些資源不能被子進程繼承。具體實施時,在一些例子中,可預先設置哪些資源不能被子進程繼承,需要代理進程在創建子進程前將這些資源關閉或釋放。在另 外的例子中,子進程的父進程可根據預先設置的規則確定哪些資源不能被子進程繼承,比如,當父進程監聽一個網路埠,它不希望子進程也監聽該埠,因為兩個進程同時監聽同一個埠通常會出現錯誤,那麼它就需要在關閉該埠,關閉的時機是在該父進程調用fork函數之後、在執行子進程之前。 Further, in some embodiments, it is considered that if some resources that cannot be inherited are inherited by the child process, errors will occur, such as resources such as file descriptors. Therefore, in the embodiment of the present case, before the proxy process creates the child process, it can close the resources that cannot be inherited by the child process. Among them, the agent process can determine which resources cannot be inherited by the child process. In specific implementation, in some examples, it is possible to set in advance which resources cannot be inherited by the child process, and the agent process is required to close or release these resources before creating the child process. In another example, the parent process of the child process can determine which resources cannot be inherited by the child process according to the preset rules. For example, when the parent process listens on a network port, it does not want the child process to listen to that port because two processes At the same time, an error usually occurs when listening on the same port, so it needs to close the port. The closing time is after the parent process calls the fork function and before the child process is executed.

需要說明的是,如果代理進程啟動的程式又使用exec函數啟動了其他程式(以及其後啟動的所有程式),則它們的記憶體無法共用。因此,凡是希望子進程可以與其父進程共用記憶體的,均需要按上述方式創建子進程以及載入程式。由於上述方案是通用的,為了讓系統的其他程式遵守該方案,本案實施例可提供一個輔助函數來實現上述方案,以供其他程式調用該函數,這樣,每個需要使用上述方案節省記憶體的進程均可使用該函數,而不需要針對每個進程編寫用於實現上述方案的代碼。 It should be noted that if the program started by the agent process starts other programs (and all programs started thereafter) using the exec function, their memory cannot be shared. Therefore, anyone who wants a child process to share memory with its parent process needs to create a child process and load a program as described above. Since the above scheme is universal, in order to allow other programs of the system to comply with the scheme, the embodiment of the present case can provide an auxiliary function to implement the above scheme for other programs to call the function. In this way, each need to use the above scheme to save memory. This function can be used by processes without the need to write code to implement the above scheme for each process.

下面結合圖3和圖4,以應用程式a和應用程式b的載入過程為例,對上述實施例的具體實現過程進行描述。 The following describes the specific implementation process of the foregoing embodiment by taking the loading process of the application a and the application b as an example in conjunction with FIG. 3 and FIG. 4.

如圖3和圖4所示,Linux系統啟動時,Linux內核為init進程分配init進程獨有的記憶體空間,並引導執行init進程。init進程啟動後啟動代理進程(cinit),代理進程具有其獨有的記憶體空間,該記憶體空間在init進程啟動該代理進程時,由Linux內核分配。由於代理進程在編譯時鏈接了Linux系統的基本動態鏈接程式庫,因此該動態鏈接程式庫被載入到記憶體中。 As shown in Figure 3 and Figure 4, when the Linux system starts, the Linux kernel allocates memory space unique to the init process and guides the execution of the init process. After the init process is started, the agent process (cinit) is started. The agent process has its own unique memory space, which is allocated by the Linux kernel when the init process starts the agent process. Because the proxy process links the basic dynamic link library of the Linux system at compile time, the dynamic link library is loaded into the memory.

載入應用程式a的過程,如圖3所示,代理進程(cinit)調用fork函數,創建得到子進程a。此過程中,如圖4所示,Linux在記憶體中開闢出一片新的記憶體空間給子進程a(即圖中所示的a獨有的記憶體),用於儲存資料和代碼,並將代理進程中的內容複製到新的空間中。如圖3所示,子進程a調用dlopen函數,輸入參數中包括動態鏈接程式庫的文件名(該文件名與代理進程所連接的動態鏈接程式庫的文件名相同),從而在子進程a中打開該動態鏈接程式庫。藉由調用dlopen函數,可以將dlopen函數返回的動態鏈接程式庫控制碼傳入dlsym函數中的參數,以獲得符號在該動態鏈接程式庫中的位址,使用這個位址,可以獲得該動態鏈接程式庫中對應函數的指標,並且調用該動態鏈接程式庫中的相應函數。子進程a調用應用程式a的main函數,從而啟動應用程式a。 The process of loading the application program a, as shown in FIG. 3, the proxy process (cinit) calls the fork function to create a child process a. In this process, as shown in Figure 4, Linux opens up a new memory space in the memory for the child process a (that is, the unique memory of a shown in the figure) for storing data and code, and Copy the contents of the agent process into the new space. As shown in Figure 3, the child process a calls the dlopen function, and the input parameters include the file name of the dynamic link library (the file name is the same as the file name of the dynamic link library connected to the agent process), so that in the child process a Open the dynamic link library. By calling the dlopen function, the dynamic link library control code returned by the dlopen function can be passed into the parameter in the dlsym function to obtain the address of the symbol in the dynamic link library. Using this address, the dynamic link can be obtained. An indicator of the corresponding function in the library, and call the corresponding function in the dynamic link library. The child process a calls the main function of the application a to start the application a.

載入應用程式b的過程,如圖3所示,代理進程(cinit)調用fork函數,創建得到子進程b。此過程中,如圖4所示,Linux在記憶體中開闢出一片新的記憶體空間給子進程b(即圖中所示的b獨有的記憶體),用於儲存資料和代碼,並將代理進程中的內容複製到新的空間中。如圖3所示,子進程b調用dlopen函數,輸入參數中包括動態鏈接程式庫的文件名(該文件名與代理進程所連接的動態鏈接程式庫的文件名相同),從而在子進程a中打開該動態鏈接程式庫。子進程b調用應用程式b的main函數,從而啟動應用程式b。 The process of loading the application program b, as shown in Figure 3, the agent process (cinit) calls the fork function to create a child process b. During this process, as shown in Figure 4, Linux created a new memory space in the memory for the child process b (that is, the unique memory of b shown in the figure) for storing data and code, and Copy the contents of the agent process into the new space. As shown in Figure 3, the child process b calls the dlopen function, and the input parameters include the file name of the dynamic link library (the file name is the same as the file name of the dynamic link library connected to the agent process), so that in the child process a Open the dynamic link library. Child process b calls application b's main function to start application b.

從圖4可以看出,子進程a和子進程b啟動應用程式時未使用exec函數,而是調用入口函數,並且應用程式a和應用程式b所打開的動態鏈接程式庫已經被代理進程載入到記憶體中,因此應用程式a和應用程式b可以共用該動態鏈接程式庫的記憶體,而不必各自保存一份該動態鏈接程式庫的副本。 As can be seen from Figure 4, child process a and child process b start the application without using the exec function, but call the entry function, and the dynamic link libraries opened by application a and application b have been loaded into the proxy process. Memory, so application a and application b can share the memory of the dynamic link library without having to keep a separate copy of the dynamic link library.

當應用程式調用由代理進程載入的動態鏈接程式庫中的函數時,該函數所修改的資料可被儲存於該應用程式(或該應用程式對應的進程)所獨有的記憶體空間。例如,若應用程式a(子進程a)調用動態鏈接程式庫中的方法(函數),且在該方法(函數)執行過程中需要修改資料(比如修改變量的值),作業系統會將該資料儲存在應用程式a(子進程a)的獨有記憶體空間;若應用程式b(子進程b)調用動態鏈接程式庫中的該方法(函數),且在該方法(函數)執行過程中需要修改名稱相同的變量,作業系統會將該變量儲存在應用程式b(子進程b)的獨有記憶體空間。這樣,應用程式a和應用程式b可共用動態鏈接程式庫,但調用動態鏈接程式庫所修改的變量會儲存在各自獨有的記憶體空間,避免資料衝突。 When an application calls a function in a dynamic link library loaded by a proxy process, the data modified by the function can be stored in a memory space unique to the application (or the process corresponding to the application). For example, if application a (subprocess a) calls a method (function) in a dynamic link library and the method (function) needs to modify data (such as modifying the value of a variable) during execution, the operating system will use the data Stored in the unique memory space of application a (child process a); if application b (child process b) calls the method (function) in the dynamic link library, and it is required during the execution of the method (function) Modify the variable with the same name, the operating system will store the variable in the unique memory space of application b (child process b). In this way, the application a and the application b can share the dynamic link library, but the variables modified by calling the dynamic link library will be stored in their own unique memory space to avoid data conflicts.

參見圖5,該流程以上述應用程式a為例,描述了該應用程式的啟動過程。應用程式b的啟動過程與此類似。如圖5所示,當需要啟動應用程式a時,該流程可包括: Referring to FIG. 5, the process uses the above-mentioned application a as an example to describe the startup process of the application. The startup process of application b is similar. As shown in FIG. 5, when the application program a needs to be started, the process may include:

方框501:代理進程確定不能被子進程繼承的資源,將這些資源關閉。 Block 501: The agent process determines resources that cannot be inherited by the child process, and closes these resources.

方框502:代理進程調用fork函數,創建子進程a。在該過程中,系統給新創建的子進程分配該子進程獨有的記憶體空間,該記憶體空間專屬於該子進程。 Block 502: The proxy process calls the fork function to create a child process a. In the process, the newly allocated child process allocates a memory space unique to the child process, and the memory space is exclusive to the child process.

方框503:子進程a調用prctl函數,藉由執行該函數將子進程a的名稱修改為應用程式a的名稱。 Block 503: The child process a calls the prctl function, and the name of the child process a is changed to the name of the application a by executing the function.

方框504:子進程a重置部分環境變量,比如重置用於儲存系統中存放的文件名的變量值。 Block 504: The child process a resets some environment variables, such as resetting the value of a variable used to store a file name stored in the system.

方框505:子進程a調用dlopen函數,並將被代理進程載入到記憶體的動態鏈接程式庫的名稱作為該函數的輸入參數,從而藉由執行該函數,在子進程a中打開該動態鏈接程式庫。 Block 505: The child process a calls the dlopen function, and uses the name of the dynamic link library loaded into the memory by the proxy process as an input parameter of the function, thereby executing the function to open the dynamic in the child process a Link the library.

方框506:子進程a調用dlsym函數,得到應用程式a的main函數位址。 Block 506: The child process a calls the dlsym function to obtain the address of the main function of the application a.

方框507:子進程a根據應用程式a的main函數位址,調用應用程式a的main函數,從而載入應用程式a。 Block 507: The child process a calls the main function of the application a according to the address of the main function of the application a, thereby loading the application a.

上述流程中,方框503至方框506的順序可做調整,本案實施例對此不做限制。 In the above process, the order of blocks 503 to 506 may be adjusted, and this embodiment of the present invention does not limit this.

上述流程具體實現過程,可參見前述實施例,在此不再重複。 For the specific implementation process of the foregoing process, reference may be made to the foregoing embodiment, which is not repeated here.

藉由以上描述可以看出,本案的上述實施例中,系統中的init進程啟動時啟動代理進程,代理進程啟動時,載入該代理進程所鏈接的動態鏈接程式庫到記憶體;當需要載入某個程式時,代理進程創建一個子進程,該子進程藉由調用該程式的入口函數,載入該程式,這樣,藉由上述 方式載入的多個程式可以共用該代理進程所載入的動態鏈接程式庫佔用的記憶體,而不必每個程式保存一份動態鏈接程式庫的副本,減少了動態鏈接程式庫的記憶體開銷。 As can be seen from the above description, in the above-mentioned embodiment of the present case, the init process in the system starts the agent process when it is started, and when the agent process starts, it loads the dynamic link library linked by the agent process into memory; When entering a program, the agent process creates a child process, and the child process loads the program by calling the program's entry function. In this way, multiple programs loaded in the above manner can share the load of the agent process. The memory occupied by the dynamic link library, instead of having to keep a copy of the dynamic link library for each program, reducing the memory overhead of the dynamic link library.

基於相同的技術構思,本案實施例還提供了一種裝置,該裝置可實現前述實施例描述的流程。 Based on the same technical concept, this embodiment of the present invention further provides a device that can implement the processes described in the foregoing embodiments.

參見圖6,為本案實施例提供的裝置的結構示意圖。該裝置可包括:啟動模組601、進程創建模組602,其中:啟動模組601,用於啟動代理進程,所述代理進程載入所述代理進程所鏈接的動態鏈接程式庫到記憶體;進程創建模組602,用於創建第一子進程,所述第一子進程藉由調用所述第一程式的入口函數,載入所述第一程式;以及,創建第二子進程,所述第二子進程藉由調用所述第二程式的入口函數,載入所述第二程式;其中,所述第一程式和所述第二程式共用所述動態鏈接程式庫佔用的記憶體。 6 is a schematic structural diagram of a device according to an embodiment of the present application. The device may include a startup module 601 and a process creation module 602, wherein the startup module 601 is used to start an agent process, and the agent process loads a dynamic link library linked to the agent process into memory; The process creation module 602 is configured to create a first sub-process, the first sub-process loads the first program by calling an entry function of the first program; and creates a second sub-process, the The second sub-process loads the second program by calling an entry function of the second program; wherein the first program and the second program share a memory occupied by the dynamic link library.

可選地,啟動模組601為作業系統中的第一個進程,被所述啟動模組啟動的所述代理進程用於代理所述第一個進程創建子進程。 Optionally, the startup module 601 is the first process in the operating system, and the agent process started by the startup module is used to create a child process on behalf of the first process.

可選地,進程創建模組602還用於:調用所述第一程式的入口函數之前,藉由調用用於打開動態鏈接程式庫的函數,在所述第一子進程中打開所述動態鏈接程式庫,其中,該函數的輸入參數中包括所述動態鏈接程式庫的文件名;以及,調用所述第二程式的入口函數之前,藉由調用用於打開動態鏈接程式庫的函數,在所述第二子進程中打 開所述動態鏈接程式庫,其中,該函數的輸入參數中包括所述動態鏈接程式庫的文件名。 Optionally, the process creation module 602 is further configured to: before calling the entry function of the first program, open the dynamic link in the first subprocess by calling a function for opening a dynamic link library. A library, wherein the input parameters of the function include the file name of the dynamic link library; and before calling the entry function of the second program, by calling a function for opening the dynamic link library, The dynamic link library is opened in the second sub-process, wherein an input parameter of the function includes a file name of the dynamic link library.

可選地,進程創建模組602創建的所述第一子進程調用所述第一程式的入口函數之前,將所述第一子進程的名稱修改為與所述第一程式的名稱相同;進程創建模組602創建的所述第二子進程調用所述第二程式的入口函數之前,將所述第二子進程的名稱修改為與所述第二程式的名稱相同。 Optionally, before the first sub-process created by the process creation module 602 calls the entry function of the first program, the name of the first sub-process is modified to be the same as the name of the first program; the process; Before the second sub-process created by the creation module 602 calls the entry function of the second program, the name of the second sub-process is changed to be the same as the name of the second program.

可選地,進程創建模組602還用於:創建所述第一子進程之前,關閉不能被所述第一子進程繼承的資源;以及,創建所述第二子進程之前,關閉不能被所述第二子進程繼承的資源。 Optionally, the process creation module 602 is further configured to: before creating the first child process, close resources that cannot be inherited by the first child process; and before creating the second child process, close the resources that cannot be inherited. Describes the resources inherited by the second child process.

可選地,進程創建模組602創建的所述第一子進程調用所述第一程式的入口函數之前,重置所述第一程式所使用的環境變量;進程創建模組602創建的所述第二子進程調用所述第二程式的入口函數之前,重置所述第二程式所使用的環境變量。 Optionally, before the first sub-process created by the process creation module 602 calls the entry function of the first program, the environment variables used by the first program are reset; Before the second child process calls the entry function of the second program, the environment variables used by the second program are reset.

可選地,所述第一程式在被編譯時,所述第一程式的入口函數位址被匯出到所述第一程式的可執行文件中;所述進程創建模組創建的所述第一子進程調用所述第一程式的入口函數之前,根據所述第一程式的可執行文件獲取所述第一程式的入口函數位址;所述第二程式在被編譯時,所述第二程式的入口函數位址被匯出到所述第二程式的可執行文件中;所述進程創建模組創建的所述第二子進程調 用所述第二程式的入口函數之前,根據所述第二程式的可執行文件獲取所述第二程式的入口函數位址。 Optionally, when the first program is compiled, an entry function address of the first program is exported to an executable file of the first program; the first program created by the process creation module is Before a child process calls the entry function of the first program, the entry function address of the first program is obtained according to the executable file of the first program; when the second program is compiled, the second program The address of the entry function of the program is exported to the executable file of the second program; before the second sub-process created by the process creation module calls the entry function of the second program, according to the first The executable file of the second program obtains an entry function address of the second program.

可選地,上述裝置中還可包括處理模組(未在圖中示出),該處理模組可用於在載入所述第一程式之後,將被所述第一程式調用的所述動態鏈接程式庫中的函數所修改的資料,儲存於所述第一子進程獨有的記憶體空間;以及,在載入所述第二程式之後,將被所述第二程式調用的所述動態鏈接程式庫中的函數所修改的資料,儲存於所述第二子進程獨有的記憶體空間。 Optionally, the above device may further include a processing module (not shown in the figure), which may be used for the dynamics to be called by the first program after the first program is loaded. The data modified by the functions in the linked library are stored in a memory space unique to the first sub-process; and after loading the second program, the dynamics to be called by the second program The data modified by the functions in the link library are stored in a memory space unique to the second sub-process.

基於相同的技術構思,本案實施例還提供了一個或多個電腦可讀媒體,所述可讀媒體上儲存有指令,所述指令被一個或多個處理器執行時,使得使用者設備執行前述實施例描述的流程。 Based on the same technical concept, this embodiment of the present invention also provides one or more computer-readable media, where the readable medium stores instructions, and when the instructions are executed by one or more processors, the user equipment executes the foregoing Example describes the process.

基於相同的技術構思,本案實施例還提供了一種裝置700,該裝置700可實現前述實施例描述的流程。 Based on the same technical concept, this embodiment of the present invention further provides a device 700, which can implement the processes described in the foregoing embodiments.

圖7示例性地示出了根據各種實施例的示例裝置700。裝置700可包括一個或多個處理器702,系統控制邏輯701耦合於至少一個處理器702,非易失性記憶體(non-volatile memory,NMV)/記憶體704耦合於系統控制邏輯701,網路介面706耦合於系統控制邏輯701。 FIG. 7 exemplarily illustrates an example apparatus 700 according to various embodiments. The device 700 may include one or more processors 702, the system control logic 701 is coupled to at least one processor 702, and a non-volatile memory (NMV) / memory 704 is coupled to the system control logic 701. The road interface 706 is coupled to the system control logic 701.

處理器702可包括一個或多個單核處理器或多核處理器。處理器702可包括任何一般用途處理器或專用處理器(如影像處理器、應用處理器基帶處理器等)的組合。 The processor 702 may include one or more single-core processors or multi-core processors. The processor 702 may include any combination of general-purpose processors or special-purpose processors (such as an image processor, an application processor baseband processor, etc.).

一個實施例中的系統控制邏輯701,可包括任何適當 的介面控制器,以提供到處理器702中的至少一個的任何合適的介面,和/或提供到與系統控制邏輯701通信的任何合適的設備或元件的任何合適的介面。 The system control logic 701 in one embodiment may include any suitable interface controller to provide any suitable interface to at least one of the processors 702 and / or any suitable interface to communicate with the system control logic 701 Any suitable interface for the device or component.

一個實施例中的系統控制邏輯701,可包括一個或多個記憶體控制器,以提供到系統記憶體703的介面。系統記憶體703用來載入以及儲存資料和/或指令。例如,對應裝置700,在一個實施例中,系統記憶體703可包括任何合適的易失性記憶體。 The system control logic 701 in one embodiment may include one or more memory controllers to provide an interface to the system memory 703. The system memory 703 is used to load and store data and / or instructions. For example, corresponding to the device 700, in one embodiment, the system memory 703 may include any suitable volatile memory.

NVM/記憶體704可包括一個或多個有形的非暫時的電腦可讀媒體,用於儲存資料和/或指令。例如,NVM/記憶體704可包括任何合適的非易失性儲存裝置,如一個或多個硬碟(hard disk device,HDD),一個或多個光碟(compact disk,CD),和/或一個或多個數位多功能光碟(digital versatile disk,DVD)。 NVM / memory 704 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. For example, the NVM / memory 704 may include any suitable non-volatile storage device, such as one or more hard disk devices (HDDs), one or more compact disks (CDs), and / or one Or multiple digital versatile disks (DVDs).

NVM/記憶體704可包括儲存資源,該儲存資源物理上是該系統所安裝的或者可以被存取的設備的一部分,但不一定是設備的一部分。例如,NVM/記憶體704可經由網路介面706被網路接取。 The NVM / memory 704 may include storage resources that are physically part of a device installed in or accessible to the system, but not necessarily part of the device. For example, the NVM / memory 704 can be accessed by the network via the network interface 706.

系統記憶體703以及NVM/記憶體704可分別包括臨時的或持久的指令710的副本。指令710可包括當由處理器702中的至少一個執行時導致裝置700實現圖2至圖5描述的方法之一或組合的指令。各實施例中,指令710或硬體、韌體,和/或軟體元件可另外地/可替換地被置於系統控制邏輯701,網路介面706和/或處理器702。 The system memory 703 and the NVM / memory 704 may include temporary or persistent copies of the instructions 710, respectively. The instructions 710 may include instructions that, when executed by at least one of the processors 702, cause the device 700 to implement one or a combination of the methods described in FIGS. 2-5. In various embodiments, the instructions 710 or hardware, firmware, and / or software components may be additionally / alternatively placed in the system control logic 701, the network interface 706, and / or the processor 702.

網路介面706可包括一個接收器來為裝置700提供無線介面來與一個或多個網路和/或任何合適的設備進行通信。網路介面706可包括任何合適的硬體和/或韌體。網路介面706可包括多個天線來提供多輸入多輸出無線介面。在一個實施例中,網路介面706可包括一個網路介面卡、一個無線網路介面卡、一個電話數據機,和/或無線數據機。 The network interface 706 may include a receiver to provide the device 700 with a wireless interface to communicate with one or more networks and / or any suitable device. The network interface 706 may include any suitable hardware and / or firmware. The network interface 706 may include multiple antennas to provide a multiple-input multiple-output wireless interface. In one embodiment, the network interface 706 may include a network interface card, a wireless network interface card, a telephone modem, and / or a wireless modem.

在一個實施例中,處理器702中的至少一個可以與用於系統控制邏輯的一個或多個控制器的邏輯一起封裝。在一個實施例中,處理器中的至少一個可以與用於系統控制邏輯的一個或多個控制器的邏輯一起封裝以形成系統級封裝。在一個實施例中,處理器中的至少一個可以與用於系統控制邏輯的一個或多個控制器的邏輯積集在相同的晶粒上。在一個實施例中,處理器中的至少一個可以與用於系統控制邏輯的一個或多個控制器的邏輯積集在相同的晶粒上以形成系統晶片。 In one embodiment, at least one of the processors 702 may be packaged with logic for one or more controllers for system control logic. In one embodiment, at least one of the processors may be packaged with the logic of one or more controllers for system control logic to form a system-level package. In one embodiment, at least one of the processors may be on the same die as the logic accumulation of one or more controllers for system control logic. In one embodiment, at least one of the processors may be on the same die as the logic accumulation of one or more controllers for system control logic to form a system chip.

裝置700可進一步包括輸入/輸出裝置705,。輸入/輸出裝置705可包括使用者介面旨在使使用者與裝置700進行互動,可包括週邊元件介面,其被設計為使得週邊元件能夠與系統互動,和/或,可包括感測器,旨在確定環境條件和/或有關裝置700的位置資訊。 The device 700 may further include an input / output device 705. The input / output device 705 may include a user interface designed to allow a user to interact with the device 700, and may include a peripheral component interface, which is designed to enable peripheral components to interact with the system, and / or may include a sensor, which In determining environmental conditions and / or location information about the device 700.

本公開可以包括以下公開的各種示例實施例。 The present disclosure may include various example embodiments disclosed below.

示例實施例1中,採用的方法可以進行合併:啟動代理進程,所述代理進程載入所述代理進程所鏈接的動態鏈 接程式庫到記憶體;所述代理進程創建第一子進程,所述第一子進程藉由調用所述第一程式的入口函數,載入所述第一程式;所述代理進程創建第二子進程,所述第二子進程藉由調用所述第二程式的入口函數,載入所述第二程式;其中,所述第一程式和所述第二程式共用所述動態鏈接程式庫佔用的記憶體。 In example embodiment 1, the method adopted may be merged: starting an agent process, the agent process loading a dynamic link library linked to the agent process into memory; the agent process creating a first child process, the The first sub-process loads the first program by calling the entry function of the first program; the proxy process creates a second sub-process, and the second sub-process calls the entry of the second program Function to load the second program; wherein the first program and the second program share a memory occupied by the dynamic link library.

示例實施例2中,根據示例實施例1,所述代理進程由作業系統中的第一個進程啟動,所述代理進程用於代理所述第一個進程創建子進程。 In example embodiment 2, according to example embodiment 1, the agent process is started by a first process in an operating system, and the agent process is used to create a child process on behalf of the first process.

示例實施例3中,根據示例實施例1-2,還包括:藉由調用用於打開動態鏈接程式庫的函數,在所述第一子進程中打開所述動態鏈接程式庫,其中,該函數的輸入參數中包括所述動態鏈接程式庫的文件名;和/或,還包括:藉由調用用於打開動態鏈接程式庫的函數,在所述第二子進程中打開所述動態鏈接程式庫,其中,該函數的輸入參數中包括所述動態鏈接程式庫的文件名。 In the exemplary embodiment 3, according to the exemplary embodiments 1-2, the method further includes: opening the dynamic link library in the first sub-process by calling a function for opening the dynamic link library, wherein the function The input parameters of include the file name of the dynamic link library; and / or, further include: opening the dynamic link library in the second subprocess by calling a function for opening the dynamic link library , Wherein the input parameters of the function include the file name of the dynamic link library.

示例實施例4中,根據示例實施例1-3,還包括:將所述第一子進程的名稱修改為與所述第一程式的名稱相同;和/或,還包括:將所述第二子進程的名稱修改為與所述第二程式的名稱相同。 In example embodiment 4, according to example embodiments 1-3, it further includes: modifying the name of the first sub-process to be the same as the name of the first program; and / or, further including: modifying the second sub-process The name of the child process is modified to be the same as the name of the second program.

示例實施例5中,根據示例實施例4,藉由以下方式修改子進程的名稱:子進程調用用於修改進程名稱的系統調用函數;或者,子進程獲取所述子進程中用於儲存進程名稱的記憶體區域的位址,並修改所述位址對應的記憶體區 域中儲存的參數值。 In the exemplary embodiment 5, according to the exemplary embodiment 4, the name of the child process is modified by: the child process calls a system call function for modifying the process name; or, the child process obtains the process name for storing the process name in the child process An address of a memory area of the memory, and modify a parameter value stored in the memory area corresponding to the address.

示例實施例6中,根據示例實施例1-5,所述代理進程創建所述第一子進程之前,還包括:關閉不能被所述第一子進程繼承的資源;所述代理進程創建所述第二子進程之前,還包括:關閉不能被所述第二子進程繼承的資源。 In example embodiment 6, according to example embodiments 1-5, before the agent process creates the first child process, the method further includes: closing a resource that cannot be inherited by the first child process; the agent process creates the Before the second child process, the method further includes: closing a resource that cannot be inherited by the second child process.

示例實施例7中,根據示例實施例1-6,還包括:重置所述第一程式所使用的環境變量;和/或,還包括:重置所述第二程式所使用的環境變量。 In example embodiment 7, according to example embodiments 1-6, it further includes: resetting the environment variables used by the first program; and / or, further includes: resetting the environment variables used by the second program.

示例實施例8中,根據示例實施例1-7,還包括:所述第一子進程獲取用於儲存第一子進程名稱的記憶體區域的位址,並修改所述位址對應的記憶體區域中儲存的參數值;和/或,還包括:所述第二子進程向所述代理進程發送請求;所述代理進程根據所述請求,獲取用於儲存第二子進程名稱的參數的位址,並修改所述位址中的參數值。 In example embodiment 8, according to example embodiments 1-7, the method further includes: obtaining, by the first child process, an address of a memory area for storing the name of the first child process, and modifying the memory corresponding to the address. Parameter values stored in the area; and / or, further comprising: the second child process sends a request to the proxy process; the proxy process obtains a bit for storing a parameter of the name of the second child process according to the request And modify the parameter value in the address.

示例實施例9中,根據示例實施例1-8,還包括:將被所述第一程式調用的所述動態鏈接程式庫中的函數所修改的資料,儲存於所述第一子進程獨有的記憶體空間;和/或,還包括:將被所述第二程式調用的所述動態鏈接程式庫中的函數所修改的資料,儲存於所述第二子進程獨有的記憶體空間。 In example embodiment 9, according to example embodiments 1-8, the method further includes: storing data modified by a function in the dynamic link library called by the first program, unique to the first sub-process. Memory space; and / or, further comprising: storing data modified by a function in the dynamic link library called by the second program in a memory space unique to the second sub-process.

示例實施例10中,根據示例實施例1-9,所述第一程式在被編譯時,所述第一程式的入口函數位址被匯出到所述第一程式的可執行文件中;所述第一子進程調用所述第一程式的入口函數之前,根據所述第一程式的可執行文件 獲取所述第一程式的入口函數位址;所述第二程式在被編譯時,所述第二程式的入口函數位址被匯出到所述第二程式的可執行文件中;所述第二子進程調用所述第二程式的入口函數之前,根據所述第二程式的可執行文件獲取所述第二程式的入口函數位址。 In example embodiment 10, according to example embodiments 1-9, when the first program is compiled, the address of the entry function of the first program is exported to the executable file of the first program; Before the first sub-process calls the entry function of the first program, obtain the entry function address of the first program according to the executable file of the first program; when the second program is compiled, the The address of the entry function of the second program is exported to the executable file of the second program; before the second subprocess calls the entry function of the second program, according to the executable file of the second program Obtaining an entry function address of the second program.

本公開還可以包括以下公開的各種示例實施例。 The present disclosure may also include various example embodiments disclosed below.

示例實施例1中,裝置可以進行合併,該裝置可包括:啟動模組,用於啟動代理進程,所述代理進程載入所述代理進程所鏈接的動態鏈接程式庫到記憶體;進程創建模組,用於創建第一子進程,所述第一子進程藉由調用所述第一程式的入口函數,載入所述第一程式;以及,創建第二子進程,所述第二子進程藉由調用所述第二程式的入口函數,載入所述第二程式;其中,所述第一程式和所述第二程式共用所述動態鏈接程式庫佔用的記憶體。 In the exemplary embodiment 1, the device may be merged. The device may include a startup module for starting an agent process, and the agent process loads a dynamic link library linked to the agent process into a memory; the process creates a module. Group for creating a first child process, the first child process loading the first program by calling an entry function of the first program; and creating a second child process, the second child process The second program is loaded by calling an entry function of the second program; wherein the first program and the second program share a memory occupied by the dynamic link library.

示例實施例2中,根據示例實施例1,所述啟動模組為作業系統中的第一個進程,被所述啟動模組啟動的所述代理進程用於代理所述第一個進程創建子進程。 In example embodiment 2, according to example embodiment 1, the startup module is the first process in the operating system, and the agent process started by the startup module is used to proxy the first process creator. process.

示例實施例3中,根據示例實施例1-2,所述進程創建模組還用於:藉由調用用於打開動態鏈接程式庫的函數,在所述第一子進程中打開所述動態鏈接程式庫,其中,該函數的輸入參數中包括所述動態鏈接程式庫的文件名;和/或,藉由調用用於打開動態鏈接程式庫的函數,在所述第二子進程中打開所述動態鏈接程式庫,其中,該函數的輸入參數中包括所述動態鏈接程式庫的文件名。 In example embodiment 3, according to example embodiments 1-2, the process creation module is further configured to: open the dynamic link in the first sub-process by calling a function for opening a dynamic link library A library, wherein input parameters of the function include a file name of the dynamic link library; and / or, opening the second sub-process by calling a function for opening the dynamic link library The dynamic link library, wherein the input parameters of the function include the file name of the dynamic link library.

示例實施例4中,根據示例實施例1-3,所述進程創建模組創建的所述第一子進程將所述第一子進程的名稱修改為與所述第一程式的名稱相同;和/或,所述進程創建模組創建的所述第二子進程將所述第二子進程的名稱修改為與所述第二程式的名稱相同。 In example embodiment 4, according to example embodiments 1-3, the first sub-process created by the process creation module changes the name of the first sub-process to the same name as the first program; and / Or, the second sub-process created by the process creation module changes the name of the second sub-process to be the same as the name of the second program.

示例實施例5中,根據示例實施例1-4,所述進程創建模組還用於:創建所述第一子進程之前,關閉不能被所述第一子進程繼承的資源;以及,創建所述第二子進程之前,關閉不能被所述第二子進程繼承的資源。 In example embodiment 5, according to example embodiments 1-4, the process creation module is further configured to: before creating the first child process, close a resource that cannot be inherited by the first child process; and, Before the second child process is described, a resource that cannot be inherited by the second child process is closed.

示例實施例6中,根據示例實施例1-5,所述進程創建模組創建的所述第一子進程重置所述第一程式所使用的環境變量;和/或,所述進程創建模組創建的所述第二子進程重置所述第二程式所使用的環境變量。 In example embodiment 6, according to example embodiments 1-5, the first sub-process created by the process creation module resets an environment variable used by the first program; and / or, the process creation module The second sub-process created by the group resets an environment variable used by the second program.

示例實施例7中,根據示例實施例1-6,還包括處理模組,用於將被所述第一程式調用的所述動態鏈接程式庫中的函數所修改的資料,儲存於所述第一子進程獨有的記憶體空間;和/或,將被所述第二程式調用的所述動態鏈接程式庫中的函數所修改的資料,儲存於所述第二子進程獨有的記憶體空間。 In example embodiment 7, according to example embodiments 1-6, it further includes a processing module for storing data modified by a function in the dynamic link library called by the first program in the first embodiment. A memory space unique to a sub-process; and / or, data modified by a function in the dynamic link library called by the second program is stored in a memory unique to the second sub-process space.

示例實施例8中,根據示例實施例1-7,所述第一程式在被編譯時,所述第一程式的入口函數位址被匯出到所述第一程式的可執行文件中;所述進程創建模組創建的所述第一子進程根據所述第一程式的可執行文件獲取所述第一程式的入口函數位址;所述第二程式在被編譯時,所述第 二程式的入口函數位址被匯出到所述第二程式的可執行文件中;和/或,所述進程創建模組創建的所述第二子進程根據所述第二程式的可執行文件獲取所述第二程式的入口函數位址。 In example embodiment 8, according to example embodiments 1-7, when the first program is compiled, the address of the entry function of the first program is exported to the executable file of the first program; The first sub-process created by the process creation module obtains an entry function address of the first program according to an executable file of the first program; when the second program is compiled, the second program The address of the entry function is exported to the executable file of the second program; and / or, the second sub-process created by the process creation module obtains all the files according to the executable file of the second program. The address of the entry function of the second program is described.

本公開還可以包括以下公開的各種示例實施例。 The present disclosure may also include various example embodiments disclosed below.

示例實施例1中,電腦可讀媒體可以進行合併,其可包括:一個或多個電腦可讀媒體,所述可讀媒體上儲存有指令,所述指令被一個或多個處理器執行時,使得通信設備執行如申請專利範圍第1-10中任一項所述的方法。 In example embodiment 1, the computer-readable media may be combined, which may include one or more computer-readable media, where the readable medium stores instructions, and when the instructions are executed by one or more processors, The communication device is caused to perform the method according to any one of claims 1-10.

本公開還可以包括以下公開的各種示例實施例。 The present disclosure may also include various example embodiments disclosed below.

示例實施例1中,裝置可以進行合併,其可包括:一個或多個處理器;以及,一個或多個電腦可讀媒體,所述可讀媒體上儲存有指令,所述指令被所述一個或多個處理器執行時,使得所述裝置執行如申請專利範圍第1-10項中任一項所述的方法。 In example embodiment 1, the device may be merged, which may include: one or more processors; and one or more computer-readable media, where instructions are stored on the readable medium, and the instructions are When executed by one or more processors, the apparatus is caused to execute the method according to any one of claims 1-10 of the scope of patent application.

Claims (20)

一種方法,其特徵在於,包括:啟動代理進程,所述代理進程載入所述代理進程所鏈接的動態鏈接程式庫到記憶體;所述代理進程創建第一子進程,所述第一子進程藉由調用所述第一程式的入口函數,載入所述第一程式;所述代理進程創建第二子進程,所述第二子進程藉由調用所述第二程式的入口函數,載入所述第二程式;其中,所述第一程式和所述第二程式共用所述動態鏈接程式庫佔用的記憶體。     A method, comprising: starting an agent process, the agent process loading a dynamic link library linked to the agent process into a memory; the agent process creating a first child process, the first child process The first program is loaded by calling the entry function of the first program; the proxy process creates a second sub-process, and the second sub-process is loaded by calling the entry function of the second program The second program; wherein the first program and the second program share a memory occupied by the dynamic link library.     如申請專利範圍第1項所述的方法,其中,所述代理進程由作業系統中的第一個進程啟動,所述代理進程用於代理所述第一個進程創建子進程。     The method according to item 1 of the scope of patent application, wherein the agent process is started by a first process in an operating system, and the agent process is used to create a child process on behalf of the first process.     如申請專利範圍第1項所述的方法,其中,還包括:藉由調用用於打開動態鏈接程式庫的函數,在所述第一子進程中打開所述動態鏈接程式庫,其中,該函數的輸入參數中包括所述動態鏈接程式庫的文件名;和/或還包括:藉由調用用於打開動態鏈接程式庫的函數,在所述第二子進程中打開所述動態鏈接程式庫,其中,該函數的輸入參數中包括所述動態鏈接程式庫的文件名。     The method according to item 1 of the patent application scope, further comprising: opening the dynamic link library in the first sub-process by calling a function for opening the dynamic link library, wherein the function The input parameters of include the file name of the dynamic link library; and / or further include: opening the dynamic link library in the second sub-process by calling a function for opening the dynamic link library, The input parameters of the function include the file name of the dynamic link library.     如申請專利範圍第1項所述的方法,其中,還包括:將所述第一子進程的名稱修改為與所述第一程式的名稱相同;和/或還包括:將所述第二子進程的名稱修改為與所述第二程式的名稱相同。     The method according to item 1 of the patent application scope, further comprising: modifying the name of the first sub-process to the same name as the first program; and / or further comprising: modifying the second sub-process The name of the process is modified to be the same as the name of the second program.     如申請專利範圍第4項所述的方法,其中,藉由以下方式修改子進程的名稱:子進程調用用於修改進程名稱的系統調用函數;或者,子進程獲取所述子進程中用於儲存進程名稱的記憶體區域的位址,並修改所述位址對應的記憶體區域中儲存的參數值。     The method according to item 4 of the scope of patent application, wherein the name of the child process is modified by: the child process calls a system call function for modifying the process name; or the child process acquires the child process for storage An address of a memory area of the process name, and modifying a parameter value stored in the memory area corresponding to the address.     如申請專利範圍第1項所述的方法,其中,所述代理進程創建所述第一子進程之前,還包括:關閉不能被所述第一子進程繼承的資源;和/或所述代理進程創建所述第二子進程之前,還包括:關閉不能被所述第二子進程繼承的資源。     The method according to item 1 of the scope of patent application, wherein before the agent process creates the first child process, the method further comprises: closing a resource that cannot be inherited by the first child process; and / or the agent process Before creating the second child process, the method further includes: closing a resource that cannot be inherited by the second child process.     如申請專利範圍第1項所述的方法,其中,還包括:重置所述第一程式所使用的環境變量;和/或還包括:重置所述第二程式所使用的環境變量。     The method according to item 1 of the scope of patent application, further comprising: resetting an environment variable used by the first program; and / or further comprising: resetting an environment variable used by the second program.     如申請專利範圍第1項所述的方法,其中,還包括:所述第一子進程獲取用於儲存第一子進程名稱的記憶體區域的位址,並修改所述位址對應的記憶體區域中儲存的參數值;和/或,還包括:所述第二子進程向所述代理進程發送請求;所述代理進程根據所述請求,獲取用於儲存第二子進程名稱的參數的位址,並修改所述位址中的參數值。     The method according to item 1 of the patent application scope, further comprising: obtaining, by the first sub-process, an address of a memory area for storing the name of the first sub-process, and modifying the memory corresponding to the address Parameter values stored in the area; and / or, further comprising: the second child process sends a request to the proxy process; the proxy process obtains a bit for storing a parameter of the name of the second child process according to the request And modify the parameter value in the address.     如申請專利範圍第1項所述的方法,其中,還包括:將被所述第一程式調用的所述動態鏈接程式庫中的函數所修改的資料,儲存於所述第一子進程獨有的記憶體空間;和/或將被所述第二程式調用的所述動態鏈接程式庫中的函數所修改的資料,儲存於所述第二子進程獨有的記憶體空間。     The method according to item 1 of the scope of patent application, further comprising: storing data modified by a function in the dynamic link library called by the first program in a unique manner of the first sub-process Memory space; and / or data modified by a function in the dynamic link library called by the second program is stored in a memory space unique to the second sub-process.     如申請專利範圍第1至9項中任一項所述的方法,其中,所述第一程式在被編譯時,所述第一程式的入口函數位址被匯出到所述第一程式的可執行文件中;所述第一子進程調用所述第一程式的入口函數之前,根據所述第一程式的可執行文件獲取所述第一程式的入口函數位址;所述第二程式在被編譯時,所述第二程式的入口函數位址被匯出到所述第二程式的可執行文件中;所述第二子 進程調用所述第二程式的入口函數之前,根據所述第二程式的可執行文件獲取所述第二程式的入口函數位址。     The method according to any one of claims 1 to 9, wherein when the first program is compiled, the address of the entry function of the first program is exported to the first program. In the executable file; before the first sub-process calls the entry function of the first program, obtain the entry function address of the first program according to the executable file of the first program; the second program is in When compiled, the address of the entry function of the second program is exported to the executable file of the second program; before the second subprocess calls the entry function of the second program, according to the first The executable file of the second program obtains an entry function address of the second program.     一種裝置,其特徵在於,包括:啟動模組,用於啟動代理進程,所述代理進程載入所述代理進程所鏈接的動態鏈接程式庫到記憶體;進程創建模組,用於創建第一子進程,所述第一子進程藉由調用所述第一程式的入口函數,載入所述第一程式;以及創建第二子進程,所述第二子進程藉由調用所述第二程式的入口函數,載入所述第二程式;其中,所述第一程式和所述第二程式共用所述動態鏈接程式庫佔用的記憶體。     A device, comprising: a startup module for starting an agent process, the agent process loading a dynamic link library linked to the agent process into a memory; a process creation module for creating a first A sub-process, the first sub-process loading the first program by calling an entry function of the first program; and creating a second sub-process, the second sub-process by calling the second program The entry function loads the second program; wherein the first program and the second program share a memory occupied by the dynamic link library.     如申請專利範圍第11項所述的裝置,其中,所述啟動模組為作業系統中的第一個進程,被所述啟動模組啟動的所述代理進程用於代理所述第一個進程創建子進程。     The device according to item 11 of the scope of patent application, wherein the startup module is the first process in the operating system, and the agent process started by the startup module is used to proxy the first process Create a child process.     如申請專利範圍第11項所述的裝置,其中,所述進程創建模組還用於:藉由調用用於打開動態鏈接程式庫的函數,在所述第一子進程中打開所述動態鏈接程式庫,其中,該函數的輸入參數中包括所述動態鏈接程式庫的文件名;和/或藉由調用用於打開動態鏈接程式庫的函數,在所述第 二子進程中打開所述動態鏈接程式庫,其中,該函數的輸入參數中包括所述動態鏈接程式庫的文件名。     The device according to item 11 of the patent application scope, wherein the process creation module is further configured to: open the dynamic link in the first sub-process by calling a function for opening a dynamic link library A library, wherein the input parameters of the function include the file name of the dynamic link library; and / or the dynamic opening of the dynamic link library by calling the function to open the dynamic in the second sub-process The link library, wherein the input parameter of the function includes the file name of the dynamic link library.     如申請專利範圍第11項所述的裝置,其中,所述進程創建模組創建的所述第一子進程將所述第一子進程的名稱修改為與所述第一程式的名稱相同;和/或所述進程創建模組創建的所述第二子進程將所述第二子進程的名稱修改為與所述第二程式的名稱相同。     The device according to item 11 of the scope of patent application, wherein the first sub-process created by the process creation module modifies the name of the first sub-process to be the same as the name of the first program; and / Or the second sub-process created by the process creation module changes the name of the second sub-process to the same name as the second program.     如申請專利範圍第11項所述的裝置,其中,所述進程創建模組還用於:創建所述第一子進程之前,關閉不能被所述第一子進程繼承的資源;以及創建所述第二子進程之前,關閉不能被所述第二子進程繼承的資源。     The device according to item 11 of the scope of patent application, wherein the process creation module is further configured to: before creating the first sub-process, close a resource that cannot be inherited by the first sub-process; and create the Before the second child process, the resources that cannot be inherited by the second child process are closed.     如申請專利範圍第11項所述的裝置,其中,所述進程創建模組創建的所述第一子進程調用所述第一程式的入口函數之前,重置所述第一程式所使用的環境變量;和/或所述進程創建模組創建的所述第二子進程調用所述第二程式的入口函數之前,重置所述第二程式所使用的環境變量。     The device according to item 11 of the scope of patent application, wherein before the first sub-process created by the process creation module calls the entry function of the first program, reset the environment used by the first program Variables; and / or before the second child process created by the process creation module calls the entry function of the second program, resetting the environment variables used by the second program.     如申請專利範圍第11項所述的裝置,其中,還包括:處理模組,用於將被所述第一程式調用的所述動態鏈 接程式庫中的函數所修改的資料,儲存於所述第一子進程獨有的記憶體空間;和/或,將被所述第二程式調用的所述動態鏈接程式庫中的函數所修改的資料,儲存於所述第二子進程獨有的記憶體空間。     The device according to item 11 of the scope of patent application, further comprising: a processing module for storing data modified by a function in the dynamic link library called by the first program, in the device. Memory space unique to the first sub process; and / or, data modified by a function in the dynamic link library called by the second program is stored in the memory unique to the second sub process Body space.     如申請專利範圍第11至17項中任一項所述的裝置,其中,所述第一程式在被編譯時,所述第一程式的入口函數位址被匯出到所述第一程式的可執行文件中;所述進程創建模組創建的所述第一子進程根據所述第一程式的可執行文件獲取所述第一程式的入口函數位址;所述第二程式在被編譯時,所述第二程式的入口函數位址被匯出到所述第二程式的可執行文件中;所述進程創建模組創建的所述第二子進程根據所述第二程式的可執行文件獲取所述第二程式的入口函數位址。     The device according to any one of claims 11 to 17, wherein when the first program is compiled, the address of the entry function of the first program is exported to the first program. In the executable file; the first sub-process created by the process creation module obtains the entry function address of the first program according to the executable file of the first program; when the second program is compiled The address of the entry function of the second program is exported to the executable file of the second program; the second sub-process created by the process creation module is based on the executable file of the second program Obtaining an entry function address of the second program.     一種或多種電腦可讀媒體,所述可讀媒體上儲存有指令,所述指令被一個或多個處理器執行時,使得通信設備執行如申請專利範圍第1-10項中任一項所述的方法。     One or more computer-readable media having instructions stored on the readable medium. When the instructions are executed by one or more processors, the communication device executes the instructions as described in any one of claims 1-10 of the scope of patent application. Methods.     一種裝置,包括:一個或多個處理器;以及一個或多個電腦可讀媒體,所述可讀媒體上儲存有指令,所述指令被所述一個或多個處理器執行時,使得所述裝置執行如申請專利範圍第1-10項中任一項所述的方法。     An apparatus includes: one or more processors; and one or more computer-readable media, where instructions are stored on the readable medium, and the instructions, when executed by the one or more processors, cause the The device executes the method according to any one of claims 1-10 of the scope of patent application.    
TW106126766A 2016-11-29 2017-08-08 Process management method and apparatus TW201820131A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
??201611078446.1 2016-11-29
CN201611078446.1A CN108121594B (en) 2016-11-29 2016-11-29 Process management method and device

Publications (1)

Publication Number Publication Date
TW201820131A true TW201820131A (en) 2018-06-01

Family

ID=62226976

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106126766A TW201820131A (en) 2016-11-29 2017-08-08 Process management method and apparatus

Country Status (3)

Country Link
CN (1) CN108121594B (en)
TW (1) TW201820131A (en)
WO (1) WO2018099292A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109086136A (en) * 2018-07-26 2018-12-25 广东浪潮大数据研究有限公司 A kind of request processing method and relevant apparatus of Samba software
CN109408147B (en) * 2018-10-22 2022-04-19 深圳市元征科技股份有限公司 Protocol determination method, system, device and readable storage medium
CN112083998A (en) * 2019-06-14 2020-12-15 中车株洲电力机车研究所有限公司 Dynamic configuration method and device for task parameters in RTP of VxWorks system
CN112256339B (en) * 2019-07-22 2023-11-03 百度在线网络技术(北京)有限公司 Multi-process management method, device, electronic equipment and storage medium
CN111083195B (en) * 2019-11-12 2022-09-13 烽火通信科技股份有限公司 Virtual single disk proxy system and method
CN113282380A (en) * 2020-02-18 2021-08-20 深圳信可通讯技术有限公司 Method and device for calling multi-channel control interface and computer readable medium
CN111596970B (en) * 2020-05-12 2023-04-28 广州市百果园信息技术有限公司 Method, device, equipment and storage medium for dynamic library delay loading
CN113377543A (en) * 2021-06-28 2021-09-10 上海商汤科技开发有限公司 Task processing system, electronic device, and storage medium
CN114385261A (en) * 2021-12-23 2022-04-22 湖南小算科技信息有限公司 Method for loading program in process
CN115309523A (en) * 2022-07-28 2022-11-08 青岛云天励飞科技有限公司 Data processing method and device, electronic equipment and storage medium
CN115589503A (en) * 2022-10-28 2023-01-10 惠州市德赛西威汽车电子股份有限公司 Vehicle-mounted host startup animation implementation method, system, host and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090113111A1 (en) * 2007-10-30 2009-04-30 Vmware, Inc. Secure identification of execution contexts
CN101382953B (en) * 2008-09-19 2013-03-20 中兴通讯股份有限公司 Interface system for accessing file system in user space and file reading and writing method
CN101576912A (en) * 2009-06-03 2009-11-11 中兴通讯股份有限公司 System and reading and writing method for realizing asynchronous input and output interface of distributed file system
US9104504B2 (en) * 2013-03-13 2015-08-11 Dell Products Lp Systems and methods for embedded shared libraries in an executable image

Also Published As

Publication number Publication date
WO2018099292A1 (en) 2018-06-07
CN108121594A (en) 2018-06-05
CN108121594B (en) 2020-10-20

Similar Documents

Publication Publication Date Title
TW201820131A (en) Process management method and apparatus
US9009693B2 (en) Out-of-band framework libraries within applications
KR101031409B1 (en) A method, article of manufacture and system for dynamically generating virtual machines
US8074231B2 (en) Configuration of isolated extensions and device drivers
CN109542506B (en) System capable of flexibly configuring interface and rapidly delivering service
US9983869B2 (en) Adaptive interface for cross-platform component generation
US9063805B2 (en) Method and system for enabling access to functionality provided by resources outside of an operating system environment
US9971582B2 (en) Selecting application wrapper logic components based on features of a mobile application to be wrapped
US8935686B2 (en) Error-code and exception-based function dispatch tables
US8200938B2 (en) Computer system and method providing a memory buffer for use with native and platform-independent software code
JP2016509714A (en) Software interface for hardware devices
KR20120037381A (en) Controlling access to software component state
US20210303681A1 (en) Shadow stack enforcement range for dynamic code
CN111290740B (en) Application program development method and device, computer equipment and storage medium
CN114880076B (en) Dynamic loading method and device for dynamic mapping file of user-mode virtual machine
US9626371B2 (en) Attribute selectable file operation
KR20070088160A (en) Method for invoking inlined method and java virtual machine using the same
CN109947407B (en) Data acquisition method and device
US9720803B2 (en) Methods and apparatus for debugging of remote systems
JP2016186697A (en) Method and mechanism for sharing variable among functions
US10599617B2 (en) Methods and apparatus to modify a binary file for scalable dependency loading on distributed computing systems
KR101748210B1 (en) Distributed processing system and processing method for file in distributed processing system
WO2023071786A1 (en) Inter-process function calling method and related device
JP7320071B2 (en) Method and system for protecting executable files using heap memory
CN114238871A (en) Class member function protection method in SO, storage medium, electronic device and system