Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Assignment 2 Theoretical


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Assignment 2 Theoretical

  1. 1. Theoretical Assignment 2 Saúl Gausin Ramón González
  2. 2. Page tableA page table is the data structure used by a virtual memorysystem in a computer operating system to store the mappingbetween virtual addresses and physical addresses. Virtualaddresses are those unique to the accessing process.
  3. 3. TLBA TLB has a fixed number of slots that contain page tableentries, which map virtual addresses to physical addresses.The virtual memory is the space seen from a process. Thisspace is segmented in pages of a prefixed size. The page table ketrack of where the virtual pages are loaded in the physicalmemory. The TLB is a cache of the page table.
  4. 4. Translation processWhen a virtual address needs to be translated into a physicaladdress, the TLB is searched first. If a match is found (a TLBhit), the physical address is returned and memory access cancontinue. However, if there is no match (called aTLB miss), thehandler will typically look up the address mapping in the pagetable to see whether a mapping exists (a Page Walk). If oneexists, it is written back to the TLB, and the faulting instructionis restarted.
  5. 5. This is a example about Virtual Memory andPhysical Memory
  6. 6. Virtual MemoryOne way of combining RAM with slower storage to give thesystem the appearance of having more RAM than is actuallyinstalled.The disadvantage of Virtual Memory is obvious: the accesstime to hard disk is very high.
  7. 7. Pagination/SwapingAccessed Pages: 1, 2, 1, 3, 4, 1, 2, 3, 4Available Page Frames: 3
  8. 8. FIFOThe first data to be added to the queue will be the first data tobe removed, then processing proceeds sequentially in thesame order.
  9. 9. FIFOstruct 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; }};
  10. 10. LRULRU is an efficient algorithm to find an item that most likely hasnot been accessed very recently,given a set of items and asequence of access events to the items.
  11. 11. File system - FATA normal directory entry contains the short name, file size,starting cluster, and temporal information. When were lookingat that information it will be all collected together in the 32 bytesdirectory.Each directory entry points to a starting cluster and to a place inthe FAT where the cluster chain for the rest of the file islocated.
  12. 12. File system - NTFSIn NTFS, youll stillhave a boot sector withcluster sizes and otherfundamentalinformation about thefile systemThe Bitmap is used todetermineallocation/unallocationof clusters.
  13. 13. File system - Ext2/3The boot record in Linux is called a Superblock. Linux dividesthe drive up into block groups and youll frequently find a copyof the Superblock at the beginning of these block groups.
  14. 14. SuperblocksThe first data structure weshould be concered with is theSuperblock. It is located 1024bytes from the beginning ofthe drive.In the 1024 bytesbefore the Superblockcontains the boot code. Itscontents are basic size andconfiguration information.Youll find copies of it at thebeginning of many of the blockgroups.
  15. 15. 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.
  16. 16. i-nodei-nodes have 12 directpointers to content blocks.They will have 1 indirectpointer, 1 double indirectpointer, and 1 tripleindirect pointer.
  17. 17. Example of hard disk statistics WD RE Hard Drives
  18. 18. Compare with Rinards notesMedia Transfer Rate (MB/s): 3.6-5.5 Media Transfer Rate (MB/s): 61Track-to-track Seek: 1.3 ms Track-to-track Seek: 2.0 msMax Seek: 25 ms Max Seek: 21 msRotational Speed: 5,400 rpm Rotational Speed: 7,200 rpmAverage Latency: 5.6 ms Average Latency: 4.2 ms
  19. 19. Difference between SATA and ATASummary:1. ATA cables are wider than SATA cables.2. SATA devices are faster than ATA devices with gainsranging 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 whichATA doesn’t have.
  20. 20. Difference between SATA and ATAATA cables have connectors at each end and another one in the middle that allows up to twodevices to be connected at the same time. SATA or Serial ATA is the newer interfacing standardthat is meant to replace ATA. It can be easily recognized with its much narrower cable that onlyallows one device to be attached per cable.ATA is a relatively old technology that has gone over a few changes before arriving to its currentstate. The latest IDE devices and controllers can theoretically achieve up to 133MB/s datatransfer, the actual speed can be lower; even more so when two devices attached to a single areused at the same time since only one device can transmit data at a time. Having two hard driveson a single connector could also cause problems when the jumpers that identify the master andthe slave are mixed up. This problem doesn’t occur in SATA drives since there is only one driveattached to every connector.The SATA interface was meant as an improvement over the older ATA interface. Although SATAsinitial speed of 150MB/s isn’t much of an improvement, later versions that could achieve up to300MB/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 notpossible with the older ATA drives. This capability developed into eSATA which is an externalimplementation of SATA drives much like in USB drives. A minor advantage, though still worthmentioning, is that the inherent smallness of SATA cables makes it easier to clean up the cablesinside the computer. This isn’t only good in an aesthetic point of view but it also creates lesserblockages to air circulation that cools the system.
  21. 21. RAID diskAcronym for Redundant Array of Independent Disks, is astorage technology that provides increased reliability andfunctions through redundancy. This is achieved by combiningmultiple disk drive components into a logical unit, where data isdistributed across the drives in one of several ways called"RAID levels".RAID is now used as an umbrella term for computer datastorage schemes that can divide and replicate data amongmultiple physical drives.
  22. 22. The physical drives are said to be in a RAID, which is accessed by theoperating system as one single drive. The different schemes orarchitectures 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 additionalstorage.RAID 1 - Data is written identically to multiple drives. Increased readperformance, and only a minimal write performance reduction.
  23. 23. FAT and NTFSFAT 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.
  24. 24. FAT and NTFSNTFS 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 mustnt 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.
  25. 25. Reference linksVirtual Memory: Vs. FAT: disk statistics: