Linux multi threaded CPU runtime

Updated on society 2024-06-12
9 answers
  1. Anonymous users2024-02-11

    1. After the program (in the Linux environment) runs the thread written by itself, the program freezes.

    2. Check the program (in the Linux environment) to run the top command of resource consumption, and the CPU occupancy rate reaches 98%.

    Problem analysis. 1. Repeatedly check the program execution steps in the thread, and there is no CPU-intensive operation.

    2. Check the experience of program optimization, optimize some algorithms, but the CPU occupancy cannot reach 98%3. Finally, check the thread concept and principle many times and draw conclusions:

    A thread is an endless loop, and the thread must have a pop-out statement, and it must reserve a time slice for other programs to run.

    Solution: Added sleep() to while(1) to prevent the CPU from being occupied all the time -- the --- of the end of the recovery content

  2. Anonymous users2024-02-10

    Linux multi-threaded CPUs run for about a week or so and can be extended.

  3. Anonymous users2024-02-09

    NSV multithreading is implied to run for a large time, 40 minutes to run, about 40 minutes.

  4. Anonymous users2024-02-08

    Fuel difference, multi-threaded CPU runtime, this run time is about two hours or so.

  5. Anonymous users2024-02-07

    The running time in the county needs to look at the normal usage of the CPU to complete such running time control.

  6. Anonymous users2024-02-06

    This month is relatively long, because the CPU that is ready to use at this level is very good to use.

  7. Anonymous users2024-02-05

    Yuncheng CPU incident, you look at the content on the Internet about this, and learn more about this running CPU.

  8. Anonymous users2024-02-04

    Under the 32-bit Linux platform, the virtual memory space is 4G, the user space occupies 3G, the kernel space is 1G, the stack size of each thread is 10240, which is 10M, and 3072 10=307. Remove the main thread and get down close to the test data.

    The default stack size can be viewed with the command ulimit -s or ulimit -a.

    Of course, you can temporarily modify the thread stack size <> by running the ulimit -s+ parameter

    After the thread stack was modified, the number of threads increased.

  9. Anonymous users2024-02-03

    Under the 32-bit Linux platform, the virtual memory space is 4G, the user space occupies 3G, the kernel space is 1G, the stack size of each thread is 10240, which is 10M, and 3072 10=307. Remove the main thread and get down close to the test data.

    By commanding ulimit

    s or ulimit

    a You can view the default stack size.

    Of course you can do this by commanding ulimit

    s+ parameter to temporarily modify the thread stack size.

    After the thread stack was modified, the number of threads increased.

Related questions
7 answers2024-06-12

ssql, adcmdtext prompts that this sentence is wrong, this syntax is wrong, how can it be written like this. >>>More

9 answers2024-06-12

Copy the file directly to the system directory

1. Windows 95 98 ME system, copy to C: Windows System directory. >>>More

8 answers2024-06-12

First, the CMOS battery on the motherboard is out of power. The chassis can be opened. Replace the CMOS battery with a new one. >>>More

3 answers2024-06-12

Hello, it is recommended that you must install the original Windows operating system, do not use the Ghost version of the operating system, because this kind of operating system is mostly a streamlined system, the stability and compatibility are very poor, and generally do not have AHCI related drivers can not recognize the hard disk in AHCI mode. At the same time, be careful not to use driver management software to find the public driver, but should use the operating system CD that comes with the factory or go to the official website of Dell to install the corresponding hardware drivers, so that the stability of your operating system is very high. >>>More