1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marat540 [252]
3 years ago
7

Memory Question!

Engineering
1 answer:
mafiozo [28]3 years ago
7 0

Answer:

Demand Paging

The basic idea behind demand paging is that when a process is swapped in, its pages are not swapped in all at once. Rather they are swapped in only when the process needs them. ( on demand. ) This is termed a lazy swapper, although a pager is a more accurate term.

Figure 9.4 - Transfer of a paged memory to contiguous disk space

9.2.1 Basic Concepts

The basic idea behind paging is that when a process is swapped in, the pager only loads into memory those pages that it expects the process to need ( right away. )

Pages that are not loaded into memory are marked as invalid in the page table, using the invalid bit. ( The rest of the page table entry may either be blank or contain information about where to find the swapped-out page on the hard drive. )

If the process only ever accesses pages that are loaded in memory ( memory resident pages ), then the process runs exactly as if all the pages were loaded in to memory.

Figure 9.5 - Page table when some pages are not in main memory.

On the other hand, if a page is needed that was not originally loaded up, then a page fault trap is generated, which must be handled in a series of steps:

The memory address requested is first checked, to make sure it was a valid memory request.

If the reference was invalid, the process is terminated. Otherwise, the page must be paged in.

A free frame is located, possibly from a free-frame list.

A disk operation is scheduled to bring in the necessary page from disk. ( This will usually block the process on an I/O wait, allowing some other process to use the CPU in the meantime. )

When the I/O operation is complete, the process's page table is updated with the new frame number, and the invalid bit is changed to indicate that this is now a valid page reference.

The instruction that caused the page fault must now be restarted from the beginning, ( as soon as this process gets another turn on the CPU. )

Figure 9.6 - Steps in handling a page fault

In an extreme case, NO pages are swapped in for a process until they are requested by page faults. This is known as pure demand paging.

In theory each instruction could generate multiple page faults. In practice this is very rare, due to locality of reference, covered in section 9.6.1.

The hardware necessary to support virtual memory is the same as for paging and swapping: A page table and secondary memory. ( Swap space, whose allocation is discussed in chapter 12. )

A crucial part of the process is that the instruction must be restarted from scratch once the desired page has been made available in memory. For most simple instructions this is not a major difficulty. However there are some architectures that allow a single instruction to modify a fairly large block of data, ( which may span a page boundary ), and if some of the data gets modified before the page fault occurs, this could cause problems. One solution is to access both ends of the block before executing the instruction, guaranteeing that the necessary pages get paged in before the instruction begins.

9.2.2 Performance of Demand Paging

Obviously there is some slowdown and performance hit whenever a page fault occurs and the system has to go get it from memory, but just how big a hit is it exactly?

There are many steps that occur when servicing a page fault ( see book for full details ), and some of the steps are optional or variable. But just for the sake of discussion, suppose that a normal memory access requires 200 nanoseconds, and that servicing a page fault takes 8 milliseconds. ( 8,000,000 nanoseconds, or 40,000 times a normal memory access. ) With a page fault rate of p, ( on a scale from 0 to 1 ), the effective access time is now:

( 1 - p ) * ( 200 ) + p * 8000000

= 200 + 7,999,800 * p

which clearly depends heavily on p! Even if only one access in 1000 causes a page fault, the effective access time drops from 200 nanoseconds to 8.2 microseconds, a slowdown of a factor of 40 times. In order to keep the slowdown less than 10%, the page fault rate must be less than 0.0000025, or one in 399,990 accesses.

A subtlety is that swap space is faster to access than the regular file system, because it does not have to go through the whole directory structure. For this reason some systems will transfer an entire process from the file system to swap space before starting up the process, so that future paging all occurs from the ( relatively ) faster swap space.

Some systems use demand paging directly from the file system for binary code ( which never changes and hence does not have to be stored on a page operation ), and to reserve the swap space for data segments that must be stored. This approach is used by both Solaris and BSD Unix

You might be interested in
A well insulated rigid tank contains 4 kg of argon gas at 450 kPa and 30 C. A valve is opened, allowing the argon to escape unti
natima [27]

Answer:

Final mass of Argon=  2.46 kg

Explanation:

Initial mass of Argon gas ( M1 ) = 4 kg

P1 = 450 kPa

T1 = 30°C = 303 K

P2 = 200 kPa

k ( specific heat ratio of Argon ) = 1.667

assuming a reversible adiabatic process

<u>Calculate the value of the M2 </u>

Applying ideal gas equation ( PV = mRT )

P₁V / P₂V = m₁ RT₁ / m₂ RT₂

hence : m2 = P₂T₁ / P₁T₂ * m₁

                   = (200 * 303 ) / (450 * 219 ) * 4

                   = 2.46 kg

<em>Note: Calculation for T2 is attached below</em>

5 0
3 years ago
Identify an object in your house that contains a physical system and list three questions you could use to define the system
jonny [76]

Answer:

ALL CAREFULLY ANSWERED CORRECTLY

Explanation:

1) A loaf of Bread PHYSICAL SYSTEM

✓ How can the environment affect the edibility of the bread

✓ What are the constituents that makes up the bread

✓ What process is involved in these constituents mixing to form the loaf.

2) The law of thermodynamics makes us to understand that when heat/energy passes through a system, the systems internal energy changes with respect to the conservation of energy law. That is energy lost = energy gained. Typically, ice would melt in a cup of hot tea because of the thermal energy in the molecules of the hot tea. When you heat a material, you are adding thermal kinetic energy to its molecules and usually raising its temperature. The temperature of the ice raises due to the kinetic energy added to it and it melts to water.

3) The theory of systems view the world as a complex system of interconnected parts. If we consider the society; (financial systems, political systems, etc) we will agree that they individually have their own components and it's the summation of this components that makes the system, this implies that system thinking could be applicable in this kinda of systems as long as they are made up of components.

4) Technology has boosted every sector of our lives and it has the capacity to do more. Restricting it's importance to entertainment alone would be an underusing of its potentials. Engineering students infact should not need any drive to be encouraged about maximizing all it can do in shaping our world.

5) ~ Nature shows its splendid soul

~Never ceases to leave us in amazement

~And we are in love

4 0
3 years ago
A manufacturer provides a warranty against failure of a carbon steel product within the first 30 days after sale. Out of 1000 so
irina1246 [14]
Answer: idk sorry we both on the same thing
7 0
3 years ago
Which of the following might be a job or task of an IT worker who manages
-Dominant- [34]

Answer:

I'm pretty sure it's letter d

7 0
3 years ago
(3) Calculate the heat flux through a sheet of brass 7.5 mm (0.30 in.) thick if the temperatures at the two faces are 150°Cand 5
bezimeni [28]

Answer:

a.) 1.453MW/m2,  b.)  2,477,933.33 BTU/hr  c.) 22,733.33 BTU/hr  d.) 1,238,966.67 BTU/hr

Explanation:

Heat flux is the rate at which thermal (heat) energy is transferred per unit surface area. It is measured in W/m2

Heat transfer(loss or gain) is unit of energy per unit time. It is measured in W or BTU/hr

1W = 3.41 BTU/hr

Given parameters:

thickness, t = 7.5mm = 7.5/1000 = 0.0075m

Temperatures 150 C = 150 + 273 = 423 K

                        50 C = 50 + 273 = 323 K

Temperature difference, T = 423 - 323 = 100 K

We are assuming steady heat flow;

a.) Heat flux, Q" = kT/t

K= thermal conductivity of the material

The thermal conductivity of brass, k = 109.0 W/m.K

Heat flux, Q" = \frac{109 * 100}{0.0075} = 1,453,333.33 W/m^{2} \\ Heat flux, Q" = 1.453MW/m^{2} \\

b.) Area of sheet, A = 0.5m2

Heat loss, Q = kAT/t

Heat loss, Q = \frac{109*0.5*100}{0.0075} = 726,666.667W

Heat loss, Q = 726,666.667 * 3.41 = 2,477,933.33 BTU/hr

c.) Material is now given as soda lime glass.

Thermal conductivity of soda lime glass, k is approximately 1W/m.K

Heat loss, Q=\frac{1*0.5*100}{0.0075} = 6,666.67W

Heat loss, Q = 6,666.67 * 3.41 = 22,733.33 BTU/hr

d.) Thickness, t is given as 15mm = 15/1000 = 0.015m

Heat loss, Q=\frac{109*0.5*100}{0.015} =363,333.33W

Heat loss, Q = 363,333.33 * 3.41 = 1,238,966.67 BTU/hr

5 0
3 years ago
Other questions:
  • A six-lane multilane highway (three lanes in each direction) has a peak-hour factor of 0.90, 11-ft lanes with a 4-ft right-side
    11·1 answer
  • Going green means: increasing one's initiatives toward a concern for the environment. increasing one's bottom line, before any o
    15·1 answer
  • Fill in the blank to correctly complete the statement below.
    10·1 answer
  • Think about the science you have studied in the past or are currently studying. Give an example of something you have learned in
    11·1 answer
  • Design drawings use line styles of up to eight different varieties to communicate important information about the item. true or
    7·1 answer
  • (35-39) A student travels on a school bus in the middle of winter from home to school. The school bus temperature is 68.0° F. Th
    13·1 answer
  • Hello Averyone Subs Chanel Me please "RezaDarmawangsa "<br>Thanks !!​
    5·1 answer
  • What’s the answer???
    9·1 answer
  • Technician A says that the starter solenoid switches the high current on and off. Technician B says that the solenoid on the sta
    5·1 answer
  • 40 POINTS IF ANSERED WITHIN 10 MINS
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!