Linux Memory Management

The resource management for newly recreated child process by fork system call will be done in #202203251058. They will point to the same process structure that their parent is using. This is crucial for I/O instructions since copying the file contents into the child’s memory space can be costly. If the child wants to modify the process structure, #202204081225 will then copy the process structure and other necessary system resources for it to prevent #202112061109.

If one or more applications are using too much RAM, Out Of Memory (OOM) Killer will be summoned by the kernel in order to terminate those applications. This could be further fine tune by 202204071051# where we could set how much memory could one application used before it terminated by OOM Killer.

For virtual memory, #202204081225 can use either a file or dedicated partition for the paging in or out. The file or the partition are usually named as a swap.

Links to this page
  • Mach Memory Management

    If the user-level memory managers fail to perform page-out operation (usually when fail to reduce its resident sets of pages), Mach has a default manager, which has a similar interface to the user-level counterparts, that taking care of that issue. It will either use a file in the standard filesystem or a dedicated partition as a swap which is quite similar to 202202142236# (v2.5 only allow to use a file). The default manager uses the pageout daemon, a kernel thread which uses FIFO with second chance paging algorithm, for paging mechanism.

  • Linux
  • Difference between thread and processes

    In conjunction, even though Process# could create its own child processes, those processes does not necessarily share the same variable and PID. Furthermore, child processes will not be allocated to its parent’s memory space. They sometime will even occupy a separate system resources for themselves.

#operating-system #linux