This document outlines the agenda and content for a talk on basics of Linux memory management. The talk will cover physical memory overview, the memory management unit, memory nodes and zones, boot time memory management, and memory allocation techniques including SLOB, SLAB, and SLUB allocators. It will also discuss the userspace memory allocator.
The document provides a history of updates to the 7-Zip file compression software from version 4.65 in 2009 to version 4.18 beta in 2005. Major updates include support for additional archive formats, encryption methods, bug fixes, speed optimizations, and localization additions. Each version listing includes release date and brief descriptions of changes and improvements made in that version.
The document discusses Linux memory management, describing how physical memory is divided into page frames and virtual memory allows processes to have a virtual view of memory mapped to physical memory using page tables, and covers topics like memory overcommit, page cache, swap space, and tools for monitoring memory usage.
The document discusses memory hierarchy and caching techniques used to improve memory access performance. It explains that caches exploit locality by copying frequently accessed data from slower memory to faster caches closer to the CPU. The basics of direct-mapped caches are described, including tags, valid bits, hits, and misses. Write policies like write-through and write-back are covered. Associativity and replacement policies in set-associative caches are also summarized.
Linux memory consumption - Why memory utilities show a little amount of free RAM? How does Linux kernel utilizes free RAM? What is the real amount of free RAM in the system?
This document discusses backup, restore, and disaster recovery options for MongoDB databases. It covers topics such as mongodump for backups, filesystem snapshots, replication for disaster recovery, and restoration procedures for both online and offline servers. Tips are provided for mongodump/restore operations and cleaning up snapshots.
The document discusses memory hierarchies and cache performance. It explains that caches exploit locality by copying frequently accessed data from slower memory into faster caches. It then describes the basic structure of direct-mapped caches, including tags and valid bits. It also covers cache hits, misses, and replacement policies. Finally, it discusses techniques for measuring cache performance, including miss rates, miss penalties, and average memory access time.
The document discusses memory hierarchy and caching techniques used in computer systems. It covers concepts like multilevel caches, virtual memory, translation lookaside buffers (TLBs), page tables, and cache design tradeoffs. It also discusses how these techniques are applied in virtual machine environments to improve isolation between guest and host systems.
The document provides an overview of using Automatic Workload Repository (AWR) for memory analysis in an Oracle database. It discusses various memory structures like the database buffer cache, shared pool, and process memory. It outlines signs of memory issues and describes analyzing the top waits, load profile, instance efficiency, SQL areas, and other AWR report sections to identify and address performance problems related to memory configuration and usage.
The document provides a history of updates to the 7-Zip file compression software from version 4.65 in 2009 to version 4.18 beta in 2005. Major updates include support for additional archive formats, encryption methods, bug fixes, speed optimizations, and localization additions. Each version listing includes release date and brief descriptions of changes and improvements made in that version.
The document discusses Linux memory management, describing how physical memory is divided into page frames and virtual memory allows processes to have a virtual view of memory mapped to physical memory using page tables, and covers topics like memory overcommit, page cache, swap space, and tools for monitoring memory usage.
The document discusses memory hierarchy and caching techniques used to improve memory access performance. It explains that caches exploit locality by copying frequently accessed data from slower memory to faster caches closer to the CPU. The basics of direct-mapped caches are described, including tags, valid bits, hits, and misses. Write policies like write-through and write-back are covered. Associativity and replacement policies in set-associative caches are also summarized.
Linux memory consumption - Why memory utilities show a little amount of free RAM? How does Linux kernel utilizes free RAM? What is the real amount of free RAM in the system?
This document discusses backup, restore, and disaster recovery options for MongoDB databases. It covers topics such as mongodump for backups, filesystem snapshots, replication for disaster recovery, and restoration procedures for both online and offline servers. Tips are provided for mongodump/restore operations and cleaning up snapshots.
The document discusses memory hierarchies and cache performance. It explains that caches exploit locality by copying frequently accessed data from slower memory into faster caches. It then describes the basic structure of direct-mapped caches, including tags and valid bits. It also covers cache hits, misses, and replacement policies. Finally, it discusses techniques for measuring cache performance, including miss rates, miss penalties, and average memory access time.
The document discusses memory hierarchy and caching techniques used in computer systems. It covers concepts like multilevel caches, virtual memory, translation lookaside buffers (TLBs), page tables, and cache design tradeoffs. It also discusses how these techniques are applied in virtual machine environments to improve isolation between guest and host systems.
The document provides an overview of using Automatic Workload Repository (AWR) for memory analysis in an Oracle database. It discusses various memory structures like the database buffer cache, shared pool, and process memory. It outlines signs of memory issues and describes analyzing the top waits, load profile, instance efficiency, SQL areas, and other AWR report sections to identify and address performance problems related to memory configuration and usage.
SnapDrive allows creation of different storage entities like LUNs, filesystems, host volumes, and disk groups. The document provides step-by-step instructions to create a LUN entity using SnapDrive. This involves first creating a LUN on the NetApp filer and then using local volume management tools like LVM to manage the LUN. Commands to create a LUN on the NetApp storage system darfas01 and volume centos_iscsi are shown.
This document discusses memory hierarchy design and optimization. It describes the different levels of memory from fastest to slowest as registers, cache, main memory, disk storage, and back storage. The goal of the memory hierarchy is to provide fast memory access at a low cost per byte. It explains principles like locality of reference, cache block structure, hit/miss rates, and causes of cache misses. Basic optimizations discussed include increasing block size, cache size, associativity, and using multiple cache levels to reduce miss rates and penalties. Address translation through virtual memory and the translation lookaside buffer are also summarized.
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12sidg75
The document discusses garbage collection, tuning, and monitoring the Java Virtual Machine (JVM) in Oracle E-Business Suite 11i and R12. It begins by introducing garbage collection and its role in memory management. It then covers key garbage collection concepts like generations, collectors, and metrics for measurement. The document also lists some notable JVM parameters and provides guidance on monitoring the JVM. It concludes by mentioning future changes related to the JRockit JVM.
HBase Accelerated introduces an in-memory flush and compaction pipeline for HBase to improve performance of real-time workloads. By keeping data in memory longer and avoiding frequent disk flushes and compactions, it reduces I/O and improves read and scan latencies. Evaluation on workloads with high update rates and small working sets showed the new approach significantly outperformed the default HBase implementation by serving most data from memory. Work is ongoing to further optimize the in-memory representation and memory usage.
This document discusses techniques for storing container files more densely using shared templates and deduplication. It introduces PFCache, a user-space caching mechanism that sits on top of PLoop devices to deduplicate page cache and IO between container templates. Evaluation results show PFCache improves density. Future work includes upstreaming PLoop and exploring additional IO deduplication techniques in the Linux kernel for containers.
The document provides an introduction to operating systems and key concepts such as processes, virtual memory, and multitasking. It discusses how the CPU uses registers to perform computations and access memory. It explains that an operating system allows multiple programs to run simultaneously through time-slicing and context-switching between processes. Each process has its own virtual address space and sees its own "virtual machine" presented by the operating system.
This document provides an overview of kernel tuning and customizing for performance on Enterprise Linux. It discusses monitoring tools, basic tuning steps like disabling unused services, memory tuning including hugepages and transparent huge pages, swap/cache tuning. It also covers I/O and filesystem tuning and networking tuning. The goal is to provide concepts and approaches for tuning the major components to optimize performance.
Linux Memory Management with CMA (Contiguous Memory Allocator)Pankaj Suryawanshi
Fundamentals of Linux Memory Management and CMA (Contiguous Memory Allocator) In Linux.
Virtual Memory, Physical Memory, Swap Space, DMA, IOMMU, Paging, Segmentation, TLB, Hugepages, Ion google memory manager
Domino memory is composed of shared and private memory pools. Shared memory is available to all Domino tasks, while private memory is allocated to individual tasks. The NSF buffer pool caches frequently accessed databases in shared memory. Memory dumps and memstats reports can be used to diagnose memory leaks by identifying continually increasing memory addresses over time. The DEBUG_TRAPLEAKS and DEBUG_SHOWLEAKS parameters can help trap specific memory leaks.
This document discusses using PFCache to improve storage density for container files by deduplicating identical data. PFCache uses a cache area to store deduplicated file contents, referenced via cache links in container image files. Evaluation showed PFCache improved storage density. Future work includes upstreaming PLoop for containers and pursuing IO deduplication in the Linux kernel for additional benefits.
Denser containers with PF cache - Pavel EmelyanovOpenVZ
This document discusses using PFCache to improve storage density for container files by deduplicating identical data. PFCache uses a cache area to store deduplicated file contents, referenced via cache links in container image files. Evaluation showed PFCache improved storage density. Future work includes upstreaming PLoop for containers and pursuing IO deduplication in the Linux kernel for additional benefits.
MySQL Performance - SydPHP October 2011Graham Weldon
A talk on optimisations around MySQL on the server side, and through the use of PHP extensions to reduce disk writes to provide for more IO access for MySQL. This was presented at SydPHP in October 2011
The document discusses CPU caching concepts. It explains that caches are faster but smaller memories that store copies of frequently accessed data from main memory, due to principles of locality of reference and the speed gap between CPUs and memory. The document outlines cache hierarchy levels, organization, mapping techniques, handling cache misses through replacement policies, updating policies for writes, issues of stale data, and modern research areas like cache coherence for multicore CPUs.
This document defines common units of measurement for digital memory and storage. It explains that a byte is 8 bits, and larger units like kilobytes and megabytes are multiples of bytes. It describes how memory is addressed in computers and how this has increased from 20 to 32 to 64 bits. It also outlines different types of memory like RAM, ROM, cache and how data is organized and stored on hard disks in sectors and tracks.
The document discusses various aspects of disk management in computer systems, including disk structure, disk scheduling, disk formatting, boot blocks, bad block recovery, swap space management, and the file system and I/O management in Windows 2000. Specifically, it covers topics like logical vs physical disk addressing, seek and rotational latency, improving access time through scheduling, low-level vs logical formatting, bootstrapping from disk, handling defective sectors, allocating and managing virtual memory using swap space, and the role of the kernel, virtual memory manager, and I/O manager in Windows 2000.
This document discusses using logical volume management (LVM) with MySQL for enterprise storage. Some key points include:
- LVM allows virtualizing storage into logical volumes mapped to physical disks, enabling features like snapshots and clones for backups and replication.
- Snapshots provide point-in-time copies while clones are writable copies, both using copy-on-write to avoid duplicating data.
- Backing up MySQL with snapshots is fast, and recovery involves reverting the logical volumes rather than restoring files. Replication slaves can be quickly recloned from snapshots.
- With shared storage, replication slaves maintain the same blocks as the master for efficient scaling and resyncing slaves by recloning
This document provides an overview of storage best practices in oVirt, including oVirt storage domains, manual tiering across different storage types, volume types and allocation policies, and single disk snapshots. It discusses using different storage domains like NFS, iSCSI, Fibre Channel for manual tiering to choose the best storage. It also covers volume types, allocation policies of preallocated vs thin provisioning, and using QCOW2 format for snapshots. Finally, it describes how oVirt implements single disk snapshots using logical volume manager (LVM).
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
SnapDrive allows creation of different storage entities like LUNs, filesystems, host volumes, and disk groups. The document provides step-by-step instructions to create a LUN entity using SnapDrive. This involves first creating a LUN on the NetApp filer and then using local volume management tools like LVM to manage the LUN. Commands to create a LUN on the NetApp storage system darfas01 and volume centos_iscsi are shown.
This document discusses memory hierarchy design and optimization. It describes the different levels of memory from fastest to slowest as registers, cache, main memory, disk storage, and back storage. The goal of the memory hierarchy is to provide fast memory access at a low cost per byte. It explains principles like locality of reference, cache block structure, hit/miss rates, and causes of cache misses. Basic optimizations discussed include increasing block size, cache size, associativity, and using multiple cache levels to reduce miss rates and penalties. Address translation through virtual memory and the translation lookaside buffer are also summarized.
Garbage Collection, Tuning And Monitoring JVM In EBS 11i And R12sidg75
The document discusses garbage collection, tuning, and monitoring the Java Virtual Machine (JVM) in Oracle E-Business Suite 11i and R12. It begins by introducing garbage collection and its role in memory management. It then covers key garbage collection concepts like generations, collectors, and metrics for measurement. The document also lists some notable JVM parameters and provides guidance on monitoring the JVM. It concludes by mentioning future changes related to the JRockit JVM.
HBase Accelerated introduces an in-memory flush and compaction pipeline for HBase to improve performance of real-time workloads. By keeping data in memory longer and avoiding frequent disk flushes and compactions, it reduces I/O and improves read and scan latencies. Evaluation on workloads with high update rates and small working sets showed the new approach significantly outperformed the default HBase implementation by serving most data from memory. Work is ongoing to further optimize the in-memory representation and memory usage.
This document discusses techniques for storing container files more densely using shared templates and deduplication. It introduces PFCache, a user-space caching mechanism that sits on top of PLoop devices to deduplicate page cache and IO between container templates. Evaluation results show PFCache improves density. Future work includes upstreaming PLoop and exploring additional IO deduplication techniques in the Linux kernel for containers.
The document provides an introduction to operating systems and key concepts such as processes, virtual memory, and multitasking. It discusses how the CPU uses registers to perform computations and access memory. It explains that an operating system allows multiple programs to run simultaneously through time-slicing and context-switching between processes. Each process has its own virtual address space and sees its own "virtual machine" presented by the operating system.
This document provides an overview of kernel tuning and customizing for performance on Enterprise Linux. It discusses monitoring tools, basic tuning steps like disabling unused services, memory tuning including hugepages and transparent huge pages, swap/cache tuning. It also covers I/O and filesystem tuning and networking tuning. The goal is to provide concepts and approaches for tuning the major components to optimize performance.
Linux Memory Management with CMA (Contiguous Memory Allocator)Pankaj Suryawanshi
Fundamentals of Linux Memory Management and CMA (Contiguous Memory Allocator) In Linux.
Virtual Memory, Physical Memory, Swap Space, DMA, IOMMU, Paging, Segmentation, TLB, Hugepages, Ion google memory manager
Domino memory is composed of shared and private memory pools. Shared memory is available to all Domino tasks, while private memory is allocated to individual tasks. The NSF buffer pool caches frequently accessed databases in shared memory. Memory dumps and memstats reports can be used to diagnose memory leaks by identifying continually increasing memory addresses over time. The DEBUG_TRAPLEAKS and DEBUG_SHOWLEAKS parameters can help trap specific memory leaks.
This document discusses using PFCache to improve storage density for container files by deduplicating identical data. PFCache uses a cache area to store deduplicated file contents, referenced via cache links in container image files. Evaluation showed PFCache improved storage density. Future work includes upstreaming PLoop for containers and pursuing IO deduplication in the Linux kernel for additional benefits.
Denser containers with PF cache - Pavel EmelyanovOpenVZ
This document discusses using PFCache to improve storage density for container files by deduplicating identical data. PFCache uses a cache area to store deduplicated file contents, referenced via cache links in container image files. Evaluation showed PFCache improved storage density. Future work includes upstreaming PLoop for containers and pursuing IO deduplication in the Linux kernel for additional benefits.
MySQL Performance - SydPHP October 2011Graham Weldon
A talk on optimisations around MySQL on the server side, and through the use of PHP extensions to reduce disk writes to provide for more IO access for MySQL. This was presented at SydPHP in October 2011
The document discusses CPU caching concepts. It explains that caches are faster but smaller memories that store copies of frequently accessed data from main memory, due to principles of locality of reference and the speed gap between CPUs and memory. The document outlines cache hierarchy levels, organization, mapping techniques, handling cache misses through replacement policies, updating policies for writes, issues of stale data, and modern research areas like cache coherence for multicore CPUs.
This document defines common units of measurement for digital memory and storage. It explains that a byte is 8 bits, and larger units like kilobytes and megabytes are multiples of bytes. It describes how memory is addressed in computers and how this has increased from 20 to 32 to 64 bits. It also outlines different types of memory like RAM, ROM, cache and how data is organized and stored on hard disks in sectors and tracks.
The document discusses various aspects of disk management in computer systems, including disk structure, disk scheduling, disk formatting, boot blocks, bad block recovery, swap space management, and the file system and I/O management in Windows 2000. Specifically, it covers topics like logical vs physical disk addressing, seek and rotational latency, improving access time through scheduling, low-level vs logical formatting, bootstrapping from disk, handling defective sectors, allocating and managing virtual memory using swap space, and the role of the kernel, virtual memory manager, and I/O manager in Windows 2000.
This document discusses using logical volume management (LVM) with MySQL for enterprise storage. Some key points include:
- LVM allows virtualizing storage into logical volumes mapped to physical disks, enabling features like snapshots and clones for backups and replication.
- Snapshots provide point-in-time copies while clones are writable copies, both using copy-on-write to avoid duplicating data.
- Backing up MySQL with snapshots is fast, and recovery involves reverting the logical volumes rather than restoring files. Replication slaves can be quickly recloned from snapshots.
- With shared storage, replication slaves maintain the same blocks as the master for efficient scaling and resyncing slaves by recloning
This document provides an overview of storage best practices in oVirt, including oVirt storage domains, manual tiering across different storage types, volume types and allocation policies, and single disk snapshots. It discusses using different storage domains like NFS, iSCSI, Fibre Channel for manual tiering to choose the best storage. It also covers volume types, allocation policies of preallocated vs thin provisioning, and using QCOW2 format for snapshots. Finally, it describes how oVirt implements single disk snapshots using logical volume manager (LVM).
Similar to Yet another talk_about_basics_in_linux_memory(1) (20)
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
বাংলাদেশের অর্থনৈতিক সমীক্ষা ২০২৪ [Bangladesh Economic Review 2024 Bangla.pdf] কম্পিউটার , ট্যাব ও স্মার্ট ফোন ভার্সন সহ সম্পূর্ণ বাংলা ই-বুক বা pdf বই " সুচিপত্র ...বুকমার্ক মেনু 🔖 ও হাইপার লিংক মেনু 📝👆 যুক্ত ..
আমাদের সবার জন্য খুব খুব গুরুত্বপূর্ণ একটি বই ..বিসিএস, ব্যাংক, ইউনিভার্সিটি ভর্তি ও যে কোন প্রতিযোগিতা মূলক পরীক্ষার জন্য এর খুব ইম্পরট্যান্ট একটি বিষয় ...তাছাড়া বাংলাদেশের সাম্প্রতিক যে কোন ডাটা বা তথ্য এই বইতে পাবেন ...
তাই একজন নাগরিক হিসাবে এই তথ্য গুলো আপনার জানা প্রয়োজন ...।
বিসিএস ও ব্যাংক এর লিখিত পরীক্ষা ...+এছাড়া মাধ্যমিক ও উচ্চমাধ্যমিকের স্টুডেন্টদের জন্য অনেক কাজে আসবে ...
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
This presentation was provided by Steph Pollock of The American Psychological Association’s Journals Program, and Damita Snow, of The American Society of Civil Engineers (ASCE), for the initial session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session One: 'Setting Expectations: a DEIA Primer,' was held June 6, 2024.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
1. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Yet another talk about basics in Linux
Memory
Vasyl Gomonovych
2020
2. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Agenda
I Physical Memory Overview
I Memory Management Unit
I Memory Nodes, Zones, Frames
I Boot time memory management
I Memblock
I Bootmem
I Physical memory allocation
I Slab allocator
I Userspace allocator
3. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Overview
4. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Virtual Memory
5. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Physical Memory Hierarchy
6. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Physical Memory Segmentation
7. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Memory Banks
8. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit
9. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit
10. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit access
I Cp15:c1:c0 -¿ MCR p15, 0, val, c1, c0, 0
I C0 – TCM status Tightly coupled memory
I C1 – control register
I C2 –
I C3 – domain access
I C4 –
I C5 –
I C6 –
I C7 – cache setup, clean, drain write buffer
I C8 –
I C9 – cache operation (victim pointer, cache lock down)
I C10 –
I C11 –
I C12 –
I C13 – current process ID
I C14 –
I C15 – round-robin replacemant
11. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit page table
12. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit tlb
13. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit tlb
I Data TLB
I Instruction TLB
14. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit cache
I Virtually indexed
I Homonyms - the same virtual addresses in different
processes
I Synonyms - different virtual addresses maps to the same
physical
I Physically indexed
I Virtually Indexed Physically Tagged
15. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit cache
16. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit cache structure
I Cache line is transfer unit between cache and RAM
I Make write asynchronous
I Clustering read and write
I Direct map cache
I Way Associative cache
I Fully Associative cache
17. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit cache miss
I Compulsory miss - miss after cache flash
I Capacity miss - cache is full no free lines
I Conflict miss - cache is full no free lines
I Coherence miss - miss triggered by coherence protocol
18. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit cache replacement
I Pseudo LRU
I FIFO
I Random
19. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit mapping
20. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit mapping
21. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit switch
I FCSE – Fast context switch
I Elimination of the cache and TLB flush
I Process ID
I 32MB VM limit for task size
I MVM = VA + (0x2000000 * process ID)
I Task switch change process ID and add entries to
domain access reg
22. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
memory management unit functionality
I Write policy
I Writeback – only to cache write
I Writethrue – write to cache and memory
I Allocation policy (miss case policy)
I Read allocate
I Write allocate - allocate line in cache read and store
I No write allocate - write directly to memory
I Lockdown – exempt from eviction (irq vector, ISR,
global data)
I Logical cache
I Physical cache
I Unified cache
I Split cache
I Cache hit vs cache miss (time penalty)
I Eviction
I Data streaming
I Thrashing
I Direct map vs set associativity
23. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Memory Nodes, Zones, Frames
24. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Boot time memory management
25. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Flat memory model
26. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Discontiguous memory model
27. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Sparse memory model
28. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Memblock
29. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Memblock
30. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Mips memblock
31. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Bootmem
32. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Buddy allocator
33. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
SLOB
34. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
SLAB
35. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
SLAB
36. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
SLUB
37. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
SLUB debug
38. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
SLUB debug
39. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
SLUB debug
40. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
SLUB debug
41. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
malloc chank
42. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
malloc buddy
43. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
thread local storage descriptor
44. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Software setup
I (1) - architecture defined register point on TCB start
I (2) - first TCB entry is a pointer on Dynamic Thread
Vector DTV
I (3) - TCP Thread Control Block
I (4) - TLS Thread Local Storage
I (5) - Static TLS
I (6) - Dynamic TLS
Static TLS blocks are memory blocks for thread-local
variables for modules or dynamically loaded libraries that load
in memory by dynamic linker during the main program load.
Dynamic TLS blocks are memory blocks for thread-local
variables for modules that load in runtime by dlopen()
syscall.
Static TLS module number 1 is always main program
executable region for own thread-local variables.
45. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
thread local storage
46. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
END
Questions?
47. Yet another talk
about basics in
Linux Memory
Vasyl Gomonovych
Physical Memory
Overview
Memory
Management Unit
Memory Nodes,
Zones, Frames
Boot time memory
management
Physical memory
allocation
SLOB SLAB SLUB
Userspace allocator
END
Links
I What Every Programmer Should Know About Memory
I The Linux Virtual Memory Manager
I Carnegie Mellon Computer Architecture
I ELF Handling For Thread-Local Storage
I elixir.bootlin.com