Vmfs

436 views

Published on

theoretical practice

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
436
On SlideShare
0
From Embeds
0
Number of Embeds
49
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Vmfs

  1. 1. ERICK ESQUIVEL <ul><li>1446516 </li></ul>
  2. 2. Virtual Memory :)
  3. 3. Fetch Policy <ul><li>Determines when a page should be brought into main memory. Two common policies: </li></ul><ul><ul><li>Demand paging only brings pages into main memory when a reference is made to a location on the page (paging on demand only). </li></ul></ul><ul><ul><ul><li>many page faults when a process is started but should decrease as more pages are brought in. </li></ul></ul></ul><ul><ul><li>Prepaging brings in more pages than needed. </li></ul></ul><ul><ul><ul><li>It is more efficient to bring in pages that reside contiguously on the disk. </li></ul></ul></ul><ul><ul><ul><li>efficiency not definitely established: the extra pages brought in are “often” not referenced. </li></ul></ul></ul>
  4. 4. TLB <ul><li>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 (generally loaded in memory) keeps track of where the virtual pages are loaded in the physical memory. The TLB is a cache of the page table; that is, only a subset of its content are stored. </li></ul><ul><li>The CPU has to access main memory for a: </li></ul><ul><li>instruction cache miss </li></ul><ul><li>data cache miss </li></ul><ul><li>TLB miss </li></ul><ul><li>The third case (the simplest case) is where the desired information itself actually is in a cache, but the information for virtual-to-physical translation is not in a TLB. These are all about equally slow, so a program &quot;thrashing&quot; the TLB will run just as poorly as one thrashing an instruction or data cache. That is why a well functioning TLB is important. </li></ul>
  5. 5. Page Replacement <ul><li>What happens if there is no free frame to allocate? </li></ul><ul><li>Here comes page replacement - find some page in memory that is “not that used” and swap it out. A free frame was just created. </li></ul><ul><li>Page Replacement Algorithms </li></ul><ul><li>First In First Out (FIFO) Stack Algorithms </li></ul><ul><li>The Optimal Algorithm (OPT) LRU Apprx.: Second-Chance Algorithm </li></ul><ul><li>Least Recently Used (LRU) Enhanced Second-Chance </li></ul><ul><ul><li>Counter implementation </li></ul></ul><ul><ul><li>Stack implementation </li></ul></ul><ul><li>Page Buffering Algorithm </li></ul>
  6. 6. Virtual Memory <ul><li>Virtual memory is a technique that allows the execution of processes that may not be completely in memory. </li></ul><ul><li>Allocation of Frames </li></ul><ul><ul><li>Minimum Number of Frames </li></ul></ul><ul><ul><li>Global Versus Local Allocation </li></ul></ul><ul><ul><li>Allocation Algorithms </li></ul></ul><ul><ul><li>-proportional allocation </li></ul></ul><ul><ul><li>-equal allocation </li></ul></ul>
  7. 7. Allocation of Frames <ul><li>Minimum number of frames in memory per process </li></ul><ul><li>All of the pages needed for any possible instruction need to be in memory </li></ul><ul><li>for this instruction to be executed. </li></ul><ul><ul><li>Allocation Algorithms </li></ul></ul><ul><ul><li>Proportional allocation .-Allocate frames according to size of process. </li></ul></ul><ul><ul><li>Equal allocation .-Each process gets the same number of frames. Divide the frames equally between the processes. </li></ul></ul>
  8. 8. Allocation of Frames <ul><li>Global versus Local Frame Allocation </li></ul><ul><li>Global replacement </li></ul><ul><ul><li>Allows a process to select a victim frame from the set of all frames.even if that frame is currently allocated to some other process; </li></ul></ul><ul><li>Local replacement </li></ul><ul><ul><li>A victim frame is selected from the set of frames allocated to this process. </li></ul></ul><ul><li>Global replacement is more efficient overall and therefore is commonly used. Also easier to implement. </li></ul><ul><li>Local replacement prevents external influences on the page fault rate of this process as long as the same number of frames is allocated. </li></ul>
  9. 9. Pseudo Code <ul><li>Memory Allocation </li></ul><ul><li>Acquire(Counting_Semaphore) </li></ul><ul><li>Lock(mutex) </li></ul><ul><li>Retrieve the memory block Unlock(mutex) </li></ul><ul><li>Memory Deallocation </li></ul><ul><li>Lock(mutex) </li></ul><ul><li>Release the memory block Unlock(mutex) </li></ul><ul><li>Release(Counting_Semaphore) </li></ul>
  10. 10. Virtual Memory <ul><li>Pseudo Code </li></ul><ul><li>Construction and Initialization </li></ul>TLB Creation Open user program file Size: code + data (initialized and uninitialized) + stack Create Swapfile Copy user Program file to swap file Construct Page Table Create Core Map
  11. 11. Esteban Sifuentes <ul><li>1395440 </li></ul>
  12. 12. FileSystem Pseudocódigo
  13. 13. What we know: <ul><li>FILES ARE DATA READILY AVAILABLE. </li></ul><ul><li>WHERE TO STORE IT: HARD DISK/ FLOPPY DISK </li></ul>
  14. 14. DIRECTORY.CC
  15. 15. <ul><li>Directory::Directory(int size) </li></ul><ul><li>{ </li></ul><ul><li>table = new DirectoryEntry[size]; </li></ul><ul><li>tableSize = size; </li></ul><ul><li>for (inti = 0; i<tableSize; i++) </li></ul><ul><li>table[i].inUse = false; </li></ul><ul><li>} </li></ul>
  16. 16. <ul><li>void </li></ul><ul><li>Directory::FetchFrom(OpenFile *file) </li></ul><ul><li>{ </li></ul><ul><li>file->ReadAt((char *)table, tableSize * sizeof(DirectoryEntry), 0); </li></ul><ul><li>} </li></ul><ul><li>--------------------------------------------------------------------------------------------- </li></ul><ul><li>void </li></ul><ul><li>Directory::WriteBack(OpenFile *file) </li></ul><ul><li>{ </li></ul><ul><li>file->WriteAt((char *)table, tableSize * sizeof(DirectoryEntry), 0); </li></ul><ul><li>} </li></ul>
  17. 17. <ul><li>bool </li></ul><ul><li>Directory::Add(const char *name, intnewSector) </li></ul><ul><li>{ </li></ul><ul><li>if (FindIndex(name) != -1) </li></ul><ul><li>return false; </li></ul><ul><li>for (inti = 0; i<tableSize; i++) </li></ul><ul><li>if (!table[i].inUse) { </li></ul><ul><li>table[i].inUse = true; </li></ul><ul><li>strncpy(table[i].name, name, FileNameMaxLen); </li></ul><ul><li>table[i].sector = newSector; </li></ul><ul><li>return true; </li></ul><ul><li>} </li></ul><ul><li>return false; // no space. Fix when we have extensible files.} </li></ul>
  18. 18. <ul><li>int </li></ul><ul><li>Directory::FindIndex(const char *name) </li></ul><ul><li>{ </li></ul><ul><li>for (inti = 0; i<tableSize; i++) </li></ul><ul><li>if (table[i].inUse&& !strncmp(table[i].name, name, FileNameMaxLen)) </li></ul><ul><li> return i; </li></ul><ul><li>return -1; // name not in directory </li></ul><ul><li>} </li></ul>
  19. 19. SYNCHDISK.CC
  20. 20. <ul><li>SynchDisk::SynchDisk(char* name) </li></ul><ul><li>{ </li></ul><ul><li>semaphore = new Semaphore(&quot;synch disk&quot;, 0); </li></ul><ul><li>lock = new Lock(&quot;synch disk lock&quot;); </li></ul><ul><li>disk = new Disk(name, DiskRequestDone, (int) this); </li></ul><ul><li>} </li></ul>
  21. 21. <ul><li>void </li></ul><ul><li>SynchDisk::ReadSector(intsectorNumber, char* data) </li></ul><ul><li>{ </li></ul><ul><li>lock->Acquire(); </li></ul><ul><li>// only one disk I/O at a time </li></ul><ul><li>disk->ReadRequest(sectorNumber, data); </li></ul><ul><li>semaphore->P(); // wait for interrupt </li></ul><ul><li>lock->Release(); </li></ul><ul><li>} </li></ul>
  22. 22. <ul><li>static void </li></ul><ul><li>DiskRequestDone (intarg) </li></ul><ul><li>{ </li></ul><ul><li>SynchDisk* disk = (SynchDisk *)arg; </li></ul><ul><li>disk->RequestDone(); </li></ul><ul><li>} </li></ul><ul><li>---------------------------------------------------------------------- </li></ul><ul><li>void </li></ul><ul><li>SynchDisk::RequestDone() </li></ul><ul><li>{ </li></ul><ul><li>semaphore->V(); </li></ul><ul><li>} </li></ul>
  23. 23. CARLOS GALINDO <ul><li>1416106 </li></ul>
  24. 24. HARD DISK DRIVE The hard drive is a magnetic device that stores all programs and computer data Its storage capacity is measured in gigabytes (GB) and is higher than that of a disk (floppy). They are usually built into the motherboard where you can connect more than one, but there are external drives that connect to the PC via a USB connector
  25. 25. LIFE OF HARD DISK DRIVE BM has concluded that using Linux extends the life of a hard disk 10% because the same tasks to reduce recourse to disk. They usually last from 5 to 8 years but there are computers that have a record of 12 years and work without problem, this is also due to the use of the same
  26. 26. FINDING THE TIME OF LIFE HARD DISK DRIVE http :// bicosyes.com /numero-de-horas-de-vida-de-un-disco-duro/
  27. 27. SATA SATA I SATA II SATA III FRECUENCIA 1500 MHz 3000 MHz 6000 MHz Bits/clock 1 1 1 Codificacion 8b 10b 80% 80% 80% Bits/Byte 8 8 8 Velocidad real 150 MB/s 300 MB/s 600 MB/s
  28. 28. MEANING OF PIN Pin 1 GND Masa Pin 2 HT+/DR+ Transmisión diferencial + Pin 3 HT-/DR- Transmisión diferencial - Pin 4 GND Masa Pin 5 HR-/DT- Recepción diferencial - Pin 6 HR-/DT+ Recepción diferencial + Pin 7 GND Masa
  29. 29. SATA external disk Speed SATA external drives (it measured 115 MB  s with external RAID) No protocol conversion PATA / SATA to USB/ Firewire, all disk features are available for the host. The cable length is restricted to 2 meters, USB and FireWire allow longer distances. Voltage was increased minimum and maximum transmission 500mV - 600mV (400 mV - 600mV) Voltage dropped to 240 mV received - 600 mV (325 mV - 600 mV) Available capacity of the disks in RAID 0 and RAID
  30. 30. SCSI Use CCS (Common Command Set). It is a command in a paragraph Set Access Devices that make them more or less compatible
  31. 32. SATA Vs SCSI SATA SCSI Cheaper Some manufacturers put in its specifications that the discs are made to operate between 8 and 11 hours a day For a database server is fully recommended to use SCSI disks. the value that you give your data is very important - if they are important, not use ATA or Serial-ATA
  32. 33. raid The acronym RAID means &quot;Redundant Array of Inexpensive Disks&quot; (Redundant Array of Inexpensive Disks). The term was used to compare inexpensive disks RAID sets small, relatively inexpensive, as compared to a single disk, large and expensive (SLED, single large expensive disk). Today, the term is outdated SLED
  33. 35. FLASH MEMORY Time nonvolatile memory that is often used in cell phones, digital cameras, PDAs, laptops, hard drives. Can be erased and rewritten. They are an evolution of EEPROM that allows multiple memory locations to be written or erased in one operation using electrical impulses
  34. 36. MEMORIA FLASH Vs Hard Disk advantage disadvantages Small size, making it ideal for transporting data Limited lifespan, allow about 100,000 write cycles nothing more Very low power consumption, this is especially the battery-powered equipment Lower speed than a hard drive, especially in writing Capacidad menor que la de un disco duro Price per GB significantly higher than that of a hard disk

×