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



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

Answer / 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

More Operating Systems General Concepts Interview Questions

Where is program files located?

0 Answers  


Why partitioning and formatting is a prerequisite to installing an operating system?

0 Answers  


What items of information about a task might be useful in real time scheduling?

0 Answers  


How long does chkdsk take to run?

0 Answers  


How the Kernel handles both the page stealer and the fault handler?

0 Answers  






Define max, min heap and search time of heap.

0 Answers   Amdocs, Tavant Technologies, Thomson Reuters, Verifone,


How many jobs can be run concurrently on MVT?

2 Answers  


How does reference counting manage memory allocated objects? When can it fail to reclaim objects?

0 Answers  


Is it possible to have a deadlock involving only one process?

0 Answers  


What is the max ram for a 64 bit?

0 Answers  


What are types of os?

0 Answers  


Why paging is used ?

1 Answers  


Categories