WIN32 API RUNS MULTI THREADED AT THE SAME TIME

Updated on technology 2024-08-05
2 answers
  1. Anonymous users2024-02-15

    Whether threads will run at the same time depends on two important factors:

    Does your CPU have two physical cores?

    What kind of job scheduling is being carried out by your operating system at this time.

    A single-core CPU will never be able to run two threads at the same time, because it only has one core;

    Only one thread can be running at a time;

    Second, even if you have a dual-core CPU, you can run two threads at the same time.

    But there are a lot of other programs and threads running inside the system, and they also take up chunks of CPU time;

    Unless there are only two threads left in the entire system, it is very difficult to have two threads running at the same time in your process;

    createthread After a thread is created, the new thread usually doesn't run right away;

    Instead, wait for the CPU to be allocated to the time slice before it starts running;

    So, if you want to start threads at the same time, you can use a kernel function like waitforsingleobject;

    Although it is guaranteed that threads can start at the same time, there is never a guarantee that threads can run at the same time;

  2. Anonymous users2024-02-14

    Most of the material you can find about multithreading is about the concept of synchronization. For example, how to serialize threads that share common data. This focus on talking about synchronization makes sense, because synchronization is an indispensable part of multithreaded programming.

    This article takes a step back and focuses on a little-known aspect of multithreading: deciding how a computation can be meaningfully split into multiple first-class threads. The sample program used in this article, ThrdPerf, is at Microsoft?

    windows?95 and Windows NT?On both platforms, the test suite is implemented for the same computation using both serial and concurrent methods, and they are compared in terms of throughput and performance.

    The first part of this article establishes some vocabulary for multithreaded applications, discusses the scope of test suites, and describes how sample suites are designed. The second part discusses the results of the tests and includes recommendations for designing multithreaded applications. Articles related to Interacting with Microsoft Excel:

    A case study in OLE Automation discusses an interesting question about the sample program suite, namely how the data obtained using the test collection is used by OLE Automation is entered into the pure Ling of Microsoft Excel.

    If you're an experienced multithreaded application programmer, you can skip the introduction section and go straight to the Results section below.

Related questions
9 answers2024-08-05

The virus is a Trojan backdoor program, when a user is infected with the virus, the virus will open a port between 1024 and 30000, and wait for the Trojan grower to connect, and the Trojan grower can control the user's machine through the backdoor left by the virus.

14 answers2024-08-05

Go to the 360 security guard online battle to see, there is a tool that specializes in killing double clicks and not opening the market.

9 answers2024-08-05

It should be a Trojan virus.

Chinese name: Virus type: Trojan Affected system: >>>More

5 answers2024-08-05

To give you a **, you can rest assured that it is definitely not a virus! Recently, I also hit this kind of Trojan horse.,I've been depressed for a few days.,I just found this method on the Internet this afternoon.,It's not just finished now.,It's very easy to use.,I want you**A small tool.,You can rest assured**,Don't be fooled.,I vouch for my personality.,Feel easy to use.,Rate me the best.,Hehe.。 >>>More

20 answers2024-08-05

Yes variants.

Clear method reference. >>>More