Threads and processes:
A computer will often appear to be doing many things simultaneously, such as checking for new e‐mail messages, saving a Word document, and loading a website. Each program is a separate “process”. Each process has one or more “threads”. If a process has several threads, they appear to run simultaneously. For example, an email client may have one thread that checks for new e‐mail messages and one thread for the GUI so that it can show a button being pressed. In fact, only one thread is being run at any given time. The processor switches between threads so quickly that they appear to be running simultaneously. Multiple threads in a single process have access to the same memory. By contrast, multiple processes have separate regions of memory and can only communicate by special mechanisms. The processor loads and saves a separate set of registers for each thread. Remember, each process has one or more threads, and the processor switches between threads.
A computer will often appear to be doing many things simultaneously, such as checking for new e‐mail messages, saving a Word document, and loading a website. Each program is a separate “process”. Each process has one or more “threads”. If a process has several threads, they appear to run simultaneously. For example, an email client may have one thread that checks for new e‐mail messages and one thread for the GUI so that it can show a button being pressed. In fact, only one thread is being run at any given time. The processor switches between threads so quickly that they appear to be running simultaneously. Multiple threads in a single process have access to the same memory. By contrast, multiple processes have separate regions of memory and can only communicate by special mechanisms. The processor loads and saves a separate set of registers for each thread. Remember, each process has one or more threads, and the processor switches between threads.