wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Virtual memory

profile
Abhijit Rajpurohit
Jul 11, 2023
0 Likes
0 Discussions
102 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

Incorporating Automation into Digital Forensics.

Blog banner

Fitness

Blog banner

IT Service as as Value Creation

Blog banner

What is Network Security?

Blog banner

Functions Of Operating Systems

Blog banner

MODERN OPERATING SYSTEM

Blog banner

Zomato's Secret Digital Marketing Techniques!

Blog banner

Music is life

Blog banner

Service Design Model

Blog banner

All you need to know about Website Traffic

Blog banner

Cyber Attacks -- Trends Patterns and Security Countermeasures

Blog banner

Sage business cloud accounting

Blog banner

Segmentation and paging concept

Blog banner

Vulnerability Assessment

Blog banner

Service Operations in ITSM

Blog banner

Moral Injury Among Healthcare Workers: When Caring Conflicts With Conscience

Blog banner

Message Passing in OS

Blog banner

Finding Meaning, and Identity : Understanding Existential Concerns and Mental Well-being

Blog banner

MIDDLE CLASS MELODIES!!

Blog banner

10 Interesting facts you should know!!!

Blog banner

Multicore and Multithreading

Blog banner

Virtual Machine

Blog banner

INTERNET

Blog banner

Healthy Habits Children Learn at Preschool That Last a Lifetime

Blog banner

THE ACTORS LIFE

Blog banner

IS CONVERTING AMBITION INTO PROFESSION?

Blog banner

Threads

Blog banner

Evolution of Operating Sytems

Blog banner

Satellite Based Positioning

Blog banner

ADIDAS

Blog banner

A Weekend of Wildlife, Rivers, and Relaxation in Southwest Florida

Blog banner

Partnership in Learning: How Parent Involvement Shapes a Child’s Early Education

Blog banner

File Organization and Access

Blog banner

10 Interesting Facts about Attack on Titan

Blog banner

c

Blog banner

EdTech (Education Technology)

Blog banner

The Lunchbox That Came Back Untouched — How to Handle a Fussy Eater at Preschool Age

Blog banner

MENDELEY

Blog banner

File management

Blog banner

Threat from Inside: Educating the Employees Against Cyber Threats

Blog banner

Are Social Media Paid Campaigns Worth It?

Blog banner

Top 5 Places To Stay And Visit In Berlin, Germany

Blog banner