1. an instance of a program, running with limited rights
  2. The operating system keeps track of the various processes on the computerusing a data structure
    process control block
  3. process elements
    • Machine instruction
    • Data
    • Heap
    • stack
  4. the difference between process and program
    • Program is a set of instructions given to the cpu to perform a specific task.
    • this execution of each line is regarded is process
  5. a sequence of instructions within a process
  6. Limited privileges
    Only those granted by the operating system kernel
    User mode
  7. Execution with the full privileges of the hardware
    Read/write to any memory, access any I/O device, read/write any disk sector, send/read any packet
    Kernel mode
  8. Available to kernel Not available to user code
    privileged instruction
  9. To make memory sharing safe, OS must configure the hardware to limit each process memory access to its boundary.
    memory protection
  10. is an asynchronous signal to the processor that some external event has occurred that may require its attention.
  11. The CPU constantly needs to read the keyboard latch memory location to see if a key is pressed
  12. is any procedure provided by kernel that can be called from user level.
    System calls
  13. Asynchronous, program-initiated control transfer from user to the OS in response to an exceptional event e.g. Divide by zero, segmentation fault
    processor exception
  14. From user mode to kernel mode
    • Interrupts
    • Exceptions
    • System calls (aka protected procedure call)
  15. From kernel mode to user mode
    • New process/new thread start
    • Return from interrupt, exception, system call
    • Process/thread context switch
    • User-level upcall (UNIX signal)
  16. the processor has a special register that points to an area of kernel memory
    Interrupt vector table
  17. interrupt handler
    is the term used for the procedure called by the kernel on an interrupt.
  18. The relationship between forked process and parent process
    We call the process creator the parent and the process being created, the child.
  19. You need to know how to create a process in Unix with fork( ).
    p i d =  f o r k ( ) ;
  20. run a new executable file in the current process
    execv( )
  21. wait for the child process to finish
    wait( )
  22. a system call that send a signal to a process, pid. If pid is greater than zero, the signal is sent to the process whose process ID is equal to pid. If pid is 0, the signal is sent to all processes, except system processes.
    kill( )
  23. to send a notification to another process
    signal( )
  24. Open returns a handle (file descriptor) for use in later calls on the file OS checks permission and sets up internal bookkeeping
    Open( )
  25. up to size bytes into buffer, from the file, channel, or device. returns the number of bytes actually read. For streaming devices this will often be less than size. For example, a read from the keyboard device will (normally) return all of its queued bytes.
  26. Analogous to read, write up to size bytes into kernel output buffer for a file, channel, or device. Write normally returns immediately but may stall if there is no space in the kernel buffer.
Card Set