Professional Documents
Culture Documents
Unit 1 Part 2-2 Segmentation
Unit 1 Part 2-2 Segmentation
allocation
Dr. Neetu Narwal
Assoc. Prof.
BCA[M]
Segmentation
Segmentation Hardware
Segmentation Hardware
Paging
Hardware Support
Each operating system has its own methods for storing page
tables. Some allocate a page table for each process. A
pointer to the page table is stored with the other register
values (like the instruction counter) in the process control
block.
The standard solution to this problem is to use a special, small,
fast lookup hardware cache called a translation look-aside
buffer (TLB). The TLB is associative, high-speed memory. Each
entry in the TLB consists of two parts: a key (or tag) and a
value.
When the associative memory is presented with an item, the
item is compared with all keys simultaneously. If the item is
found, the corresponding value field is returned.
Dr. Neetu Narwal, MSI
Dr. Neetu Narwal, Asso. Prof. BCA [M], MSI
Hit Ratio
The percentage of times that the page number of interest is
found in the TLB is called the hit ratio. An 80-percent hit ratio,
for example, means that we find the desired page number in
the TLB 80 percent of the time. If it takes 100 nanoseconds to
access memory, then a mapped-memory access takes 100
nanoseconds when the page number is in the TLB.
To find the effective memory-access time, we weight the
case by its probability:
effective access time = 0.80 × 100 + 0.20 × 200 = 120
nanoseconds
In this example, we suffer a 20-percent slowdown in average
memory-access time (from 100 to 120 nanoseconds).
Protection
Protection
Q5. Given six memory partitions of 100 MB, 170 MB, 40 MB,
205 MB, 300 MB, and 185 MB (in order), how would the first-
fit, best-fit, and worst-fit algorithms place processes of size
200 MB, 15 MB, 185 MB, 75 MB, 175 MB, and 80 MB (in
order)?
Q9.
END