wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Virtual memory

profile
Abhijit Rajpurohit
Jul 11, 2023
0 Likes
0 Discussions
97 Reads

Virtual memory is a way of representing your memory that's abstracted from the physical memory on your machine. It makes use of both your RAM and your storage space, whether that's on a traditional hard drive or an SSD. In Linux, this is done at the kernel and hardware levels².

Linux supports virtual memory, that is, using a disk as an extension of RAM so that the effective size of usable memory grows correspondingly. The kernel will write the contents of a currently unused block of memory to the hard disk so that the memory can be used for another purpose¹.

Virtual memory takes advantage of the fact that not all of the memory that's being used in theory is being used all of the time. Programs in memory are broken down into pages and the parts that the kernel deems as unnecessary are "swapped out," or moved to the hard drive. When they're needed, they can be "swapped in," or brought back into RAM².

The space used for virtual memory on a drive is known as "backing store," or "swap space." In the Windows world, it's usually implemented as a file, known as a "swap file." It's also possible to do this in Linux, but it's much more common to use a dedicated disk partition².

The upshot of virtual memory is that it's possible to run large programs by using more memory than the physical RAM in your machine. Virtual memory also allows developers to create applications without having to know how a computer's memory is organized².

The main downside historically with virtual memory has been that hard drives have been slower than RAM. If a machine doesn't have enough RAM, the system can keep swapping pages in and out endlessly, a process known as "thrashing." This is less of an issue on modern PCs with more RAM and faster SSDs displacing mechanical hard drives, but it's still something to be aware of


Comments ()


Sign in

Read Next

IOT Hacking Techniques

Blog banner

Fitness

Blog banner

Design Considerations for Disk Cache Management

Blog banner

Threads in OS

Blog banner

Processing Crime and Incident Scenes

Blog banner

Data Exfiltration

Blog banner

Social Engineering Deceptions and Defenses

Blog banner

Understanding Toddler Tantrums: What They Really Mean

Blog banner

Landslide Hazard

Blog banner

differentiate thinking humanly and rationally

Blog banner

Memory Partitioning

Blog banner

Rock, Paper, Scissors Game in Common Lisp

Blog banner

Concurrency and Deadlocks

Blog banner

Security issues in Sensor Networks and gathering admissible evidence in Network Forensics

Blog banner

Retiring ISS

Blog banner

MENDELEY

Blog banner

Interrupts in operating system.

Blog banner

How Men and Women Process Pain Differently

Blog banner

?Why Social and Emotional Skills Matter More Than ABCs in Early Years?

Blog banner

PERT Overview

Blog banner

Never give up

Blog banner

What do you mean by online marketing and why do you need to know about it

Blog banner

Threats To Computer System

Blog banner

CRISP-DM Methodology

Blog banner

Ghee vs. Coconut Oil vs. Mustard Oil: Which Cooking Fat Wins for Indian Food?

Blog banner

geographic information system (GIS)

Blog banner

How to Find the Right Therapist For Me?

Blog banner

The Importance of Financial Literacy for College Students

Blog banner

Cache memory

Blog banner

How Laughing Gas Makes Your Dental Visit So Much Easier

Blog banner

MEMORY MANAGEMENT (techniques)

Blog banner

BIRYANI ! The history you never knew about

Blog banner

EVOLUTION OF THE MIRCOPROCESSOR

Blog banner

Safeguarding Your Data: The Importance of Wireless Encryption

Blog banner

Smitten Kitchen Keepers

Blog banner

Multiprocessor and Multicore Organization

Blog banner

Introduction to Data Science: Life Cycle & Applications

Blog banner

The Joy of Giving: How Festivals Teach Children Empathy and Gratitude

Blog banner

Depression

Blog banner

DIGITAL TECHNOLOGY

Blog banner

Why Soft Skills Matter as Much as Grades?

Blog banner

COMMUNICATION

Blog banner