2

オペレーティング システムの試験問題を調べているときに、どうしても理解できない問題に出くわしました。メモリ管理スキームはページング です ここに質問があります:

An operating system that runs on a CPU with a 16 bit address pointer employs a paging memory management scheme with a page size of 1024 bytes.
a)  At most how many frames can physical memory contain?
b)  Indicate which bits in an address pointer are used for page and offset. 
c)  A process image of size 3.5K resides in memory. You are given the page table of this process in Figure 1 below. What physical address will the hexadecimal logical address 0x0FCE result in? Show your calculations.
d)  How much internal fragmentation does this process produce?

Page    Frame
0             4
1             8
2             9
3             6
Figure 1 Process Page Table

誰でもこれで私を助けることができますか?

4

1 に答える 1

6
  1. 16 ビットのアドレス バスにより2^16 = 64kB、物理メモリにアクセスできます。このシステムでは size のページがあるため、メモリは物理フレーム1024B = 2^10に分類されます。2^16 / 2^10 = 2^6

  2. のページがある前の結果を考えると、ページの1024 = 2^10 bytes任意のバイトにアクセスするには 10 ビットが必要です。したがって、上位 6 ビットはページ テーブル (基本的に宿題の図 1) からページ インデックスを取得するために使用され、下位 10 ビットはそのページのオフセットに使用されます。

  3. 0xfce上位 6 ビットが であるため、論理アドレスは 4 ページ目に存在します000011b = 3 = 4th page = 0x0c00-0x0fff。ページ テーブルが与えられ、物理メモリがシーケンシャルであると仮定すると、4 番目のページは で始まる 6 番目の物理フレームにマップされ1024 * 6 = 0x1800 = 0001100000000000bます。ページの上位 6 ビットは です000110b。ここに、前の回答から得られた 10 ビットのオフセットを追加します000110b << 10 | 0x3ce = 0x1bce

  4. フレーム割り当てはシーケンシャルではないため (4、6、8、9)、ページ 4 と 6 の間のホール (つまり 1024B)、およびページ 6 と 8 の間のホール (つまり再び 1024B) により、物理メモリの断片化が発生します。

この助けを願っています。

于 2013-01-08T10:41:18.100 に答える