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
X cotx expansion using maclaurins theorem.
Lemur [1.5K]

It is to be noted that it is impossible to find the Maclaurin Expansion for F(x) = cotx.

<h3>What is Maclaurin Expansion?</h3>

The Maclaurin Expansion is a Taylor series that has been expanded around the reference point zero and has the formula f(x)=f(0)+f′. (0) 1! x+f″ (0) 2! x2+⋯+f[n](0)n!

<h3>What is the explanation for the above?</h3>

as indicated above, the Maclaurin infinite series expansion is given as:

F(x)=f(0)+f′. (0) 1! x+f″ (0) 2! x2+⋯+f[n](0)n!

If F(0) = Cot 0

F(0) = ∝ = 1/0

This is not definitive,

Hence, it is impossible to find the Maclaurin infinite series expansion for F(x) = cotx.

Learn more about Maclaurin Expansion at;
brainly.com/question/7846182
#SPJ1

4 0
2 years ago
A cylindrical tank is required to contain a gage pressure 560 kPa . The tank is to be made of A516 grade 60 steel with a maximum
adoni [48]

Answer:

5.6 mm

Explanation:

Given that:

A cylindrical tank is required to contain a:

Gage Pressure P = 560 kPa

Allowable normal stress \sigma = 150 MPa = 150000 Kpa.

The inner diameter of the tank = 3 m

In a closed cylinder  there exist both the circumferential stress and the longitudinal stress.

Circumferential stress \sigma = \dfrac{pd}{2t}

Making thickness t the subject; we have

t = \dfrac{pd}{2* \sigma}

t = \dfrac{560000*3}{2*150000000}

t = 0.0056 m

t = 5.6 mm

For longitudinal stress.

\sigma = \dfrac{pd}{4t}

t= \dfrac{pd}{4*\sigma }

t = \dfrac{560000*3}{4*150000000}

t = 0.0028  mm

t = 2.8 mm

From the above circumferential stress and longitudinal stress; the stress with the higher value will be considered ; which is circumferential stress and it's minimum value  with the maximum thickness = 5.6 mm

8 0
3 years ago
Problem definition
LekaFEV [45]

Answer:

ummm thats alot

Explanation:

8 0
3 years ago
Why does an object under forced convection reach a steady-state faster than an object subjected to free-convection?
bonufazy [111]

Answer:

Free convection:

   When heat transfer occurs due to density difference between fluid then this type of heat transfer is know as free convection.The velocity of fluid is zero or we can say that fluid is not moving.

Force convection:

   When heat transfer occurs due to some external force then this type of heat transfer is know as force convection.The velocity of fluid is not zero or we can say that fluid is moving in force convection.

Heat transfer coefficient of force convection is high as compare to the natural convection.That is why heat force convection reach a steady-state faster than an object subjected to free-convection.

We know that convective heat transfer given as

 q = h  A ΔT

h=Heat transfer coefficient

A= Surface area

ΔT = Temperature difference

5 0
3 years ago
PELASEE HELPPP WITH MARK BRAINLIST!!!! You are stopped at a red light, and a long string of cars is crossing in front of you. Wh
choli [55]

Answer:

1st one.

Explanation:

I think that because they the one who is going to get a ticket and also you will not gonna get in a car accident.

7 0
3 years ago
Read 2 more answers
Other questions:
  • A 1000 W iron utilizes a resistance wire which is 20 inches long and has a diameter of 0.08 inches. Determine the rate of heat g
    12·1 answer
  • Represent the following sentence by a Boolean expression:
    11·1 answer
  • Which of the following is part of the highway
    11·2 answers
  • By using order of magnitude analysis, the continuity and Navier-Stokes equations can be simplified to the Prandtl boundary-layer
    9·1 answer
  • If you have a hole diameter of 0.250 with a tolerance of ±0.005, what are the limits of the hole size?
    13·1 answer
  • PROBLEM IN PICTURE HELP ME DEAR GODDDDDD UGHHH NONONO I HAVE 2 MINUTES TO FINISH THIS ❕❗️❕❗️❗️❕❕❕❕❗️❕❕❗️❕❗️❗️❗️❕‼️‼️‼️‼️❗️‼️❗️
    11·2 answers
  • A steel bar with a diameter of .875 inches and a length of 15.0 ft is axially loaded with a force of 21.6 kip. The modulus of el
    10·1 answer
  • Is an example of an electrical device.
    13·2 answers
  • Which of the following describes all illustrations created by freehand?
    10·2 answers
  • What classes do you have to take in college for be a system software engineer
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!