answersLogoWhite

0


Best Answer

Answer

# 11. 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.

answer 2## Process :Generally heavy weight by, the PCB holds kernel objects the values generally referred as state information. A application can be divided into two types in design phase: 1.Process - may affect application/program architecture 2.Threads - didn't affect architecture Threads typically are spawned for a short-term benefit where as process for long-term even the thread share its own process address space is never larger than 4GB. A single process may hold "n" threads so exchanging value between process; then the CPU spend most of its time for swapping it leads to thrasing definitely. Threads easily exchange their locale variables within its scope but exchange value between process stolen more CPU cycles.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: List reasons why a Mode switch between threads may be cheaper than a Mode switch between processes?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Computer Science

What is the difference between concurrent and parallel threads?

Its really so easy to distinguish between the concurrent & parallel threads that A parallel thread is the thread maintained the parallel processing system including the process sheduling system is quite murcible. Where as the concurrent threading is the way of manupulation of a thread using simultaneous process threading. It would be be quite better if the book named "Galvin & Siberscartz" book of "Operating System" the chapter process & threads would be followed for maximum details.


Why cant a single computer processor execute two or more programs simultaneously?

In simple terms a single processor can only process one machine instruction at a time; it's just not possible to execute two or more instructions simultaneously and therefore not possible to execute 2 programs simultaneously. However, it's not quite as simple as that because a modern processor can have 2 or more cores, in which case it is possible to execute 2 or more instructions simultaneously. However, that's not quite the same thing as executing 2 programs simultaneously as we invariably execute far more threads of execution than we have cores available. Note that a program consists of one or more processes and a process consists of one or more threads of execution. Although it is theoretically possible to execute two threads simultaneously upon two cores, when those cores share the same processor they also share the same L2 cache and that's really only beneficial when both threads share the same process. With 2 independent processors there's a better chance of simultaneous program execution, however it's nigh on impossible to guarantee this unless the system is specifically designed for that purpose. In a multi-processing, multi-threaded environment, task-switching makes it next to impossible for any two independent programs to execute simultaneously because every thread has to yield to waiting threads.


What is interleaved execution of program?

Interleaved execution of the programs means that in the systems which are used concurrently by several threads or processes, and it is usually only one processor so the system execute one and then suspend it start other one then start executing the first one from that suspend point and like this going one and it is used to avoid delays.


What is the importance of mutual exclusion and synchronization in the case of process cooperation?

to ensure that two concurrently-executing threads or processes do not execute the same code of a program at the same time. to control access to state both in small-scale multiprocessing systems -- in multithreaded environments and multiprocessor computers - and in distributed computers consisting of thousands of units - in banking and database systems, in web servers, and so on.


Is executing two threads in parallel to improve multitasking performance?

hyper-threading dumb @sses

Related questions

What is the difference between processes and threads?

The memory space, where a given application is executed is called - process. A Process is the memory set aside for an application to be executed in. Within this process the thing, which is really executed is the thread. The key difference is that processes are fully isolated from each other; threads share (heap) memory with other threads running in the same application. Threads share the address space of the process that created it; processes have their own address. Threads have direct access to the data segment of its process; processes have their own copy of the data segment of the parent process. Threads can directly communicate with other threads of its process; processes must use inter-process communication to communicate with sibling processes. Threads have almost no overhead; processes have considerable overhead. New threads are easily created; new processes require duplication of the parent process. Threads can exercise considerable control over threads of the same process; processes can only exercise control over child processes. A great answer to the question can also be found here: (link moved to link section)


Briefly summarise the reasons for the decisions made by software developers regarding the use of processes versus threads?

Control and speed of executions.


Compare and contrast between threads and classes in java language?

A thread is like any other class, except that there is the capacity to run multiple threads - multiple processes - simultaneously.


What is relationship between process and thread?

Process --1------------m-- Threads 1 process to many threads Bring up your Task Manager (if you are using a windows), Performance tap, you can see the number of process and the number of threads, usually the number of threads is a lot higher than the number of processes.


What is processes threads?

different paths of control in a program that a computer might run at the same time if it has parallel processing support for multithread execution. threads and processes are two ways of supporting multitasking on a uniprocessor or multiprocessing on a multiprocessor. threads are lighter weight: take less OS resources to implement but only support limited protection and security. processes take more OS resources but can support full protection and security. Many operating systems support both processes and threads, allowing each process to have many threads.


What is the best baseball hobby box?

i would say Topps triple threads or exquisite. triple threads is much cheaper and the hits are in my opinion better


How do you fix oxygen sensor threads?

You need to get a die that fits. Probably cheaper to buy the sensor


Does message passing in java means calling a method regardless of whether it is an instance method or class method?

Message passing refers to the communication between two or more processes or threads.


Whats the difference between plumbing pipe threads and conduit pipe threads?

Plumbing pipe threads are squared and conduit pipe threads are tapered.


What is the difference between pipe threads and electrical conduit pipe threads?

Water pipe threads are tapered, electrical pipe is not tapered.


What is thread based multitasking?

-> Difference between process based and thread based multitasking: 1) threads share the same address space where as process doesn't. 2) context switching between threads is usually less expensive than between processes. 3) cost of communication between threads is relatively low.


If process stop its execution will thread also stop or it will continue to run?

Processes do not execute, it is the threads within a process that actually execute. All processes have at least one thread of execution, the main thread. If the main thread falls from scope, the process ends, taking all threads with it. This can lead to undefined behaviour if the threads are not terminated gracefully from within the main thread before it falls from scope.