List reasons why a Mode switch between threads may be
cheaper than a Mode switch between processes.

Answer Posted / kumar

1. reason - the control blocks for processes are larger
than for threads (hold more
state information), so the amount of information to
move during the thread
switching is less than for process context
switching
2. reason - the major reason is that the memory management
is much simpler for
threads than for processes. Threads share their memory so
during mode switching, memory information does not have to
be exchanged/changed, pages and page tables do not have to
be switched, etc. This makes the thread context switch much
cheaper than for processes. In case of processes the memory
pieces (pages) need to be exchanged, etc. (Will talk about
the details in few weeks).
3. reason - threads do not have to worry about accounting,
etc, so do not have to fill
out all the information about accounting and other
process specific information in
their thread control block, so keeping the thread
control block consistent is much
faster






4. reason - threads share files, so when mode switch
happens in threads, these
information stay the same and threads do not have to worry
about it (similar to accounting information) and that
makes the mode switch much faster.
But the most expensive operation is truly the memory
aspect.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I stop apps from running in the background?

509


Is 64 bit excel faster?

525


How do I check my filesystem?

591


When does page fault error occur?

572


How do you change File Access Permissions?

622






What is disk operating system in computer?

510


What kind of operations are possible on a semaphore?

574


How long should a chkdsk r take?

533


What is the trtw/trwt timing?

653


Who is the father of operating system?

505


Can you tell what a device is by mac address?

539


What is synchronous and asynchronous process?

540


What is memory-management unit (mmu)?

637


What is the meaning of Thread Priority?

602


Can a system detect starvation?

528