CN115185634A - Subsystem implementation method and computing device - Google Patents

Subsystem implementation method and computing device Download PDF

Info

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
Application number
CN202210695943.5A
Other languages
Chinese (zh)
Inventor
赵志鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Uniontech Software Technology Co Ltd
Original Assignee
Uniontech Software Technology Co Ltd
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 Uniontech Software Technology Co Ltd filed Critical Uniontech Software Technology Co Ltd
Priority to CN202210695943.5A priority Critical patent/CN115185634A/en
Publication of CN115185634A publication Critical patent/CN115185634A/en
Pending legal-status Critical Current

Links

Images

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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45537Provision of facilities of other operating environments, e.g. WINE
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/482Application

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

The invention discloses a subsystem implementation method and computing equipment, and relates to the technical field of operating systems. The method is performed in an operating system of a computing device, the operating system adapted to run a first-digit application, wherein the operating system has a subsystem manager and one or more subsystems running thereon, the subsystem adapted to run a second-digit application, the method comprising the steps of: receiving an operation request of a user for the second digit application program; generating a corresponding operation command based on the operation request of the second digit application program, and sending the operation command to the subsystem manager; and the subsystem manager sends the operation command to a target subsystem corresponding to the second digit application program so that the target subsystem executes the operation command. According to the technical scheme of the invention, the second digit application program is operated on the first digit operating system, and the user can operate the second digit application program on the first digit operating system without perception, so that the interaction mode is more friendly.

Description

Subsystem implementation method and computing device
Technical Field
The invention relates to the technical field of operating systems, in particular to a subsystem implementation method and computing equipment.
Background
With the rapid development of processor technology, processors with a length of 64 words have become the mainstream, and have driven the rapid development of a 64-bit operating system. At present, 64-bit is supported by mainstream operating systems, more and more operating system releases no longer release 32-bit images, and mainstream application software gradually takes development of 64-bit as a main factor.
Based on the practical requirement, a part of 32-bit application programs are still reserved, and the current mainstream operating system (such as Linux) release still reserves the support capability of the 32-bit application programs. However, the maintenance cost for large 32-bit applications has been greater than the maintenance cost of the application itself. In real-world development, dependence damage and other serious consequences are caused by untimely or incomplete maintenance of the 32-bit application program, and normal use of the 64-bit application program is also influenced.
As 32-bit applications are about to exit the mainstream market, it is necessary to consider that the 32-bit applications are managed separately to improve the stability of the entire system environment. To address the problem of current mixed use of 32-bit and 64-bit programs, an isolation environment is needed to run 32-bit applications.
In the prior art, the scheme for running a 32-bit application program in an isolated environment implemented on Linux includes two schemes: a chroot and a container. The chroma is a system call provided by a Linux kernel, and the root directory of the process can be changed through the system call, so that the purpose of isolating the environment is achieved. The method is characterized in that a root is used for running the 32-bit application program, a rootfs is required to be prepared, and the running of the 32-bit application program can be completed by means of ld and other basic settings provided in the rootfs by modifying a root directory of a process to a path where the rootfs is located. However, the chroma environment cannot easily interact with host (main operating system), and for example, running GUI programs in the chroma environment is troublesome and requires various settings.
The Linux Container is an operating system level virtualization method, which can implement environment isolation and manage and control the resource authority of a process. The contiainer can be used for running a plurality of isolated Linux systems on a single Linux kernel. Taking Docker as an example, docker can conveniently manage images conforming to OCI and provide runtime support and management. By running 32-bit Linux OCI (open container initiative) images through the Docker, the 32-bit application program can be run in the container by the dependence required by installation.
Although both the root and container may provide a runtime isolation environment to support the isolated environment running of 32-bit applications on a 64-bit operating system. However, the use of the chrome and the container is too troublesome for the consumer user, and the user needs to perform complicated configuration like a developer to realize normal use of the network, the disk, the display, and the like in the isolated environment. Moreover, these operations need to be performed at the command line terminal.
For this reason, a subsystem implementation method is needed to solve the problems in the above solutions.
Disclosure of Invention
To this end, the present invention provides a subsystem implementation method to solve or at least alleviate the above existing problems.
According to one aspect of the present invention, there is provided a subsystem implementation method, executed in an operating system of a computing device, the operating system being adapted to run a first-digit application program, wherein the operating system has a subsystem manager and one or more subsystems thereon, the one or more subsystems being adapted to run a second-digit application program, the method comprising the steps of: receiving an operation request of a user for the second digit application program; generating a corresponding operation command based on the operation request of the second digit application program, and sending the operation command to a subsystem manager; and the subsystem manager sends the operation command to a target subsystem corresponding to the second digit application program so that the target subsystem can execute the operation command.
Optionally, in the subsystem implementation method according to the present invention, sending the operation command to the subsystem manager includes: and packaging the operation command into an operation command message in a metadata format, and sending the operation command message to a subsystem manager.
Optionally, in the subsystem implementation method according to the present invention, each subsystem is adapted to run a second digit application; the step of sending the operation command to a target subsystem corresponding to a second digit application program comprises the following steps: determining a second digit application program corresponding to the operation command, and determining a target subsystem corresponding to the second digit application program; and sending the operation command to the target subsystem.
Optionally, in the subsystem implementation method according to the present invention, the step of sending, by the subsystem manager, the operation command to the target subsystem corresponding to the second digit application program includes: the subsystem manager analyzes the operation command to determine whether the operation command needs to be executed by a subsystem; and if so, sending the operation command to a 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 install operation command, an uninstall operation command, a start operation command, and a compile operation command for the second digital application.
Optionally, in the subsystem implementation method according to the present invention, the method further includes:
and the subsystem manager acquires a system image corresponding to each subsystem, and decompresses the system image to a preset installation directory so as to install the subsystems.
Optionally, in the subsystem implementation method according to the present invention, the operating command is an installation operating command for a second bit application program, and the subsystem manager sends the operating command to a target subsystem corresponding to the second bit application program, so that the target subsystem executes the operating command, including: and the subsystem manager determines a target subsystem configured for the second digit application program according to the installation operation command, and sends the installation operation command 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 correspondence between the second digit application program and the subsystem in a system log.
Optionally, in the subsystem implementation method according to the present invention, the sending, by the subsystem manager, the operation command to a target subsystem corresponding to the second digit application program, so that the target subsystem executes the operation command includes: the subsystem manager determines a second digit application program corresponding to the starting operation command, determines a target subsystem corresponding to the second digit application program based on the system log, and sends the starting operation command to the target subsystem, so that the target subsystem executes the starting operation command to start the second digit application program on the target subsystem.
Optionally, in a subsystem implementation method according to the present invention, the operating system includes a user directory, and the method further includes the steps of: a subsystem manager binds the user directory to the subsystem so that a second numeric application running in the subsystem accesses the user directory and creates shortcuts; the subsystem manager maps the user identification and the group identification of the operating system into the subsystem so that the second-digit application program running in the subsystem and the first-digit application program running on the operating system keep the same user identification and the same group identification.
Optionally, in the subsystem implementation method according to the present invention, the method further includes: the subsystem manager registers the service with the operating system to run the service of the second digit application in response to operation of the second digit application to register the service with the subsystem.
Optionally, in the subsystem implementation method according to the present invention, the first number of bits is 64 bits, and the second number of bits is 32 bits.
According to an aspect of the 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 executed by the at least one processor, the program instructions comprising instructions for performing 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 that, when read and executed by a computing device, cause the computing device to perform a subsystem implementation method as described above.
According to the technical scheme of the invention, the subsystem implementation method is provided, one or more subsystems are deployed on the operating system with the first digit, the subsystem can provide a running environment isolated from the operating system for the second digit application program, and the running environment for running the second digit application program on the operating system with the first digit is realized. When the user operates the second digit application program, the user still calls an interface provided by the operating system, the operating system generates a corresponding operating command according to the operation of the user, forwards the operating command to the subsystem manager, and sends the operating command to the subsystem where the second digit application program is located through the subsystem manager for execution. Therefore, according to the implementation scheme of the invention, the user can operate the second digit application program on the first digit operating system in an imperceptible manner, the interaction mode is more friendly, and the learning cost of the user for using the second digit application program on the first digit operating system is greatly reduced. Moreover, based on the isolation environment provided by the subsystem, when the subsystem is abnormal, the operation of each first digit application program on the operating system is not influenced, so that the maintenance is convenient, and the stability of the system operation is favorably improved.
The above description is only an overview of the technical solutions of the present invention, and the present invention can be implemented in accordance with the content of the description so as to make the technical means of the present invention more clearly understood, and the above and other objects, features, and advantages of the present invention will be more clearly understood.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof 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 from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
FIG. 1 shows a schematic diagram of a computing device 100, according to one embodiment of the invention;
FIG. 2 illustrates a schematic diagram of a computing device 100 having an operating system running thereon, according to one embodiment of the invention;
FIG. 3 illustrates a flow diagram of a subsystem implementation method 300 according to one embodiment of the invention;
fig. 4 shows a timing diagram of a subsystem implementation method 300 according to one embodiment of the invention.
Detailed Description
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 this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 1 shows a schematic diagram of a computing device 100, according to one embodiment of the 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, the processing unit 102 may be implemented as a processor depending on the configuration and type of computing device. The system memory 160 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read-only memory), flash memory, or any combination of such memories. According to one aspect, an operating system 150 is included in system memory 160, operating system 150 being configured to perform subsystem implementation method 300 in accordance with the present invention.
According to one embodiment of the invention, a first bit number kernel is included in operating system 150, such that a first bit number application is adapted to run on operating system 150. Also included in system memory 160 is subsystem manager 130, subsystem manager 130 being operable on operating system 150. Additionally, one or more subsystems supporting the execution of the second digital application may also be running on the operating system 150, and the subsystems may provide an isolated environment for the execution of the second digital application to run the one or more second digital applications in the one or more subsystems.
According to one aspect, the operating system 150 is, for example, adapted to control the operation of the computing device 100. Further, the examples are practiced in conjunction with a graphics library, other operating systems, or any other application program, and are not limited to any particular application or system. This basic configuration is illustrated in fig. 1 by those components within the dashed line. According to one aspect, the 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, for example, magnetic disks, optical disks, or tape. Such additional storage is illustrated in FIG. 1 by removable storage device 109 and non-removable storage device 110.
As stated hereinabove, according to one aspect, program modules are stored in the system memory 160. According to one aspect, the program modules may include one or more application programs (a first-digit application program adapted to run on the operating system 150), the invention not being limited to the type of application program, for example, the application programs may include: email and contacts applications, word processing applications, spreadsheet applications, database applications, slide show applications, drawing or computer-aided applications, web browser applications, and the like. In an embodiment according to the invention, the program module may further comprise one or more subsystems in which the second digital application may be installed and run.
According to one aspect, examples may be practiced in a circuit comprising discrete electronic elements, a packaged or integrated electronic chip containing logic gates, a circuit utilizing a microprocessor, or on a single chip containing electronic elements or microprocessors. For example, an example may be practiced via a system on a 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") onto a chip substrate as a single integrated circuit. When operating via an SOC, the functions described herein may be operated via application-specific 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 (e.g., AND, OR, AND NOT), including but NOT limited to mechanical, optical, fluidic, AND quantum technologies. In addition, embodiments of the invention may be practiced within a general purpose computer or in any other circuits or systems.
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, or the like. Output device(s) 114 such as a display, speakers, printer, etc. may also be included. The foregoing devices are examples and other devices may also be used. Computing device 100 may include one or more communication connections 116 that allow communications with other computing devices 118. Examples of suitable communication connections 116 include, but are not limited to: RF transmitter, receiver and/or transceiver circuitry; universal Serial Bus (USB), parallel, and/or serial ports.
The term computer readable media as used herein includes computer storage media. Computer storage media may include volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, or program modules. System memory 160, removable storage 109, and non-removable storage 110 are all examples of computer storage media (i.e., 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 Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other article of manufacture that can be used to store information and that can be accessed by computing device 100. According to one aspect, any such computer storage media may be part of computing device 100. Computer storage media does not include a carrier wave or other propagated data signal.
According to one aspect, communication media is embodied by computer readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., a carrier wave or other transport mechanism) and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more characteristics set or changed in such a manner 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, and wireless media such as acoustic, radio Frequency (RF), infrared, and other wireless media.
In an embodiment in accordance with the invention, the computing device 100 is configured to perform a subsystem-implementing method 300 in accordance with the invention. Computing device 100 includes one or more processors, and one or more readable storage media storing program instructions that, when configured by the one or more processors, cause the computing device to perform subsystem-implemented method 300 in embodiments of the invention.
According to one embodiment of the invention, the operating system of computing device 100 includes a plurality of program instructions for performing subsystem implementation method 300 of the present invention, which may direct the processor to perform subsystem implementation method 300 in accordance with the present invention.
FIG. 2 shows a schematic diagram of computing device 100 with an operating system running therein, according to one embodiment of the invention. As shown in fig. 2, an operating system 150 runs in the computing device 100, and an application layer is included on top of the operating system 150.
According to one embodiment of the invention, as shown in FIG. 2, the operating system 150 of the computing device 100 includes a first digit kernel therein, and accordingly, the operating system 150 is a first digit operating system on which the first digit application 131 is adapted to run.
The application layer may include one or more first digit applications 131. The operating system may provide a software execution environment for one or more first digit applications 131 of the application layer such that the one or more first digit applications 131 may run on the operating system 150.
According to one embodiment of the invention, the application layer further includes one or more subsystems, a subsystem manager 130. Subsystem manager 130 may run on operating system 150, it being understood that subsystem manager 130 is also a second-digit program. It is noted that one or more subsystems may run on the operating system, and one or more subsystems may provide an isolated environment for the running of the second digital application 132, i.e., a subsystem may provide a running environment for the second digital application 132 that is isolated from the operating system 150. That is, one or more subsystems are adapted to run a second digital application 132. By deploying one or more subsystems above the first-digit operating system 150, the second-digit application 132 may be run in a subsystem above the operating system 150.
It will be appreciated that in embodiments of the present invention, the operating system 150 in the computing device acts as the Host operating system and the subsystems act as Guest operating systems. In one implementation, the subsystem manager 130 may be implemented as a sussysmanager.
In one embodiment, the first number of bits is 64 bits and the second number of bits is 32 bits. Accordingly, 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 thereto. In this embodiment, a runtime environment that runs 32-bit applications on a 64-bit operating system can be implemented based on the subsystem.
FIG. 3 shows a flow diagram of a subsystem implementation method 300 according to one embodiment of the invention. Fig. 4 shows a timing diagram of a subsystem implementation method 300 according to one embodiment of the invention. The method 300 is suitable for execution in an operating system of a computing device (the aforementioned computing device 100).
It should be noted that, in the specific embodiment, the subsystem implementation method 300 is specifically described only by taking the Linux operating system as an example. However, it should be understood that the subsystem implementation method 300 of the present invention is not limited to the particular type of operating system on which it is implemented, and those skilled in the art will appreciate that the method can be implemented on other types of operating systems as well, such as a Windows operating system, without the need for inventive effort. Any type of operating system capable of running a second digital application on a first digital operating system by the method of the present invention is within the scope of the present invention.
As shown in fig. 3 and 4, the method 300 begins at step S310.
In step S310, an operation request of the second digit application program 132 by the user is received.
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 particularly can interact with system infrastructure tools in the operating system 150, which include, for example, a package management tool, various service programs, a chain of compilation tools, and the like, and the present invention is not limited to these system tools.
For example, when a user needs to install or uninstall the second digit application program 132 in a subsystem on the operating system 150, the user may invoke an interface of a package management tool provided by the operating system 150 to request an installation operation, an uninstall operation, or a launch operation on the second digit application program 132. Thus, the operating system 150 may receive a request from a user to invoke an interface of the package management tool to perform an install operation, an uninstall operation, or a launch operation on the second digit application program 132.
When a user (developer) needs to develop the second digit application program 132, the user may invoke an interface of a compilation toolchain provided by the operating system 150 to request a compilation operation on the second digit application program 132. Thus, operating system 150 may receive a request from a user to perform a compilation operation on second digit application 132 by invoking an interface of a compilation toolchain.
Thus, in the embodiment of the present invention, the operation request of the user for the second digit application 132 in step S310 may specifically include: the user sends requests for installation, uninstallation, startup, and compilation operations to the second digital application 132 via the various interfaces provided by the operating system 150.
Subsequently, in step S320, based on the operation request of the user for the second digit application 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.
It should be noted that, according to the embodiment of the present invention, the user may request the installation operation, the uninstallation operation, the start operation, and the compilation operation of the second digit application 132 through various interfaces provided by the operating system 150, and is not limited to these operation types. Accordingly, the operation command generated by the operating system 150 based on the operation request may include: one or more of an install operation command, an uninstall operation command, a start operation command, and a compile operation command to the second digital application 132, and is not limited to the above operation commands.
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 operation command to the second digit application program 132 is executed by the target subsystem.
It should be noted that, according to the method 300 of the present invention, when the user operates the second digit application program, the user still calls the interface provided by the operating system to implement the operation, the operating system generates a corresponding operation command according to the operation of the user, and forwards the operation command to the subsystem manager, and the subsystem manager sends the operation command to the subsystem where the second digit application program is located (i.e., the target subsystem corresponding to the second digit application program) to be executed. Therefore, when the user operates the second digit application program, no matter installation operation, uninstallation operation, starting operation and compiling operation are the same as the first digit application program on the operating system, the user does not feel the existence of the subsystem, and the difference between the second digit application program and the first digit application program in use and operation is not felt, so that the user does not need to additionally learn the interactive operation mode with the second digit application program.
As can be seen, according to the method 300 of the present invention, the user can operate the second digit application program imperceptibly on the first digit operating system, the interaction mode is more friendly, and the learning cost of the user for using the second digit application program on the first digit operating system is greatly reduced. Moreover, based on the running environment provided by the subsystem and isolated from the operating system, the running of each first-digit application program on the operating system is not influenced when the subsystem is abnormal, and the running stability of the system is favorably improved.
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, which is a data format in which the operating system 150 interacts with the subsystem, and may further send the operation commands in the metadata format to the subsystem manager 130. Further, the operating system 150 may send the operation command to the subsystem through message subscription and publication. Specifically, operating system 150 may encapsulate the operation command into an operation command message in a metadata format and send the operation command message to subsystem manager 130 through a message queue. Here, the subsystem manager 130 may subscribe to the operation command message from the operating system 150, and the operating system 150 may subsequently retrieve the operation command message from the message queue by adding the operation command message to the message queue after encapsulating the operation command into the operation command message in the metadata format.
According to one embodiment of the invention, each subsystem may run a second numeric application, with different second numeric applications running in different subsystems. Here, the second digit application programs having the same packet name are the same type of second digit application program. When the subsystem manager 130 sends the operation command to the subsystem corresponding to the second digit application program, it first determines the second digit application program 132 corresponding to the operation command, and determines the target subsystem corresponding to the second digit application program 132. Subsequently, an operation command is sent to the target subsystem.
In one embodiment, the subsystem manager 130 parses the operation command (operation command message) to determine whether the operation command needs to be executed by the subsystem before sending the operation command to the subsystem corresponding to the second digit application. And if the operating command is determined to be required to be executed by the subsystem, sending the operating command to a target subsystem corresponding to the second digit application program so as to execute the operating command at the target subsystem.
In addition, if the operation command does not need to be executed by the subsystem, the operation command is transmitted to the operating system 150 so as to be executed in the operating system 150.
In one embodiment, before performing step S310, the subsystem manager 130 may obtain a system image corresponding to each subsystem and decompress the system image into a predetermined installation directory in order to install the subsystem in the computing device. Thereafter, a second digit application 132 may be installed in each subsystem. In one implementation, the second number is 32 bits and accordingly, subsystem manager 130 is a 32-bit subsystem manager 130.
In an implementation mode, in consideration of portability of the subsystem, a mirror image conforming to an OCI specification can be constructed to serve as a subsystem mirror image so as to realize migration of the subsystem, and technologies such as namespace, cgroup and capability provided by a Linux kernel can be used for realizing environment isolation, resource control and authority management of the subsystem. The subsystem manager 130 realizes the subsystem operation environment by acquiring the subsystem image and decompressing the system image file to a predetermined installation directory. Further, second digit application 132 may be installed under a subsystem directory to enable second digit application 132 to run in a subsystem on operating system 150.
In one embodiment, when the operation command is an install operation command for the second digit application 132, the subsystem manager 130 determines a target subsystem configured by the user for the second digit application 132 to be installed from the install operation command by parsing the install operation command. Further, an installation operation command is sent to the target subsystem for execution by the target subsystem, upon which the installation operation command may be executed, to effect installation of the second digit application program 132 in the target subsystem. In addition, the user may also configure an installation path in the target subsystem for the second digit application 132 to be installed, such that the target subsystem may implement installation of the second digit application 132 under the installation path of the target subsystem by executing the installation operation command.
In addition, the subsystem manager 130 may record the correspondence of the second digit application 132 with the subsystem in a system log. In this way, the subsystem manager 130, upon receiving an operation command for the second digit application 132, may determine a target subsystem to which the second digit application 132 corresponds based on the system log.
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 may provide a management Interface, such as a GUI (Graphical User Interface) or a CLI (command-line Interface), to a User. The service process Daemon of the subsystem manager 130 may monitor operation requests sent by users invoking various interfaces of the operating system 150.
In one implementation, a user may configure a target subsystem to be installed for the second digit application 132 through a user process of the subsystem manager 130, and may configure an installation path of the second digit application 132 in the target subsystem, such that the second digit application 132 is installed at a corresponding location of the target subsystem based on the installation path.
Daemon may acquire the installation path of the user in the target subsystem configured by the Client for the second digit application program 132 and the target subsystem, and record the package name of the second digit application program 132, the corresponding target subsystem, and the installation path in the target subsystem in the system log in an associated manner. In this way, when the subsystem manager 130 receives an operation command for the second digit application program 132, it may determine a target subsystem corresponding to the second digit application program 132 based on the system log, and send the operation command to the target subsystem for execution.
In one implementation, the subsystem manager provides configuration files that support ymal, etc., formats, and based on the configuration files, the subsystem may be configured to personalize the installation location of the second digital application 132.
In one embodiment, when the operation command received by the subsystem manager 130 is a start operation command for the second digit application 132, the subsystem manager 130 determines the second digit application 132 corresponding to the start operation command, determines the target subsystem corresponding to the second digit application 132 based on the system log, and sends the start operation command to the target subsystem, so that the target subsystem executes the start operation command, thereby starting the second digit application 132 at the target subsystem.
Additionally, in one embodiment, when a user (developer) needs to perform development of the second digit application program 132, the user may invoke an interface of a compilation toolchain provided by the operating system 150 to perform a compilation operation on the second digit application program 132. The operating system 150 responds to the compiling operation request of the user, generates a corresponding compiling operation command based on the compiling operation request of the user, and sends the compiling operation command to the corresponding target subsystem, so that the compiling operation command is executed through the second digit tool chain corresponding to the target subsystem, thereby realizing the compiling operation on the second digit application program 132 in the target subsystem.
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, operating system 150 includes a user directory, which in one embodiment, subsystem manager 130 may bind into a subsystem. In this way, the second digit application 132 running in the subsystem is enabled to access the user directory and the second digit application 132 is enabled to create shortcuts in accordance with the method by which the first digit application creates shortcuts.
In addition, subsystem manager 130 may also map the User Identification (UID) and Group Identification (GID) of operating system 150 into the subsystem such that second digit application 132 running in the subsystem maintains the same User Identification (UID) and Group Identification (GID) as first digit application 131 running on the operating system.
In one embodiment, when the second digit application 132 registers for service in the subsystem, the subsystem manager 130 may generate a copy of the service for storage and register the service with the operating system 150 in response to the second digit application registering for service in the subsystem, which may ensure that the services of the second digit application 132 are functioning properly.
In one embodiment, 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, and for an xdgopen-like tool, the subsystem manager 130 may intercept the operation of the subsystem, and specifically, when the subsystem manager detects that the subsystem needs to be operated by using the xdgopen tool, forward the corresponding operation command to the operating system for execution.
According to the subsystem implementation method 300 of the present invention, by deploying one or more subsystems on top of the first-digit operating system, a runtime environment isolated from the operating system can be provided for the second-digit application program by the subsystem, thereby implementing a runtime environment for running the second-digit application program on the first-digit operating system. When the user operates the second digit application program, the user still calls an interface provided by the operating system, the operating system generates a corresponding operating command according to the operation of the user, forwards the operating command to the subsystem manager, and sends the operating command to the subsystem where the second digit application program is located through the subsystem manager for execution. Therefore, according to the implementation scheme of the invention, the user can operate the second digit application program on the first digit operation system in an imperceptible manner, the interaction mode is more friendly, and the learning cost of the user for using the second digit application program on the first digit operation system is greatly reduced. Moreover, based on the isolation environment provided by the subsystem, when the subsystem is abnormal, the operation of each first digit application program on the operating system is not influenced, so that the maintenance is convenient, and the stability of the system operation is favorably improved.
The various techniques described herein may be implemented in connection with hardware or software or, alternatively, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as removable hard drives, U.S. disks, floppy disks, CD-ROMs, or any other machine-readable storage medium, wherein, when the program is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
In the case of program code execution on programmable computers, the mobile terminal generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. Wherein the memory is configured to store program code; the processor is configured to perform the subsystem implementation method of the present invention according to instructions in the program code stored in the memory.
By way of example, and not limitation, readable media may comprise 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 description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with examples of this invention. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is 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 should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: 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 devices in the examples disclosed herein may be arranged in a device as described in this embodiment, or alternatively may be located in one or more devices different from the device in this example. The modules in the foregoing examples may be combined into one module or may additionally be divided into multiple sub-modules.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any 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 while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Additionally, some of the embodiments are described herein as a method or combination of method elements that can be implemented by a processor of a computer system or by other means of performing the described functions. A processor with the necessary instructions for carrying out the method or the method elements thus forms a device for carrying out the method or the method elements. Further, the elements of the apparatus embodiments described herein are examples of the following apparatus: the apparatus is used to implement the functions performed by the elements for the purpose of carrying out the invention.
As used herein, unless otherwise specified the use of the ordinal adjectives "first", "second", "third", etc., to describe a common object, merely indicate that different instances of like objects are being referred to, and are not intended to imply that the objects so described must be in a given sequence, either temporally, spatially, in ranking, or in any other manner.
While the invention has been described with respect to a limited number of embodiments, those skilled in the art, having benefit of this description, will appreciate that other embodiments can be devised which do not depart from the scope of the invention as disclosed herein. Furthermore, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the appended claims. The present invention has been disclosed by way of illustration and not limitation with respect to the scope of the invention, which is defined by the appended claims.

Claims (14)

1. A subsystem-implemented method, performed in an operating system of a computing device, the operating system adapted to run a first-digit application, wherein the operating system has a subsystem manager running thereon and one or more subsystems adapted to run a second-digit application, the method comprising the steps of:
receiving an operation request for a second digit application program;
generating a corresponding operation command based on the operation request of the second digit application program, and sending the operation command to the subsystem manager;
and the subsystem manager sends the operation command to a target subsystem corresponding to the second digit application program so that the target subsystem can execute the operation command.
2. The method of claim 1, wherein sending the operation command to the subsystem manager comprises:
and packaging the operation command into an operation command message in a metadata format, and sending the operation command message to the subsystem manager.
3. The method of claim 2, wherein each subsystem is adapted to run a second digital application; the step of sending the operation command to a target subsystem corresponding to a second digit application program comprises the following steps:
determining a second digit application program corresponding to the operation command, and determining a target subsystem corresponding to the second digit application program;
and sending the operation command to the target subsystem.
4. The method of any of claims 1-3, wherein the subsystem manager sending the operation command to a target subsystem corresponding to a second numeric application comprises:
the subsystem manager analyzes the operation command to determine whether the operation command needs to be executed by a subsystem;
and if so, sending the operation command to a target subsystem corresponding to the second digit application program.
5. The method of any of claims 1-3, wherein the operation command comprises one or more of an install operation command, an uninstall operation command, a launch operation command, a compile operation command for the second digital application.
6. A method according to any one of claims 1-3, further comprising the step of:
and the subsystem manager acquires a system image corresponding to each subsystem and decompresses the system image to a preset installation directory so as to install the subsystems.
7. The method of any one of claims 1-3, wherein the operation command is an installation operation command for a second digital application, and the subsystem manager sends the operation command to a target subsystem corresponding to the second digital application so that the target subsystem executes the operation command, including:
and the subsystem manager determines a target subsystem configured for the second digit application program according to the installation operation command, and sends the installation operation command 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.
8. A method according to any one of claims 1-3, further comprising the step of:
and the subsystem manager records the corresponding relation between the second digit application program and the subsystem in a system log.
9. The method of claim 8, wherein the operation command is a start operation command for a second digit application program, and the subsystem manager sends the operation command to a target subsystem corresponding to the second digit application program, so that the target subsystem executes the operation command, including:
the subsystem manager determines a second digit application program corresponding to the starting operation command, determines a target subsystem corresponding to the second digit application program based on the system log, and sends the starting operation command to the target subsystem, so that the target subsystem executes the starting operation command to start the second digit application program on the target subsystem.
10. The method of any of claims 1-3, wherein the operating system includes a user directory, the method further comprising the steps of:
binding the user directory into the subsystem by a subsystem manager so that a second digit application program running in the subsystem accesses the user directory and creates shortcuts;
the subsystem manager maps the user identification and the group identification of the operating system into the subsystem so that the second-digit application program running in the subsystem and the first-digit application program running on the operating system keep the same user identification and the same group identification.
11. A method according to any one of claims 1-3, further comprising the step of:
the subsystem manager registers the service with the operating system to run the service of the second digit application in response to operation of the second digit application to register the service with the subsystem.
12. The method of any one of claims 1-3,
the first number of bits is 64 bits and the second number of bits is 32 bits.
13. A computing device, comprising:
at least one processor; and
a memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, the program instructions comprising instructions for performing the method of any of claims 1-12.
14. A readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the method of any of claims 1-12.
CN202210695943.5A 2022-06-20 2022-06-20 Subsystem implementation method and computing device Pending CN115185634A (en)

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)

Similar Documents

Publication Publication Date Title
US8601449B2 (en) Cross-platform application framework
US7444621B2 (en) Method and system for providing a common operating system
US10127023B2 (en) Computer-aided development of native mobile application code
WO2017166447A1 (en) Method and device for loading kernel module
CN104704468A (en) Cross system installation of WEB applications
JP5414814B2 (en) Customizing space in a network environment
US9645814B1 (en) Generating and publishing applications for multiple platforms
US20080141219A1 (en) Multiple inheritance facility for java script language
KR20060063642A (en) Enabling inter-subsystem resource sharing
US9141353B2 (en) Dynamically building locale objects at run-time
CN114461223A (en) Code generation method and device and terminal equipment
JP5070286B2 (en) Customizing space in a network environment
CN112154417A (en) Sharing a code base between a stand-alone version and a Web-based version of an application via an emulated network communication channel
JP2010500671A5 (en)
CN115248680A (en) Software construction method, system, device, medium, and program product
CN114860272A (en) Operating system installation method, computing device and storage medium
CN115357257A (en) Installation file generation method, system, computing device and storage medium
CN115185634A (en) Subsystem implementation method and computing device
US8924963B2 (en) In-process intermediary to create virtual processes
KR20080027293A (en) Managing multiple languages in a data language
US8615736B2 (en) Module facility for JAVASCRIPT language
CN114026540A (en) System and method for supporting and negotiating multiple API versions across multiple products
CN115202830B (en) Root file system preparation method, system, computing device and readable storage medium
CN116661876B (en) System starting method, file generating method, electronic equipment and server
CN115454827B (en) Compatibility detection method, system, equipment and medium

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