Running two threads at the same time

前端 未结 7 1827
南旧
南旧 2020-11-29 20:07

I want to know if a program can run two threads at the same time (that is basically what it is used for correct?). But if I were to do a system call in one function where it

7条回答
  •  旧巷少年郎
    2020-11-29 20:31

    • If your computer has only a single CPU, you should know, how it can execute more than one thread at the same time.

    • In single-processor systems, only a single thread of execution occurs at a given instant. because Single-processor systems support logical concurrency, not physical concurrency.

    • On multiprocessor systems, several threads do, in fact, execute at the same time, and physical concurrency is achieved.

    • The important feature of multithreaded programs is that they support logical concurrency, not whether physical concurrency is actually achieved.

提交回复
热议问题