Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swap Space vs Backing Store

I am currently reading about memory management in my operating systems textbook and am curious if there is a difference between a swap space and a backing store. They both seem to do the same thing in general. From what I understand when a page fault occurs an inactive page is found and stored in the swap space so the page that caused the fault can be stored. A backing store seems to do the same thing except it's for an entire process not just a page. Is this the main difference between the two? Or are there other things I am over looking?

like image 539
steveclark Avatar asked Aug 31 '25 03:08

steveclark


1 Answers

The term "backing store" is normally used in the context of graphical user interfaces. The backing story is a block of memory that holds the image of a window. If the window gets covered (even partially) then uncovered, the backing store is used to redraw.

Some systems (e.g., X, and Windoze) generally do not use a backing store (except for dialog boxes). They just have the application redraw the screen.

In ye olde days swap space was used to move entire processes to disk. The page file was used to store individual pages. Traditional swapping has gone away. However, Unix retains the term swap when it is technically paging.

In a general sense, a page file and a backing store are similar:

backing store is to video memory as is

page file is to physical memory.

However, backing story is not really related to paging as you describe it.

like image 110
user3344003 Avatar answered Sep 03 '25 05:09

user3344003