Computer System Management - File Systems Amarjeet Singh August 27, 2012 Partly adopted from Computer System Management Slides by Navpreet Singh
Logistics Lab Session Please read through the handout and browse through the video before coming for the lab session Creative session: September-10: Each group to perform/show video for 15 minutes Theme - Any topic covered so far in the SM course Skit/Play/Video For live performance, at least one student from each group to make video of the performance Marks will be given only on submission of the video 5% of total weight Videos from last year uploaded at http://www.iiitd.edu.in/~amarjeet/sm2011-files/
Logistics Learn-it-yourself Topics now uploaded on the course website A link to spreadsheet also shared select a topic, make a group of 3 students and put your group name in that list Only 2 groups allowed per topic First come, first serve. If a topic is already taken by 2 groups, select another topic Bonus Deadline Sep 22 (If you finish by this deadline, you will be given 20% extra marks) Final Deadline Oct 20
Quiz From Last Class 19200-8-N-1 19200: Timeout session, pulses per second N: No even parity, north bridge, No error 8: memory bits, total bits (including parity, start, data, stop) Quite a few got it correct 1 bit parity Some put parity bit after every 3 bits - I only asked for 1 bit for 8 bits Even parity: Count of 1s should be even - if not then parity bit is 1 Many got it correct
Quiz From Last Class PCIe vs PCI 3 slots in PCIe Memory bits reserved for PCIe PCIe is close to processor and has more pins PCIe has parallel interface PCIe has extendable ports (GPU/ethernet) can be installed In PCI data is parallel i.e. can be sent in only one direction Pins are directly connected in PCIe PCIe uses serial interface vs PCI using parallel - this allows PCIe to send data at faster rate PCIe is newer technology PCI is slow as we need to wait for a task to complete to go to another task Partially has to do with that this topic was not covered extensively - but I only asked for 2 reasons
Quiz From Last Class HDD vs CD/DVD CD writes at 52x Speed higher in CD since read through laser vs in HDD where it is stored magnetically CD writes internal tracks first while HDD writes external tracks first Reading/writing speed are different for CD/DVD and same for HDD Many got it right that HDD has fixed rotational velocity while CD has fixed linear velocity
Some revision What is boot loader? Where all is it located? Give some examples of boot loaders What are two different kind of user interfaces for an OS? What are two different ways in which applications and hardware are handled by the kernel in OS? What are different components involved in a typical OS interaction What are the two file systems for Windows OS?
File System File system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them Most file systems maintain the physical location of the file on an underlying data storage device such as hard disk drive in terms of fixed-size blocks (the smallest logical amount of disk space that can be allocated to hold a file) What can be those fixed-size blocks? File system organizes these blocks into files and directories Keeps track of used sectors and their association with the corresponding file and unused sectors
File System And hence typical information connectivity will be File name -> Index in file allocation table -> Other information (including physical address) In addition to address, other information (metadata) is also stored - file size, date and time of creation/modification, access permissions etc. Formatting can be thought of as installing a file system so that your system is ready to store files Like installing book shelves and catalogue system before we add books in the library
Types of File System File system types can be classified into disk file systems, network file systems and flash file systems A disk file system is a file system designed for the storage of files on a data storage device, most commonly a disk drive e.g. FAT, NTFS, ext2, ext3 etc. A network file system is a file system that acts as a client for a remote file access protocol, providing access to files on a server e.g. NFS etc. A flash file system is a file system designed for storing files on flash memory devices e.g. JFFS2
File System and OS File system is an integral part of any modern operating system Windows Operating system supports FAT and NTFS File Systems Linux popularly supports ext2, ext3, ext4 File Systems Other flavors of Operating Systems may support other File Systems like UFS in many UNIX Operating Systems and HFS in MAC OS X All Operating Systems provide a user interface like Command Line (CLI) or File Browser to access and manage File System information
FAT File System The File Allocation Table (FAT) file system was initially developed for DOS Operating System and was later used and supported by all versions of Microsoft Windows. It was an evolution of Microsoft's earlier operating system MS-DOS and was the predominant File System in Windows versions like 95, 98, ME etc. All the latest versions of Windows still support FAT file system although it may not be popular. FAT had various versions like FAT12, FAT16 and FAT32. Successive versions of FAT were named after the number of bits in the table: 12, 16 and 32.
FAT File System Relatively simple - used in memory cards, cameras etc. FAT12 FAT16 FAT32 12 bit address for clusters Cluster size limited to 8 KB What is the maximum supported drive size? 16 bit address for cluster Maximum cluster size 32 KB Maximum supported drive size? 28 of the 32 bits used for cluster addressing Maximum cluster size 32 KB Maximum supported drive size?
NTFS File System Video from youtube http://www.youtube.com/watch?v=szofcci5dtc
NTFS File System Much more complex - Journaling File System Keeps track of changes in the journal (log) before committing to main file system Advantage - less likely to be corrupted in case of system crash Example - Deleting a file in Unix involves Removing its directory entry Marking space for file and its index in table as free in free space map Crash in-between imply the file system goes through the complete list - can take a lot of time for large file systems In a journal file system, it requires reading the journal again and performing the changes until the system is consistent Allows Access Control List (ACL) based permission control
NTFS File System Later versions of Windows like Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, and Windows Vista also use NTFS
File System in Linux Linux supports many different file systems, but common choices for the system disk include the ext family (such as ext2 and ext3), XFS, JFS and ReiserFS The ext3 or third extended file system is a journaled file system and is the default file system for many popular Linux distributions It is an upgrade of its predecessor ext2 file system and among other things it has added the journaling feature The ext4 or fourth extended file system is the successor to ext3 file system
ext4 File System Journaling File System for Linux Can support volume upto 1 exabyte (10 18 ) with file sizes upto 16 terabytes Backward compatible with ext2 and ext3 - possible to mount ext2/ext3 as ext4 filesystem Uses extents for memory reservation Extent is a range of contiguous physical memory blocks A single extent can map up to 128 MB of contiguous space in 4 KB block size Uses delayed allocation Delaying block allocation until the data is going to be written on the disk Improves performance and reduces fragmentation by making decisions based on actual file size
HFS Plus File System Hierarchical File System (HFS): MAC OS X filesystem Allocation blocks - contain one or more sectors 32 bit value to address allocation blocks Journaled file system Supports ACL based file security Maximum volume size - 8 exabytes
Flash File System Why cant we use the disk file system? Erasing blocks - Flash memory blocks have to be explicitly erased before they can be rewritten Time taken for erase may be significant - beneficial to erase unused blocks when the device is idle Random access does not incur latency in flash memory: If a single block is overwritten multiple times it tends to wear out - FFS spreads out writes evenly In practice, flash file systems are only used for embedded flash memories that do not have a controller. Removable flash memory cards and USB flash drives have built-in controllers to manage them with dedicated algorithms like wear leveling, bad block recovery, power loss recovery etc.
Learning What did you learn today? Each group to write on a sheet of paper and submit me with their names This is also your attendance for the day