0

Suppose I move file from Drive C to D.
If I set the environment such OS will schedule processes as preemptive scheduling, would it be affect the speed of moving file?

I have heard that moving file is held in kernel, and while kernel(=OS) is still a process, my answer was yes as context-switch could occurred.

Am I right? If I am wrong, I would like to know what I am missing.

jadon
  • 29
  • 4
  • Try it. Copy/move a large file on a box that is essentially idle, then load it up with apps and try again. Time the move. Moving/copying takes relatively little CPU, but lots of I/O. Threads made ready by I/O completion interrupts are often given a temporary priority boost, and I suspect that the delay will be less than you might suspect. – Martin James Aug 03 '21 at 04:02

1 Answers1

-1

Yes, it would because whole notion of preemptive scheduling is around if process is allowed to take out from ready queue before it completes.

and this would not matter just to mv command but to any other process which would take context to kernel. But we have downside that like starvation based on CPU burst time etc

tej parkash
  • 137
  • 2
  • If there are fewer ready threads than cores, there may be no preemption, so no preemptive delay. An unqualified 'Yes' is therefore incorrect. – Martin James Aug 04 '21 at 13:09