Questions tagged [context-switch]

A context switch is the process of storing and restoring the state (context) of a process.

In computing, a context switch is the process of storing and restoring the state (context) of a process so that execution can be resumed from the same point at a later time. This enables multiple processes to share a single CPU and is an essential feature of a multitasking operating system. What constitutes the context is determined by the processor and the operating system.

313 questions
0
votes
2 answers

When do process switching takes place

I am confused about the process switching between two processes. When a new process is created using fork, what are the general rules applicable for switching between processes. Is it only when one processes goes to idle state? I have few…
user567879
  • 5,139
  • 20
  • 71
  • 105
0
votes
1 answer

Running a function right after each context switch, in C under windows-XP

I'm programming a multithreading application in C under windows-XP. I'm looking for a way to run a function, right after each context-switch between threads of the application (and just before the starting of the new thread). To be more precise, I…
Nir S.
  • 53
  • 5
0
votes
1 answer

ZF2 equivalent of Zend_Controller_Action_Helper_ContextSwitch?

I cannot find something similar in Zend Framework 2.
ilhan
  • 8,700
  • 35
  • 117
  • 201
0
votes
1 answer

Overriden timer interrupt not working properly

I am working on a small kernel as a project for my University. I have overridden (not sure if that's the correct expression) a timer interrupt routine. It works well until the first context switching. Context switching is in dispatch() which is…
Invader Zim
  • 796
  • 2
  • 14
  • 39
0
votes
1 answer

Why synchronization requires a context switch down to the OS?

I was watching a presentation on high performance computing and starting at 24:55 one of the presenter states that synchronization by acquiring a lock requires a context switch down to the kernel of the OS (not even the one of the virtual machine,…
wishihadabettername
  • 14,231
  • 21
  • 68
  • 85
0
votes
1 answer

how to force context switching in embedded development kit

i learn these days about embedded development with multi processors, and i wanted to ask if it is possible to force a context switching in debug mode, to access a specific thread i want?. and if it is possible, is there a way to do this through the…
0
votes
2 answers

how quick can the processor handle the interrupts

I was studying about interrupts. So most architecture are interrupt driven, if everything is interrupt driven, how fast the processor can handle all of those. For example, while pressing a key board keys, it creates an interrupt asking the kernel to…
-1
votes
1 answer

Why is the context not saved in the process itself instead of the PCB?

I have read that when a context switch happens, the context of that particular process will be saved in the process control block. But I wonder why the context couldn't be saved in the process itself so the CPU only had to remind itself which…
NimaJan
  • 162
  • 1
  • 13
-1
votes
1 answer

Context switch interrupt handler

Which interrupt handler is responsible for context switching in multitasking system? Sorry for my English.
Nik Novák
  • 569
  • 1
  • 9
  • 24
-1
votes
1 answer

relation between warp scheduling and warp context switching in Cuda

As far as I understand, a ready warp is a warp that can be executed in warp scheduling. A waiting warp is waiting for source operands to be fetched or computed so that it can't be executed. Warp scheduler chooses a ready warp to execute for "warp…
LongY
  • 168
  • 1
  • 11
-1
votes
2 answers

DIFFERENT TASKS ASSIGNED TO DIFFERENT INSTANCES OF FORK() OF A PROCESS IN C

Can I assign different task to different instances of fork() of a process in C ? like for example: program.c has been forked 3 times int main() { pid_t pid; pid = fork(); pid = fork(); pid = fork(); } now to every instance of fork()…
Shayan Ahmad
  • 952
  • 8
  • 17
-1
votes
1 answer

Thread context switch in one process & two processes

Is it faster to context-switch between two threads within the same process THAN to context switch between two threads within 2 different processes?
Rouki
  • 2,239
  • 1
  • 24
  • 41
-1
votes
1 answer

Too many or too few context switches undesirable for computer system?

I would like to know why too many or too few context switches would be undesirable in a computer system, would be really grateful if someone knew and could explain it to me. thanks
1 2 3
20
21