CN115185634A - Subsystem implementation method and computing device - Google Patents
Subsystem implementation method and computing device Download PDFInfo
- Publication number
- CN115185634A CN115185634A CN202210695943.5A CN202210695943A CN115185634A CN 115185634 A CN115185634 A CN 115185634A CN 202210695943 A CN202210695943 A CN 202210695943A CN 115185634 A CN115185634 A CN 115185634A
- Authority
- CN
- China
- Prior art keywords
- subsystem
- operation command
- digit
- application program
- operating system
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45537—Provision of facilities of other operating environments, e.g. WINE
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/48—Indexing scheme relating to G06F9/48
- G06F2209/482—Application
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及操作系统技术领域,尤其涉及一种子系统实现方法及计算设备。The present invention relates to the technical field of operating systems, and in particular, to a method for implementing a subsystem and a computing device.
背景技术Background technique
随着处理器技术的飞速发展,64字长的处理器已经成为主流,并带动了配套的64位操作系统飞速发展。目前,主流操作系统均支持64位,越来越多的操作系统发行版不再发布32位镜像,主流应用软件也逐渐以开发64位为主。With the rapid development of processor technology, 64-word processors have become the mainstream, and have driven the rapid development of supporting 64-bit operating systems. At present, all mainstream operating systems support 64-bit, and more and more operating system distributions no longer release 32-bit images, and mainstream application software is gradually developing 64-bit.
基于现实需求,一部分32位应用程序依然被保留,目前主流操作系统(例如Linux)发行版依然保留着对32位应用的支持能力。但,对大型32位应用的维护成本已经大于应用本身的维护成本。在现实开发中,经常由于对32位应用程序的维护不及时或不完整而导致依赖破坏等严重后果,还会影响64位应用程序的正常使用。Based on practical needs, some 32-bit applications are still reserved, and current mainstream operating system (such as Linux) distributions still retain the ability to support 32-bit applications. However, the maintenance cost of a large 32-bit application is already greater than the maintenance cost of the application itself. In real development, the maintenance of 32-bit applications is often untimely or incomplete, resulting in serious consequences such as dependency destruction, and also affects the normal use of 64-bit applications.
随着32位应用程序即将退出主流市场,需要考虑将32位应用程序进行单独管理,以提高整个系统环境的稳定性。针对当前32位程序和64位程序相互混合使用的问题,需要一个隔离环境来运行32位应用程序。As 32-bit applications are about to withdraw from the mainstream market, it is necessary to consider managing 32-bit applications separately to improve the stability of the entire system environment. In view of the problem of mixed use of 32-bit programs and 64-bit programs, an isolated environment is required to run 32-bit applications.
现有技术中,在Linux上实现的在隔离环境运行32位应用程序的方案包括两种:chroot和container。chroot 是Linux内核提供的系统调用,通过该系统调用可以改变进程的根目录,从而实现隔离环境的目的。使用chroot来运行32位应用程序,还需要准备一个rootfs, chroot通过将进程的根目录修改到rootfs所在路径,便可以借助rootfs内提供的ld等基础设置完成32位应用程序的运行。但,chroot环境无法方便地与host(主操作系统)进行交互,例如,GUI程序在chroot环境内运行就比较麻烦,需要各种各样的设置。In the prior art, there are two solutions for running 32-bit applications in an isolated environment implemented on Linux: chroot and container. chroot is a system call provided by the Linux kernel, through which the root directory of the process can be changed to achieve the purpose of isolating the environment. To use chroot to run 32-bit applications, you also need to prepare a rootfs. By changing the root directory of the process to the path where rootfs is located, chroot can complete the running of 32-bit applications with the help of basic settings such as ld provided in rootfs. However, the chroot environment cannot easily interact with the host (the main operating system). For example, GUI programs running in the chroot environment are cumbersome and require various settings.
Linux Container 是一种操作系统级虚拟化方法,其除了能实现环境隔离,还可以对进程的资源权限进行管控。通过container可以实现在单个Linux内核上运行多个隔离的Linux系统。以Docker为例,Docker可以方便地管理符合OCI的镜像,并提供运行时支持和管理。通过Docker运行32位Linux OCI (open container initiative,开发容器标准)镜像,安装所需依赖就可以在容器内运行32位应用程序。Linux Container is an operating system-level virtualization method, which can not only achieve environment isolation, but also control the resource permissions of processes. Multiple isolated Linux systems can be run on a single Linux kernel through a container. Taking Docker as an example, Docker can easily manage OCI-compliant images and provide runtime support and management. Run a 32-bit Linux OCI (open container initiative) image through Docker, install the required dependencies, and run a 32-bit application inside the container.
虽然chroot和container 都可以提供一个运行时隔离环境,以支持32位应用程序在64位操作系统上的隔离环境运行。但是对于消费者用户来说,chroot和container的使用过于麻烦,用户需要像开发者一样进行复杂的配置,才能实现在隔离环境正常使用网络、磁盘、显示器等。而且,这些操作都需要在命令行终端上进行。Although both chroot and container can provide a runtime isolation environment to support 32-bit applications running in an isolated environment on 64-bit operating systems. However, for consumer users, the use of chroot and container is too cumbersome, and users need to perform complex configurations like developers in order to use the network, disks, monitors, etc. normally in an isolated environment. Moreover, these operations need to be performed on the command line terminal.
为此,需要一种子系统实现方法,以解决上述方案中存在的问题。Therefore, a subsystem implementation method is required to solve the problems existing in the above solutions.
发明内容SUMMARY OF THE INVENTION
为此,本发明提供一种子系统实现方法,以解决或至少缓解上面存在的问题。To this end, the present invention provides a subsystem implementation method to solve or at least alleviate the above problems.
根据本发明的一个方面,提供一种子系统实现方法,在计算设备的操作系统中执行,所述操作系统适于运行第一位数应用程序,其中,所述操作系统上运行有子系统管理器以及一个或多个子系统,一个或多个子系统中适于运行第二位数应用程序,所述方法包括步骤:接收用户对第二位数应用程序的操作请求;基于所述对第二位数应用程序的操作请求生成相应的操作命令,并将所述操作命令发送至子系统管理器;子系统管理器将所述操作命令发送至所述第二位数应用程序对应的目标子系统,以便所述目标子系统执行所述操作命令。According to one aspect of the present invention, there is provided a method for implementing a subsystem, which is executed in an operating system of a computing device, the operating system is adapted to run a first-digit application program, wherein a subsystem manager runs on the operating system and one or more subsystems, wherein the one or more subsystems are adapted to run a second-digit application program, the method comprising the steps of: receiving a user's operation request for the second-digit application program; The operation request of the application program generates a corresponding operation command, and sends the operation command to the subsystem manager; the subsystem manager sends the operation command to the target subsystem corresponding to the second-digit application program, so that The target subsystem executes the operation command.
可选地,在根据本发明的子系统实现方法中,将所述操作命令发送至子系统管理器包括:将所述操作命令封装为元数据格式的操作命令消息,并将所述操作命令消息发送至子系统管理器。Optionally, in the subsystem implementation method according to the present invention, sending the operation command to the subsystem manager includes: encapsulating the operation command into an operation command message in a metadata format, and sending the operation command message Sent to Subsystem Manager.
可选地,在根据本发明的子系统实现方法中,每个子系统适于运行一种第二位数应用程序;将所述操作命令发送至第二位数应用程序对应的目标子系统的步骤包括:确定所述操作命令对应的第二位数应用程序,并确定第二位数应用程序对应的目标子系统;将所述操作命令发送至所述目标子系统。Optionally, in the subsystem implementation method according to the present invention, each subsystem is suitable for running a second-digit application program; the step of sending the operation command to the target subsystem corresponding to the second-digit application program The method includes: determining a second-digit application program corresponding to the operation command, and determining a target subsystem corresponding to the second-digit application program; sending the operation command to the target subsystem.
可选地,在根据本发明的子系统实现方法中,子系统管理器将所述操作命令发送至第二位数应用程序对应的目标子系统的步骤包括:子系统管理器对所述操作命令进行解析,以确定所述操作命令是否需要由子系统执行;如果是,则将所述操作命令发送至第二位数应用程序对应的目标子系统。Optionally, in the subsystem implementation method according to the present invention, the step of the subsystem manager sending the operation command to the target subsystem corresponding to the second-digit application program includes: the subsystem manager sends the operation command to the operation command. Perform parsing to determine whether the operation command needs to be executed by the subsystem; if so, send the operation command to the target subsystem corresponding to the second-digit application program.
可选地,在根据本发明的子系统实现方法中,所述操作命令包括对第二位数应用程序的安装操作命令、卸载操作命令、启动操作命令、编译操作命令中的一种或多种。Optionally, in the subsystem implementation method according to the present invention, the operation command includes one or more of an installation operation command, an uninstallation operation command, a startup operation command, and a compilation operation command for the second-digit application program. .
可选地,在根据本发明的子系统实现方法中,还包括步骤:Optionally, in the subsystem implementation method according to the present invention, the method further includes the steps:
子系统管理器获取每个子系统对应的系统镜像,并将系统镜像解压到预定安装目录下,以便安装所述子系统。The subsystem manager obtains a system image corresponding to each subsystem, and decompresses the system image to a predetermined installation directory, so as to install the subsystem.
可选地,在根据本发明的子系统实现方法中,所述操作命令是对第二位数应用程序的安装操作命令,子系统管理器将所述操作命令发送至第二位数应用程序对应的目标子系统,以便所述目标子系统执行所述操作命令,包括:子系统管理器根据所述安装操作命令确定为所述第二位数应用程序配置的目标子系统,将所述安装操作命令发送至所述目标子系统,以便目标子系统执行所述安装操作命令,以将第二位数应用程序安装在所述目标子系统中。Optionally, in the subsystem implementation method according to the present invention, the operation command is an installation operation command for the second-digit application program, and the subsystem manager sends the operation command to the corresponding second-digit application program. The target subsystem, so that the target subsystem executes the operation command, including: the subsystem manager determines the target subsystem configured for the second-digit application program according to the installation operation command, and executes the installation operation command. A command is sent to the target subsystem, so that the target subsystem executes the installation operation command to install the second-digit application program in the target subsystem.
可选地,在根据本发明的子系统实现方法中,子系统管理器将第二位数应用程序与子系统的对应关系记录在系统日志中。Optionally, in the subsystem implementation method according to the present invention, the subsystem manager records the corresponding relationship between the second-digit application program and the subsystem in the system log.
可选地,在根据本发明的子系统实现方法中,所述操作命令是对第二位数应用程序的启动操作命令,子系统管理器将所述操作命令发送至第二位数应用程序对应的目标子系统,以便所述目标子系统执行所述操作命令,包括:子系统管理器确定所述启动操作命令对应的第二位数应用程序,基于所述系统日志确定所述第二位数应用程序对应的目标子系统,并将所述启动操作命令发送至所述目标子系统,以便目标子系统执行所述启动操作命令,以在所述目标子系统启动所述第二位数应用程序。Optionally, in the subsystem implementation method according to the present invention, the operation command is a start operation command for the second-digit application program, and the subsystem manager sends the operation command to the corresponding second-digit application program. The target subsystem, so that the target subsystem executes the operation command, comprising: a subsystem manager determining a second-digit application program corresponding to the start-up operation command, and determining the second-digit application program based on the system log the target subsystem corresponding to the application program, and send the start operation command to the target subsystem, so that the target subsystem executes the start operation command to start the second-digit application program in the target subsystem .
可选地,在根据本发明的子系统实现方法中,所述操作系统包括用户目录,所述方法还包括步骤:子系统管理器将所述用户目录绑定到所述子系统中,以便运行在所述子系统中的第二位数应用程序访问所述用户目录、创建快捷方式;子系统管理器将所述操作系统的用户标识和群组标识映射到所述子系统中,以便运行在所述子系统中的第二位数应用程序与运行在所述操作系统上的第一位数应用程序保持相同的用户标识和群组标识。Optionally, in the subsystem implementation method according to the present invention, the operating system includes a user directory, and the method further includes the step of: the subsystem manager binds the user directory to the subsystem so as to run The second-digit application program in the subsystem accesses the user directory and creates shortcuts; the subsystem manager maps the user ID and group ID of the operating system to the subsystem to run on The second-digit application program in the subsystem maintains the same user identification and group identification as the first-digit application program running on the operating system.
可选地,在根据本发明的子系统实现方法中,还包括步骤:子系统管理器响应于第二位数应用程序在子系统注册服务的操作,将所述服务注册到操作系统,以便运行所述第二位数应用程序的服务。Optionally, in the subsystem implementation method according to the present invention, it further includes the step of: the subsystem manager, in response to the operation of registering the service in the subsystem by the second-digit application program, registers the service to the operating system so as to run The second digit application service.
可选地,在根据本发明的子系统实现方法中,所述第一位数为64位,所述第二位数为32位。Optionally, in the subsystem implementation method according to the present invention, the first number of digits is 64 bits, and the second number of digits is 32 bits.
根据本发明的一个方面,提供一种计算设备,包括:至少一个处理器;存储器,存储有程序指令,其中,程序指令被配置为适于由上述至少一个处理器执行,所述程序指令包括用于执行如上所述的子系统实现方法的指令。According to one aspect of the present invention, there is provided a computing device comprising: at least one processor; a memory storing program instructions, wherein the program instructions are configured to be adapted to be executed by the at least one processor, the program instructions comprising using Instructions for executing the subsystem implementation method as described above.
根据本发明的一个方面,提供一种存储有程序指令的可读存储介质,当该程序指令被计算设备读取并执行时,使得该计算设备执行如上所述的子系统实现方法。According to one aspect of the present invention, there is provided a readable storage medium storing program instructions, which, when the program instructions are read and executed by a computing device, cause the computing device to execute the above-described method for implementing a subsystem.
根据本发明的技术方案,提供了一种子系统实现方法,通过在第一位数的操作系统之上部署一个或多个子系统,通过子系统可以为第二位数应用程序提供与操作系统隔离的运行环境,实现了在第一位数操作系统上运行第二位数应用程序的运行环境。用户在对第二位数应用程序进行操作时,依然是调用操作系统提供的接口,由操作系统来根据用户的操作生成相应的操作命令,并将操作命令转发至子系统管理器,经由子系统管理器将操作命令发送至第二位数应用程序所在的子系统中执行。这样,根据本发明的实现方案,用户可以无感知地在第一位数操作系统上对第二位数应用程序进行操作,交互方式更友好,大大降低了用户在第一位数操作系统上使用第二位数应用程序的学习成本。而且,基于子系统提供的隔离环境,当子系统出现异常时并不会影响操作系统上的各个第一位数应用程序的运行,从而便于维护,有利于提高系统运行的稳定性。According to the technical solution of the present invention, a method for implementing a subsystem is provided. By deploying one or more subsystems on the operating system of the first digit, the subsystem can provide the application program of the second digit with the isolation system from the operating system. The operating environment realizes the operating environment for running the second-digit application program on the first-digit operating system. When the user operates the second-digit application program, he still calls the interface provided by the operating system, and the operating system generates the corresponding operation command according to the user's operation, and forwards the operation command to the subsystem manager. The manager sends the operation command to the subsystem where the second-digit application program is located for execution. In this way, according to the implementation scheme of the present invention, the user can operate the second-digit application program on the first-digit operating system without perception, and the interaction mode is more friendly, which greatly reduces the use of the first-digit operating system by the user. Learning costs for second-digit applications. Moreover, based on the isolation environment provided by the subsystem, when the subsystem is abnormal, it will not affect the operation of each first-digit application program on the operating system, thereby facilitating maintenance and improving the stability of the system operation.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, in order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand , the following specific embodiments of the present invention are given.
附图说明Description of drawings
为了实现上述以及相关目的,本文结合下面的描述和附图来描述某些说明性方面,这些方面指示了可以实践本文所公开的原理的各种方式,并且所有方面及其等效方面旨在落入所要求保护的主题的范围内。通过结合附图阅读下面的详细描述,本公开的上述以及其它目的、特征和优势将变得更加明显。遍及本公开,相同的附图标记通常指代相同的部件或元素。To achieve the above and related objects, certain illustrative aspects are described herein in conjunction with the following description and drawings, which are indicative of the various ways in which the principles disclosed herein may be practiced, and all aspects and their equivalents are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout this disclosure, the same reference numbers generally refer to the same parts or elements.
图1示出了根据本发明一个实施例的计算设备100的示意图;FIG. 1 shows a schematic diagram of a computing device 100 according to an embodiment of the present invention;
图2示出了根据本发明一个实施例的计算设备100中运行有操作系统的示意图;FIG. 2 shows a schematic diagram of an operating system running in the computing device 100 according to an embodiment of the present invention;
图3示出了根据本发明一个实施例的子系统实现方法300的流程图;FIG. 3 shows a flowchart of a
图4示出了根据本发明一个实施例的子系统实现方法300的时序图。FIG. 4 shows a sequence diagram of a
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be more thoroughly understood, and will fully convey the scope of the present disclosure to those skilled in the art.
图1示出了根据本发明一个实施例的计算设备100的示意图。如图1所示,在基本配置中,计算设备100包括至少一个处理单元102和系统存储器160。根据一个方面,取决于计算设备的配置和类型,处理单元102可以实现为处理器。系统存储器160包括但不限于易失性存储(例如,随机存取存储器)、非易失性存储(例如,只读存储器)、闪速存储器、或者这样的存储器的任何组合。根据一个方面,系统存储器160中包括操作系统150,操作系统150被配置为执行根据本发明的子系统实现方法300。FIG. 1 shows a schematic diagram of a computing device 100 according to one embodiment of the present invention. As shown in FIG. 1 , in a basic configuration, computing device 100 includes at least one processing unit 102 and system memory 160 . According to one aspect, depending on the configuration and type of computing device, processing unit 102 may be implemented as a processor. System memory 160 includes, but is not limited to, volatile storage (eg, random access memory), nonvolatile storage (eg, read only memory), flash memory, or any combination of such memories. According to one aspect, the system memory 160 includes an operating system 150 configured to execute the
根据本发明的一个实施例,操作系统150中包括第一位数内核,从而操作系统150上适于运行第一位数应用程序。系统存储器160中还包括子系统管理器130,子系统管理器130可以运行在操作系统150上。另外,操作系统150上还可以运行一个或多个支持第二位数应用程序运行的子系统,子系统可以为第二位数应用程序的运行提供隔离环境,以便在一个或多个子系统中运行一个或多个第二位数应用程序。According to an embodiment of the present invention, the operating system 150 includes a first-digit kernel, so that the operating system 150 is suitable for running a first-digit application program. The system memory 160 also includes a subsystem manager 130 that can run on the operating system 150 . In addition, the operating system 150 can also run one or more subsystems that support the running of the second-digit application programs, and the subsystems can provide an isolated environment for the running of the second-digit application programs, so as to run in the one or more subsystems One or more second digit applications.
根据一个方面,操作系统150例如适合于控制计算设备100的操作。此外,示例结合图形库、其他操作系统、或任何其他应用程序而被实践,并且不限于任何特定的应用或系统。在图1中通过在虚线内的那些组件示出了该基本配置。根据一个方面,计算设备100具有额外的特征或功能。例如,根据一个方面,计算设备100包括额外的数据存储设备(可移动的和/或不可移动的),例如磁盘、光盘、或者磁带。这样额外的存储在图1中是由可移动存储设备109和不可移动存储设备110示出的。According to one aspect, operating system 150 is adapted, for example, to control the operation of computing device 100 . Furthermore, the examples are practiced in conjunction with graphics libraries, other operating systems, or any other application, and are not limited to any particular application or system. This basic configuration is shown in FIG. 1 by those components within dashed lines. According to one aspect, computing device 100 has additional features or functionality. For example, according to one aspect, computing device 100 includes additional data storage devices (removable and/or non-removable), such as magnetic disks, optical disks, or tapes. Such additional storage is illustrated by removable storage device 109 and non-removable storage device 110 in FIG. 1 .
如在上文中所陈述的,根据一个方面,在系统存储器160中存储有程序模块。根据一个方面,程序模块可以包括一个或多个应用程序(适于运行在操作系统150上的第一位数应用程序),本发明不限制应用程序的类型,例如应用程序可以包括:电子邮件和联系人应用程序、文字处理应用程序、电子表格应用程序、数据库应用程序、幻灯片展示应用程序、绘画或计算机辅助应用程序、网络浏览器应用程序等。在根据本发明的实施例中,程序模块还可以包括一个或多个子系统,子系统中可以安装并运行第二位数应用程序。As stated above, according to one aspect, program modules are stored in system memory 160 . According to one aspect, the program modules may include one or more application programs (first digit application programs suitable for running on the operating system 150), the present invention does not limit the type of application programs, for example, the application programs may include: email and Contacts applications, word processing applications, spreadsheet applications, database applications, slideshow applications, drawing or computer aided applications, web browser applications, etc. In an embodiment according to the present invention, the program module may further include one or more subsystems, in which the second-digit application program can be installed and run.
根据一个方面,可以在包括分立电子元件的电路、包含逻辑门的封装或集成的电子芯片、利用微处理器的电路、或者在包含电子元件或微处理器的单个芯片上实践示例。例如,可以经由其中在图1中所示出的每个或许多组件可以集成在单个集成电路上的片上系统(SOC)来实践示例。根据一个方面,这样的SOC设备可以包括一个或多个处理单元、图形单元、通信单元、系统虚拟化单元、以及各种应用功能,其全部作为单个集成电路而被集成(或“烧”)到芯片基底上。当经由SOC进行操作时,可以经由在单个集成电路(芯片)上与计算设备100的其他组件集成的专用逻辑来对在本文中所描述的功能进行操作。还可以使用能够执行逻辑操作(例如AND、OR和NOT)的其他技术来实践本发明的实施例,所述其他技术包括但不限于机械、光学、流体、和量子技术。另外,可以在通用计算机内或在任何其他任何电路或系统中实践本发明的实施例。According to one aspect, the examples may be practiced on a circuit comprising discrete electronic components, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or on a single chip containing electronic components or a microprocessor. For example, the examples may be practiced via a system-on-chip (SOC) in which each or many of the components shown in FIG. 1 may be integrated on a single integrated circuit. According to one aspect, such SOC devices may include one or more processing units, graphics units, communication units, system virtualization units, and various application functions, all integrated (or "burned") into a single integrated circuit on the chip substrate. When operating via the SOC, the functions described herein may operate via dedicated logic integrated with other components of the computing device 100 on a single integrated circuit (chip). Embodiments of the invention may also be practiced using other technologies capable of performing logical operations such as AND, OR, and NOT, including but not limited to mechanical, optical, fluid, and quantum technologies. Additionally, embodiments of the invention may be practiced within a general purpose computer or in any other circuit or system.
根据一个方面,计算设备100还可以具有一个或多个输入设备112,例如键盘、鼠标、笔、语音输入设备、触摸输入设备等。还可以包括输出设备114,例如显示器、扬声器、打印机等。前述设备是示例并且也可以使用其他设备。计算设备100可以包括允许与其他计算设备118进行通信的一个或多个通信连接116。合适的通信连接116的示例包括但不限于:RF发射机、接收机和/或收发机电路;通用串行总线(USB)、并行和/或串行端口。According to one aspect, computing device 100 may also have one or more input devices 112, such as a keyboard, mouse, pen, voice input device, touch input device, and the like. Output devices 114 may also be included, such as displays, speakers, printers, and the like. The aforementioned devices are examples and other devices may also be used. Computing device 100 may include one or
如在本文中所使用的术语计算机可读介质包括计算机存储介质。计算机存储介质可以包括以任何用于存储信息(例如,计算机可读指示、数据结构、或程序模块)的方法或技术来实现的易失性的和非易失性的、可移动的和不可移动的介质。系统存储器160、可移动存储设备109、和不可移动存储设备110都是计算机存储介质的示例(即,存储器存储)。计算机存储介质可以包括随机存取存储器(RAM) 、只读存储器(ROM) 、电可擦只读存储器(EEPROM)、闪速存储器或其他存储器技术、CD-ROM、数字通用盘(DVD)或其他光存储、盒式磁带、磁带、磁盘存储器或其他磁存储设备、或者可用于存储信息并且可以由计算设备100访问的任何其他制品。根据一个方面,任何这样的计算机存储介质都可以是计算设备100的一部分。计算机存储介质不包括载波或其他经传播的数据信号。The term computer readable medium as used herein includes computer storage medium. Computer storage media may include volatile and nonvolatile, removable and non-removable implemented in any method or technology for storage of information (eg, computer readable instructions, data structures, or program modules) medium. System memory 160, removable storage device 109, and non-removable storage device 110 are all examples of computer storage media (ie, memory storage). Computer storage media may include random access memory (RAM), read only memory (ROM), electrically erasable read only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other Optical storage, tape cassettes, magnetic tape, disk storage or other magnetic storage devices, or any other article of manufacture that may be used to store information and that may be accessed by computing device 100 . According to one aspect, any such computer storage medium may be part of computing device 100 . Computer storage media does not include carrier waves or other propagated data signals.
根据一个方面,通信介质是由计算机可读指令、数据结构、程序模块、或者经调制的数据信号(例如,载波或其他传输机制)中的其他数据实施的,并且包括任何信息传递介质。根据一个方面,术语“经调制的数据信号”描述了具有一个或多个特征集或者以将信息编码在信号中的方式改变的信号。作为示例而非限制,通信介质包括诸如有线网络或直接有线连接之类的有线介质,以及诸如声学、射频(RF)、红外线的、以及其他无线介质之类的无线介质。According to one aspect, communication media are embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal (eg, carrier wave or other transport mechanism) and include any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more sets of characteristics or is altered in such a way as to encode information in the signal. By way of example and not limitation, communication media includes wired media such as a wired network or direct wired connection, as well as wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media.
在根据本发明的实施例中,计算设备100被配置为执行根据本发明的子系统实现方法300。计算设备100包括一个或多个处理器、以及存储有程序指令的一个或多个可读存储介质,当程序指令被配置为由一个或多个处理器执行时,使得计算设备执行本发明实施例中的子系统实现方法300。In an embodiment according to the present invention, the computing device 100 is configured to perform the
根据本发明的一个实施例,计算设备100的操作系统中包含用于执行本发明的子系统实现方法300的多条程序指令,这些程序指令可以指示处理器执行根据本发明的子系统实现方法300。According to an embodiment of the present invention, the operating system of the computing device 100 includes a plurality of program instructions for executing the
图2示出了根据本发明一个实施例的计算设备100中运行有操作系统的示意图。如图2所示,计算设备100中运行有操作系统150,操作系统150之上包括应用层。FIG. 2 shows a schematic diagram of an operating system running in the computing device 100 according to an embodiment of the present invention. As shown in FIG. 2 , an operating system 150 runs in the computing device 100 , and an application layer is included on the operating system 150 .
根据本发明的一个实施例,如图2所示,计算设备100的操作系统150中包括第一位数内核,相应地,操作系统150为第一位数操作系统,操作系统上适于运行第一位数应用程序131。According to an embodiment of the present invention, as shown in FIG. 2 , the operating system 150 of the computing device 100 includes a first-digit kernel. Accordingly, the operating system 150 is a first-digit operating system, and the operating system is suitable for running the first digit kernel. One-digit applications 131.
应用层可以包括一个或多个第一位数应用程序131。操作系统可以为应用层的一个或多个第一位数应用程序131提供软件运行环境,使得一个或多个第一位数应用程序131可以运行在操作系统150上。The application layer may include one or more first digit applications 131 . The operating system may provide a software operating environment for one or more first-digit application programs 131 of the application layer, so that the one or more first-digit application programs 131 may run on the operating system 150 .
根据本发明的一个实施例,应用层还包括一个或多个子系统、子系统管理器130。子系统管理器130可以运行在操作系统150上,可以理解,子系统管理器130也是第二位数的程序。需要说明的是,一个或多个子系统可以运行在操作系统上,并且,一个或多个子系统可以为第二位数应用程序132的运行提供隔离环境,即,子系统可以为第二位数应用程序132提供与操作系统150相互隔离的运行环境。也就是说,一个或多个子系统适于运行第二位数应用程序132。通过在第一位数的操作系统150之上部署一个或多个子系统,使得第二位数应用程序132可以运行在操作系统150之上的子系统中。According to an embodiment of the present invention, the application layer further includes one or more subsystems, a subsystem manager 130 . The subsystem manager 130 may run on the operating system 150, and it is understood that the subsystem manager 130 is also a program of the second digit. It should be noted that one or more subsystems can run on the operating system, and one or more subsystems can provide an isolated environment for the second-digit application program 132 to run, that is, the subsystems can be used for the second-digit application program 132. Program 132 provides an operating environment that is isolated from operating system 150 . That is, one or more subsystems are adapted to run the second bit application 132 . By deploying one or more subsystems on top of the operating system 150 of the first digit, the second digit application 132 can run in the subsystem on top of the operating system 150 .
可以理解,在本发明的实施例中,计算设备中的操作系统150作为Host操作系统,子系统作为Guest操作系统。在一种实现方式中,子系统管理器130可以实现为SubSysManager。It can be understood that, in the embodiment of the present invention, the operating system 150 in the computing device serves as the host operating system, and the subsystem serves as the guest operating system. In one implementation, the subsystem manager 130 may be implemented as a SubSysManager.
在一个实施例中,第一位数为64位,第二位数为32位。相应地,第一位数应用程序为64位应用程序,第二位数应用程序为32位应用程序。但,本发明不限于此。在该实施例中,基于子系统能实现在64位操作系统上运行32位应用程序的运行环境。In one embodiment, the first number of bits is 64 bits and the second number of bits is 32 bits. Correspondingly, the first-digit application is a 64-bit application, and the second-digit application is a 32-bit application. However, the present invention is not limited to this. In this embodiment, an operating environment for running 32-bit applications on a 64-bit operating system can be implemented based on the subsystem.
图3示出了根据本发明一个实施例的子系统实现方法300的流程图。图4示出了根据本发明一个实施例的子系统实现方法300的时序图。方法300适于在计算设备(前述计算设备100)的操作系统中执行。FIG. 3 shows a flowchart of a
需要说明的是,在具体实施例中,本发明仅以Linux操作系统为例对子系统实现方法300进行了具体说明。但,应当理解,本发明的子系统实现方法300并不受限于执行该方法的操作系统的具体种类,本领域技术人员都能理解该方法同样能在其他种类的操作系统,例如Windows操作系统上实现,而不需要付出创造性的劳动。任何能通过本发明的方法来实现在第一位数操作系统上运行第二位数应用程序的操作系统的种类均在本发明的保护范围之内。It should be noted that, in the specific embodiment, the present invention only takes the Linux operating system as an example to specifically describe the
如图3和图4所示,方法300始于步骤S310。As shown in Figures 3 and 4, the
在步骤S310中,接收用户对第二位数应用程序132的操作请求。In step S310, a user's operation request for the second-digit application program 132 is received.
这里,操作系统150向用户空间提供有接口,以便用户空间可以调用操作系统150提供的接口来与操作系统150进行通信,具体可以与操作系统150中的系统基础工具进行交互,操作系统150中的系统基础工具例如包括包管理工具、多种服务程序、编译工具链等,且本发明不限于这些系统工具。Here, the operating system 150 provides an interface to the user space, so that the user space can call the interface provided by the operating system 150 to communicate with the operating system 150, and specifically can interact with the system basic tools in the operating system 150. The system basic tools include, for example, package management tools, various service programs, compilation tool chains, etc., and the present invention is not limited to these system tools.
例如,当用户需要在操作系统150上的子系统中安装或卸载第二位数应用程序132时,用户可以调用操作系统150提供的包管理工具的接口来请求对第二位数应用程序132进行安装操作、卸载操作或启动操作。从而,操作系统150可以接收到用户调用包管理工具的接口发送的对第二位数应用程序132进行安装操作、卸载操作或启动操作的请求。For example, when the user needs to install or uninstall the second-digit application program 132 in the subsystem on the operating system 150, the user can call the interface of the package management tool provided by the operating system 150 to request the second-digit application program 132 to be installed or uninstalled. Install operation, uninstall operation, or start operation. Thus, the operating system 150 may receive a request for installing, uninstalling or starting the second-digit application program 132 sent by the user invoking the interface of the package management tool.
当用户(开发人员)需要进行第二位数应用程序132的开发时,用户可以调用操作系统150提供的编译工具链的接口来请求对第二位数应用程序132进行编译操作。从而,操作系统150可以接收到用户调用编译工具链的接口发送的对第二位数应用程序132进行编译操作的请求。When a user (developer) needs to develop the second-digit application program 132 , the user can call the interface of the compilation tool chain provided by the operating system 150 to request the second-digit application program 132 to be compiled. Thus, the operating system 150 can receive a request for compiling the second-digit application program 132 sent by the user invoking the interface of the compiling tool chain.
这样,在本发明的实施例中,在步骤S310中用户对第二位数应用程序132的操作请求具体可以包括:用户通过操作系统150提供的各个接口、发送的对第二位数应用程序132进行安装操作、卸载操作、启动操作、编译操作的请求。In this way, in the embodiment of the present invention, in step S310, the user's operation request to the second-digit application program 132 may specifically include: various interfaces provided by the user through the operating system 150, and the second-digit application program 132 sent by the user. Requests for installation, uninstallation, startup, and compilation.
随后,在步骤S320中,基于用户对第二位数应用程序132的操作请求,生成相应的操作命令,并将生成的操作命令发送至运行在操作系统150中的子系统管理器130。Subsequently, in step S320, based on the user's operation request for the second-digit application program 132, a corresponding operation command is generated, and the generated operation command is sent to the subsystem manager 130 running in the operating system 150.
需要说明的是,根据在本发明的实施例中,用户可以通过操作系统150提供的各个接口,请求对第二位数应用程序132进行安装操作、卸载操作、启动操作、编译操作,并且不限于这些操作种类。相应地,操作系统150基于操作请求生成的操作命令可以包括:对第二位数应用程序132的安装操作命令、卸载操作命令、启动操作命令、编译操作命令中的一种或多种,并且不限于上述操作命令。It should be noted that, according to the embodiment of the present invention, the user can request the installation operation, uninstallation operation, startup operation, and compilation operation of the second-digit application program 132 through various interfaces provided by the operating system 150, and is not limited to These kinds of operations. Correspondingly, the operation command generated by the operating system 150 based on the operation request may include one or more of an installation operation command, an uninstallation operation command, a startup operation command, and a compilation operation command for the second-digit application program 132, and no Limited to the above operation commands.
最后,在步骤S330中,子系统管理器130将操作命令发送至第二位数应用程序对应的目标子系统,以便由目标子系统执行对第二位数应用程序132的操作命令。Finally, in step S330, the subsystem manager 130 sends the operation command to the target subsystem corresponding to the second-digit application program, so that the target subsystem executes the operation command for the second-digit application program 132.
需要说明的是,根据本发明的方法300,用户在对第二位数应用程序进行操作时,依然是调用操作系统提供的接口来实现,由操作系统来根据用户的操作生成相应的操作命令,并将操作命令转发至子系统管理器,经由子系统管理器将操作命令发送至第二位数应用程序所在的子系统(即第二位数应用程序对应的目标子系统)中执行。这样,用户对第二位数应用程序进行操作时,无论是安装操作、卸载操作、启动操作、编译操作,均如同操作操作系统上的第一位数应用程序一样,用户不会感受到子系统的存在,也感受不到第二位数应用程序与第一位数应用程序在使用和操作上的区别,从而,用户无需额外学习与第二位数应用程序的交互操作方式。It should be noted that, according to the
可见,根据本发明的方法300,用户可以无感知地在第一位数操作系统上对第二位数应用程序进行操作,交互方式更友好,大大降低了用户在第一位数操作系统上使用第二位数应用程序的学习成本。而且,基于子系统提供的与操作系统相互隔离的运行环境,子系统出现异常时并不会影响操作系统上的各个第一位数应用程序的运行,有利于提高系统运行的稳定性。It can be seen that, according to the
根据本发明的一个实施例,操作系统150可以将用户的各种操作请求定义为元数据格式的操作命令,元数据格式是操作系统150与子系统进行交互的数据格式,进而可以将元数据格式的操作命令发送至子系统管理器130。进一步地,操作系统150可以通过消息订阅与发布的方式将操作命令发送至子系统。具体地,操作系统150可以将操作命令封装为元数据格式的操作命令消息,并将操作命令消息通过消息队列发送至子系统管理器130。这里,子系统管理器130可以向操作系统150订阅操作命令消息,操作系统150在将操作命令封装为元数据格式的操作命令消息后,通过将操作命令消息添加到消息队列中,随后子系统管理器130可以从消息队列中获取到操作命令消息。According to an embodiment of the present invention, the operating system 150 may define various operation requests of the user as operation commands in a metadata format, and the metadata format is a data format in which the operating system 150 interacts with the subsystem, and then the metadata format may be The operation command is sent to the subsystem manager 130 . Further, the operating system 150 may send operation commands to the subsystems by means of message subscription and publication. Specifically, the operating system 150 may encapsulate the operation command into an operation command message in a metadata format, and send the operation command message to the subsystem manager 130 through a message queue. Here, the subsystem manager 130 may subscribe the operation command message to the operating system 150. After the operating system 150 encapsulates the operation command into the operation command message in the metadata format, the operation command message is added to the message queue, and then the subsystem manages The server 130 can obtain the operation command message from the message queue.
根据本发明的一个实施例,每个子系统可以运行一种第二位数应用程序,不同的第二位数应用程序运行在不同的子系统中。这里,包名相同的第二位数应用程序为同一种第二位数应用程序。子系统管理器130在将操作命令发送至第二位数应用程序对应的子系统时,首先确定操作命令对应的第二位数应用程序132,并确定第二位数应用程序132对应的目标子系统。随后,将操作命令发送至该目标子系统。According to an embodiment of the present invention, each subsystem can run one type of second-digit application program, and different second-digit application programs run in different subsystems. Here, the second-digit applications with the same package name are the same second-digit applications. When sending the operation command to the subsystem corresponding to the second-digit application program, the subsystem manager 130 first determines the second-digit application program 132 corresponding to the operation command, and determines the target sub-system corresponding to the second-digit application program 132. system. Subsequently, an operation command is sent to the target subsystem.
在一个实施例中,子系统管理器130在将操作命令发送至第二位数应用程序对应的子系统之前,通过对操作命令(操作命令消息)进行解析,以确定操作命令是否需要由子系统执行。如果确定操作命令需要由子系统执行,则将操作命令发送至第二位数应用程序对应的目标子系统,以便在目标子系统执行该操作命令。In one embodiment, before sending the operation command to the subsystem corresponding to the second-digit application program, the subsystem manager 130 parses the operation command (operation command message) to determine whether the operation command needs to be executed by the subsystem . If it is determined that the operation command needs to be executed by the subsystem, the operation command is sent to the target subsystem corresponding to the second-digit application program, so that the operation command is executed in the target subsystem.
另外,如果操作命令不需要由子系统执行,则将操作命令发送至操作系统150,以便在操作系统150中执行该操作命令。In addition, if the operation command does not need to be executed by the subsystem, the operation command is sent to the operating system 150 so that the operation command is executed in the operating system 150 .
在一个实施例中,在执行步骤S310之前,子系统管理器130可以获取每个子系统对应的系统镜像,并将系统镜像解压到预定安装目录下,以便将子系统安装在计算设备中。之后,可以在每个子系统中安装第二位数应用程序132。在一种实现方式中,第二位数为32位,相应地,子系统管理器130为32位子系统管理器130。In one embodiment, before step S310 is performed, the subsystem manager 130 may obtain a system image corresponding to each subsystem, and decompress the system image to a predetermined installation directory, so as to install the subsystem in the computing device. Thereafter, the second digit application 132 may be installed in each subsystem. In an implementation manner, the second digit is 32 bits, and correspondingly, the subsystem manager 130 is a 32-bit subsystem manager 130 .
在一种实现方式中,考虑到子系统的可移植性,可以构建符合OCI规范的镜像来作为子系统镜像,以实现对子系统的迁移,并可以利用Linux内核提供的namespace、cgroup、capability等技术来实现子系统的环境隔离、资源控制和权限管理。子系统管理器130通过获取子系统镜像,并将系统镜像文件解压到预定安装目录下,从而实现子系统运行环境。进而,可以在子系统目录下安装第二位数应用程序132,以实现在操作系统150上的子系统中运行第二位数应用程序132。In one implementation, considering the portability of the subsystem, an image that conforms to the OCI specification can be built as the subsystem image to realize the migration of the subsystem, and the namespace, cgroup, capability, etc. provided by the Linux kernel can be used. Technology to achieve environment isolation, resource control and authority management of subsystems. The subsystem manager 130 realizes the subsystem operating environment by acquiring the subsystem image and decompressing the system image file to a predetermined installation directory. Furthermore, the second-digit application program 132 may be installed in the subsystem directory, so as to realize the running of the second-digit application program 132 in the subsystem on the operating system 150 .
在一个实施例中,当操作命令是对第二位数应用程序132的安装操作命令时,子系统管理器130通过解析安装操作命令,根据安装操作命令来确定用户为待安装的第二位数应用程序132配置的目标子系统。进而,将安装操作命令发送至目标子系统,以便由目标子系统执行该安装操作命令,在目标子系统执行该安装操作命令后,可以实现将第二位数应用程序132安装在目标子系统中。另外,用户还可以为待安装的第二位数应用程序132配置目标子系统中的安装路径,这样,目标子系统通过执行安装操作命令,可以实现将第二位数应用程序132安装在目标子系统的安装路径下。In one embodiment, when the operation command is an installation operation command for the second-digit application program 132, the subsystem manager 130 determines that the user is the second-digit number to be installed according to the installation operation command by parsing the installation operation command The target subsystem configured by the application 132 . Further, the installation operation command is sent to the target subsystem, so that the target subsystem executes the installation operation command. After the target subsystem executes the installation operation command, the second-digit application program 132 can be installed in the target subsystem. . In addition, the user can also configure the installation path in the target subsystem for the second-digit application program 132 to be installed. In this way, the target subsystem can implement the installation operation command to install the second-digit application program 132 in the target subsystem. under the installation path of the system.
另外,子系统管理器130可以将第二位数应用程序132与子系统的对应关系记录在系统日志中。这样,子系统管理器130在接收到对第二位数应用程序132的操作命令时,可以基于系统日志来确定第二位数应用程序132对应的目标子系统。In addition, the subsystem manager 130 may record the corresponding relationship between the second-digit application 132 and the subsystem in the system log. In this way, when the subsystem manager 130 receives an operation command for the second-digit application program 132, it can determine the target subsystem corresponding to the second-digit application program 132 based on the system log.
需要说明的是,子系统管理器130包括用户进程(Client)和服务进程(Daemon),其中,子系统管理器130的用户进程Client可以向用户提供管理接口,例如GUI(GraphicalUser Interface,图形用户界面)或CLI(command-line interface,命令行界面)。子系统管理器130的服务进程Daemon,可以监控用户调用操作系统150的各个接口发送的操作请求。It should be noted that the subsystem manager 130 includes a user process (Client) and a service process (Daemon), wherein the user process Client of the subsystem manager 130 can provide a management interface to the user, such as a GUI (Graphical User Interface, graphical user interface). ) or CLI (command-line interface). The service process Daemon of the subsystem manager 130 can monitor the operation requests sent by the user calling various interfaces of the operating system 150 .
在一种实现方式中,用户可以通过子系统管理器130的用户进程来为第二位数应用程序132配置将要安装的目标子系统,并可以配置第二位数应用程序132在目标子系统中的安装路径,以便基于安装路径来将第二位数应用程序132安装在目标子系统的相应位置。In one implementation, the user can configure the target subsystem to be installed for the second-digit application 132 through the user process of the subsystem manager 130, and can configure the second-digit application 132 in the target subsystem so that the second digit application 132 is installed in the corresponding location of the target subsystem based on the installation path.
Daemon可以将获取用户在Client为第二位数应用程序132配置的目标子系统、及目标子系统中的安装路径,并将第二位数应用程序132的包名及对应的目标子系统、目标子系统中的安装路径相关联地记录在系统日志中。这样,当子系统管理器130接收到对第二位数应用程序132的操作命令时,可以基于系统日志来确定第二位数应用程序132对应的目标子系统,并将操作命令发送至目标子系统中执行。Daemon can obtain the target subsystem configured by the client for the second-digit application 132 and the installation path in the target subsystem, and obtain the package name of the second-digit application 132 and the corresponding target subsystem, target The installation paths in the subsystem are associated in the system log. In this way, when the subsystem manager 130 receives an operation command for the second-digit application program 132, it can determine the target subsystem corresponding to the second-digit application program 132 based on the system log, and send the operation command to the target sub-system executed in the system.
在一种实现方式中,子系统管理器提供了支持ymal等格式的配置文件,可以基于配置文件对子系统进行配置,以便对第二位数应用程序132的安装位置进行个性化设置。In an implementation manner, the subsystem manager provides a configuration file that supports formats such as ymal, and the subsystem can be configured based on the configuration file, so as to perform personalized settings for the installation location of the second-digit application 132 .
在一个实施例中,当子系统管理器130接收到的操作命令是对第二位数应用程序132的启动操作命令时,子系统管理器130通过确定启动操作命令对应的第二位数应用程序132,基于系统日志来确定第二位数应用程序132对应的目标子系统,并将启动操作命令发送至目标子系统,以便目标子系统执行启动操作命令,从而实现在目标子系统启动第二位数应用程序132。In one embodiment, when the operation command received by the subsystem manager 130 is a start operation command for the second-digit application program 132, the subsystem manager 130 determines the second-digit application program corresponding to the start-up operation command by determining 132. Determine the target subsystem corresponding to the second-digit application program 132 based on the system log, and send the start-up operation command to the target subsystem, so that the target subsystem executes the start-up operation command, thereby realizing starting the second-digit number in the target subsystem. Number of applications 132.
另外,在一个实施例中,当用户(开发人员)需要进行第二位数应用程序132的开发时,用户可以调用操作系统150提供的编译工具链的接口来对第二位数应用程序132进行编译操作。操作系统150响应于用户的编译操作请求,基于用户的编译操作请求生成相应的编译操作命令,并将编译操作命令发送至对应的目标子系统,以便通过目标子系统对应的第二位数工具链来执行编译操作命令,从而实现在目标子系统中对第二位数应用程序132进行编译操作。In addition, in one embodiment, when the user (developer) needs to develop the second-digit application program 132, the user can call the interface of the compilation tool chain provided by the operating system 150 to develop the second-digit application program 132 Compile operation. The operating system 150, in response to the user's compilation operation request, generates a corresponding compilation operation command based on the user's compilation operation request, and sends the compilation operation command to the corresponding target subsystem, so as to pass the second-digit toolchain corresponding to the target subsystem. to execute the compile operation command, so as to implement the compile operation on the second-digit application program 132 in the target subsystem.
需要说明的是,第二位数应用程序132在子系统中的正常运行,依赖于子系统管理器130提供的支持。例如,操作系统150包括用户目录,在一个实施例中,子系统管理器130可以将用户目录绑定到子系统中。这样,使得运行在子系统中的第二位数应用程序132可以访问用户目录,并且,使得第二位数应用程序132可以按照第一位数应用程序创建快捷方式的方法,来创建快捷方式。It should be noted that the normal operation of the second-digit application 132 in the subsystem depends on the support provided by the subsystem manager 130 . For example, the operating system 150 includes a user directory, and in one embodiment, the subsystem manager 130 may bind the user directory into the subsystem. In this way, the second-digit application 132 running in the subsystem can access the user directory, and the second-digit application 132 can create a shortcut in the same way that the first-digit application creates a shortcut.
另外,子系统管理器130还可以将操作系统150的用户标识(UID)和群组标识(GID)映射到子系统中,这样,使得运行在子系统中的第二位数应用程序132与运行在操作系统上的第一位数应用程序131保持相同的用户标识(UID)和群组标识(GID)。In addition, the subsystem manager 130 may also map the user identification (UID) and group identification (GID) of the operating system 150 into the subsystem, so that the second-digit application 132 running in the subsystem is compatible with the running The first digit application 131 on the operating system maintains the same user identification (UID) and group identification (GID).
在一个实施例中,当第二位数应用程序132在子系统中注册服务时,子系统管理器130可以响应于第二位数应用程序在子系统注册服务的操作,生成服务的副本进行存储,并将服务注册到操作系统150,这样可以确保第二位数应用程序132的服务正常运行。In one embodiment, when the second-digit application 132 registers the service in the subsystem, the subsystem manager 130 may generate a copy of the service for storage in response to the operation of the second-digit application registering the service in the subsystem , and register the service with the operating system 150, so as to ensure the normal operation of the service of the second digit application 132.
在一个实施例中,为了保证GUI应用程序的正常运行,子系统管理器130可以将操作系统150的DISPLAY变量保存为副本供各个子系统使用,对于xdgopen 之类的工具,子系统管理器130会拦截子系统的操作,具体地,当子系统管理器检测到子系统需要使用xdgopen工具进行操作时,将对应的操作命令转发至操作系统中执行。In one embodiment, in order to ensure the normal operation of the GUI application, the subsystem manager 130 may save the DISPLAY variable of the operating system 150 as a copy for each subsystem to use. For tools such as xdgopen, the subsystem manager 130 will Intercept the operation of the subsystem. Specifically, when the subsystem manager detects that the subsystem needs to use the xdgopen tool to operate, it forwards the corresponding operation command to the operating system for execution.
根据本发明的子系统实现方法300,通过在第一位数的操作系统之上部署一个或多个子系统,通过子系统可以为第二位数应用程序提供与操作系统隔离的运行环境,实现了在第一位数操作系统上运行第二位数应用程序的运行环境。用户在对第二位数应用程序进行操作时,依然是调用操作系统提供的接口,由操作系统来根据用户的操作生成相应的操作命令,并将操作命令转发至子系统管理器,经由子系统管理器将操作命令发送至第二位数应用程序所在的子系统中执行。这样,根据本发明的实现方案,用户可以无感知地在第一位数操作系统上对第二位数应用程序进行操作,交互方式更友好,大大降低了用户在第一位数操作系统上使用第二位数应用程序的学习成本。而且,基于子系统提供的隔离环境,当子系统出现异常时并不会影响操作系统上的各个第一位数应用程序的运行,从而便于维护,有利于提高系统运行的稳定性。According to the
这里描述的各种技术可结合硬件或软件,或者它们的组合一起实现。从而,本发明的方法和设备,或者本发明的方法和设备的某些方面或部分可采取嵌入有形媒介,例如可移动硬盘、U盘、软盘、CD-ROM或者其它任意机器可读的存储介质中的程序代码(即指令)的形式,其中当程序被载入诸如计算机之类的机器,并被所述机器执行时,所述机器变成实践本发明的设备。The various techniques described herein can be implemented in conjunction with hardware or software, or a combination thereof. Thus, the method and apparatus of the present invention, or certain aspects or portions of the method and apparatus of the present invention, may take the form of an embedded tangible medium, such as a removable hard disk, a USB stick, a floppy disk, a CD-ROM, or any other machine-readable storage medium. in the form of program code (ie, instructions) that, when the program is loaded into a machine, such as a computer, and executed by the machine, the machine becomes an apparatus for practicing the invention.
在程序代码在可编程计算机上执行的情况下,移动终端一般包括处理器、处理器可读的存储介质(包括易失性和非易失性存储器和/或存储元件),至少一个输入装置,和至少一个输出装置。其中,存储器被配置用于存储程序代码;处理器被配置用于根据该存储器中存储的所述程序代码中的指令,执行本发明的子系统实现方法。Where the program code is executed on a programmable computer, the mobile terminal generally includes a processor, a storage medium readable by the processor (including volatile and nonvolatile memory and/or storage elements), at least one input device, and at least one output device. The memory is configured to store program codes; the processor is configured to execute the subsystem implementation method of the present invention according to the instructions in the program codes stored in the memory.
以示例而非限制的方式,可读介质包括可读存储介质和通信介质。可读存储介质存储诸如计算机可读指令、数据结构、程序模块或其它数据等信息。通信介质一般以诸如载波或其它传输机制等已调制数据信号来体现计算机可读指令、数据结构、程序模块或其它数据,并且包括任何信息传递介质。以上的任一种的组合也包括在可读介质的范围之内。By way of example and not limitation, readable media include readable storage media and communication media. Readable storage media store information such as computer readable instructions, data structures, program modules or other data. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. Combinations of any of the above are also included within the scope of readable media.
在此处所提供的说明书中,算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与本发明的示例一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。In the specification provided herein, the algorithms and displays are not inherently related to any particular computer, virtual system, or other device. Various general purpose systems may also be used with examples of the present invention. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not directed to any particular programming language. It should be understood that various programming languages may be used to implement the inventions described herein, and that the descriptions of specific languages above are intended to disclose the best mode for carrying out the invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it is to be understood that in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or its description. This disclosure, however, should not be interpreted as reflecting an intention that the invention as claimed requires more features than are expressly recited in each claim. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员应当理解在本文所公开的示例中的设备的模块或单元或组件可以布置在如该实施例中所描述的设备中,或者可替换地可以定位在与该示例中的设备不同的一个或多个设备中。前述示例中的模块可以组合为一个模块或者此外可以分成多个子模块。Those skilled in the art will appreciate that the modules or units or components of the apparatus in the examples disclosed herein may be arranged in the apparatus as described in this embodiment, or alternatively may be positioned differently from the apparatus in this example in one or more devices. The modules in the preceding examples may be combined into one module or further divided into sub-modules.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will appreciate that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and further they may be divided into multiple sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method so disclosed may be employed in any combination, unless at least some of such features and/or procedures or elements are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including the accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will appreciate that although some of the embodiments described herein include certain features, but not others, included in other embodiments, that combinations of features of different embodiments are intended to be within the scope of the invention within and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
此外,所述实施例中的一些在此被描述成可以由计算机系统的处理器或者由执行所述功能的其它装置实施的方法或方法元素的组合。因此,具有用于实施所述方法或方法元素的必要指令的处理器形成用于实施该方法或方法元素的装置。此外,装置实施例的在此所述的元素是如下装置的例子:该装置用于实施由为了实施该发明的目的的元素所执行的功能。Furthermore, some of the described embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other means for performing the described functions. Thus, a processor having the necessary instructions for implementing the method or method element forms means for implementing the method or method element. Furthermore, an element of an apparatus embodiment described herein is an example of a means for carrying out the function performed by the element for the purpose of carrying out the invention.
如在此所使用的那样,除非另行规定,使用序数词“第一”、“第二”、“第三”等等来描述普通对象仅仅表示涉及类似对象的不同实例,并且并不意图暗示这样被描述的对象必须具有时间上、空间上、排序方面或者以任意其它方式的给定顺序。As used herein, unless otherwise specified, the use of the ordinal numbers "first," "second," "third," etc. to describe common objects merely refers to different instances of similar objects, and is not intended to imply such The objects being described must have a given order in time, space, ordinal, or in any other way.
尽管根据有限数量的实施例描述了本发明,但是受益于上面的描述,本技术领域内的技术人员明白,在由此描述的本发明的范围内,可以设想其它实施例。此外,应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的而非限制性的,本发明的范围由所附权利要求书限定。While the invention has been described in terms of a limited number of embodiments, those skilled in the art will appreciate, having the benefit of the above description, that other embodiments are conceivable within the scope of the invention thus described. Furthermore, it should be noted that the language used in this specification has been principally selected for readability and teaching purposes, rather than to explain or define the subject matter of the invention. Accordingly, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. This disclosure is intended to be illustrative and not restrictive with regard to the scope of the present invention, which is defined by the appended claims.
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210695943.5A CN115185634A (en) | 2022-06-20 | 2022-06-20 | Subsystem implementation method and computing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210695943.5A CN115185634A (en) | 2022-06-20 | 2022-06-20 | Subsystem implementation method and computing device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115185634A true CN115185634A (en) | 2022-10-14 |
Family
ID=83513388
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210695943.5A Pending CN115185634A (en) | 2022-06-20 | 2022-06-20 | Subsystem implementation method and computing device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115185634A (en) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102591671A (en) * | 2011-01-14 | 2012-07-18 | 鸿富锦精密工业(深圳)有限公司 | Method for starting application program in virtual environment |
| CN103207802A (en) * | 2012-01-12 | 2013-07-17 | 上海盛霄云计算技术有限公司 | Software operating system and method |
| CN103493011A (en) * | 2011-03-03 | 2014-01-01 | 微软公司 | Application compatibility with library operating systems |
| US20150178198A1 (en) * | 2013-12-24 | 2015-06-25 | Bromium, Inc. | Hypervisor Managing Memory Addressed Above Four Gigabytes |
| CN108604187A (en) * | 2016-02-09 | 2018-09-28 | 安维智有限公司 | The deploying virtual machine of trustship |
| CN111459623A (en) * | 2019-01-18 | 2020-07-28 | 华为技术有限公司 | Application program recovery method, device and computer |
-
2022
- 2022-06-20 CN CN202210695943.5A patent/CN115185634A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102591671A (en) * | 2011-01-14 | 2012-07-18 | 鸿富锦精密工业(深圳)有限公司 | Method for starting application program in virtual environment |
| CN103493011A (en) * | 2011-03-03 | 2014-01-01 | 微软公司 | Application compatibility with library operating systems |
| CN103207802A (en) * | 2012-01-12 | 2013-07-17 | 上海盛霄云计算技术有限公司 | Software operating system and method |
| US20150178198A1 (en) * | 2013-12-24 | 2015-06-25 | Bromium, Inc. | Hypervisor Managing Memory Addressed Above Four Gigabytes |
| CN108604187A (en) * | 2016-02-09 | 2018-09-28 | 安维智有限公司 | The deploying virtual machine of trustship |
| CN111459623A (en) * | 2019-01-18 | 2020-07-28 | 华为技术有限公司 | Application program recovery method, device and computer |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10862982B2 (en) | Cloud-scale heterogeneous datacenter management infrastructure | |
| US8694988B2 (en) | Runtime extensions | |
| US8683462B2 (en) | Handling calls to native code in a managed code environment | |
| CN101470621B (en) | Virtual machine configuration system | |
| CN111984263B (en) | Method, device, equipment and medium for running second system application on first system | |
| CN102207896A (en) | Virtual machine crash file generation techniques | |
| BRPI0618027A2 (en) | configuration of isolated extensions and device triggers | |
| US20210141632A1 (en) | Automated software patching for versioned code | |
| CN111427782B (en) | Running method, device, device and storage medium of Android dynamic link library | |
| CN106796521B (en) | API versioning independent of product releases | |
| CN112189187A (en) | Extensibility of unified platform | |
| CN114780950A (en) | Method, system, device and storage medium for cross-version compatible operation of application software | |
| US20080141219A1 (en) | Multiple inheritance facility for java script language | |
| CN118051421A (en) | IO delay fault injection method, device, electronic device and storage medium | |
| CN115248680A (en) | Software construction method, system, device, medium, and program product | |
| WO2023016151A1 (en) | Software framework of security application of linux system, and creation method for same | |
| CN114860202A (en) | Project operation method, device, server and storage medium | |
| US7873807B1 (en) | Relocating a program module from NVRAM to RAM during the PEI phase of an EFI-compatible firmware | |
| US10628513B2 (en) | Providing isolated extensibility for webpages with a unified manifest and omni-accessible platform script | |
| CN115185634A (en) | Subsystem implementation method and computing device | |
| CN110333914B (en) | A method and device for performing target operations | |
| US8615736B2 (en) | Module facility for JAVASCRIPT language | |
| CN115904623A (en) | Container creation method and system, electronic device, and storage medium | |
| CN114026540B (en) | Systems and methods for supporting and negotiating multiple API versions across multiple products | |
| US12379907B2 (en) | Generating executables for target operational environments |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |