#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    Red face Context Switching In Operating System


    Process A with its address space and stack is currently being executed by the CPU and there is a system call to jump to a higher priority process B; the CPU needs to remember the current state of the process A so that it can suspend its operation, begin executing the new process B and when done, return to its previously executing process A.
    Now ,, let us suppose Process A is an audio file and Process B is some other file say a word file ,,
    When there is a system call to jump to Process B ,,the process A is suspended !

    Then how our audio file keeps playing even of suspending the process ???
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
    Buffering. Process A has buffered the audio output so unless process B deadlocks the system for a while there'll be enough time for A to continue where it left off before the buffer empties.

    [edit] Fun fact: my work laptop is just barely capable of letting me work and the hard drive is probably on its last legs, so when I listen to YouTube and try something strenuous it can lock up for a second or two until it finishes. During that time the audio buffer will completely flush and I'll get hiccups.
    Last edited by requinix; January 16th, 2013 at 07:26 PM.

IMN logo majestic logo threadwatch logo seochat tools logo