notes

Personal notes
git clone git://git.laack.co/notes.git
Log | Files | Refs

Process.md (1379B)


      1 # Process
      2 
      3 **Source:** CS 6200
      4 
      5 **Chapter:** P2L1
      6 
      7 **Definition:** A process is an instance of an executing program.
      8 
      9 ## Specifics
     10 
     11 Each process has its own virtual address space.
     12 
     13 ## States
     14 
     15 The below is a list where the first layer is the state and the second layer transitions.
     16 
     17 - New
     18     - Admitting
     19         - Processes start in the new state. This is when the OS determines if it's okay to start the process by allocating the PCB and other init resources. The OS then moves the process to the ready state.
     20 - Ready
     21     - Scheduler dispatch
     22         - Scheduler gives CPU to the ready process
     23 - Running
     24     - I/O or event wait
     25         - Enters waiting state while CPU isn't needed by the process
     26     - Exit
     27         - Finishes execution and returns status code
     28     - Interrupt
     29         - Moves back to ready state for context switching
     30 - Waiting
     31     - I/O or event completion
     32 - Terminated
     33 
     34 ## Process Creation
     35 
     36 Processes can create child processes. Most operating systems start with some privileged processes (root processes) which then start child processes that are unprivileged.
     37 
     38 The main child creation processes are
     39 
     40 1. Fork
     41     - Creates a new child process and (mostly) copies the parent PCB into the child PCB
     42         - There are necessary distinctions between the processes so they can identify themselves
     43 2. Exec
     44     - Replaces the current process's PCB with a new one