What is exact difference between process switching and context switching?

Liked this question? Tell your friends about it

3 Answers

Order by
Oldest to Newest
Newest to Oldest

A context switch is the computing process of storing and restoring the state (context) of a Central Processing Unit (processor or CPU) such that multiple processes can share a single CPU resource. The context switch is an essential feature when trying to multitask on an operating system. 

A context switch can mean a register context switch, a task context switch, a thread context switch, or a process context switch. What constitutes the context is determined by the processor and the operating system.

Computers are the wave of the future.

At some time, a running process is interrupted and the operating system assigns another process to the running state and turns control over that process.

A process switch may occur any time that the operating system has gained control from the currently running process. Considering that the system interrupts, there are two types of system interrupts out of which one is simply referred to as an interrupt and the other as a trap.

The former is caused by some sort of event that is external to and independent of the currently running process, such as the completion of an I/O operation. The latter relates to an error or exception condition generated within the currently running process, such as an illegal attempt to access a file.

With an ordinary interrupt, control is first transferred to an interrupt handler, which does some basic house keeping and then branches to an operating system routine that is concerned with the particular type of interrupt that has occurred.

The operating system determines whether the currently running process has been executing for the maximum allowed time slice. If so, this process must be switched to a ready state and another process dispatched. This is known as clock interrupt. The operating system determines exactly what I/O action has occurred. If the I/O action constitutes an event for which one or more processes are waiting, then the operating system moves all the corresponding blocked processes to the Ready state( and blocked, suspended process to the Ready, suspended state).

The operating system must then decide whether to resume execution of the process currently in the Running state to preempt that process for a higher-priority Ready process.

The processor encounters a virtual memory address reference for a word that is not in main memory. The operating system must bring in the block of memory containing the reference from secondary memory to main memory. After the I/O request is issued to bring the block of memory, the operating system may perform a context switch to resume execution of another process; the process with the memory fault is placed in a blocked state. After the desired block is brought into memory, then that particular process is placed in a Ready state.

Quick Note: Taking the Nonsense out of looking for the right spyware remover

If you really want to take the work out of looking for that right Spyware Protection from a Spybot go to the Internet and get a Free Spybot or a Free Spybot Search and Destroy
Download, In order to prevent your vital information from being ripped from your computer get your Spybot Remover Today.

With a trap, the operating system determines whether the error is fatal. If so, then the currently running process is moved to the EXIT state and a process switch occurs.


1.process switching is a transition b/w 2 memory resident process in a multiprogramming environment........whr as context switching is a changing context from an executing prg to an interrupt service routine(ISR).

2. 1 process switch needs 100 context switches...........

Related Questions

Other people asked questions on similar topics, check out the answers they received:

Asked: Who is my system operator

who is my system operator

Asked: Operating system

what is operating system, had something come up on my laptop, can't find operating system. Best Buy told me it meant my hard drive needs to be replaced but I don't buy that. I thought operating system ...

Asked: Operating system

Do you think “Operating system is the core area of the computer system?

More Questions

What is the difference in a three bedroom home and a four bedroom home in

The prices for 3 bedroom start around $80,000, while for 4 bedroom they start around $120,000. The price per square foot might be comparable, because the 3 bedroom houses tend to be smaller. Prices will vary according to the schools, and how new the house is, and the location.

What is the difference between low context and high context cultures?

The general terms "high context" and "low context" (popularized by Edward Hall) are used to describe broad-brush cultural differences between societies. High context refers to societies or groups where people have close connections over a long period of time. Many aspects of cultural behavior are ...

Switch wiring

It might be cheaper to tie the two white and two black together, BUT I don't recommend it. Replace the switch with an identical replacement.

What is the difference among G.729, G.729AB and G ...

Standard G.729 codec operates at 8 kbps and mostly used in VoIP Application. G.729a codec is similar and fully compatible with G.729 codec but requires less computation hence the speech quality slighly detoriate. Whereas G.729.1 codec has been designed to provide better quality and more ...