US-12625737-B2 - Self-recovering method of physical layer of base station and base station apparatus
Abstract
A processor of a base station apparatus executes steps of: (a) executing multiple first tasks, one by one, during a time period of one of m time slots in a normal mode in a thread pool; (b) when finishing executing the first tasks, recording first statuses of the first tasks into the task status vector table; (c) when finishing recording the first statuses of the first tasks, determining whether all of second statuses of second tasks of a previous k th time slot of the m time slots recorded in the task status vector table are executed statuses; if yes, returning to the step (a); if not, executing at least one of the second tasks of the previous k th time slot having an unexecuted status within next p consecutive time slots in a load reduction mode, and then returning to step (a); m, k, and p are positive integers. The processor executes the tasks in the load reduction mode for self-recovering so that the base station apparatus can avoid crashing.
Inventors
- Terng-Yin Hsu
- Yuan-Te Liao
- Shung-Mei KOH
Assignees
- AESPULA TECHNOLOGY INC.
Dates
- Publication Date
- 20260512
- Application Date
- 20230207
Claims (7)
- 1 . A self-recovering method of a physical layer of a base station, executed by a processor of a base station apparatus, and comprising steps of: (a) executing multiple first tasks, one by one, during a time period of one of m time slots in a normal mode in a thread pool; (b) when finishing executing the first tasks, recording first statuses of the first tasks into a task status vector table, wherein the task status vector table further records second statuses of second tasks of the m time slots other than the one of the m time slots having the first tasks; (c) when finishing recording the first statuses of the first tasks, determining whether all of the second statuses of the second tasks of a previous k th time slot of the m time slots recorded in the task status vector table are executed statuses; when the second statuses of the second tasks of the previous k th time slot recorded in the task status vector table are all executed statuses, returning to the step (a); and when any one of the second statuses of the second tasks of the previous k th time slot recorded in the task status vector table is not the executed status, executing at least one of the second tasks of the previous k th time slot having an unexecuted status within next p consecutive time slots in a load reduction mode, and returning to the step (a); wherein the at least one of the second tasks of the previous k th time slot having the unexecuted status in the thread pool is executed in a same thread pool within the next p consecutive time slots; wherein m, k, and p are positive integers; wherein p+k≤m; wherein the base station apparatus is a cell site for communicating with mobile devices; wherein p is determined according to the statuses of the second tasks of the previous k th time slot recorded in the task status vector table; and wherein the smaller a number of the executed statuses of the second tasks of the previous k th time slot recorded in the task status vector table is, the greater p is.
- 2 . The self-recovering method as claimed in claim 1 , wherein the task status vector table is stored in a memory of the base station apparatus.
- 3 . The self-recovering method as claimed in claim 1 , wherein when the processor is in the load reduction mode, a workload for processing subsequent tasks within the next p consecutive time slots is reduced.
- 4 . The self-recovering method as claimed in claim 3 , wherein when the workload of the processor is reduced, the processor executes i said subsequent tasks within each of the next p consecutive time slots in the load reduction mode; wherein i is a positive integer, and i≤n; and wherein n is a number of the first tasks.
- 5 . A base station apparatus, and comprising: a memory, storing a task status vector table; a processor, electrically connected to the memory, and executing steps of: (a) executing multiple first tasks, one by one, during a time period of one of m time slots in a normal mode in a thread pool; (b) when finishing executing the first tasks, recording first statuses of the first tasks into a task status vector table, wherein the task status vector table further records second statuses of second tasks of the m time slots other than the one of the m time slots having the first tasks; (c) when finishing recording the first statuses of the first tasks, determining whether all of the second statuses of the second tasks of a previous k th time slot of the m time slots recorded in the task status vector table are executed statuses; when the second statuses of the second tasks of the previous k th time slot recorded in the task status vector table are all executed statuses, returning to the step (a); and when any one of the second statuses of the second tasks of the previous k th time slot recorded in the task status vector table is not the executed status, executing at least one of the second tasks of the previous k th time slot having an unexecuted status within next p consecutive time slots in a load reduction mode, and returning to the step (a); wherein the at least one of the second tasks of the previous k th time slot having the unexecuted status in the thread pool is executed in a same thread pool within the next p consecutive time slots; wherein m, k, and p are positive integers; wherein p+k≤m; wherein the base station apparatus is a cell site for communicating with mobile devices; wherein p is determined according to the statuses of the second tasks of the previous k th time slot recorded in the task status vector table; and wherein the smaller a number of the executed statuses of the second tasks of the previous k th time slot recorded in the task status vector table is, the greater p is.
- 6 . The base station apparatus as claimed in claim 5 , wherein when the processor is in the load reduction mode, a workload for processing subsequent tasks within the next p consecutive time slots is reduced.
- 7 . The base station apparatus as claimed in claim 6 , wherein when the workload of the processor is reduced, the processor executes i said subsequent tasks within each of the next p consecutive time slots in the load reduction mode; wherein i is a positive integer, and i≤n; and wherein n is a number of the first tasks.
Description
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a self-recovering method and an apparatus, especially a self-recovering method of a physical layer of a base station, and a base station apparatus. 2. Description of the Related Art A base station is a cell site being a cellular-enabled mobile device site. The base station is used to receive data packages from mobile devices or transmit the data packages to the mobile devices. Further, the base station needs to execute tasks when receiving the data packages from the mobile devices, and the base station executes n tasks during each time slot. However, when the base station cannot execute n tasks within one time slot due to excessive workload, there will be multiple undone tasks during such one time slot. The undone tasks may negatively affect performance of the base station. Namely, if a number of the undone tasks is too many, the base station may crash. Therefore, the base station needs to be improved. SUMMARY OF THE INVENTION In view of the above-mentioned needs, the main purpose of the present invention is to provide a self-recovering method of a physical layer of a base station, and a base station apparatus. The base station apparatus includes a memory and a processor. The processor is electrically connected to the memory. The memory stores a task status vector table. The processor executes the self-recovering method of the physical layer of the base station, and the self-recovering method includes steps of: (a) executing multiple first tasks, one by one, during a time period of one of m time slots in a normal mode in a thread pool;(b) when finishing executing the first tasks, recording first statuses of the first tasks into a task status vector table; wherein the task status vector table further records second statuses of second tasks of the m time slots other than the one of the m time slots having the first tasks;(c) when finishing recording the first statuses of the first tasks, determining whether all of the second statuses of the second tasks of a previous kth time slot of the m time slots recorded in the task status vector table are executed statuses;when the second statuses of the second tasks of the previous kth time slot recorded in the task status vector table are all executed statuses, returning to the step (a);when any one of the second statuses of the second tasks of the previous kth time slot recorded in the task status vector table is not the executed status, executing at least one of the second tasks of the previous kth time slot having an unexecuted status within next p consecutive time slots in a load reduction mode, and returning to the step (a);wherein the at least one of the second tasks of the previous kth time slot having the unexecuted status in the thread pool is executed in a same thread pool within the next p consecutive time slots;wherein m, k, and p are positive integers;wherein p+k≤m;wherein the base station apparatus is a cell site for communicating with mobile devices;wherein p is determined according to the statuses of the second tasks of the previous kth time slot recorded in the task status vector table;wherein the smaller a number of the executed statuses of the second tasks of the previous kth time slot recorded in the task status vector table is, the greater p is. Since the processor of the base station apparatus can execute the tasks in the load reduction mode during next p consecutive time slots, the base station apparatus can self-recover to avoid crashing. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a flowchart of a self-recovering method of a physical layer of a base station of the present invention; FIG. 2 is a block diagram of a base station apparatus of the present invention; FIG. 3 is a schematic block diagram of the base station apparatus of the present invention; and FIG. 4 is a schematic diagram of the self-recovering method of the present invention. DETAILED DESCRIPTION OF THE INVENTION In the following, the technical solutions in the embodiments of the present invention will be clearly and fully described with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of, not all of, the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention. FIG. 1 is a flowchart of a self-recovering method of a physical layer of a base station, which is executed by a base station apparatus. In an embodiment, the base station apparatus 1 may be a cell site for communicating with mobile devices. Further with reference to FIG. 2, the base station apparatus 1 includes a memory 10 and a processor 20. The processor 20 is electrically connected to the memory 10. With reference to FIG. 3, in the embodiment, the base station apparatus