Virtual Memory
-
Buddy System Allocator
- Slab Allocator
-
memory-management unit (MMU)
Slab Allocator
一个Slab有一个或多个连续页,并划分成相同大小的对象
Three possible states:
- Full: all objects are allocated
- Partial: some objects are allocated, some are free
- Empty: all objects are free
Virtual Addresses
Linux特性:
- kernel使用virtual memory(但并非所有操作系统都一样)
- 虚拟地址空间被划分,高位被kernel使用,低位被User使用
MMU
负责实现虚拟地址的硬件
File System Interface
File is a contiguous logical address space for storing information
File Attributes
文件系统:路径
Meta-data
Create: - Entry in directory
Open: - return a handler for other operations
read/write: need to maintain a pointer
delete: - Hardlink:maintain a counter
truncate:delete a dile but maintains its attributes
Per-process table: current location pointer, access rights
System-wide table : location on the disk
File Structure
解析者决定文件格式