MyFS: An Enhanced File System for MINIX A Dissertation Submitted in partial fulfillment of the requirement for the award of the degree of MASTER OF ENGINEERING ( COMPUTER TECHNOLOGY & APPLICATIONS ) By ASHISH BHAWSAR College Roll No. 05/CTA/03 Delhi University Roll No. 3005 Under the guidance of Prof. Asok De Department Of Computer Engineering Delhi College Of Engineering, New Delhi-110042 (University of Delhi) July-2005 1 CERTIFICATE This is to certify that the dissertation entitled “MyFS: An Enhanced File System for MINIX” submitted by Ashish Bhawsar in the partial fulfillment of the requirement for the award of degree of Master of Engineering in Computer Technology and Application, Delhi College of Engineering is an account of his work carried out under my guidance and supervision. Professor D. Roy Choudhury Professor Asok De Head of Department Head of Department Department of Computer Engineering Department of Information Technology Delhi College of Engineering Delhi College of Engineering Delhi Delhi 2 ACKNOWLEDGEMENT It is a great pleasure to have the opportunity to extent my heartiest felt gratitude to everybody who helped me throughout the course of this project. I would like to express my heartiest felt regards to Dr. Asok De, Head of the Department, Department of Information Technology for the constant motivation and support during the duration of this project. It is my privilege and owner to have worked under the supervision. His invaluable guidance and helpful discussions in every stage of this thesis really helped me in materializing this project. It is indeed difficult to put his contribution in few words. I would also like to take this opportunity to present my most sincere regards to Dr. Goldie Gabrani, Assistant Professor, Department of Computer Engineering, for her able guidance and support. I would also like to take this opportunity to present my sincere regards to my teachers viz. Professor D. Roy Choudhury, Dr S. K. Saxena, Mr. Rajeev Kumar and Mrs. Rajni Jindal for their support and encouragement. I am thankful to my friends and classmates for their unconditional support and motivation during this project. Ashish Bhawsar M.E. (Computer Technology & Applications) College Roll No. 05/CTA/03 Delhi University Roll No. 3005 3 ABSTRACT In this dissertation, design and implementation of an enhanced MINIX file system MyFS for MINIX operating system has been proposed and implemented. This design is for MINIX operating system and MyFS is modified version of MINIX file system with some new features, like append-only, immutable files/directories and secure deletion. MINIX file system has some limitations. MyFS, is an effort to enhance the existing MINIX file system, and also include some new features. In MINIX file system maximum file size is restricted to nearly 65 MB. MyFS lift this restriction and is capable to handle the files of large size. The maximum file size limit is extended to 4GB nearly. MyFS uses the triple indirect blocks to implement support for large files, which have not been used in existing MINIX file system. Two new types of file and directory have been added; append-only and immutable files/directories. These new type of files have are being provided in many modern operating systems, and have been proved very useful to store sensitive system and configuration information. Another new feature of secure file deletion has been added. File systems just delete the references of the file and leave the file data undeleted, which can be recovered by recovery software. Moreover some special techniques can recover the data after overwriting. [5] To securely delete the user data from the disk some specific data patterns are to be write on the disk data blocks.[5] Secure deletion feature tries to delete user file data by overwriting such patterns on the disk. This dissertation is focusing on the design and implementation of these modifications. This design does not propose a new file system from the scratch but suggest modification for enhancement in the existing MINIX file system. 4 Contents 1. Problem Definition and Introduction…………………………………... 1.1 Literature survey…………………………………………….……………... 1.1.1 What is an operating system? ……………………….………….…. 1.1.2 Types of operating systems………………………….…..………… 1.1.3 File system : overview……………………………………………... 1.1.4 File systems in UNIX like OSs…………………………………….. 1.2 Problem Description.………………………………………………………. 1.3 Thesis organization………………………………………………………… 2. File System Concepts……………………………………………………. 2.1 Introduction………………………………………………………………... 2.1.1 Various File Systems ……………………………………………… 2.2 File Concepts ……………………………………………………………… 2.2.1 File Naming ……………………………………………………….. 2.2.2 File Structure ……………………………………………………… 2.2.3 File Access…………………………………………………………. 2.2.4 File Attributes……………………………………………………… 2.2.5 File Operations…………………………………………………….. 2.3 Implementation of Files …………………………………………………… 2.3.1 Contiguous Allocation ……………………………………………. 2.3.2 Linked List Allocation …………………………………………….. 2.3.3 Linked List Allocation Using an Index …………………………… 2.3.4 I-NODES ………………………………………………………….. 2.4 Directories…………………………………………………………………. 2.4.1 Directories in UNIX……………………………………………….. 2.5 Disk Space Management…………………………………………………... 2.5.1 Keeping Track of Free Block……………………………………… 2.6 Protection Mechanisms…………………………………………………….. 2.6.1 Protection Domains………………………………………………... 3. Overview of the MINIX File System .. ……………………………… 3.1 System Calls……………………………………………………………….. 3.2 File System Structure ……………………………………………………… 3.2.1 Super 3.2.2 Block…………………………………………..…………………… 3.2.3 Bit Maps…………………………………………………………… 3.2.4 I-nodes…………………………………………..………………… 3.2.5 Directories…………………………………………..……………... 3.2.6 File Descriptors……………………………………………………. 3.3 File Locking ……………………………………………………………….. 3.4 Pipes and Special Files…………………………………………………… 5 3.5 Mounting Operation……………………………………………….…….. 4. MyFS: Concepts and Design….…..…………………………………….. 4.1 Limitations of existing MINIX File System…….…………………………. 4.2 Concepts ……………………………………….………………………….. 4.2.1 Large Data Blocks ………………………………………………… 4.2.2 Large files …………………………………………………………. 4.2.3 Append only File/Directory ………………………………………. 4.2.4 Immutable File/Directory …………………………………………. 4.2.5 Secure Deletion……………………………………………………. 4.2.5.6 Erasure of Data stored on Magnetic Media………………. 4.3 Design Issues 4.4 Design……………………………………………………………………… 4.4.1 Large Files…………………………………………………………. 4.4.2 Append-only and Immutable Files………………………………… 4.4.3 Change in Super Block…………………………………………….. 4.4.4 Secure Deletion of Files…………………………………………… 5. MyFS: Implementation…………………………………………….……. 5.1 Support for backward compatibility ………………………………………. 5.2 Description of various features implemented …………..………………… 5.2.1 Regular file system check …………….…………………………... 5.2.2 Large files………………………………………………………….. 5.2.3 Append-only and Immutable Files/directories…………………….. 5.2.4 Secure Deletion of Files…………………………………………... 5.2.5 Large Data Block ……………………………………………….…. 6. Conclusions and Future Work………………………………………….. 6.1 Conclusion………………….……………………………………………… 6.2 Future work………………….……………………………………………... References…………………………………………………………….….….. Source Code...……………………………………………………………….. 6 CHAPTER 1 PROBLEM DEFINITION AND INTRODUCTION 1.1 Literature survey Before having problem introduction, first we summarize a few basic terms and ideas related to operating systems in this section. 1.1.1 What is an Operating System? An operating system (OS) is the system software responsible for the direct control and management of hardware and basic system operations. Additionally, it provides a foundation upon which to run application software. The operating system ensures that other applications are able to use memory, input and output devices and have access to the file system. If multiple applications are running, the operating system schedules these such that all processes have sufficient processor time where possible and do not interfere with each other. In general, the operating system is the first layer of software loaded into computer memory when it starts up. As the first software layer, all other software that gets loaded after it depends on this software to provide them with various common core services. These common core services include disk access, memory management, task scheduling, and user interfacing. Since these basic common services are assumed to be provided by the OS. Some examples of operating systems: UNIX like OS’s (which consists of all UNIX from BSD (FreeBSD) and Linux, Mac OS, Microsoft Windows, Solaris, MS-DOS, CP/M and AmigaOS. An operating system is conceptually broken into three sets of components: a user interface (which may consist of a GUI and/or a command line interpreter or "shell"), low-level system 7 utilities, and a kernel--which is the heart of the operating system. As the name implies, the shell is an outer wrapper to the kernel, which in turn talks directly to the hardware. The portion of code that performs these core services is called the "kernel" of the operating system. Compiler Banking System Web Browser Application Programs Shell Kernel Hardware Figure 1.1 Components of Operating System The kernel is the core of an operating system. It is a piece of software responsible for providing secure access to the machine's hardware and to various computer processes (a process is a computer program in a state of execution). Since there are many programs, and hardware access is limited, the kernel also decides when and how long a program should be able to make use of a piece of hardware, which is called scheduling.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages141 Page
-
File Size-