Linux Basics Practice Test: Memory Management — Flashcards | Linux | FatSkills

Linux Basics Practice Test: Memory Management — Flashcards

Fast review mode: answers are shown by default so you can skim quickly. Hide them if you want to self-test.

Linux memory management involves allocating and freeing physical memory, including pages, groups of pages, and small blocks of main memory. It also handles virtual memory, which is memory mapped into the address space of running processes. Virtual memory provides an abstraction for physical memory details from the application software, stores only needed information in the physical memory, and protects and controls data sharing between processes. 

Linux memory management uses demand paging to load executable images into a process's virtual memory. When a command is executed, the file containing it is opened and its contents are mapped into the process's virtual memory. Only the first part of the image is brought into physical memory, and the rest is left on disk. As the image executes, it generates page faults, and Linux uses the process's memory map to determine which parts of the image to bring into memory for execution. 

Linux provides a variety of APIs for memory allocation. For example, you can allocate small chunks using kmalloc or kmem_cache_alloc families, large virtually contiguous areas using vmalloc and its derivatives, or you can directly request pages from the page allocator with alloc_pages. 

Here are some ways to manage Linux memory:
Remove unnecessary files:
Use the rm command to remove files that are no longer needed
Compress files: Use tools such as ` gzip` and tar to compress files
Use a disk quota system: Limit the amount of disk space users can use
Create a swap partition: Use this as virtual memory for your server
Create a ramdisk: Use this for application caching or work areas
Protect open ports: Protect open ports
Turn off or stop services not in use: Turn off or stop services not in use 

1 of 14 Ready
On x86-32 Linux, at which address the code segment of the program starts?
0x08048000
Shortcuts
Prev Space Show / hide Next
Turn this into a study set.
Sign in with Google to save tricky questions to your reminder list and resume on any device.
Sign in with Google Free • no extra password