Professional Documents
Culture Documents
NLHDH Tuan9
NLHDH Tuan9
block = pointer
Cấp phát liên kết (tiếp)
⚫ Thuật toán cấp phát đơn giản: Chỉ cần địa
chỉ khối đầu tiên
⚫ Không gian đĩa được sử dụng hiệu quả
⚫ Truy cập ngẫu nhiên: Chậm LA/511
Q
⚫ Minh họa:
Bảng chỉ số
Ví dụ cấp phát chỉ số
Cấp phát chỉ số (tiếp)
⚫ Cần có một bảng chỉ số
⚫ Truy cập ngẫu nhiên
⚫ Truy cập động, không có phân mảnh ngoài,
nhưng có chi phí tối thiểu, bắt buộc cho khối
chỉ số
⚫ Mapping from logical to physical in a file of
maximum size of 256K words and block size
of 512 words. We need only 1 block for index
Q
table. Q = displacement into index table
LA/512
R = displacement into block
R
Indexed Allocation – Mapping
(Cont.)
⚫ Mapping from logical to physical in a
file of unbounded length (block size of
512 words). Q 1
outer-index
0 block[i] free
bit[i] =
1 block[i] occupied
⚫ Performance
⚫ disk cache – separate section of main memory for
frequently used blocks
⚫ free-behind and read-ahead – techniques to
optimize sequential access
⚫ improve PC performance by dedicating section of
memory as virtual disk, or RAM disk.
Các vị trí cache khác nhau
Cache trang
⚫ A page cache caches pages rather than disk
blocks using virtual memory techniques.