Joke Collection Website - Talk about mood - Why introduce threads?
Why introduce threads?
Anyone who has studied computer architecture knows that. Compared with multi-thread parallel execution, sequential execution of programs can greatly improve efficiency. For example, there are five threads Thread 1, Thread 2, Thread 3, Thread 4 and Thread 5, and the CPU time consumed is 4, 5, 1, 2 and 7 respectively. (Assuming that the CPU rotation cycle is 4 CPU times and the threads are independent of each other) Sequential execution takes 19 CPU time, while parallel execution takes less than 19 CPU time. As for the specific time, it depends on which threads can be executed simultaneously. This is in a very small-scale situation, and the efficiency can be higher if faced with the interaction between large-scale processes.
- Previous article:Shoulder the heavy responsibility-Scania V8 heavy equipment transport vehicle
- Next article:Sentences that are very satisfied with life
- Related articles
- Ask the master to name his daughter. Let's talk about the five elements, which belong to cattle. She was born at 5: 05 am on February 9, 2009. Last name is Deng. Mother's surname is Cheng.
- Miss the taste of loss, just like saying.
- Pick 400-word Mulberry Composition
- Try to accept a person's talk.
- Shooting skills of SLR camera in cloudy days
- On Nantong property market
- Describe a sentence that sticks a hot face to a cold ass. . .
- Is it illegal to pick up shell casings?
- Tell me about the Wang Leehom incident.
- The young man had dinner with his brothers and talked about it.