CN116610342A - Method, device, equipment and medium for operating basic input/output system hyper-threading - Google Patents

Method, device, equipment and medium for operating basic input/output system hyper-threading Download PDF

Info

Publication number
CN116610342A
CN116610342A CN202310580901.1A CN202310580901A CN116610342A CN 116610342 A CN116610342 A CN 116610342A CN 202310580901 A CN202310580901 A CN 202310580901A CN 116610342 A CN116610342 A CN 116610342A
Authority
CN
China
Prior art keywords
hyper
threads
threading
thread
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
CN202310580901.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.)
Inspur Shandong Computer Technology Co Ltd
Original Assignee
Inspur Shandong Computer 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 Inspur Shandong Computer Technology Co Ltd filed Critical Inspur Shandong Computer Technology Co Ltd
Priority to CN202310580901.1A priority Critical patent/CN116610342A/en
Publication of CN116610342A publication Critical patent/CN116610342A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method, a device, equipment and a medium for operating a basic input/output system hyper-thread, which relate to the technical field of computers and comprise the following steps: starting a basic input/output system to judge whether a hyper-threading function is started or not; if the current thread is started, setting a local advanced programmable interrupt mode as a target interrupt mode, and determining the total number of first threads of all the hyper threads; judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads; and adjusting the target hyper-thread to be in a closed state, and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state. By the scheme, if the hyper-threading function is started and the total number of the first threads of all the hyper-threading is larger than the preset threshold, the target hyper-threading is closed, and the basic input/output system hyper-threading operation can be realized under the condition that the system version and the system kernel version do not need to be replaced.

Description

Method, device, equipment and medium for operating basic input/output system hyper-threading
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a medium for operating a basic input/output system hyper-thread.
Background
The X86 architecture (The X86 architecture) processor is The most mature architecture, and is also a server architecture commonly adopted in The internet industry and data centers, and is widely adopted by various industries because of its stability, maturity and comprehensive support system application. One of the X86 architecture processor core functions is to support a hyper-threading function, i.e., one physical processor core may support 2 logical threads, and if the hyper-threading function is turned off, one physical processor core may support only 1 logical thread. With the improvement of chip process and chip technology level, one chip of the x86 architecture processor can support 64 physical cores, 128 logic threads can be supported when the hyper-threading is started or enabled, 128 physical cores and 256 logic threads can be supported at maximum in two paths, the early capacity of the overall performance is improved by 8 times, and the performance is improved in a crossing mode.
At present, most of operating systems used by terminal clients are free open-source centos (Community Enterprise Operating System, namely community enterprise operating systems), versions are old, and versions of system kernels are old, when the system versions and the system kernel versions are not replaced, new functions cannot be supported or partial functional characteristics of the latest x86 architecture processor are supported, and when the hyper-threading functions of the processor are started, normal starting cannot be achieved and downtime occurs.
In summary, how to implement the basic input/output system hyper-threading operation without replacing the system version and the system kernel version is a problem to be solved in the art.
Disclosure of Invention
In view of the above, the present application aims to provide a method, an apparatus, a device and a medium for operating a basic input/output system hyper-threading, which can implement the basic input/output system hyper-threading operation without replacing a system version and a system kernel version. The specific scheme is as follows:
in a first aspect, the application discloses a method for operating a basic input/output system hyper-threading, which comprises the following steps:
starting a basic input/output system to judge whether a hyper-threading function is started or not;
if the current thread is started, setting a local advanced programmable interrupt mode as a target interrupt mode, and determining the total number of first threads of all the hyper threads;
judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads;
and adjusting the target hyper-thread to be in a closed state, and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state.
Optionally, after the judging whether the hyper-threading function is started, the method further includes:
if the hyper-threading function is judged not to be started, the corresponding operating system is accessed, so that the operating system runs the hyper-threading.
Optionally, after the determining whether the total number of the first threads is greater than a preset threshold, the method further includes:
if the total number of the first threads is not larger than the preset threshold value, a plurality of advanced programmable interrupt controller description tables are created according to the total number of the first threads, and all the hyper threads are adjusted to be in an on state.
Optionally, the entering the corresponding operating system so that the operating system runs the hyper-thread in the on state includes:
and entering a corresponding operating system so that the operating system runs all the hyper-threads.
Optionally, the adjusting the target hyper-thread to be in a closed state and entering into a corresponding operating system, so that the operating system runs the hyper-thread in the open state includes:
adjusting the central processor core of the target hyper-thread to be in a closed state, and adjusting all the hyper-threads except the target hyper-thread to be in an open state;
and entering a corresponding operating system so that the operating system runs the hyper-threading in the starting state.
Optionally, the adjusting the central processor core of the target hyper-threading to be in a closed state includes:
and setting the enable bit and the online capability bit of the central processor core of the target hyper-threading to be low.
Optionally, the adjusting the target hyper-thread to be in a closed state and entering into a corresponding operating system, so that the operating system runs the hyper-thread in the open state includes:
adjusting the target hyper-threads to be in a closed state, and determining the total number of second threads of all the hyper-threads except the target hyper-threads;
and creating a plurality of advanced programmable interrupt controller instruction tables according to the total number of the second threads, and entering a corresponding operating system so that the operating system runs the hyper-threads in an on state.
In a second aspect, the present application discloses a basic input/output system hyper-threading operation device, including:
the first judging module is used for starting the basic input and output system to judge whether the hyper-threading function is started or not;
the thread number determining module is used for setting the local advanced programmable interrupt mode as a target interrupt mode if the thread number determining module is started, and determining the total number of first threads of all the hyper threads;
the second judging module is used for judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads;
and the hyper-thread running module is used for adjusting the target hyper-thread to be in a closed state and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the steps of the basic input/output system hyper-threading operation method disclosed in the prior art.
In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; the method comprises the steps of a basic input output system hyper-threading operation method, wherein the steps of the basic input output system hyper-threading operation method are realized when the computer program is executed by a processor.
The application has the beneficial effects that: starting a basic input/output system to judge whether a hyper-threading function is started or not; if the current thread is started, setting a local advanced programmable interrupt mode as a target interrupt mode, and determining the total number of first threads of all the hyper threads; judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads; and adjusting the target hyper-thread to be in a closed state, and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state. Therefore, if the hyper-threading function is started, after the local advanced programmable interrupt mode is set to the target interrupt mode, whether the total number of the first threads of all the hyper-threading is larger than a preset threshold value is judged, if so, the target hyper-threading is closed, so that the operating system runs the hyper-threading in the starting state, namely, the basic input/output system hyper-threading can be realized under the condition that the system version and the system kernel version are not required to be replaced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for operating a basic input/output system hyper-threading disclosed by the application;
FIG. 2 is a flowchart of a method for operating a hyper-threading of a basic input/output system according to one embodiment of the present disclosure;
FIG. 3 is a flowchart of another specific method for operating a basic input/output system hyper-threading disclosed in the present application;
FIG. 4 is a schematic diagram illustrating a specific basic input/output system hyper-threading operation according to the present disclosure;
FIG. 5 is a schematic diagram of a basic input/output system hyper-threading device according to the present application;
fig. 6 is a block diagram of an electronic device according to the present disclosure.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The X86 architecture processor is the most mature architecture, is also a server architecture commonly adopted by the Internet industry and data centers, and is widely adopted by various industries because of stability, maturity and comprehensive support system application. One of the X86 architecture processor core functions is to support a hyper-threading function, i.e., one physical processor core may support 2 logical threads, and if the hyper-threading function is turned off, one physical processor core may support only 1 logical thread. With the improvement of chip process and chip technology level, one chip of the x86 architecture processor can support 64 physical cores, 128 logic threads can be supported when the hyper-threading is started or enabled, 128 physical cores and 256 logic threads can be supported at maximum in two paths, the early capacity of the overall performance is improved by 8 times, and the performance is improved in a crossing mode.
At present, most of operating systems used by terminal clients are free and open-source centos versions are old and versions of system kernels are old, when the system versions and the system kernel versions are not replaced, new functions cannot be supported or partial functional characteristics of the latest x86 architecture processor are supported, and when the hyper-threading functions of the processor are started, normal starting cannot be achieved and downtime occurs.
Therefore, the application correspondingly provides a basic input/output system hyper-threading operation scheme which can realize the basic input/output system hyper-threading operation under the condition that the system version and the system kernel version do not need to be replaced.
Referring to fig. 1, the embodiment of the application discloses a method for operating a basic input/output system hyper-threading, which comprises the following steps:
step S11: and starting the basic input/output system to judge whether the hyper-threading function is started or not.
In this embodiment, the client does not accept the system version upgrade or the system kernel version upgrade, and does not agree to modify the system boot startup parameters but has to support the x86 architecture 64 core processor, so the support can only be performed by the basic input output system (Basic Input Output System, i.e. BIOS). When the hyper-threading function is not started according to the 64-core dual-path processor, the system can be started normally and all functions are normal under the system, and the problem that the system is down and cannot enter the system can occur when the hyper-threading function of the processor in the basic input/output system is started and 256-core threads are arranged under the system, so that the BIOS starts the hyper-threading function, and whether the hyper-threading function is started needs to be judged first is solved.
Step S12: if so, the local advanced programmable interrupt mode is set to the target interrupt mode and the total number of first threads of all hyper threads is determined.
It will be appreciated that if turned on, it is necessary to further determine the total number of first threads for all hyper threads, and thus set the local advanced programmable interrupt mode to the target interrupt mode, i.e., set the local APIC (Advanced Programmable Interrupt Controller) mode to X2APIC.
Step S13: and judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads.
It can be understood that, only after the hyper thread function related to the processor in the basic input/output system is turned on, when the total number of the first threads exceeds 255, that is, 256 hyper threads, the system is down and the system cannot be accessed, so that it needs to be determined whether the total number of the first threads is greater than a preset threshold, that is, whether the total number of the first threads is greater than 255, and if so, the target hyper thread is determined from all the hyper threads, for example, the 256 th hyper thread is determined to be the target hyper thread.
In this embodiment, after determining whether the total number of the first threads is greater than a preset threshold, the method further includes: if the total number of the first threads is not larger than the preset threshold value, a plurality of advanced programmable interrupt controller description tables are created according to the total number of the first threads, and all the hyper threads are adjusted to be in an on state. It should be noted that if the total number of first threads is determined to be not greater than the preset threshold, i.e. the total number of first threads is not greater than 255, a plurality of advanced programmable interrupt controller description (Multiple APIC Description Table, i.e. MADT) tables may be created directly according to the actual number of threads, i.e. the total number of first threads, i.e. the actual number of threads is 100, and then the MADT tables may be created according to 100, and the hyper-threading function of each core number may be enabled, i.e. all hyper-threads may be adjusted to be in an on state.
Step S14: and adjusting the target hyper-thread to be in a closed state, and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state.
In this embodiment, when it is determined that the total number of the first threads is not greater than the preset threshold, the corresponding operating system is entered so that the operating system runs all the hyper threads, so that all the hyper threads at this time are in an on state, and the operating system can run all the hyper threads.
In this embodiment, the adjusting the target hyper-thread to be in the off state and entering the corresponding operating system so that the operating system runs the hyper-thread in the on state includes: adjusting the target hyper-threads to be in a closed state, and determining the total number of second threads of all the hyper-threads except the target hyper-threads; and creating a plurality of advanced programmable interrupt controller instruction tables according to the total number of the second threads, and entering a corresponding operating system so that the operating system runs the hyper-threads in an on state. When the total number of the hyper threads exceeds a preset threshold, for example, more than 255, and is 256 hyper threads, the enable bit and the on-line capability bit of the core information of the CPU (Central Processing Unit, namely, the central processing unit) of the last hyper thread are set to 0, namely, the enable bit and the on-line capability bit of the central processing unit core of the target hyper thread are set to be low, so that the central processing unit core of the target hyper thread is adjusted to be in a closed state, namely, the 256 hyper thread function of the processor is closed when the system is entered, and a plurality of high-level programmable interrupt controller description tables are created according to the total number of the second threads.
The application has the beneficial effects that: starting a basic input/output system to judge whether a hyper-threading function is started or not; if the current thread is started, setting a local advanced programmable interrupt mode as a target interrupt mode, and determining the total number of first threads of all the hyper threads; judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads; and adjusting the target hyper-thread to be in a closed state, and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state. Therefore, if the hyper-threading function is started, after the local advanced programmable interrupt mode is set to the target interrupt mode, whether the total number of the first threads of all the hyper-threading is larger than a preset threshold value is judged, if so, the target hyper-threading is closed, so that the operating system runs the hyper-threading in the starting state, namely, the basic input/output system hyper-threading can be realized under the condition that the system version and the system kernel version are not required to be replaced.
Referring to fig. 2, the embodiment of the application discloses a specific method for operating a hyper-threading of a basic input/output system, which comprises the following steps:
step S21: and starting the basic input/output system to judge whether the hyper-threading function is started or not.
Step S22: if so, the local advanced programmable interrupt mode is set to the target interrupt mode and the total number of first threads of all hyper threads is determined.
Step S23: if the hyper-threading function is judged not to be started, the corresponding operating system is accessed, so that the operating system runs the hyper-threading.
It can be understood that, only the hyper thread function of the processor in the basic input/output system is turned on, and when the total number of the first threads exceeds 255 or 256 hyper threads, the system is down and cannot enter the system, so if it is determined that the hyper thread function is not turned on, no processing is needed, and after entering the corresponding operating system, the operating system can run the hyper thread.
Step S24: and judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads.
Step S25: and adjusting the target hyper-thread to be in a closed state, and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state.
In this embodiment, the enable bit and the online capability bit of the central processing unit kernel of the target hyper-thread are set to be low, and all hyper-threads except the target hyper-thread in the hyper-threads are adjusted to be in an on state; and entering a corresponding operating system so that the operating system runs the hyper-threading in the starting state.
Adjusting the target hyper-threads to be in a closed state, and determining the total number of second threads of all the hyper-threads except the target hyper-threads; and creating a plurality of advanced programmable interrupt controller instruction tables according to the total number of the second threads, and entering a corresponding operating system so that the operating system runs the hyper-threads in an on state.
Therefore, the method and the device firstly judge whether the hyper-threading function is started or not, if the hyper-threading function is not started, no processing is needed, if the hyper-threading function is started, whether the total number of the first threads of all the hyper-threading is larger than the preset threshold value is further judged, if the total number of the first threads of all the hyper-threading is larger than the preset threshold value, the target hyper-threading is closed, so that the operating system runs the hyper-threading in the starting state, and the basic input/output system hyper-threading operation can be realized under the condition that the system version and the system kernel version are not needed to be replaced.
Referring to fig. 3, the embodiment of the application discloses another specific method for operating a hyper-threading of a basic input/output system, which comprises the following steps:
step S31: and starting the basic input/output system to judge whether the hyper-threading function is started or not.
When the user does not accept the system version upgrade or the system kernel version upgrade, nor does the user agree to modify the system boot startup parameters, but has to support the x86 architecture 64 core processor, support can only be provided through the bios aspect. When the hyper-threading function is not started according to the 64-core dual-path processor, the system can be started normally and all functions are normal under the system, and the problem that the system is down and cannot enter the system can occur when the hyper-threading function of the processor in the basic input/output system is started and 256-core threads are arranged under the system, so that the BIOS starts the hyper-threading function, and whether the hyper-threading function is started needs to be judged first is solved.
Step S32: if so, the local advanced programmable interrupt mode is set to the target interrupt mode and the total number of first threads of all hyper threads is determined.
Step S33: and judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads.
Step S34: and adjusting the central processor core of the target hyper-thread to be in a closed state, and adjusting all the hyper-threads except the target hyper-thread to be in an open state.
In this embodiment, the adjusting the central processor core of the target hyper-threading to be in a closed state includes: and setting the enable bit and the online capability bit of the central processor core of the target hyper-threading to be low. For example, when the total number of hyper threads exceeds 255, i.e., 256 hyper threads, then the enable bit and the on-line capability bit of the CPU core information of the last hyper thread are set to 0 to be turned off, i.e., the 256 th hyper thread function of the processor is turned off when entering the system, and a MADT table is created.
Step S35: and entering a corresponding operating system so that the operating system runs the hyper-threading in the starting state.
Therefore, if the hyper-threading function is started, the application sets the local advanced programmable interrupt mode as the target interrupt mode to judge whether the total number of the first threads of all the hyper-threading is larger than the preset threshold, if so, the enable bit and the online capacity bit of the central processing unit kernel of the target hyper-threading are set to be low potential, so that the operating system can operate the hyper-threading in the starting state, i.e. the basic input/output system hyper-threading operation can be realized under the condition that the system version and the system kernel version are not required to be replaced.
The following describes the present application by taking a specific basic input/output system hyper-threading operation schematic diagram as an example shown in fig. 4.
1) And starting the basic input/output system to judge whether the hyper-threading function is started or not. Since the problem that the system is down and cannot enter the system occurs when the hyper thread function of the processor is exclusively started in the basic input/output system and the total number of the first threads exceeds 255 or 256 hyper threads is solved, if the hyper thread function is not started, no processing is needed, and the operating system can run the hyper thread after entering the corresponding operating system.
2) If the current thread is started, setting a local advanced programmable interrupt mode as a target interrupt mode, and determining the total number of first threads of all the hyper threads;
if the thread is not started, no processing is needed, and the corresponding operating system is only needed to be accessed, so that the operating system runs the hyper-threading.
3) And judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining the target hyper-thread from all the hyper-threads.
When the total number of hyper-threads exceeds 255, then the last hyper-thread is determined to be the target hyper-thread.
For example, when the total number of hyper threads does not exceed 255, the MADT table is created according to the actual number of threads and the hyper thread function of each core is enabled to enter the corresponding operating system so that the operating system runs all the hyper threads.
4) And adjusting the target hyper-thread to be in a closed state, and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state. The CPU kernel of the target hyper-threading is adjusted to be in a closed state, and hyper-threading except the target hyper-threading in all the hyper-threading is adjusted to be in an open state; and entering a corresponding operating system so that the operating system runs the hyper-thread in an on state. The adjusting the central processor core of the target hyper-threading to be in a closed state specifically comprises the following steps: the enable bit and the online capability bit of the central processor core of the target hyper-threading are set to low. It should be noted that after the target hyper-thread is adjusted to be in the off state, the total number of second threads of the hyper-threads except the target hyper-thread in all the hyper-threads needs to be determined; and creating a plurality of high-level programmable interrupt controller instruction tables according to the total number of the second threads, and entering a corresponding operating system so that the operating system runs the hyper-threads in an on state, and starting and guiding the basic input output system into the operating system, wherein the number of the processor threads under the current system can be checked to be 255 by using an lscpu command under the system.
Referring to fig. 5, an embodiment of the present application discloses a basic input/output system hyper-threading operation apparatus, including:
a first judging module 11, configured to start the basic input/output system to judge whether the hyper-threading function is on;
a thread number determining module 12, configured to set the local advanced programmable interrupt mode to a target interrupt mode if turned on, and determine a total number of first threads of all the hyper threads;
a second judging module 13, configured to judge whether the total number of the first threads is greater than a preset threshold, and if so, determine a target hyper-thread from all the hyper-threads;
the hyper-threading operation module 14 is configured to adjust the target hyper-threading to be in a closed state, and enter a corresponding operating system, so that the operating system operates the hyper-threading in an open state.
The application has the beneficial effects that: starting a basic input/output system to judge whether a hyper-threading function is started or not; if the current thread is started, setting a local advanced programmable interrupt mode as a target interrupt mode, and determining the total number of first threads of all the hyper threads; judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads; and adjusting the target hyper-thread to be in a closed state, and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state. Therefore, if the hyper-threading function is started, after the local advanced programmable interrupt mode is set to the target interrupt mode, whether the total number of the first threads of all the hyper-threading is larger than a preset threshold value is judged, if so, the target hyper-threading is closed, so that the operating system runs the hyper-threading in the starting state, namely, the basic input/output system hyper-threading can be realized under the condition that the system version and the system kernel version are not required to be replaced.
In some embodiments, the bios hyper-threading device further comprises:
and the second target hyper-threading operation unit is used for entering a corresponding operating system if the hyper-threading function is judged not to be started, so that the operating system operates the hyper-threading.
In some embodiments, the bios hyper-threading device further comprises:
and the first hyper-thread starting unit is used for creating a plurality of advanced programmable interrupt controller description tables according to the total number of the first threads and adjusting all the hyper-threads to be in a starting state if the total number of the first threads is not larger than a preset threshold value.
In some embodiments, the hyper-threading execution module 14 includes:
the first running unit is used for entering a corresponding operating system so that the operating system runs all the hyper-threads.
In some embodiments, the hyper-threading execution module 14 includes:
the state adjustment sub-module is used for adjusting the central processor core of the target hyper-thread to be in a closed state and adjusting all the hyper-threads except the target hyper-thread to be in an open state;
and the second running unit is used for entering a corresponding operating system so that the operating system runs the hyper-threading in the starting state.
In some embodiments, the status adjustment sub-module includes:
and the potential setting unit is used for setting the enable bit and the online capability bit of the central processing unit kernel of the target hyper-threading to be low potential.
In some embodiments, the hyper-threading execution module 14 includes:
a second thread total number determining unit, configured to adjust the target hyper-thread to be in a closed state, and determine a second thread total number of hyper-threads except the target hyper-thread in all the hyper-threads;
and the third running unit is used for creating a plurality of high-level programmable interrupt controller description tables according to the total number of the second threads and entering a corresponding operating system so that the operating system runs the hyper-threads in an on state.
Further, the embodiment of the application also provides electronic equipment. Fig. 6 is a block diagram of an electronic device 20, according to an exemplary embodiment, and is not intended to limit the scope of use of the present application in any way.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Specifically, the method comprises the following steps: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is used for storing a computer program, which is loaded and executed by the processor 21 for realizing the following steps:
starting a basic input/output system to judge whether a hyper-threading function is started or not;
if the current thread is started, setting a local advanced programmable interrupt mode as a target interrupt mode, and determining the total number of first threads of all the hyper threads;
judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads;
and adjusting the target hyper-thread to be in a closed state, and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state.
In some embodiments, the processor may specifically implement the following steps by executing the computer program stored in the memory:
if the hyper-threading function is judged not to be started, the corresponding operating system is accessed, so that the operating system runs the hyper-threading.
In some embodiments, the processor may specifically implement the following steps by executing the computer program stored in the memory:
if the total number of the first threads is not larger than the preset threshold value, a plurality of advanced programmable interrupt controller description tables are created according to the total number of the first threads, and all the hyper threads are adjusted to be in an on state.
In some embodiments, the processor may specifically implement the following steps by executing the computer program stored in the memory:
and entering a corresponding operating system so that the operating system runs all the hyper-threads.
In some embodiments, the processor may specifically implement the following steps by executing the computer program stored in the memory:
adjusting the central processor core of the target hyper-thread to be in a closed state, and adjusting all the hyper-threads except the target hyper-thread to be in an open state;
and entering a corresponding operating system so that the operating system runs the hyper-threading in the starting state.
In some embodiments, the processor may specifically implement the following steps by executing the computer program stored in the memory:
and setting the enable bit and the online capability bit of the central processor core of the target hyper-threading to be low.
In some embodiments, the processor may further include the following steps by executing the computer program stored in the memory:
adjusting the target hyper-threads to be in a closed state, and determining the total number of second threads of all the hyper-threads except the target hyper-threads;
and creating a plurality of advanced programmable interrupt controller instruction tables according to the total number of the second threads, and entering a corresponding operating system so that the operating system runs the hyper-threads in an on state.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not limited herein in detail; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 21 may also comprise a main processor, which is a processor for processing data in an awake state, also called CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon include an operating system 221, a computer program 222, and data 223, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device and the computer program 222, so as to implement the operation and processing of the processor 21 on the mass data 223 in the memory 22, which may be Windows, unix, linux. The computer program 222 may further include a computer program capable of performing other specific tasks in addition to the computer program capable of performing the basic input output system hyper-threading method performed by the electronic device as disclosed in any of the foregoing embodiments. The data 223 may include, in addition to data received by the electronic device and transmitted by the external device, data collected by the input/output interface 25 itself, and so on.
Further, the embodiment of the application also discloses a computer readable storage medium, wherein the storage medium stores a computer program, and when the computer program is loaded and executed by a processor, the method steps executed in the process of the basic input output system hyper-threading operation disclosed in any embodiment are realized.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above describes in detail a method, apparatus, device and medium for operating a basic input/output system hyper-thread, and specific examples are applied to illustrate the principle and implementation of the present application, and the description of the above examples is only used to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A basic input/output system hyper-threading operation method is characterized by comprising the following steps:
starting a basic input/output system to judge whether a hyper-threading function is started or not;
if the current thread is started, setting a local advanced programmable interrupt mode as a target interrupt mode, and determining the total number of first threads of all the hyper threads;
judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads;
and adjusting the target hyper-thread to be in a closed state, and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state.
2. The method for operating a hyper-threading of a basic input/output system according to claim 1, wherein after the judging whether the hyper-threading function is on, further comprises:
if the hyper-threading function is judged not to be started, the corresponding operating system is accessed, so that the operating system runs the hyper-threading.
3. The method for operating a basic input/output system hyper thread according to claim 1, wherein after determining whether the total number of first threads is greater than a preset threshold, further comprising:
if the total number of the first threads is not larger than the preset threshold value, a plurality of advanced programmable interrupt controller description tables are created according to the total number of the first threads, and all the hyper threads are adjusted to be in an on state.
4. The method for operating a hyper-threading of a basic input output system according to claim 3 wherein said entering a corresponding operating system so that said operating system operates a hyper-threading in an on state comprises:
and entering a corresponding operating system so that the operating system runs all the hyper-threads.
5. The method for operating a basic input/output system (bios) hyper-threading according to claim 1, wherein said adjusting the target hyper-threading to be in an off state and entering a corresponding operating system so that the operating system operates the hyper-threading in an on state comprises:
adjusting the central processor core of the target hyper-thread to be in a closed state, and adjusting all the hyper-threads except the target hyper-thread to be in an open state;
and entering a corresponding operating system so that the operating system runs the hyper-threading in the starting state.
6. The method for operating a basic input/output system (bios) hyper-threading according to claim 5, wherein said adjusting the cpu core of the target hyper-threading to be in an off state comprises:
and setting the enable bit and the online capability bit of the central processor core of the target hyper-threading to be low.
7. The method for operating a basic input/output system (bios) hyper-threading according to any one of claims 1 to 6, wherein said adjusting the target hyper-threading to be in an off state and entering a corresponding operating system so that the operating system operates the hyper-threading in an on state comprises:
adjusting the target hyper-threads to be in a closed state, and determining the total number of second threads of all the hyper-threads except the target hyper-threads;
and creating a plurality of advanced programmable interrupt controller instruction tables according to the total number of the second threads, and entering a corresponding operating system so that the operating system runs the hyper-threads in an on state.
8. A basic input output system hyper-threading device, comprising:
the first judging module is used for starting the basic input and output system to judge whether the hyper-threading function is started or not;
the thread number determining module is used for setting the local advanced programmable interrupt mode as a target interrupt mode if the thread number determining module is started, and determining the total number of first threads of all the hyper threads;
the second judging module is used for judging whether the total number of the first threads is larger than a preset threshold value, and if so, determining a target hyper-thread from all the hyper-threads;
and the hyper-thread running module is used for adjusting the target hyper-thread to be in a closed state and entering a corresponding operating system so that the operating system runs the hyper-thread in an open state.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the basic input output system hyper-threading method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program; wherein the computer program when executed by a processor implements the steps of the basic input output system hyper-threading method according to any one of claims 1 to 7.
CN202310580901.1A 2023-05-19 2023-05-19 Method, device, equipment and medium for operating basic input/output system hyper-threading Pending CN116610342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310580901.1A CN116610342A (en) 2023-05-19 2023-05-19 Method, device, equipment and medium for operating basic input/output system hyper-threading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310580901.1A CN116610342A (en) 2023-05-19 2023-05-19 Method, device, equipment and medium for operating basic input/output system hyper-threading

Publications (1)

Publication Number Publication Date
CN116610342A true CN116610342A (en) 2023-08-18

Family

ID=87683139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310580901.1A Pending CN116610342A (en) 2023-05-19 2023-05-19 Method, device, equipment and medium for operating basic input/output system hyper-threading

Country Status (1)

Country Link
CN (1) CN116610342A (en)

Similar Documents

Publication Publication Date Title
CN102789305B (en) Postponing suspend
US9558016B2 (en) Platform system, method for changing support hardware configuration of universal extensible firmware interface basic input output system and computer program product
CN109726076B (en) Applet life cycle management method and system
JP2010237787A (en) Program, information processing apparatus, and state output method
CN112256383B (en) Method, device, equipment and medium for adjusting CPU core number of virtual machine
US20100205410A1 (en) Data Processing
JPH04362716A (en) System restarting device
EP3407186B1 (en) Interface refresh synchronization method and apparatus, terminal, and storage medium
CN110851297A (en) Method, device, system and medium for processing interface jitter state
US20210306431A1 (en) Monitoring and managing services in legacy systems using cloud native monitoring and managing tools
CN110825425A (en) Configuration data management method and device, electronic equipment and storage medium
JPWO2019215795A1 (en) Information processing equipment, tuning method and tuning program
CN116610342A (en) Method, device, equipment and medium for operating basic input/output system hyper-threading
CN115033462B (en) Storage server start detection method, system, device, equipment and storage medium
CN116208487A (en) Method, device, equipment and medium for upgrading consensus algorithm in block chain system
JP2004213122A (en) Stable operation method of control system by client/server and program therefor
KR102621930B1 (en) A computer system for saving the energy by controlling the clock according to compuer resourse usage rate and controlling method therefor
CN113365171B (en) Screen sound box processing method and device, electronic equipment and storage medium
CN114924802B (en) System starting method, device equipment and medium based on BMC and BIOS
US20240111579A1 (en) Termination of sidecar containers
US11360813B1 (en) Timer object management for a multiprocessor virtual environment
CN114443767B (en) Method, device, equipment and medium for determining consistency level of distributed system
EP4216097A1 (en) Method, system, equipment and medium for modifying the layering layer information of finite element model unit
CN117908914A (en) Component deployment upgrading method and device, computer equipment and storage medium
WO2024076425A1 (en) Termination of sidecar containers

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