CN115543467A - Method for accelerating starting speed of switch - Google Patents

Method for accelerating starting speed of switch Download PDF

Info

Publication number
CN115543467A
CN115543467A CN202211512721.1A CN202211512721A CN115543467A CN 115543467 A CN115543467 A CN 115543467A CN 202211512721 A CN202211512721 A CN 202211512721A CN 115543467 A CN115543467 A CN 115543467A
Authority
CN
China
Prior art keywords
functions
main program
ram
program
starting
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
CN202211512721.1A
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.)
Tianjin Juxin Guanghe Technology Co ltd
Original Assignee
Tianjin Juxin Guanghe 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 Tianjin Juxin Guanghe Technology Co ltd filed Critical Tianjin Juxin Guanghe Technology Co ltd
Priority to CN202211512721.1A priority Critical patent/CN115543467A/en
Publication of CN115543467A publication Critical patent/CN115543467A/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/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/351Switches specially adapted for specific applications for local area network [LAN], e.g. Ethernet switches

Abstract

The invention provides a method for accelerating the starting speed of a switch, which comprises the following steps: step S1, acquiring customer requirements, analyzing the customer requirements to obtain a function list which must be used after starting up; s2, placing the functions which need to be used after starting up in a main program, and loading a strategy when other functions are configured and used; step S3, after the configuration is finished, the loading and the starting of the bootstrap program are executed in a Read Only Memory (ROM), and the bootstrap program is moved to a Random Access Memory (RAM) from the ROM; executing a boot program in the RAM; s4, moving the main program from the FLASH to the RAM, decompressing the functions which need to be used in the main program in the RAM, and executing the functions which need to be used in the main program in the RAM; and step S5, after executing the necessary use function in the main program, calling and executing other functions according to the use state.

Description

Method for accelerating starting speed of switch
Technical Field
The invention relates to the technical field of switches, in particular to a method for accelerating the starting speed of a switch.
Background
Ethernet switches have been developed for decades with gradually enriched and powerful functions, and with the continuous enrichment of software functions, the switch has a longer and longer time from power-on to normal operation, which is especially obvious in the field of commercial switches.
In some special fields, customers will demand the starting speed of the switch, and suppliers need to realize the quick starting of the switch on the premise of providing rich functions.
The startup process of the switch in the prior art is roughly divided into two parts:
1) And loading and starting a system boot program. After the CPU is powered on and finishes its initialization, it will start to execute programs from the external executable ROM, and at this time, the efficiency of the CPU executing instructions is very low. After the program in the executable ROM performs basic initialization operation on the CPU (the memory controller must be initialized), the program in the executable ROM is moved to the memory to start execution, at this time, the efficiency of the CPU executing instructions reaches a normal level, and then the system boot program performs further initialization and preparation on the hardware environment. In pursuit of extreme boot speed, the function in the system main program in section 2 can be added to the boot program, thus saving the system main program loading time in step 2. However, this approach is not conducive to maintenance and the switch may provide limited functionality.
2) And loading and starting a main program of the system. The system bootstrap program moves the system main program from FLASH to the memory, and after the decompression operation is executed, the system main program can be started.
The two steps are the starting procedure of most switches in the prior art.
In order to increase the starting speed, an improvement can be considered from the two steps:
1) And accelerating the loading and starting of the system boot program. The significance of the system bootstrap program is to carry out necessary initialization on the hardware environment, and lay a foundation for the running of the main program of the system. Under the condition that the hardware environment is not changed, the loading and starting efficiency of the system boot program is difficult to improve.
2) And accelerating the loading and starting of the main program of the system. The main program of the system emphasizes the software functions, and the size of the main program of the system is therefore much larger than that of the bootstrap program, usually from several megabytes to several hundred megabytes. In order to shorten the execution time of the part, the compression algorithm is considered more. Increasing the compression ratio can shorten the time for reading the file from the FLASH, but the decompression time will be longer. It is generally necessary to select the appropriate compression algorithm and compression ratio so that the read time + decompression time is minimized.
Figure 1 shows the switch system startup process and the 6 steps of time subdivision.
1. The ROM executes a boot program.
2. The boot program is moved from the ROM to the RAM.
3. The boot program is executed in the RAM.
4. The main program is moved from FLASH to RAM.
5. And decompressing the main program in the RAM.
6. The main program is executed in the RAM.
FIG. 2 shows the internal structure of a conventional main program, which includes an operating system kernel and a root file system. The operating system kernel is often difficult to rethink. The root file system is critical data that must be used during the startup of the operating system kernel and cannot be omitted, but it is contemplated that the size of the data may be reduced. For convenience, developers have been accustomed to putting all the functions of the switch into the root file system, but this increases the load time and decompression time of the main program.
Disclosure of Invention
The object of the present invention is to solve at least one of the technical drawbacks mentioned.
Therefore, the present invention is directed to a method for increasing the startup speed of a switch, so as to solve the problems mentioned in the background art and overcome the disadvantages in the prior art.
In order to achieve the above object, an embodiment of the present invention provides a method for increasing a startup speed of a switch, including the following steps:
step S1, customer requirements are obtained, and the customer requirements are analyzed to obtain a function list which must be used after starting up;
s2, placing the functions which need to be used after starting up in a main program, and loading a strategy when other functions are configured and used;
s3, after the configuration is finished, loading and starting a bootstrap program in a Read Only Memory (ROM), and moving the bootstrap program from the ROM to a Random Access Memory (RAM); executing a boot program in the RAM;
s4, moving the main program from the FLASH to the RAM, decompressing the functions which are necessary to use in the main program in the RAM, and executing the functions which are necessary to use in the main program in the RAM;
and step S5, after executing the necessary use function in the main program, calling and executing other functions according to the use state.
Preferably, in any of the above solutions, the main program includes an operating system kernel, a root file system, and an extended file system, and the functions that must be used after booting are added to the root file system, and other functions are added to the extended file system.
Preferably, in any of the above schemes, after the main program is started, the extended file system is mounted to a path of the root file system.
Compared with the prior art, the invention has the following beneficial effects: the method can customize the root file system and the extension file system according to different customer requirements, flexibly meet different customer requirements, and accelerate the starting time of the switch so as to achieve the purpose of shortening the starting time of the switch.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic diagram of a conventional method for increasing the startup speed of a switch;
FIG. 2 is an internal structural view of a conventional main program;
FIG. 3 is a flow chart of a method of increasing the startup speed of a switch according to an embodiment of the invention;
FIG. 4 is a diagram illustrating an improved method for increasing the startup speed of a switch according to an embodiment of the present invention;
fig. 5 is an internal structural view of a main program after modification.
Detailed Description
Reference will now be made in detail to the embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
As shown in fig. 3, the method for increasing the startup speed of the switch according to the embodiment of the present invention includes the following steps:
and S1, acquiring customer requirements, and analyzing the customer requirements to obtain a function list which must be used after starting.
Specifically, different main program contents are customized according to different customer requirements, namely, the main program is customized according to functions which must be used after the computer is started according to the customer requirements.
And S2, placing the functions which need to be used after the startup into the main program, and loading the strategy when other functions are configured and used.
In this step, only the functions that must be used after the boot process are placed in the main program, and the strategy of 'loading again when in use' is generally adopted for other functions, so that the size of the main program is effectively reduced, the moving time and the decompression time of the main program are further reduced, and the purpose of accelerating the boot speed under the premise of guaranteeing the availability of the basic functions is finally achieved. As shown in fig. 4, the time for moving and decompressing functions 4 and 5 can be mainly shortened by the method of the present invention.
Specifically, as shown in fig. 5, the main program includes an operating system kernel, a root file system, and an extended file system, and adds a function that must be used after booting to the root file system, and adds another function to the extended file system.
According to different customer requirements, only the necessary functions which are used immediately after the switch is started are added into the root file system, and other functions are added into the extended file system. In this way, the size of the main program loaded by the boot program becomes smaller, and thus the loading time and decompression time become smaller. After the main program is started, the extended file system is mounted to a certain path of the root file system.
S3, after the configuration is finished, loading and starting of the bootstrap program are executed in the ROM, and the bootstrap program is moved to the RAM from the ROM; the boot program is executed in the RAM.
And step S4, moving the main program from the FLASH to the RAM, decompressing the functions which are required to be used in the main program in the RAM, and executing the functions which are required to be used in the main program in the RAM.
And step S5, after executing the necessary use function in the main program, calling and executing other functions according to the use state.
In this step, after the main program is started, the extended file system is mounted to a certain path of the root file system.
Compared with the prior art, the invention has the following beneficial effects: the method can customize a root file system and an extension file system according to different customer requirements, flexibly meet different customer requirements and accelerate the starting time of the switch so as to achieve the purpose of shortening the starting time of the switch.
In the description of the specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It will be understood by those skilled in the art that the present invention includes any combination of the summary and detailed description of the invention described above and those illustrated in the accompanying drawings, which is not intended to be limited to the details and which, for the sake of brevity of this description, does not describe every aspect which may be formed by such combination. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made in the above embodiments by those of ordinary skill in the art without departing from the principle and spirit of the present invention. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (3)

1. A method for accelerating the starting speed of a switch is characterized by comprising the following steps:
step S1, customer requirements are obtained, and the customer requirements are analyzed to obtain a function list which must be used after starting up;
s2, placing the functions which need to be used after starting up in a main program, and loading strategies when other functions are used;
s3, after the configuration is finished, loading and starting a bootstrap program in a Read Only Memory (ROM), and moving the bootstrap program from the ROM to a Random Access Memory (RAM); executing a boot program in the RAM;
s4, moving the main program from the FLASH to the RAM, decompressing the functions which need to be used in the main program in the RAM, and executing the functions which need to be used in the main program in the RAM;
and step S5, after executing the necessary use function in the main program, calling and executing other functions according to the use state.
2. The method for increasing the boot speed of a switch according to claim 1, wherein the main program comprises an operating system kernel, a root file system and an extended file system, the functions that must be used after booting are added to the root file system, and other functions are added to the extended file system.
3. The method of claim 2, wherein after the main program is started, the extended file system is mounted to a path of the root file system.
CN202211512721.1A 2022-11-30 2022-11-30 Method for accelerating starting speed of switch Pending CN115543467A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211512721.1A CN115543467A (en) 2022-11-30 2022-11-30 Method for accelerating starting speed of switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211512721.1A CN115543467A (en) 2022-11-30 2022-11-30 Method for accelerating starting speed of switch

Publications (1)

Publication Number Publication Date
CN115543467A true CN115543467A (en) 2022-12-30

Family

ID=84722530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211512721.1A Pending CN115543467A (en) 2022-11-30 2022-11-30 Method for accelerating starting speed of switch

Country Status (1)

Country Link
CN (1) CN115543467A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108762828A (en) * 2018-04-24 2018-11-06 桂林长海发展有限责任公司 A kind of DSP multi-core arrays two level startup method and apparatus
CN111008045A (en) * 2019-11-14 2020-04-14 中国航空工业集团公司洛阳电光设备研究所 Automatic loading method for off-chip flash high-capacity program
CN114138360A (en) * 2021-11-12 2022-03-04 上海华元创信软件有限公司 Multi-core programming starting method and system of DSP on Flash
CN115098190A (en) * 2022-06-30 2022-09-23 苏州浪潮智能科技有限公司 Method, device, terminal and storage medium for improving starting speed of SSD (solid State disk) system
CN115269025A (en) * 2022-08-01 2022-11-01 亿咖通(湖北)技术有限公司 Kernel quick starting method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108762828A (en) * 2018-04-24 2018-11-06 桂林长海发展有限责任公司 A kind of DSP multi-core arrays two level startup method and apparatus
CN111008045A (en) * 2019-11-14 2020-04-14 中国航空工业集团公司洛阳电光设备研究所 Automatic loading method for off-chip flash high-capacity program
CN114138360A (en) * 2021-11-12 2022-03-04 上海华元创信软件有限公司 Multi-core programming starting method and system of DSP on Flash
CN115098190A (en) * 2022-06-30 2022-09-23 苏州浪潮智能科技有限公司 Method, device, terminal and storage medium for improving starting speed of SSD (solid State disk) system
CN115269025A (en) * 2022-08-01 2022-11-01 亿咖通(湖北)技术有限公司 Kernel quick starting method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US10452404B2 (en) Optimized UEFI reboot process
US8321655B2 (en) Execution parallelism in extensible firmware interface compliant systems
US8793686B2 (en) Operating system decoupled heterogeneous computing
EP2548115B1 (en) Apparatus and method for handling exception events
US7797681B2 (en) Stack memory selection upon exception in a data processing system
EP1934714A4 (en) Fast booting an operating system from an off state
CN115269057B (en) Method for generating configuration file of isolation system based on equipment tree
US10983847B2 (en) Dynamically loadable unikernel binaries
US9274804B2 (en) Overlapped boot task fetches and boot task execution to reduce boot time in an electrical device
CN111625289B (en) Method and device for quickly starting application program and electronic equipment
US8661236B2 (en) Partial initialization of divided programs in response to pre-boot and post-boot activation events to rapidly boot a computer system
JPH10228380A (en) Method and computer system for executing network moving code having reduced run-time memory space request
US20110208505A1 (en) Assigning floating-point operations to a floating-point unit and an arithmetic logic unit
CN115543467A (en) Method for accelerating starting speed of switch
JP2000242484A (en) Change method for control program
GB2429084A (en) Operating system coprocessor support module
CN116028129B (en) UEFI (unified extensible firmware interface) quick starting method based on Feiteng platform and Feiteng platform
GB2452735A (en) Loading and executing programs in parallel during boot loading
CN113885949A (en) Quick startup method and system
KR20040071446A (en) Computer system providing for recompiling a program and cxtracting threads dynamically by a thread binary compiler and Simultaneous Multithreading method thereof
US7930526B2 (en) Compare and branch mechanism
US20150149752A1 (en) Server and control method thereof
CN114968388B (en) Booting method and system applied to microprocessor
US20230161616A1 (en) Communications across privilege domains within a central processing unit core
CN113407240B (en) Simulation method of C64x + DSP software flow circulation buffer mechanism

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