asked 143k views
0 votes
Is switching among threads in the same process more efficient than switching among processes?

1) True
2) False

asked
User Yeradis
by
8.1k points

1 Answer

4 votes

Final answer:

Switching among threads in the same process is more efficient than switching among processes due to lighter context switching and shared memory space.

Step-by-step explanation:

Switching among threads in the same process is more efficient than switching among processes.

When switching among threads in the same process, the operating system only needs to change the current thread's state and context, which is faster than switching between processes. Threads within the same process share the same memory space, so switching between them is more lightweight.

On the other hand, switching among processes involves saving and restoring the entire state of the process, which includes its memory space, file descriptors, and other resources. This process switch is heavier and takes more time compared to switching between threads.

answered
User Zilicon
by
8.6k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.