IP Library Granted Patent US 12,050,896
Granted Patent B2
US 12,050,896 · App. 18/154,560 · Granted Jul 30, 2024

System architecture switching method and apparatus

Inventors: Yuming Wu (Shanghai, CN); Fangzhou Lu (Beijing, CN); Xie Miao (Hangzhou, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06F8/457
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,050,896
App. No.
18/154,560
Granted
Jul 30, 2024
Kind
B2
Abstract

This application provides a system architecture switching method and apparatus. The method includes: when a system architecture needs to be switched, transforming a first system architecture into a second system architecture, where the first system architecture represents a system architecture before switching; and providing a service for a user by using the second system architecture. Dynamic switching of a system architecture is implemented by using a transformable system architecture, so that switching of different architectures can be implemented by using only one system architecture. Therefore, only code for implementing the system architecture is required, and code overheads can be reduced in comparison with a conventional technology.

Claims (53)

1. A method of system architecture switching, comprising:

transforming a first system architecture into a second system architecture, wherein the first system architecture represents a system architecture before system architecture switching, the second system architecture represents a system architecture after the system architecture switching, the first system architecture comprises a first service process pre-divided into a plurality of components, and there is no data coupling between the plurality of components; and

providing a service for a user by using the second system architecture;

wherein:

a relationship between the first system architecture and the second system architecture is one or more of: a privilege level of a service process in the first system architecture is different from a privilege level of a service process in the second system architecture, or a quantity of service processes in the first system architecture is different from a quantity of service processes in the second system architecture;

transforming the first system architecture into the second system architecture comprises:

splitting the first service process into a plurality of sub-service processes based on the plurality of components, wherein each sub-service process comprises one or more of the plurality of components, and different sub-service processes comprise different components; or

splitting the first service process into the plurality of sub-service processes based on the plurality of components, and changing a privilege level of one or more of the plurality of sub-service processes, so that the privilege level of the one or more sub-service processes is different from a privilege level of the first service process, wherein each sub-service process comprises one or more of the plurality of components, and different sub-service processes comprise different components.

2. The method according to claim 1 , wherein parameter transfer specifications of communication interfaces in the first service process are unified, and

the communication interfaces comprise one or more of:

a function call communication interface, an inter-privilege-level communication interface, or an inter-process communication interface.

3. The method according to claim 1 , wherein parameter transfer specifications of communication interfaces in the first service process and communication interfaces in each of the plurality of sub-service processes are unified, and

the communication interfaces comprise one or more of:

a function call communication interface, an inter-privilege-level communication interface, or an inter-process communication interface.

4. The method according to claim 1 , wherein

parameter transfer specifications of communication interfaces in the first system architecture and communication interfaces in the second system architecture are unified, and

the communication interfaces comprise one or more of:

a function call communication interface, an inter-privilege-level communication interface, or an inter-process communication interface.

5. The method according to claim 1 , further comprising:

when addresses at different privilege levels are different, creating the first service process by using a mechanism in which a data segment supports address-independent relocation and a mechanism in which a code segment supports address-independent relocation.

6. The method according to claim 5 , wherein

the privilege level of the first service process comprises a first privilege level and a second privilege level, the first privilege level uses a low address, and the second privilege level uses a high address; and

using the mechanism in which the data segment supports the address-independent relocation comprises: mapping the data segment of the first service process to the low address.

7. The method according to claim 5 , wherein

using the mechanism in which the data segment supports the address-independent relocation comprises: performing address translation processing on the data segment of the first service process, so that the data segment of the first service process after the privilege level changes and the data segment of the first service process before the privilege level changes are mapped to a same address; and

using the mechanism in which the code segment supports the address-independent relocation comprises: performing address translation processing on the code segment of the first service process, so that the code segment of the first service process after the privilege level changes and the code segment of the first service process before the privilege level changes are mapped to a same address.

8. A system architecture switching apparatus, comprising:

at least one processor; and

one or more memories coupled to the at least one processor and storing programming instructions, which when executed by the at least one processor, cause the system architecture switching apparatus to:

transform a first system architecture into a second system architecture, wherein the first system architecture represents a system architecture before system architecture switching, the second system architecture represents a system architecture after the system architecture switching, the first system architecture comprises a first service process pre-divided into a plurality of components, and there is no data coupling between the plurality of components; and

provide a service for a user by using the second system architecture;

wherein:

a relationship between the first system architecture and the second system architecture is one or more of: a privilege level of a service process in the first system architecture is different from a privilege level of a service process in the second system architecture, or a quantity of service processes in the first system architecture is different from a quantity of service processes in the second system architecture;

to transform the first system architecture into the second system architecture, the programming instructions, which when executed by the at least one processor, cause the system architecture switching apparatus to:

split the first service process into a plurality of sub-service processes based on the plurality of components, wherein each sub-service process comprises one or more of the plurality of components, and different sub-service processes comprise different components; or

split the first service process into the plurality of sub-service processes based on the plurality of components, and change a privilege level of one or more of the plurality of sub-service processes, so that the privilege level of the one or more sub-service processes is different from a privilege level of the first service process, wherein each sub-service process comprises one or more of the plurality of components, and different sub-service processes comprise different components.

9. The system architecture switching apparatus according to claim 8 , wherein parameter transfer specifications of communication interfaces in the first service process are unified, and

the communication interfaces comprise one or more of:

a function call communication interface, an inter-privilege-level communication interface, or an inter-process communication interface.

10. The system architecture switching apparatus according to claim 8 , wherein parameter transfer specifications of communication interfaces in the first service process and communication interfaces in each of the plurality of sub-service processes are unified, and

the communication interfaces comprise one or more of:

a function call communication interface, an inter-privilege-level communication interface, or an inter-process communication interface.

11. The system architecture switching apparatus according to claim 8 , wherein parameter transfer specifications of communication interfaces in the first system architecture and communication interfaces in the second system architecture are unified, and

the communication interfaces comprise any one or more of the following:

a function call communication interface, an inter-privilege-level communication interface, and an inter-process communication interface.

12. The system architecture switching apparatus according to claim 8 , wherein the programming instructions, which when executed by the at least one processor, further cause the system architecture switching apparatus to:

when addresses at different privilege levels are different, create the first service process by using a mechanism in which a data segment supports address-independent relocation and a mechanism in which a code segment supports address-independent relocation.

13. The system architecture switching apparatus according to claim 12 , wherein

the privilege level of the first service process comprises a first privilege level and a second privilege level, the first privilege level uses a low address, and the second privilege level uses a high address; and

to use the mechanism in which the data segment supports the address-independent relocation, the programming instructions, which when executed by the at least one processor, cause the system architecture switching apparatus to: map the data segment of the first service process to the low address.

14. The system architecture switching apparatus according to claim 12 , wherein

to use the mechanism in which the data segment supports the address-independent relocation, the programming instructions, which when executed by the at least one processor, cause the system architecture switching apparatus to: perform address translation processing on the data segment of the first service process, so that the data segment of the first service process after the privilege level changes and the data segment of the first service process before the privilege level changes are mapped to a same address; and

to use the mechanism in which the code segment supports the address-independent relocation, the programming instructions, which when executed by the at least one processor, cause the system architecture switching apparatus to: perform address translation processing on the code segment of the first service process, so that the code segment of the first service process after the privilege level changes and the code segment of the first service process before the privilege level changes are mapped to a same address.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 10, 2023
From: WU, YUMING; LU, FANGZHOU; MIAO, XIE
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 062946/0722 →
Priority Claims (1)
CN 202010687260.6 · Jul 16, 2020 · national
Continuity (2)
Continuation PCTCN2021097850 · Jun 2, 2021
Related Publication 20230153088A1 · May 18, 2023