WORKING WITH MEMORY IN OPERATING SYSTEMS.
INTRODUCTION
BASIC CONCEPTS
MEMORY MANAGEMENT TASKS
βοΈ Efficiency
π Security
π Multitasking
TYPES OF MEMORY IN OPERATING SYSTEMS
π§± Physical and virtual memory
β‘ Cache, buffers, swap
π Permanent and temporary memory
COMPARISON TABLE: MEMORY TYPES IN OS
Memory type | Purpose | Peculiarities | Examples |
π§± Physical memory | The device's main RAM | Fast, limited volume, energy-dependent | RAM |
π§± Virtual memory | Expanding physical memory using a disk | Uses a swap file (Windows) or swap partition (Linux/macOS) | Pagefile.sys, swap |
β‘ Cash | Storing frequently used data | Located closer to the processor (L1/L2/L3), high speed | CPU Cache, disk/file cache |
β‘ Buffer | Temporary storage of data during input/output | Smooths out speed differences between devices | Print buffer, file buffer |
β‘ Swap | Unloading rarely used data from RAM | Slows down performance if used actively, but avoids system crashes | Swap partition, pagefile |
π Permanent memory | Long-term data storage | Does not lose data when power is turned off | SSD, HDD, ROM |
π Temporary memory | Temporary storage of data during system operation | Fast, but clears when rebooting or powering off | RAM, cache |
VIRTUAL MEMORY
π What is this?
π The principle of page organization
β Advantages:
β Disadvantages:
WORKING WITH MEMORY IN WINDOWS
WORKING WITH MEMORY IN LINUX
π§± Key components:
π Basic commands:
WORKING WITH MEMORY IN MACOS
π§¬Darwin
π§± Key components:
π Tools:
COMPARISON TABLE: WORKING WITH MEMORY IN THE OS
operating system | Swap / Paging | Tools | Flexibility of customization |
Windows | Pagefile.sys | Task Manager, Resource Monitor | Average |
Linux | Swap | free, top, htop, vmstat | High |
macOS | Swap | Activity Monitor, vm_stat, top | Limited |
π Note:
PROBLEMS AND CHALLENGES WHEN WORKING WITH MEMORY
π§ Memory Leaks
π Thrashing (repeated pumping)
π’ Performance issues
OPTIMIZING MEMORY USAGE
βοΈ Swap settings
π Monitoring and cleaning
πΎ Hardware solutions
PRACTICAL PART
πΉ Task 1 (Windows): Analyzing Memory in Task Manager
π Task:
β Discussion questions:
π How does swap affect?
π‘ Tip: Pay attention to the memory usage graphs at the bottom of the window - they show the current load on RAM and the paging file.
PRACTICAL PART
πΉ Task 2 (Linux): Memory Usage Analysis
π Task:
free -h
top
vmstat
β Questions for analysis:
How much free and available memory does free -h show?
What is the current swap memory usage?
Are there any signs of low RAM (eg heavy swap usage )?
What does top show βwhich processes consume the most memory?
How to interpret values from vmstat ( buff , cache , si , so )?
π‘ Hint:B free pay attention to the line " available " - it shows how much memory can be used without swapping.
si and so in vmstat are the amount of data loaded into swap and unloaded from swap , respectively.
PRACTICAL PART
π‘ Tip: Pay attention to the "Memory Pressure " indicator - green means normal condition, yellow/red - a sign of overload.
πΉ Task 3 ( macOS ): Analyzing Memory Usage
π Task:
β Additionally:
vm_stat
β Questions for analysis: How much memory is occupied by applications?
Is swap used ? How much?
Are there any signs of low RAM?
What does vm_stat show by page? ins / outs ?
PRACTICAL PART
πΉ Task 4: Comparative analysis of memory work
π Task:
Select two operating systems (for example, Windows and Linux or macOS and Linux).
Compare their memory performance using the following criteria and complete the table :
Criterion | OS 1 (β¦?) | OS 2 (β¦?) |
Memory management type | Β | Β |
Using swap | Β | Β |
Monitoring tools | Β | Β |
Flexibility of customization | Β | Β |
Low Memory Response | Β | Β |
User friendliness | Β | Β |
π Questions:
THANK YOU FOR YOUR ATTENTION