A Novel Term Weighing Scheme Towards Efficient Crawl Of
Total Page:16
File Type:pdf, Size:1020Kb
International Journal of Computer Engineering and Applications, Volume X, Special Issue, ICRTCST -2016 www.ijcea.com, ISSN 2321-3469 FEATURES AND DIFFERENCES OF LINUX EXT, EXT2, EXT3 AND EXT4 FILE SYSTEMS Sanku Sinha 1, Sadique Nayeem 2 1, 2 Department of Computer Science and Engineering, R.V.S. College of Engineering and Technology, Jamshedpur ABSTRACT: File System is a way used by operating systems to store and organize files so that the files can be accessed efficiently. File system is a component of operating system and it interacts with the abstraction of the underlying hardware known as Block Layer. An open source environment like Linux has over 50 different file systems since its existence. Though, in recent years, the speed of CPUs have been increased and the Hard drive technology have tremendous growth, the file systems have also been evolved so that operating system can provide better performance to the user. To measure the performance of the file systems there are different benchmarks used by different developers. In this work, a study of Linux file system evolution has been carried out. As there are several file systems for different Linux Distributions and different Linux kernel versions, some popular versions of extended file systems like ext, ext2, ext3 and ext4 has been considered. The features and differences on the inode structures of these file systems have been discussed. Keywords: Ext, ext2, ext3, ext4, inode, Linux [1] INTRODUCTION Operating System of a particular system is chosen by a user on the basis of applications to be used or better system performance. For better system performance, the performance of the file system is a key part. A file system is part of modern operating system that provides permanent data storage with relatively low access latencies. In Linux, everything is a file. For instance, device drivers, inter-process-communication channels or network connections can appear as files to the user. The Linux kernel handles all these types by handling the implementation details of the files behind a layer of software called the Virtual File System (VFS) [1, 5]. The file system is usually composed of several layers. Each layer uses the features of lower layers to create new features for use by the higher layers. The lowest layer, the I/O Sanku Sinha and Sadique Nayeem 1 FEATURES AND DIFFERENCES OF LINUX EXT, EXT2, EXT3 AND EXT4 FILE SYSTEMS control, consists of device drivers and interrupts handlers. At this layer, information is transferred between the main memory and the secondary disk system. The purpose of the device drivers is to translate high-level commands, such as retrieving a certain disk block, to low-level hardware specific instructions. The basic file system issues generic commands to the appropriate device driver to read and write physical blocks on the disk. The file- organization module translates logical block addresses to physical block addresses for the basic file system to transfer. Finally, the logical file system manages the metadata information; this includes the directory structure [5]. In the last 24 years the Linux file system evolve from ext file system to the current file system. In 1992, the first extended file system (EXT) was created especially for Linux. The first change to ext happened the following year with the creation of the second extended Application Programs Logical File Systems File-Organization Module Basic File System I/O Control Device filesystem (EXT2). EXT3 was developed in 2001 in order to expand upon EXT2 and is the first major Linux filesystem to enable journaling. EXT4 is a fork of the EXT3 filesystem, started in 2006 and added to the Linux kernel in 2008 [3]. Figure: 1. The Logical Structure of File Systems In this paper, a detail study has been made about the features and differences of ext, ext2, ext3 and ext4 File systems. The rest of the paper is organized as follows. In section 2, the concept of inode has been explained. In section 4 the features of ext, ext2, ext3 and ext4 has been explained. Finally the study has been concluded with the overall discussion of these file systems and future scope of this study has been discussed. [2] INODES 2 International Journal of Computer Engineering and Applications, Volume X, Special Issue, ICRTCST -2016 www.ijcea.com, ISSN 2321-3469 An Inode number points to an Inode. An Inode is a data structure that stores the following information about a file : (a) Size of file, (b) Device ID, (c) User ID of the file, (d) Group ID of the file, (e) The file mode information and access privileges for owner, group and others, (f) File protection flags, (g) The timestamps for file creation, modification etc, (i) link counter to determine the number of hard links and(j)Pointers to the blocks storing file’s contents [7]. When a user requests an I/O operation on the file, the kernel code converts the current offset to a block number, uses this number as an index in the block addresses table and reads or writes the physical block. The following figure represents the structure of an inode [3]. Data Blocks Mode Data Blocks Owner info Size Data Blocks Timestamps Data Direct Blocks Blocks Indirect Blocks Data Double Indirect Blocks Triple Indirect Data Blocks Data Blocks Figure: 2. The Structure of inode [3] FILE SYSTEMS [3.1] Ext To implement support Minix File system in Linux, a Virtual File System (VFS) layer was developed. The VFS layer was initially written by Chris Provenzano and later rewritten by Linus Torvalds. After integration of the VFS in the kernel, a new file system, called the “Extended File System” was implemented in 1992 and added to Linux version 0.96c. The maximum size of the file system was 2 giga bytes and maximum file name size was 255 characters [1]. There was no support for the separate access, inode modification and data modification timestamps. The file system used linked list data structure to keep track of free Sanku Sinha and Sadique Nayeem 3 FEATURES AND DIFFERENCES OF LINUX EXT, EXT2, EXT3 AND EXT4 FILE SYSTEMS blocks and inodes [1]. After a long use, the file system gets fragmented and results bad performance. [3.2] Ext2 The Second Extended File system was devised (by Rémy Card) as an extensible and powerful file system for Linux. The Second Extended File System has been designed and implemented to fix some problems present in the first Extended File System. The Ext2fs supports standard Unix file types: regular files, directories, device special files and symbolic links.Ext2fs is able to manage filesystems created on really big partitions. While the original kernel code restricted the maximal filesystem size to 2 GB, recent work in the VFS layer have raised this limit to 4 TB. Thus, it is now possible to use big disks without the need of creating many partitions. It provides long file names. It uses variable length directory entries. The maximal file name size is 255 characters. This limit could be extended to 1012 if needed [4]. Ext2fs reserves some blocks for the super user (root). Normally, 5% of the blocks are reserved. This allows the administrator to recover easily from situations where user processes fill up file systems [4]. [3.3] Ext3 The third extended file system (Ext3) was Developed by Stephen Tweedie in 2001 and was introduced in Linux Kernel 2.4.15.The main benefit of ext3 is that it allows journaling [5]. Journaling has a dedicated area in the file system, where all the changes are tracked. When the system crashes, the possibility of file system corruption is less because of journaling. There are three types of journaling available in ext3 file system [3,4]. Journal – Metadata and content are saved in the journal. Ordered – Only metadata is saved in the journal. Metadata are journaled only after writing the content to disk. This is the default. Writeback – Only metadata is saved in the journal. Metadata might be journaled either before or after the content is written to the disk. In ext3 the maximum individual file size can be from 16 GB to 2 TB and the overall ext3 file system size can be from 2 TB to 32 TB. An ext2 file system can be converted to ext3 file system directly (without backup/restore) [5]. [3.4] Ext4 Ext4 stands for fourth extended file system and it was introduced in Linux Kernel 2.6.19 in 2008. Ext4 supports huge individual file size and overall file system size. The maximum individual file size can be from 16 GB to 16 TB and overall maximum ext4 file system size is 1 EB (exabyte) [2]. Directory can contain a maximum of 64,000 subdirectories (as opposed to 4 International Journal of Computer Engineering and Applications, Volume X, Special Issue, ICRTCST -2016 www.ijcea.com, ISSN 2321-3469 32,000 in ext3). An existing ext3 file system can be mounted as ext4 file system without having to upgrade it [2]. Several other new features are introduced in ext4: multiblock allocation, delayed allocation, journal checksum. fast fsck, etc. In ext4, there have the option of turning the journaling feature “off” [6]. [6] CONCLUSION In this paper, the evolution and features of mutually compatible Linux file systems ext, ext2, ext3 and ext4 have been studied. Ext4 file system has shown superior characteristics when compared to its four predecessors, ext, ext2, ext3 and ext4. It has also be seen that the limit of individual file size as well as the file system size has been increased with evolution of linux file system. The journaling mechanism has provided stability in Linux file system.