I have got some free time on my hand and operating systems sounds like an interesting thing to read up on. I picked OPERATING SYSTEM CONCEPTS by SILBERSCHATZ, GALVIN and GAGNE because someone on Twitter recommended it.
A process is the unit of work in a modern time-sharing system. Informally, a process is a job that the computer must complete.
A process is an active entity where as a program is an passive entity. A program becomes a process when an executable file is loaded into memory.
A process usually includes:

  • program code - text section
  • program counter - includes the current activity
  • process stack - contains temporary data (such as function parameters, return addresses and local variables)
  • data section - contains global variables
  • heap - memeory dynamicall allocated during process runtime

    ####Process in memory



    Stack is a Last In First Out (LIFO) data structure. Frequently used with function calls.
    For x86 CPU's the stack starts out at high memory addresses and grows downwards (as shown by the arrow in the figure above). When a program exceeds all of the space allocated for the stack the program crashes beacuse of stackoverflow (Now I know how stackoverflow got its name).
    Stacks usually allow two operations: push and pop. Push is adding items to the top of the stack and pop is removing items from the top of the stack. Inserting or removing items from the middle of the stack is not permitted.
    [There's a great animation by Delroy A. Brinkerhoff](https://icarus.cs.weber.edu/~dab/cs1410/textbook/4.Pointers/memory.html)
    Heap memory is dynamically allocated by the program. Here there is no restriction that memory can only be accessed at the top. Data can be inserted or removed from anywhere in the heap. ###Interprocess Communication A process is independent if it cannot affect or be affected by the other processes executing in the system.