-
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
-
Linux multi-threaded CPUs run for about a week or so and can be extended.
-
NSV multithreading is implied to run for a large time, 40 minutes to run, about 40 minutes.
-
Fuel difference, multi-threaded CPU runtime, this run time is about two hours or so.
-
The running time in the county needs to look at the normal usage of the CPU to complete such running time control.
-
This month is relatively long, because the CPU that is ready to use at this level is very good to use.
-
Yuncheng CPU incident, you look at the content on the Internet about this, and learn more about this running CPU.
-
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.
-
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.
ssql, adcmdtext prompts that this sentence is wrong, this syntax is wrong, how can it be written like this. >>>More
Copy the file directly to the system directory
1. Windows 95 98 ME system, copy to C: Windows System directory. >>>More
The people upstairs were too accurate.
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
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