Considering only the virtual memory, and assuming no hits in the TLB,
how many memory accesses does it take to write four bytes starting at
virtual address 0x123fffff
on an Intel machine using only
small (4K) pages?
Following this question will be the contents of the PDBR, some of memory, some of cache, and the small page data TLB for an Intel Pentium Pro. All the numbers are in hexadecimal.
The L1 data cache on this machine was an 8KB, 4-way set-associative cache with a 32 byte line size.
Assume a program running in User mode attempts to write to each of the following virtual addresses. In each case, what happens? You may get page faults at either the directory entry or page table entry level, cache hits, cache misses, TLB hits, TLB misses.... However, you should never have reason to attempt a lookup in one of the tables and simply not find a table entry.
6141fac4
5eef358c
4ff2dfbc
6cc8e224
2153b858
4bf6af30
52b8525c
7559989c
PDBR contains 27060000
Physical Address Contents 0239707c
2ec0a066
083aecb4
6a941045
08ce6664
7bd5c065
09258f30
78827a81
17cb158c
3dda3750
1aad2e14
4698e067
27060214
45601007
270604bc
724e7027
270604fc
083ae005
27060528
1aad2027
270605ec
3edd1007
27060614
02397006
270606cc
74bfc007
27060754
08ce6025
2ec0aac4
54d41564
3a951224
11d56994
3edd1bcc
17cb1006
456014ec
5bdd1067
4698e25c
33fa4d22
5bdd1858
31dda0cc
6a941fbc
2803babe
724e7da8
09258067
74bfc238
3a951063
7bd5c89c
3436b337
Set Number Member 0 Member 1 Member 2 Member 3 Tag Valid Entry Tag Valid Entry Tag Valid Entry Tag Valid Entry 0
194a4
0
465d240d
1505d
1
52c124f0
0fa7c
1
49473234
05273
0
7382025b
1
0eab3
1
7bd5c025
1ff2b
0
66673da2
0df2c
0
15da7203
06294
1
0ef9be08
2
097ed
1
09258027
1677e
0
061ba265
08b8b
0
3ceca3c4
1b07b
1
0cee00cf
3
0e2af
0
0df915f8
0e50a
1
0861c136
0cfe1
0
00f958ac
00d83
0
46fb15e0
4
07f86
0
74ab34bf
03d8f
0
2a40cfbe
14e4f
0
79239043
0f0b4
0
7ff925ad
5
09fe5
0
3c7235e0
19547
1
759edab7
0a570
1
4698e027
06c75
0
5cb5bf9c
6
1c521
1
5eeb01c1
0db02
0
2cb9e479
0d991
1
3a951003
0df7f
1
250c876d
7
06fc2
0
338aab11
19570
1
7f463f7b
1cb50
0
447f3b63
0a607
0
4992c2d7
In the "contents" field, byte 0 is on the right and byte 31 is on the left.
Set Valid Tag Contents 02
1
08f548
62915ea617d74a8426bb6fb079a422e439ec6ea6cf20825800c07ef071795dbb
0
0349aa
e6257a6fe3f3caac288806bcec78279a6eb803d3f9e5dd5dab21acdf0bcb3377
0
0511cf
4ae33f0b8f6dbd2b4856ec9e5e90e831e05a8b3688d205ddb241ea9651f05e3f
0
0b7ba3
69d430843ff4724702448f1ba443f130401ea7dcaaaf5f66963daeb4a2c8d7e5
04
0
0838b9
c455e93957304562d2d1b12a5246bb4bf133f409b30440e5a9e11cb608845e8a
0
0e47ac
573aa33972c7e884335aea8806a80ef7c866ba9ae8ceb1262eba9882ccbdda1e
1
0aaad6
67368dbb8ad833d5a1025a0c0a513ffbcda446339297418ee018f0e3893bb5ac
0
0f7ab9
8c05588f491704cf3daee31ee3d033ec5d4950f76a05d086874ee83c5ee232fc
11
0
0810e1
78c174b18cda5233265dac5723cde54b96a96ed89d88be93f361c2c3da35bac7
0
0752a2
211b7a4fa8557563a95c92afcf9c0775ccbcc75495e7c1b99dd74b2b8a6577d1
1
0c76d2
4577a4ab3dadbc83a7eee51c6fefe6665c59b85c7cdaf8a570608bce1d06149a
1
0752a2
64166165df67e560b3dc85aa10575dc7d1fe64660ff1e285dab7b41f08bd5cfe
12
0
01f556
84ab1a8a3748f9db1ee7a9b78284ece29bee0c07ffa6a4eef1e03056cbeec8f9
0
08d31c
0a3bee0f8fbcaec50ff716ec78b0c2d36780d8d6c06131e2857a11b1c3e681fa
1
03e1a0
2ab18573825989759ca9a4cdd861bbb6e4b78b7ea0d8c74bf87876f1ff614cb7
1
08d31c
224dfa3345397916e7af6d08671eb2956b056785309b5b12b3e87e4915c3a68d
16
0
01e63b
1eda56529f4d555de6b96d94f98edfb1f26dedef36e9c02850fbe6aee4e108cc
1
090527
e3564885297f29b914eb23ff002c376a92558d6508a9c69a771999315ccfd55e
0
05d815
a1fde5df1602414d02facc87dcca3577ddce35f0681f3a6b9bd9fc7c813623c2
0
02b7e1
517679ac48f92a4d82494ff147686186ced4c000cdd5fdfc62d7f923a15e04a5
2c
1
054752
43e1c8917e79874d368538e8af767b29bb4e1a656a8152a9dc26334319a5d0b2
0
02f962
936521bbd4136adc48f9ad0e07f75c627730f5e0b3ffc35fc4f525ef926c6bd8
0
0cc086
345e3ebd9d916cad71af2272ad6b871591e376644edf2e16a9700d6991b82976
0
0c419e
50c941ec23354d938fe3612836cd51f5e5ec6420f97fc68db0fd045799cadd64
39
0
0124b1
bcb85531c8881a2dc6328e971dc7dea874fb57c042b14907966581bdf1eb338a
1
0aebb3
3a9adaaa64d1c7d150a0f724abe580d000a227a95c9b19f3b7fe862aa25a4e90
0
0ad662
ddf8356cbafed871f07ec2bdcf775be8fe49a17b5c05def0394026944cb88a71
0
0c4395
a29c3cefcdd466ae2cb987b9791b441020c026e7f90c268dd9636b481ca5bbb2
3d
0
042f09
6fed11aec453c3d5558dfd6f8ac486221ca01c3e52a90627046947d9281ad4c1
1
03b112
af3bbe748cc1d0e3a99c28a21630ef530e921ee8a373873bea42737e3bfebc3b
0
0b5a4b
ee5283956a3027bb5867483e1c61e5a15e35c28227fad709863a7d2f86954c59
0
07ceb9
9f00bd1990f40708fae4d18457053ff0f451f12ba20ec4d7ccbb424d35d4c886