0
$\begingroup$

If we start a new process with

exec('process-2')

Does this cause an immediate context switch in order to halt the current process and then start the new 'process-2'?

Edit: This is a theoretical question with no specific OS intended, but you suppose it's some UNIX like OS.

There is no specific details about exec, the only thing I know is that exec halts the current program execution and executes the other program.

Also the assumption here is that we are using a uni processor system.

$\endgroup$
  • $\begingroup$ (What does the specification say about exec()? What about a multi-processor environment?) $\endgroup$ – greybeard Nov 19 '19 at 22:35
  • $\begingroup$ What OS are you on? $\endgroup$ – ghellquist Nov 21 '19 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.