Linux Memory Issues

pdf
Số trang Linux Memory Issues 25 Cỡ tệp Linux Memory Issues 76 KB Lượt tải Linux Memory Issues 0 Lượt đọc Linux Memory Issues 0
Đánh giá Linux Memory Issues
4.8 ( 20 lượt)
Nhấn vào bên dưới để tải tài liệu
Đang xem trước 10 trên tổng 25 trang, để tải xuống xem đầy đủ hãy nhấn vào bên trên
Chủ đề liên quan

Nội dung

Linux Memory Issues An introduction to some low-level and some high-level memory management concepts Some Architecture History • • • • • • 8080 (late-1970s) 16-bit address (64-KB) 8086 (early-1980s) 20-bit address (1-MB) 80286 (mid-’80s) 24-bit address (16-MB) 80386 (late-’80s) 32-bit address (4-GB) 80686 (late-’90s) 36-bit address (64-GB) Core2 (mid-2000s) 40-bit address (1-TB) ‘Backward Compatibility’ • • • • • • • Many buyers resist ‘early obsolescence’ New processors need to run old programs Early design-decisions leave their legacy 8086 could run recompiled 8080 programs 80x86 can still run most 8086 applications Win95/98 could run most MS-DOS apps But a few areas of incompatibility existed Linux must accommodate legacy • • • • • • • Legacy elements: hardware and firmware CPU: reset-address and interrupt vectors ROM-BIOS: data area and boot location Display Controllers: VRAM & video BIOS Support chipsets: 15MB ‘Memory Window’ DMA: 24-bit memory-address bus SMP: combined Local and I/O APICs Other CPU Architectures • Besides IA-32, Linux runs on other CPUs (e.g., PowerPC, MC68000, IBM360, Sparc) • So must accommodate their differences – Memory-Mapped I/O – Wider address-buses – Non-Uniform Memory Access (NUMA) Nodes, Zones, and Pages • • • • • Nodes: to accommodate NUMA systems However 80x86 doesn’t support NUMA So on 80x86 Linux uses just one ‘node’ Zones: to accommodate distinct regions Three ‘zones’ on 80x86: – ZONE_DMA – ZONE_NORMAL – ZONE_HIGHMEM (memory below 16-MB) (from 16-MB to 896-MB) (memory above 896-MB) Zones divided into Pages • • • • 80x86 supports 4-KB page-frames Linux uses an array of ‘page descriptors’ Array of page descriptors: ‘mem_map[]’ physical memory is ‘mapped’ by CPU How 80x86 Addresses RAM • Two-stages: ‘segmentation’ plus ‘paging’: – First: logical address  linear address – Then: linear address  physical address • CPU employs special caches: – Segment-registers contain ‘hidden’ fields – Paging uses ‘Translation Lookaside Buffer’ Logical to Linear segment-register virtual address-space operand-offset selector global descriptor table descriptor GDTR base-address and segment-limit memory segment Segment Descriptor Format 31 0 Base[ 31..24 ] Base[ 15..0 ] Limit [19..16 ] Base[ 23..16 ] Limit[ 15..0 ]
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.