1. A page table maps virtual addresses to physical addresses in memory, allowing processes to access virtual memory. A TLB cache improves translation speed.
2. Virtual memory allows more RAM to be accessed than is physically installed by paging pages between RAM and disk. Pagination and swapping impact performance.
3. RAID uses multiple disks for redundancy to increase reliability or performance. Common RAID levels include RAID 0 for striping and RAID 1 for mirroring.
4. FAT supports small directories faster than NTFS but performance degrades with fragmentation. NTFS resists fragmentation and supports larger files and directories.
2. Page table
A page table is the data structure used by a virtual memory
system in a computer operating system to store the mapping
between virtual addresses and physical addresses. Virtual
addresses are those unique to the accessing process.
3. TLB
A TLB has a fixed number of slots that contain page table
entries, which map virtual addresses to physical addresses.
The virtual memory is the space seen from a process. This
space is segmented in pages of a prefixed size. The page table ke
track of where the virtual pages are loaded in the physical
memory. The TLB is a cache of the page table.
4. Translation process
When a virtual address needs to be translated into a physical
address, the TLB is searched first. If a match is found (a TLB
hit), the physical address is returned and memory access can
continue. However, if there is no match (called aTLB miss), the
handler will typically look up the address mapping in the page
table to see whether a mapping exists (a Page Walk). If one
exists, it is written back to the TLB, and the faulting instruction
is restarted.
5.
6. This is a example about Virtual Memory and
Physical Memory
7. Virtual Memory
One way of combining RAM with slower storage to give the
system the appearance of having more RAM than is actually
installed.
The disadvantage of Virtual Memory is obvious: the access
time to hard disk is very high.
9. FIFO
The first data to be added to the queue will be the first data to
be removed, then processing proceeds sequentially in the
same order.
10. FIFO
struct fifo_node
{
As you see this pseudo-code
struct fifo_node *next;
value_type value;
};
class fifo
{
fifo_node *front;
fifo_node *back;
fifo_node *dequeue(void)
{
fifo_node *tmp = front;
front = front->next;
return tmp;
}
queue(value)
{
fifo_node *tempNode = new fifo_node;
tempNode->value = value;
back->next = tempNode;
back = tempNode;
}
};
11. LRU
LRU is an efficient algorithm to find an item that most likely has
not been accessed very recently,given a set of items and a
sequence of access events to the items.
12. File system - FAT
A normal directory entry contains the short name, file size,
starting cluster, and temporal information. When we're looking
at that information it will be all collected together in the 32 bytes
directory.
Each directory entry points to a starting cluster and to a place in
the FAT where the cluster chain for the rest of the file is
located.
13. File system - NTFS
In NTFS, you'll still
have a boot sector with
cluster sizes and other
fundamental
information about the
file system
The Bitmap is used to
determine
allocation/unallocation
of clusters.
14. File system - Ext2/3
The boot record in Linux is called a Superblock. Linux divides
the drive up into block groups and you'll frequently find a copy
of the Superblock at the beginning of these block groups.
15. Superblocks
The first data structure we
should be concered with is the
Superblock. It is located 1024
bytes from the beginning of
the drive.In the 1024 bytes
before the Superblock
contains the boot code. Its
contents are basic size and
configuration information.
You'll find copies of it at the
beginning of many of the block
groups.
16. Information in the superblock
● The total number of blocks in the whole file system.
● The number of blocks per block group.
● The number of reserved blocks preceding the first block
group.
● The total number of inodes in the system.
● Number of inodes per block group.
● Number of sectors per block are all located in the
Superblock.
17. i-node
i-nodes have 12 direct
pointers to content blocks.
They will have 1 indirect
pointer, 1 double indirect
pointer, and 1 triple
indirect pointer.
19. Compare with Rinard's notes
Media Transfer Rate (MB/s): 3.6-5.5 Media Transfer Rate (MB/s): 61
Track-to-track Seek: 1.3 ms Track-to-track Seek: 2.0 ms
Max Seek: 25 ms Max Seek: 21 ms
Rotational Speed: 5,400 rpm Rotational Speed: 7,200 rpm
Average Latency: 5.6 ms Average Latency: 4.2 ms
20. Difference between SATA and ATA
Summary:
1. ATA cables are wider than SATA cables.
2. SATA devices are faster than ATA devices with gains
ranging from 12% to 350%.
3. Two devices per ATA cable, only one on SATA.
4. ATA drives are prone to jumper mix-ups.
5. SATA drives can be hot-swapped while ATA devices cannot.
6. SATA has an external implementation called eSATA which
ATA doesn’t have.
21. Difference between SATA and ATA
ATA cables have connectors at each end and another one in the middle that allows up to two
devices to be connected at the same time. SATA or Serial ATA is the newer interfacing standard
that is meant to replace ATA. It can be easily recognized with its much narrower cable that only
allows one device to be attached per cable.
ATA is a relatively old technology that has gone over a few changes before arriving to its current
state. The latest IDE devices and controllers can theoretically achieve up to 133MB/s data
transfer, the actual speed can be lower; even more so when two devices attached to a single are
used at the same time since only one device can transmit data at a time. Having two hard drives
on a single connector could also cause problems when the jumpers that identify the master and
the slave are mixed up. This problem doesn’t occur in SATA drives since there is only one drive
attached to every connector.
The SATA interface was meant as an improvement over the older ATA interface. Although SATAs
initial speed of 150MB/s isn’t much of an improvement, later versions that could achieve up to
300MB/s and 600MB/s makes the speed advantage totally undeniable. SATA drives are also hot-
swappable, meaning you can remove and attach drives while the OS is running, which is not
possible with the older ATA drives. This capability developed into eSATA which is an external
implementation of SATA drives much like in USB drives. A minor advantage, though still worth
mentioning, is that the inherent smallness of SATA cables makes it easier to clean up the cables
inside the computer. This isn’t only good in an aesthetic point of view but it also creates lesser
blockages to air circulation that cools the system.
22.
23. RAID disk
Acronym for Redundant Array of Independent Disks, is a
storage technology that provides increased reliability and
functions through redundancy. This is achieved by combining
multiple disk drive components into a logical unit, where data is
distributed across the drives in one of several ways called
"RAID levels".
RAID is now used as an umbrella term for computer data
storage schemes that can divide and replicate data among
multiple physical drives.
24. The physical drives are said to be in a RAID, which is accessed by the
operating system as one single drive. The different schemes or
architectures are named by the word RAID followed by a number.
Each scheme provides a different balance between two key goals:
Increase data reliability and Increase input/output performance.
RAID 0 - Has no redundancy. Improved performance and additional
storage.
RAID 1 - Data is written identically to multiple drives. Increased read
performance, and only a minimal write performance reduction.
25.
26. FAT and NTFS
FAT highs:
● The effective work requires few of RAM.
● Fast work with small and average directories.
● The disc implements less movements of the heads.
● The effective work on slow discs.
FAT lows:
● Quick performance decrease with the fragmentation going up (only
for FAT32).
● Difficulty in access to big files (more than 10% of the disc space).
● Very slow work with directories containing huge amount of files.
27. FAT and NTFS
NTFS highs:
● Fragmentation does not influence the system performance.
● Complicity of the structure of directories and the number of files do
not affect the performance.
● Quick access to the required file fragment.
● Very quick access to small files.
NTFS lows:
● The memory size mustn't be less than 64 MBytes.
● Slow discs and controllers without Bus Mastering slows the system
performance down tremendously.
● The work with average-size directories is quite difficult, since they
are fragmented.
● The disc working for a long time with 80% - 90% of its space
occupied shows low performance.