<< Chapter < Page Chapter >> Page >

1. partitioning

Partitioning of memory is as a job that is brought into memory, it must be allocated a portion of the memory, this is its partition. Partitions can be fixed size of variable sized

– Fixed size:

This is a rigid size divisions of memory

Process is assigned to smallest available partition it fits into

Process can be very wasteful of memory

– Variable size

Allocate a process to only as much memory as it needs

Other memory can be used for other processes

Efficient use of memory but, over time, can lead to large numbers of little left over pieces of free memory -- too small to use

Must consider use of memory compaction

  • Effect of partitioning

Since a process can be swapped in and out of memory and end up in different partitions, addressing within the process must not be tied to specific physical memory addresses

– Program/process addresses are logical ones with respect to the starting address of the

program itself

– Processor hardware must convert the logical address reference of the program into a physical address that the machine can operate on

– In effect this is a form of index addressing -- base addressing -- where the base address is the first address of the program.

Figure 15.1 Effect of partitioning

2. paging

  • Paging is to subdivide memory into small fixed-size “chunks” called frames or page frames
  • Divide programs into same sized chunks, called pages
  • Loading a program in memory requires the allocation of the required number of pages
  • Limits wasted memory to a fraction of the last page
  • Page frames used in loading process need not be contiguous

– Each program has a page table associated with it that maps each program page to a memory page frame

– Thus, logical addresses in a program are interpreted as a physical address -- page frame number and an offset within the page

  • Principle for allocation of free page frames

Figure 15.2 Allocation of free pages

  • Address mapping in a paging system

The more sophistiated way of mapping address from the address space onto the actual memory address is possible. Principle of address mapping in a paging system is shown in Figure 15.3 .

The address that the program can refer is called the virtual address space, the actual hardwired (pgysical) memory address is called the physical address space.

Figure 15.3 Address mapping in a paging system

3. implementation of paging

  • The implementation of paging systems permit true multiprogramming systems through the use of virtual memory / demand paging

– Only the program pages that are required for the execution of the program are actually loaded -- hence the “demanded” concept

– Only a few (of the many potential) pages of any one program might be in memory at a time

– Many “active” programs can have pages -- increasing the degree of multiprogramming

  • With demand paging, it is possible for a program consisting of more pages than can (ever) fit into memory to run

– This is presents a virtual memory system that seems unlimited in size to the programmer

– Significantly simplifies program development

  • Page tables can be large and are themselves subject to being stored in

secondary storage. Only a small portion will be kept in main memory

  • To reduce size of a page table consider

– Using a 2-level page table:

Entry in first level point to a table at the second level

First level is small -- in many cases the size of a single page

– Use an inverted table structure: A hashing function maps a page request

into an inverted table that is used by all processes. One structure is usec for all processes and virtual pages

  • It would seem that each virtual address reference causes 2 memory accesses

– An access to get to the page table

– An access to get the actual data page

  • To avoid this delay, use a special cache to hold page table information
  • Every memory access requires

– Trying to find frame reference in TLB

– If not there, go to page table in memory

– With frame identified, check the cache to see if it is there,

– If not there, get from main memory or retrieve from disk

  • Operation of paging and TLB

Figure 15.3 Operation of paging and TLB

Figure 15.4. TLB and cache operation

4. page replacemenr policy

  • Principle of Replacemenr Policy

- If there is an unused page frame, it can be loaded into it

- If all page frames are in use, one must be selected for replacement

- If it has been altered, the page to be replaced must be copied back to secondary

storage

  • Page replacement algorithms

Similar to the ones discussed in caching, the following algorithms have been used

LRU

FIFO

Random, etc.

5. segmentation

In addition to partitioning and paging, segmentation can be used to subdivide

memory

– Programmer subdivides the program into logical units called segments

Programs subdivided by function

Data array items grouped together as a unit

– Advantages

Simplifies data structure handling

Supports code modification and maintenance

Supports sharing code segments

Provides a degree of protection

– Memory reference is in the form of a segment ID and an offset

– Segmentation can be combined with paging in a segment ID, page number, page offset scheme

Resume of Virtual Memory management

– Partitioning

– Paging

– Segmentation

– Segmentation and paging

Questions & Answers

A golfer on a fairway is 70 m away from the green, which sits below the level of the fairway by 20 m. If the golfer hits the ball at an angle of 40° with an initial speed of 20 m/s, how close to the green does she come?
Aislinn Reply
cm
tijani
what is titration
John Reply
what is physics
Siyaka Reply
A mouse of mass 200 g falls 100 m down a vertical mine shaft and lands at the bottom with a speed of 8.0 m/s. During its fall, how much work is done on the mouse by air resistance
Jude Reply
Can you compute that for me. Ty
Jude
what is the dimension formula of energy?
David Reply
what is viscosity?
David
what is inorganic
emma Reply
what is chemistry
Youesf Reply
what is inorganic
emma
Chemistry is a branch of science that deals with the study of matter,it composition,it structure and the changes it undergoes
Adjei
please, I'm a physics student and I need help in physics
Adjanou
chemistry could also be understood like the sexual attraction/repulsion of the male and female elements. the reaction varies depending on the energy differences of each given gender. + masculine -female.
Pedro
A ball is thrown straight up.it passes a 2.0m high window 7.50 m off the ground on it path up and takes 1.30 s to go past the window.what was the ball initial velocity
Krampah Reply
2. A sled plus passenger with total mass 50 kg is pulled 20 m across the snow (0.20) at constant velocity by a force directed 25° above the horizontal. Calculate (a) the work of the applied force, (b) the work of friction, and (c) the total work.
Sahid Reply
you have been hired as an espert witness in a court case involving an automobile accident. the accident involved car A of mass 1500kg which crashed into stationary car B of mass 1100kg. the driver of car A applied his brakes 15 m before he skidded and crashed into car B. after the collision, car A s
Samuel Reply
can someone explain to me, an ignorant high school student, why the trend of the graph doesn't follow the fact that the higher frequency a sound wave is, the more power it is, hence, making me think the phons output would follow this general trend?
Joseph Reply
Nevermind i just realied that the graph is the phons output for a person with normal hearing and not just the phons output of the sound waves power, I should read the entire thing next time
Joseph
Follow up question, does anyone know where I can find a graph that accuretly depicts the actual relative "power" output of sound over its frequency instead of just humans hearing
Joseph
"Generation of electrical energy from sound energy | IEEE Conference Publication | IEEE Xplore" ***ieeexplore.ieee.org/document/7150687?reload=true
Ryan
what's motion
Maurice Reply
what are the types of wave
Maurice
answer
Magreth
progressive wave
Magreth
hello friend how are you
Muhammad Reply
fine, how about you?
Mohammed
hi
Mujahid
A string is 3.00 m long with a mass of 5.00 g. The string is held taut with a tension of 500.00 N applied to the string. A pulse is sent down the string. How long does it take the pulse to travel the 3.00 m of the string?
yasuo Reply
Who can show me the full solution in this problem?
Reofrir Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Computer architecture. OpenStax CNX. Jul 29, 2009 Download for free at http://cnx.org/content/col10761/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Computer architecture' conversation and receive update notifications?

Ask