Address Space

Address Spaces
1368 views
Address Spaces

Every computer has some main memory that it uses to hold executing programs. In a very simple operating system, only one program at a time is in memory. To run a second program, the first o

OUTLINE OF THE REST OF THIS BLOG
988 views
OUTLINE OF THE REST OF THIS BLOG

We have now completed our introduction and bird's-eye view of the operating system. It is time to get down to the details. As mentioned already, from the programmer's point of view,

THREADS
2070 views
THREADS

In usual operating systems, each process has an address space and a single thread of control. In reality, that is almost the definition of a process. However, there are often situations in which it is desirable to have multiple threads of control in the same address space running in

The Classical Thread Model
4029 views
The Classical Thread Model

Now that we have seen why threads might be helpful and how they can be used, let us examine the idea a bit more closely. The process model is based on two independent ideas: resource grouping and execution. Often it is beneficial to separate them; this is where threads

A MEMORY ABSTRACTION: ADDRESS SPACES
1802 views
A MEMORY ABSTRACTION: ADDRESS SPACES

On the whole, exposing physical memory to processes has many major drawbacks. First, if user programs can address every byte of memory, they can easily trash the operating system, intentionally or by accident, bringing the system to a grinding halt (unless there is

Page Tables
1404 views
Page Tables

In a simple execution, the mapping of virtual addresses onto physical addresses can be summarized as follows: the virtual address is split into a virtual page number (high-order bits) and an offset (low-order bits). For instance, with a 16-bit address and a 4-KB page size, the

The Working Set Page Replacement Algorithm
1689 views
The Working Set Page Replacement Algorithm

In the purest form of paging, processes are started up with none of their pages in memory. As soon as the CPU tries to get the first instruction, it gets a page fault, causing the operating system to bring in the page containing the first instruction. Other page faults for global

Separate Instruction and Data Spaces / Shared Pages
1591 views
Separate Instruction and Data Spaces / Shared Pages

The majority of computers have a single address space that holds both programs and data, as shown in Figure 1(a). If this address space is large enough, everything works fine. On the other hand, it is often too small, forcing programmers to stand on their heads to fit everything

Shared Libraries / Mapped Files
1538 views
Shared Libraries / Mapped Files

Sharing can be executed at other granularities than individual pages. If a program is started up twice, most operating systems will automatically share all the text pages so that only one copy is in memory. Text pages are always read only, so there is no problem here.

Cleaning Policy / Virtual Memory Interface
1515 views
Cleaning Policy / Virtual Memory Interface

Paging works best when there are lots of free page frames that can be claimed as page faults take place. If every page frame is full, and moreover customized, before a new page can be brought in, an old page must first be written to disk. To make sure a plentiful supply of free

Page 0 of 2 Previous 1 2 Next