1. Storage Managementhistorical

    1. What Is Memory Management? Manage the computer's memory. 2. Memory Allocation and Reclamation Memory Allocation and Reclamation 3. Memory Management Schemes 3.1. Segmentation and Paging Segmentation and Paging 3.2. Virtual Memory Virtual Memory

  2. Virtual Memoryhistorical

    [toc] 1. Why Virtual Memory Is Needed To solve the problem of insufficient physical memory. For example, if we have a 16GB game but only 4GB of physical memory, how can it run? Traditional memory management has two problems: A job must be loaded into

  3. Memory Allocation and Reclamationhistorical

    [toc] 1. Memory Allocation There are three main allocation methods: 1.1. Single Contiguous Allocation Can only be used in single user, single process operating systems. Memory is divided into a system area and a user area. The system area is used to

  4. Segmentation and Paginghistorical

    1. Address Space 1.1. Physical Address Space To better manage memory, the operating system assigns an address to every byte of memory, forming the physical address space. The maximum size of this space is the size of memory. 1.2. Virtual Address Spac

  5. Linux Memory Managementhistorical

    1. Linux Memory Management 2. Swap Space It is a partition on disk. When Linux memory is full, some memory is swapped to the Swap space. 2.1. Swap Space vs Virtual Memory Swap Space Virtual Memory Exists on disk Exists on disk Swapped with main memor

  6. Page Replacementhistorical

    1. What Is It? Page replacement algorithms are similar to cache eviction policies. The former solve a capacity problem, while the latter solve a speed problem. Cache eviction policy: memory can be viewed as a cache for disk. Data that will be used sh

  7. System Callshistorical

    1. What Is a System Call? Call APIs provided by the operating system in a way similar to a function call. 2. System Call vs Function Call System Call Function Call CPU mode Kernel mode User mode Calling method Integer number Function name Parameter p

  8. I/O Modelshistorical

    [toc] 1. Synchronous vs Asynchronous When an application invokes a system call, who handles the process? In the former, I ask you Synchronous means the application handles it itself. In the latter, you notify me Asynchronous means the operating syste

  9. select, poll, epollhistorical

    1. select Several major disadvantages of select: Every time select is called, the fd set needs to be copied from user space to kernel space. This overhead becomes large when there are many fds. At the same time, each select call requires the kernel t

  10. I/Ohistorical

    1. What Is a File? A file consists of a sequence of bytes. Under Linux, everything is a file. All I/O devices are files. /dev/sda2 (/usr disk partition) /dev/tty2 (terminal) The kernel is also a file. /boot/vmlinuz 3.13.0 55 generic (kernel image) /p