Top 10 List of Week 06

  1. Zombie Process
    A zombie process or defunct process is a process that has completed execution but still has an entry in the process table. When a process ends via exit, all of the memory and resources associated with it are deallocated so they can be used by other processes. The parent can read the child’s exit status by executing the wait system call, whereupon the zombie is removed.

  2. Fork vs Thread
    The difference between forking and threading approaches is one of operating system architecture. A forked process is called a heavy-weight process, whereas a threaded process is called light-weight process. A forked process is considered a child process whereas a threaded process is called a sibling. Process switching requires the help of OS unlike thread switching.

  3. Fork Purpose
    fork() is used to create child process. It is for this reason operating system can do many things at the same time. Example is Google Chrome browser using fork to handle each page with within seperate process. This prevents the whole browser crashing when only one page crashes (also probably why it hogs so much RAM).

  4. Software Threads vs Hardware Threads
    Multi-core processors have more physical threads. It is true parallel because it is physically there. Whereas software threads are abstraction to the hardware to make multi-processing possible. Software multi-threading can actually run in single core (or single cpu thread) hence it is not true parallel.

  5. Fork vs Exec
    Both fork and exec are ways to create new processes. The fork call basically makes a duplicate of the current process. The exec call is a way to basically replace the entire current process with a new program. It loads the program into the current process space and runs it from the entry point.

  6. Context Switching
    A context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point. This allows multiple processes to share a CPU. It is essential feature for multitasking. Context swtiching is however very expensive.

  7. Process Scheduling
    Process Scheduling is an OS task that schedules processes of different states like ready, waiting, and running. Process scheduling allows OS to allocate a time interval of CPU execution for each process. Another important reason for using a process scheduling system is that it keeps the CPU busy all the time. This allows you to get the minimum response time for programs. Process scheduling is an essential part of a Multiprogramming operating systems.

  8. Concurrency vs Parallelism
    Concurrency means that an application is making progress on more than one task at the same time. Concurrency means executing multiple tasks at the same time but not necessarily simultaneously. Parallelism means that an application splits its tasks up into smaller subtasks which can be processed in parallel. Parallelism does not require two tasks to exist. It literally physically run parts of tasks OR multiple tasks, at the same time using the multi-core infrastructure of CPU.

  9. 2 Threads 1 Core
    The important part in hyperthreading is that the two logical processors share the same Execution engine. The units that make up the core are not duplicated. The gain of having more than 2 threads per core is not that much and its better to use more cores.

  10. Core Allocation
    The OS cannot split an individual single-threaded process across multiple cores. OS does not have the ability to determine which parts of the process are OK to run in parallel and which are not. If a program is not designed to run on parallel cores, you can have routines within the application that are designed to run sequentially running at the same time. This can cause all sorts of issues.