C191-Terms-Chapter-9 Flashcards

1
Q

Standard swapping

A

Standard swapping involves moving entire processes between main memory and a backing store. The backing store is commonly fast secondary storage. It must be large enough to accommodate whatever parts of processes need to be stored and retrieved, and it must provide direct access to these memory images.

When a process or part is swapped to the backing store, the data structures associated with the process must be written to the backing store.

For a multithreaded process, all per-thread data structures must be swapped as well. The operating system must also maintain metadata for processes that have been swapped out, so they can be restored when they are swapped back in to memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Advantage of standard swapping.

A

The advantage of standard swapping is that it allows physical memory to be oversubscribed, so that the system can accommodate more processes than there is actual physical memory to store them. Idle or mostly idle processes are good candidates for swapping; any memory that has been allocated to these inactive processes can then be dedicated to active processes. If an inactive process that has been swapped out becomes active once again, it must then be swapped back in.

Standard swapping was used in traditional UNIX systems, but it is generally no longer used in contemporary operating systems, because the amount of time required to move entire processes between memory and the backing store is prohibitive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Swapping with paging

A

Most systems, including Linux and Windows, now use a variation of swapping in which pages of a process—rather than an entire process—can be swapped. This strategy still allows physical memory to be oversubscribed, but does not incur the cost of swapping entire processes, as presumably only a small number of pages will be involved in swapping.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Modern swapping

A

In fact, the term swapping now generally refers to standard swapping, and paging refers to swapping with paging.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

page out / page in

A

A page out operation moves a page from memory to the backing store; the reverse process is known as a page in.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Swapping on mobile systems

A

In contrast, mobile systems typically do not support swapping in any form. Mobile devices generally use flash memory rather than more spacious hard disks for nonvolatile storage.

The resulting space constraint is one reason why mobile operating-system designers avoid swapping. Other reasons include the limited number of writes that flash memory can tolerate before it becomes unreliable and the poor throughput between main memory and flash memory in these devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Instead of swapping for IOS and Android

A

Instead of using swapping, when free memory falls below a certain threshold, Apple’s IOS asks applications to voluntarily relinquish allocated memory. Read-only data (such as code) are removed from main memory and later reloaded from flash memory if necessary.

Data that have been modified (such as the stack) are never removed. However, any applications that fail to free up sufficient memory may be terminated by the operating system.

Android adopts a strategy similar to that used by IOS. It may terminate a process if insufficient free memory is available. However, before terminating a process, Android writes its application state to flash memory so that it can be quickly restarted.

Because of these restrictions, developers for mobile systems must carefully allocate and release memory to ensure that their applications do not use too much memory or suffer from memory leaks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

swapped

A

Moved between main memory and a backing store. A process may be swapped out to free main memory temporarily and then swapped back in to continue execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

backing store

A

The secondary storage area used for process swapping.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

application state

A

A software construct used for data storage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly