UNIT IV: FILE SYSTEMS PART A

Size: px
Start display at page:

Download "UNIT IV: FILE SYSTEMS PART A"

Transcription

1 QUESTION BANK Sub Code: CS2411 Dept: EEE Sub Name: Operating Systems Sem/Year:VII/IV UNIT IV: FILE SYSTEMS PART A (2 Marks) 1. What is File system? A file is a named collection of related information that isrecorded on secondary storage. A file contains either programs ordata. A file has certain "structure" based on its type. File attributes: Name, identifier, type, size, location, protection, time, date File operations: creation, reading, writing, repositioning, deleting, truncating, appending, renaming File types: executable, object, library, source code etc. 2. Write the attributes of the file. (AUC APR/MAY 2011) A file has certain other attributes, which vary from one operating system to another, but typically consist of these: Name, identifier, type, location, size, protection, time, date and user identification 3. What are the various layers of a file system? The file system is composed of many different levels. Each level in the design uses the feature of the lower levels to create new features for use by higher levels. Application programs Logical file system File-organization module Basic file system I/O control Devices 4. What is the content of a typical file control block?. (AUC APR/MAY 2011) 5. What are the various file operations? The six basic file operations are Creating a file Writing a file Reading a file MAHALAKSHMI ENGINEERING COLLEGE Page 1

2 Repositioning within a file Deleting a file Truncating a file 6. What are the advantages and disadvantages of Contiguous allocation? The advantages are a. Supports direct access b. Supports sequential access c. Number of disk seeks is minimal The disadvantages are a. Suffers from external fragmentation b. Suffers from internal fragmentation c. Difficulty in finding space for a new file 7. Why is protection needed in file sharing systems?. (AUC NOV/DEC 2008) Files are the main information storage mechanism in most computer systems, file protection is needed. Access to files can be controlled separately for each type of access read, write, execute, append, delete, list directory, and so on. File protection can be provided by access lists, passwords, or other techniques. 8. List any four types of file 9. What are the advantages and disadvantages of linked allocation? The advantages are a. No external fragmentation b. Size of the file does not need to be declared The disadvantages are a. Used only for sequential access of files. b. Direct access is not supported c. Memory space required for the pointers. d. Reliability is compromised if the pointers are lost or damaged 10. Mention the objectives of file management system. (AUC APR/MAY 2010) To meet the data management needs and requirements of the user which include storage of data and the ability to perform the aforementioned operations. To guarantee, to the extent possible, that the data in the file are valid. To optimize performance, both from the system point of view in terms of overall throughput. To provide I/O support for a variety of storage device types. MAHALAKSHMI ENGINEERING COLLEGE Page 2

3 To minimize or eliminate the potential for lost or destroyed data. To provide a standardized set of I/O interface routines to use processes. 11. Differentiate the various file access methods.(auc APR/MAY 2010) The different types of accessing a file are: Sequential access: Information in the file is accessed sequentially Direct access: Information in the file can be accessed without any particular order. Other access methods: Creating index for the file, indexed sequential access method (ISAM) etc. 12. A direct or sequential access has a fixed file-size S-byte record. At what logical location, the first byte of record N will start? (AUC NOV/DEC2011,13) Soln: Record N will start at byte ((N-1)*S) Give an example of a situation where variable-size records would be useful. (AUC NOV2011) Variable length record is useful when the members size is not same for all examples. 14. What is garbage collection? (AUC MAY/JUNE 2012,14) Garbage collection is the process of collecting the unused memory spaces. 15. How can the index blocks be implemented in the indexed allocation scheme? The index block can be implemented as follows a. Linked scheme b. Multilevel scheme c. Combined scheme 16. What are the structures used in file-system implementation? Several on-disk and in-memory structures are used to implement a file system a. On-disk structure include Boot control block Partition block Directory structure used to organize the files File control block (FCB) b. In-memory structure include In-memory partition table In-memory directory structure System-wide open file table Per-process open table 17. What are the functions of virtual file system (VFS)? a. It separates file-system-generic operations from their implementation defining a clean VFS interface. It allows transparent access to different types of file systems mounted locally. b. VFS is based on a file representation structure, called a vnode. It contains a numerical value for a network-wide unique file.the kernel maintains one vnode structure for each active file or directory. MAHALAKSHMI ENGINEERING COLLEGE Page 3

4 18. Define seek time and latency time. The time taken by the head to move to the appropriate cylinder or track is called seek time. Once the head is at right track, it must wait until the desired block rotates under the read-write head. This delay is latency time. 19. What is Directory? The device directory or simply known as directory records information-such as name, location, size, and type for all files on that particular partition. The directory can be viewed as a symbol table that translates file names into their directoryentries 20. What are the operations that can be performed on a directory? The operations that can be performed on a directory are Search for a file Create a file Delete a file Rename a file List directory Traverse the file system 21. What are the most common schemes for defining the logical structure of a directory? The most common schemes for defining the logical structure of a directory Single-Level Directory Two-level Directory Tree-Structured Directories Acyclic-Graph Directories General Graph Directory 22. What is the information associated with an open file? Several pieces of information are associated with an open file which may be: File pointer File open count Disk location of the file Access rights 23. Define UFD and MFD. In the two-level directory structure, each user has her own user file directory (UFD). Each UFD has a similar structure, but lists only the files of a single user. When a job starts the system's master file directory (MFD) is searched. The MFD is indexed by the user name or account number, and each entry points to the UFD for that user. 24. What are the most common schemes for defining the logic structure directory? The most common schemes for defining the logical structure of a directory o Single-Level Directory o Two-level Directory o Tree-Structured Directories o Acyclic-Graph Directories o General Graph Directory MAHALAKSHMI ENGINEERING COLLEGE Page 4

5 25. What is a path name? A pathname is the path from the root through all subdirectories to a specified file. In a two-level directory structure a user name and a file name define a path name. 26. What is cache? How it improves the performance of the system? A cache is a region of fast memory that holds copies of data. Access to the cached copy is more efficient than access to the original. Caching and buffering are distinct functions, but sometimes a region of memory can be used for both purposes 27. What is full and incremental backup? 28. What are the allocation methods of a disk space? Three major methods of allocating disk space which are widely in use are a. Contiguous allocation b. Linked allocation c. Indexed allocation 29. What are the two types of system directories?.(auc MAY/JUNE 2012,13) PART-B ( 16 Marks ) 1. Distinguish between demand paging and anticipatory paging (8) (AUC NOV 08,12,13) Demand paging: In computer operating systems, demand paging is an application of virtual memory. In a system that uses demand paging, the operating system copies a disk page into physical memory only if an attempt is made to access it (i.e., if a page fault occurs). It follows that a process begins execution with none of its pages in physical memory, and many page faults will occur until most of a process s working set of pages is located in physical memory. This is an example of lazy loading techniques. Advantages Demand paging, as opposed to loading all pages immediately: Only loads pages that are demanded by the executing process. As there is more space in main memory, more processes can be loaded reducing context switching time which utilizes large amounts of resources. Less loading latency occurs at program startup, as less information is accessed from secondary storage and less information is brought into main memory. Does not need extra hardware support than what paging needs, since protection fault can be used to get page fault. Disadvantages MAHALAKSHMI ENGINEERING COLLEGE Page 5

6 Individual programs face extra latency when they access a page for the first time. So demand paging may have lower performance than anticipatory paging algorithms such as prepaging. Programs running on low-cost, low-power embedded systems may not have a memory management unit that supports page replacement. Memory management with page replacement algorithms becomes slightly more complex. Possible security risks, including vulnerability to timing attacks; Anticipatory paging Some systems use demand paging waiting until a page is actually requested before loading it into RAM. Other systems attempt to reduce latency by guessing which pages not in RAM are likely to be needed soon, and pre-loading such pages into RAM, before that page is requested. (This is often in combination with pre-cleaning, which guesses which pages currently in RAM are not likely to be needed soon, and pre-writing them out to storage). When a page fault occurs, anticipatory paging systems will not only bring in the referenced page, but also the next few consecutive pages (analogous to a prefetch input queue in a CPU). The swap prefetch mechanism goes even further in loading pages (even if they are not consecutive) that are likely to be needed soon. 2. Comment on inverted page tables and their use in paging and segmentation (8)(AUC NOV 08) i) Hierarchical paging: Recent computer system suppoil a large logical address space from V 2 to 2 M. In this system the page table becomes large. It is difficult to allocate contiguous main memory for page table. To solve this problem, two level page table scheme is used. The page table is divided into number of smaller pieces. Fig.l shows the two level page table scheme. In this two level page table scheme, the page itself is also paged. ii) Hashed page table: Hashed page table handles the address space larger than 32 bits. The virtual page number is used as hashed value. Linked list is used in the hash table. Each entry contains the linked list of element that hash to the same location. Each element in the hash table contains following fields. 1. Virtual page number 2. Mapped page frame value 3. Pointer to the next element in the linked list. Fig.2 shows hashed page table MAHALAKSHMI ENGINEERING COLLEGE Page 6

7 Working: 1. Virtual page number is taken from virtual address. 2. Virtual page number is hashed into the hash (able. 3. Virtual page number is compared with the first element of linked list. 4. Both the value is matched, that value is (ie page frame) used for calculating physical address. 5. If the both value is not matched, the entire linked list is searched for a matching. Clustered page table is same as hashed page table but only difference is that each entry in the hash table refers to several pages. Hi) Inverted page table: As address spaces have grown to 64 bits, the side of traditional page table becomes a problem. Even with two level page tables, the tables themselves can become too large. Inverted page table is used to solve this problem. The inverted page table has one entry for each real page of memory. A physical page table instead of a logical one. The physical page table is often called as inverted page table. This table contains one entry per page frame. An inverted page table is very good at mapping from physical page to logical page number, but not very good at mapping from virtual page number to physical page number. Fig shows the inverted page table. Page table Inverted page table There is no other hardware or registers dedicated to memory mapping the TLB can be quite larger, so that missing faults are rare. With an inverted page table, most address translations are handled by the TLB when there is a miss in the translation look aside buffer, the operating system is notified and TLB miss handler is invoked. Hashing is used to speed up the search. 3. Explain the two level directory and three structured directory. (16) (AUC APR 11,14) Explain the various schemes used for defining the logical structure of a directory.(8) (AUC MAY/JUNE 2012) The directory can be viewed as a symbol table that translates file name into their directory entries MAHALAKSHMI ENGINEERING COLLEGE Page 7

8 When considering a particular directory structure, we need to keep in mind the operations that are to be performed on a directory: Search for a file: We need to be able to search a directory structure to find the entry for a particular file. Since files have symbolic names and similar names may indicate a relationship between files, we may want to be able to find all files whose names match a particular pattern. Create a file: New files need to be created and added to the directory.delete a file: When a file is no longer needed, we want to remove it fromthe directory. List a directory: We need to be able to list the files in a directory, and the contents of the directory entry for each file in the list. Rename a file: Because the name of a file represents its contents to its users,the name must be changeable when the contents or use of the file changes. Renaming a file may also allow its position within the directory structure to be changed. Traverse the file system: We may wish to access every directory, and everyfile within a directory structure. Single-Level Directory The simplest directory structure is the single-level directory. All files arecontained in the same directory, which is easy to support and understand A single-level directory has significant limitations, however, when the number of files increases or when the system has more than one user. Sinceall files are in the same directory, they must have unique names. If two userscall their data file test, then the uniquename rule is violated. Two-Level Directory MAHALAKSHMI ENGINEERING COLLEGE Page 8

9 A single-level directory often leads to confusion of file names between different users. The standard solution is to create a separate directory for each user.in the two-level directory structure, each user has her own user file directory(ufd). Each UFD has a similar structure, but lists only the files of a singleuser. When a user job starts or a user logs in, the system's master file directory(mfd) is searched. The MFD is indexed by user name or account number, and each entry points to the UFD for that user Although the two-level directory structure solves the name-collision problem, it still has disadvantages. This structure effectively isolates one user from another. This isolation is an advantage when the users are completely indepen Two-Level Directory Tree-structured directory structure. some other predefined location) to find an entry for this user (for accounting purposes). In the accounting file is a pointer to (or the name of) the user's initial directory. This pointer is copied to a local variable for this user that specifies the user s initial current directory.path names can be of two types: absolicte path names or relative path names.an absolute path name begins at the root and follows a path down to the specified file, giving the directory names on the path. A relative path name defines a path from the current directory Acyclic-Graph Directories: It has shared subdirectories and files. It also has two different names that it is called aliasing. If dict deletes list dangling pointer. Allow only links to file not subdirectories. Garbage collection. Every time a new link is added use a cycle detection algorithm to determine whether it is OK. Solutions: Backpointers, so we can delete all pointers. Variable size records a problem. Backpointers using a daisy chain organization. Entry-hold-count solution Figure Acyclic Graph Directories MAHALAKSHMI ENGINEERING COLLEGE Page 9

10 General Graph Directory Figure Graph Directory 4. Explain various file allocation methods in detail. (8) (AUC NOV 2010) MAHALAKSHMI ENGINEERING COLLEGE Page 10

11 Contiguous Allocation An allocation method refers to how disk blocks are allocated for files: Contiguous allocation Linked allocation Indexed allocation Each file occupies a set of contiguous blocks on the disk. Simple only starting location (block #) and length (number of blocks) are required. It takes a random access. It occupy wasteful of space (dynamic storage-allocation problem) and files cannot grow. Contiguous Allocation of Disk Space MAHALAKSHMI ENGINEERING COLLEGE Page 11

12 Figure Contiguous Allocation Extent-Based Systems 1. Many newer file systems use a modified contiguous allocation scheme. 2. Extent-based file systems allocate disk blocks in extents. 3. An extent is a contiguous block of disks. Extents are allocated for file allocation. A file consists of one or more extents. Linked Allocation 1. Each file is a linked list of disk blocks: blocks may be scattered anywhere on the disk. 2. Simple need only starting address 3. Free-space management system no waste of space 4. No random access 5. Mapping Block to be accessed is the Qth block in the linked chain of blocks representing the file. MAHALAKSHMI ENGINEERING COLLEGE Page 12

13 Displacement into block = R + 1. File-allocation table (FAT) disk-space allocation used by MS-DOS and OS/2. Figure Linked Allocation File-Allocation Table Figure. File-Allocation Table (FAT) Indexed Allocation Brings all pointers together into the index block. Logical view. Need index table MAHALAKSHMI ENGINEERING COLLEGE Page 13

14 Random access: Dynamic access without external fragmentation, but have overhead of index block. Mapping from logical to physical in a file of maximum size of 256K words and block size of 512 words. We need only 1 block for index table. Q = displacement into index table and R = displacement into block 1. Mapping from logical to physical in a file of unbounded length (block size of 512 words). 2. Linked scheme Link blocks of index table (no limit on size). 3. Mapping from logical to physical in a file of unbounded length (block size of 512 words). 4. Linked scheme Link blocks of index table (no limit on size). Combined Scheme: UNIX (4K bytes per block) Figure UNIX File Allocation MAHALAKSHMI ENGINEERING COLLEGE Page 14

15 5.Explain in detail the free space management with neat diagram. (16 (AUC NOV 2010) Block number calculation (number of bits per word) * (number of 0-value words) + offset of first 1 bit. Bit map requires extra space. Example:block size = 212 bytes disk size = 230 bytes (1 gigabyte) n = 230/212 = 218 bits (or 32K bytes) Easy to get contiguous files Linked list (free list): Cannot get contiguous space easily and No waste of space Grouping Counting Need to protect: o Pointer to free list o Bit map: It must be kept on disk. Copy in memory and disk may differ. It cannot allow for block[i] to have a situation where bit[i] = 1 in memory and bit[i] = 0 on disk. Solution: Set bit[i] = 1 in disk. Allocate block[i] and Set bit[i] = 1 in memory Linked Free Space List on Disk MAHALAKSHMI ENGINEERING COLLEGE Page 15

16 Since there is only a limited amount of disk space, it is necessary to reuse the space from deleted files for new files, if possible. Bit Vector Free-space list is implemented as a bit map or bit vector. Each block is represented by 1 bit. If the block is free, the bit is 1; if the block is allocated, the bit is 0. For example consider a disk where blocks 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 17, 18, 25, 26, and 27 are free, and the rest of the blocks are allocated. The free-space bit map would be The main advantage of this approach is that it is relatively simple and efficient to find the first free block or n consecutive free blocks on the disk. The calculation of the block number is (number of bits per word) x (number of 0-value words) + offset of first 1 bit Linked List Another approach is to link together all the free disk blocks, keeping a pointy to the first free block in a special location on the disk and caching it in memory. This first block contains a pointer to the next free disk block, and so on. Block 2 would contain a pointer to block 3, which would point to block 4, which would point to block 5, which would point to block 8, and so on. Usually, the operating system simply needs a free block so that it can allocate that block to a file, so the first block in the free list is used. Grouping A modification of the free-list approach is to store the addresses of n free blocks in the first free block. The first n-1 of these blocks are actually free. The importance of this implementation is that the addresses of a large number of free blocks can be found quickly, unlike in the standard linked-list approach. Counting MAHALAKSHMI ENGINEERING COLLEGE Page 16

17 Several contiguous blocks may be allocated or freed simultaneously, particularly when space is allocated with the contiguous allocation algorithm or through clustering. A list of n free disk addresses, we can keep the address of the first free block and the number n of free contiguous blocks that follow the first block. Each entry in the free-space list then consists of a disk address and a count. Although each entry requires more space than would a simple disk address, the overall list will be shorter, as long as count is generally greater than 1. 6.Explain linked file allocation method. (6) (AUC APR 10, APR 11) Linked allocation solves all problems of contiguous allocation. With link allocation, each file is a linked list disk blocks; the disk blocks may be scattered anywhere on the disk. This pointer is initialized to nil (the end-of-list pointer value) to signify an empty file. The size field is also set to 0. A write to the file causes a free bio to be found via the free-space management system, and this new block is the written to, and is linked to the end of the file There is no external fragmentation with linked allocation, and any free! block on the free-space list can be used to satisfy a request. Notice also that there is no need to declare the size of a file when that file is created. A file can continue to grow as long as there are free blocks. Consequently, it is never necessary to compact disk space. The major problem is that it can be used effectively for only sequential access files. To find the ith block of a file we must start at the beginning of that file, and follow the pointers until we get to the ith block. Each access to a pointer requires a disk read and sometimes a disk seek. Consequently, it is inefficient to support a direct-access capability for linked allocation files. Linked allocation is the space required for the pointers If a pointer requires 4 bytes out of a 512 Byte block then 0.78 percent of the disk is being used for pointer, rather than for information. The usual solution to this problem is to collect blocks into multiples, called clusters, and to allocate the clusters rather than blocks. For instance, the file system define a cluster as 4 blocks and operate on the disk in only cluster units. Pointers then use a much smaller percentage of the file's disk space. This method allows the logical-to-physical block mapping to remain simple, but improves disk throughput (fewer disk head seeks) and decreases the space needed for block allocation and free-list management. The cost of this approach an increase in internal fragmentation. Yet another problem is reliability. Since the files are linked together by pointers scattered all over the disk, consider what would happen if a pointer were lost or damaged. Partial solutions are to use doubly linked lists or to store the file name and relative block number in each block; however, these schemes require even more overhead for each file. An important variation, on the linked allocation method is the use of a file allocation table (FAT). This simple but efficient method of disk-space allocation is used by the MS-DOS and OS/2 operating systems. A section of disk at the beginning of each-partition is set aside to MAHALAKSHMI ENGINEERING COLLEGE Page 17

18 contain the table. The table has one entry for each disk block, and is indexed by block number. The FAT is used much as is a linked list. The directory entry contains the block number of the first block of the file. The table entry indexed by that block number then contains the block number of the next block in the file. This chain continues until the last block, which has a special end-of-file value -as the table entry. Unused blocks are indicated by a 0 table value. Allocating a new block to a file is a simple matter of finding the first 0-valued table entry, and replacing the previous end-of-file value with the address of the new block. The 0 is then replaced with the end-offile value. An illustrative example is the FAT structure of for a file consisting of disk blocks 217, 618, and Explain the advantages and shortcomings of LRU page replacement.(16) (AUC NOV 08) pages that have been heavily used in the last few instructions will probably beheavily used again in the next few. Conversely, pages that have not been used forages will probably remain unused for a long time. This idea suggests a realizable algorithm: when a page fault occurs, throw out the page that has been unused for the longest time. This strategy is calledlru(least Recently Used) paging. Although LRU is theoretically realizable, it is not cheap. To fully implementlru, it is necessary to maintain a linked list of all pages in memory, with themost recently used page at the front and the least recently used page at the rear. The difficulty is that the list must be updated on every memory reference. Find-ing a page in the list, deleting it, and then moving it to the front is a very time con-suming operation, even in hardware (assuming that such hardware could be built).however, there are other ways to implement LRU with special hardware. Letus consider the simplest way first. This method requires equipping the hardware with a 64-bit counter, that is automatically incremented after each instruction. Furthermore, each page table entry must also have a field large enough to containthe counter. After each memory reference, the current value ofcis stored in thepage table entry for the page just referenced. When a page fault occurs, theoperating system examines all the counters in the page table to find the lowestone. That page is the least recently used.now let us look at a second hardware LRU algorithm. For a machine withpage frames, the LRU hardware can maintain a matrix ofn nbits, initially all zero. Whenever page framekis referenced, the hardware first sets all the bits of row kto 1, then sets all the bits of columnkto 0. At any instant, the row whosebinary value is lowest is the least recently used, the row whose value is next lowest is next least recently used, and so forth. The workings of this algorithm are given in Fig for four page frames and page references in the order MAHALAKSHMI ENGINEERING COLLEGE Page 18

19 LRU using a matrix when pages are referenced in the order 0, 1, 2,3, 2, 1, 0, 3, 2, 3. 8.(i) Explain the various attributes of a file The file attributes are, Name only information kept in human-readable form. Type needed for systems that support different types. Location pointer to file locat ion on device. Size current file size. Protection controls who can do reading, writing, executing. Time, date, and user identification data for protection, security, and usage monitoring. Information about files are kept in directory structure. (ii)consider a file currently consisting of 100 blocks. Assume that the file control block (and the index block, in the case of indexed allocation) is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed (single-level) allocation strategies, if, for one block, the following conditions hold. In the contiguous allocation case, assume that there is no room to grow in the beginning, but there is room to grow in the end. Assume that the block information to be added is stored in memory. (1) The block is added at the beginning. (2) The block is added in the middle. (3) The block is added at the end. MAHALAKSHMI ENGINEERING COLLEGE Page 19

20 (4) The block is removed from the end. (5) The block is removed from the middle. (6) The block is removed from the end. (12) (AUC MAY/JUNE 2012) 9. What is the role of Access matrix for protection? Explain The model of protection that we have been discussing can be viewed as an access matrix, in which columns represent different system resources and rows represent different protection domains. Entries within the matrix indicate what access that domain has to that resource. Figure - Access matrix. Domain switching can be easily supported under this model, simply by providing "switch" access to other domains: MAHALAKSHMI ENGINEERING COLLEGE Page 20

21 Figure - Access matrix of Figure 14.3 with domains as objects. The ability to copy rights is denoted by an asterisk, indicating that processes in that domain have the right to copy that access within the same column, i.e. for the same object. There are two important variations: o If the asterisk is removed from the original access right, then the right is transferred, rather than being copied. This may be termed a transfer right as opposed to a copy right. o If only the right and not the asterisk is copied, then the access right is added to the new domain, but it may not be propagated further. That is the new domain does not also receive the right to copy the access. This may be termed a limited copy right, as shown in Figure 14.5 below: MAHALAKSHMI ENGINEERING COLLEGE Page 21

22 Figure - Access matrix with copy rights. The owner right adds the privilege of adding new rights or removing existing ones: MAHALAKSHMI ENGINEERING COLLEGE Page 22

23 Figure - Access matrix with owner rights. Copy and owner rights only allow the modification of rights within a column. The addition of control rights, which only apply to domain objects, allow a process operating in one domain to affect the rights available in other domains. For example in the table below, a process operating in domain D2 has the right to control any of the rights in domain D4. Figure Modified access matrix of Figure Implementation of Access Matrix Global Table MAHALAKSHMI ENGINEERING COLLEGE Page 23

24 The simplest approach is one big global table with < domain, object, rights > entries. Unfortunately this table is very large ( even if sparse ) and so cannot be kept in memory ( without invoking virtual memory techniques. ) There is also no good way to specify groupings - If everyone has access to some resource, then it still needs a separate entry for every domain. Access Lists for Objects Each column of the table can be kept as a list of the access rights for that particular object, discarding blank entries. For efficiency a separate list of default access rights can also be kept, and checked first. Capability Lists for Domains In a similar fashion, each row of the table can be kept as a list of the capabilities of that domain. Capability lists are associated with each domain, but not directly accessible by the domain or any user process. Capability lists are themselves protected resources, distinguished from other data in one of two ways: o A tag, possibly hardware implemented, distinguishing this special type of data. ( other types may be floats, pointers, booleans, etc. ) o The address space for a program may be split into multiple segments, at least one of which is inaccessible by the program itself, and used by the operating system for maintaining the process's access right capability list. A Lock-Key Mechanism Comparison Each resource has a list of unique bit patterns, termed locks. Each domain has its own list of unique bit patterns, termed keys. Access is granted if one of the domain's keys fits one of the resource's locks. Again, a process is not allowed to modify its own keys. Each of the methods here has certain advantages or disadvantages, depending on the particular situation and task at hand. Many systems employ some combination of the listed methods. 10. Write a detailed note on various file access methods with neat sketch.(16) (AUC APR 11) 1. Sequential Access: Read, next write next reset MAHALAKSHMI ENGINEERING COLLEGE Page 24

25 no read after last write (rewrite) 2. Direct Access: read n write n position to n read next write next rewrite n Sequential-access File n = relative block number Figure Sequential Access File Simulation of Sequential Access on a Direct-access File Figure Simulation of Access Files MAHALAKSHMI ENGINEERING COLLEGE Page 25

26 Example of Index and Relative Files Figure Index and Relative Files A Typical File-system Organization Figure File-System Organization MAHALAKSHMI ENGINEERING COLLEGE Page 26

27 11. Write note on (i) Log structured file system Log structured (or journaling) file systems record each update to the file system as a transaction. All transactions are written to a log. A transaction is considered committed once it is written to the log. However, the file system may not yet be updated. The transactions in the log are asynchronously written to the file system. When the file system is modified, the transaction is removed from the log. If the file system crashes, all remaining transactions in the log must still be performed. (ii) Efficiency and Usage of disk space Efficiency and Performance Efficiency dependent on the disk allocation and directory algorithms and types of data kept in file s directory entry. Performance depends on the terms of, disk cache separate section of main memory for frequently used blocks free-behind and read-ahead techniques to optimize sequential access improve PC performance by dedicating section of memory as virtual disk Various Disk-Caching Locations Figure Disk-Cache MAHALAKSHMI ENGINEERING COLLEGE Page 27

28 Page Cache page cache caches pages rather than disk blocks using echniques. emory-mapped I/O uses a page cache. outine I/O through the file system uses the buffer (disk) cache. tual emory y I/O Without a Unified Buffer Cache Figure Buffer Cache without I/O Unified Buffer Cache: A unified buffer cache uses the same page cache to cache both memory-mapped pages and ordinary file system I/O. I/O Using a Unified Buffer Cache Figure Buffer Cache with I/O MAHALAKSHMI ENGINEERING COLLEGE Page 28

29 (iii) File system mounting. A file system must be mounted before it can be accessed. 2. A unmounted file system (i.e. Fig (b)) is mounted at a mount point. (a) Existing (b) Unmounted Partition Figure Mount Point File Sharing Sharing of files on multi-user systems is desirable. Sharing may be done through a protection scheme. On distributed systems, files may be shared across a network. Network File System (NFS) is a common distributed file-sharing method Protection 1. File owner/creator should be able to control: a. what can be done b. by whom MAHALAKSHMI ENGINEERING COLLEGE Page 29

30 2. Types of access a. Read b. Write c. Execute d. Append e. Delete f. List Mode of access: T h e s e t y p e s o f a c c e s s a r e read, write, execute. The three classes of users are ask manager to create a group (unique name), say G, and add some users to the group. For a particular file (say game) or subdirectory, define an appropriate access. MAHALAKSHMI ENGINEERING COLLEGE Page 30

CS720 - Operating Systems

CS720 - Operating Systems CS720 - Operating Systems File Systems File Concept Access Methods Directory Structure File System Mounting File Sharing - Protection 1 File Concept Contiguous logical address space Types: Data numeric

More information

Chapter 7: File-System

Chapter 7: File-System Chapter 7: File-System Interface and Implementation Chapter 7: File-System Interface and Implementation File Concept File-System Structure Access Methods File-System Implementation Directory Structure

More information

File System: Interface and Implmentation

File System: Interface and Implmentation File System: Interface and Implmentation Two Parts Filesystem Interface Interface the user sees Organization of the files as seen by the user Operations defined on files Properties that can be read/modified

More information

UNIT V SECONDARY STORAGE MANAGEMENT

UNIT V SECONDARY STORAGE MANAGEMENT UNIT V SECONDARY STORAGE MANAGEMENT File System Interface: Concept Access Methods Directory Structure File System Mounting File Sharing Protection File System Implementation: File System Structure File

More information

File Management By : Kaushik Vaghani

File Management By : Kaushik Vaghani File Management By : Kaushik Vaghani File Concept Access Methods File Types File Operations Directory Structure File-System Structure File Management Directory Implementation (Linear List, Hash Table)

More information

File Systems: Interface and Implementation

File Systems: Interface and Implementation File Systems: Interface and Implementation CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those from an earlier edition

More information

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed. File-System Structure File structure Logical storage unit Collection of related information File

More information

ICS Principles of Operating Systems

ICS Principles of Operating Systems ICS 143 - Principles of Operating Systems Lectures 17-20 - FileSystem Interface and Implementation Prof. Ardalan Amiri Sani Prof. Nalini Venkatasubramanian ardalan@ics.uci.edu nalini@ics.uci.edu Outline

More information

Chapter 11: Implementing File-Systems

Chapter 11: Implementing File-Systems Chapter 11: Implementing File-Systems Chapter 11 File-System Implementation 11.1 File-System Structure 11.2 File-System Implementation 11.3 Directory Implementation 11.4 Allocation Methods 11.5 Free-Space

More information

CS6401- Operating System QUESTION BANK UNIT-IV

CS6401- Operating System QUESTION BANK UNIT-IV Part-A QUESTION BANK UNIT-IV 1. What is a File? A file is a named collection of related information that is recorded on secondary storage. A file contains either programs or data. A file has certain structure

More information

File Systems: Interface and Implementation

File Systems: Interface and Implementation File Systems: Interface and Implementation CSCI 315 Operating Systems Design Department of Computer Science File System Topics File Concept Access Methods Directory Structure File System Mounting File

More information

File Systems: Interface and Implementation

File Systems: Interface and Implementation File Systems: Interface and Implementation CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those from an earlier edition

More information

Chapter 12 File-System Implementation

Chapter 12 File-System Implementation Chapter 12 File-System Implementation 1 Outline File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency and Performance Recovery Log-Structured

More information

Chapter 11: File System Implementation. Objectives

Chapter 11: File System Implementation. Objectives Chapter 11: File System Implementation Objectives To describe the details of implementing local file systems and directory structures To describe the implementation of remote file systems To discuss block

More information

V. File System. SGG9: chapter 11. Files, directories, sharing FS layers, partitions, allocations, free space. TDIU11: Operating Systems

V. File System. SGG9: chapter 11. Files, directories, sharing FS layers, partitions, allocations, free space. TDIU11: Operating Systems V. File System SGG9: chapter 11 Files, directories, sharing FS layers, partitions, allocations, free space TDIU11: Operating Systems Ahmed Rezine, Linköping University Copyright Notice: The lecture notes

More information

File-System Interface

File-System Interface File-System Interface Chapter 10: File-System Interface File Concept Access Methods Directory Structure File-System Mounting File Sharing Protection Objectives To explain the function of file systems To

More information

FILE SYSTEM IMPLEMENTATION. Sunu Wibirama

FILE SYSTEM IMPLEMENTATION. Sunu Wibirama FILE SYSTEM IMPLEMENTATION Sunu Wibirama File-System Structure Outline File-System Implementation Directory Implementation Allocation Methods Free-Space Management Discussion File-System Structure Outline

More information

Chapter 11: File System Implementation

Chapter 11: File System Implementation Chapter 11: File System Implementation Chapter 11: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency

More information

Chapter 11: File System Implementation

Chapter 11: File System Implementation Chapter 11: File System Implementation Chapter 11: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency

More information

Chapter 11: Implementing File Systems

Chapter 11: Implementing File Systems Chapter 11: Implementing File-Systems, Silberschatz, Galvin and Gagne 2009 Chapter 11: Implementing File Systems File-System Structure File-System Implementation ti Directory Implementation Allocation

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 11: File System Implementation Prof. Alan Mislove (amislove@ccs.neu.edu) File-System Structure File structure Logical storage unit Collection

More information

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture) EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture) Dept. of Computer Science & Engineering Chentao Wu wuct@cs.sjtu.edu.cn Download lectures ftp://public.sjtu.edu.cn User:

More information

F 4. Both the directory structure and the files reside on disk Backups of these two structures are kept on tapes

F 4. Both the directory structure and the files reside on disk Backups of these two structures are kept on tapes Directory Structure A collection of nodes containing information about all files Directory Files F 1 F 2 F 3 F 4 F n Both the directory structure and the files reside on disk Backups of these two structures

More information

Da-Wei Chang CSIE.NCKU. Professor Hao-Ren Ke, National Chiao Tung University Professor Hsung-Pin Chang, National Chung Hsing University

Da-Wei Chang CSIE.NCKU. Professor Hao-Ren Ke, National Chiao Tung University Professor Hsung-Pin Chang, National Chung Hsing University Chapter 11 Implementing File System Da-Wei Chang CSIE.NCKU Source: Professor Hao-Ren Ke, National Chiao Tung University Professor Hsung-Pin Chang, National Chung Hsing University Outline File-System Structure

More information

Chapter 12: File System Implementation

Chapter 12: File System Implementation Chapter 12: File System Implementation Silberschatz, Galvin and Gagne 2013 Chapter 12: File System Implementation File-System Structure File-System Implementation Allocation Methods Free-Space Management

More information

File-System Structure

File-System Structure Chapter 12: File System Implementation File System Structure File System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency and Performance Recovery Log-Structured

More information

Chapter 11: Implementing File Systems

Chapter 11: Implementing File Systems Chapter 11: Implementing File Systems Operating System Concepts 99h Edition DM510-14 Chapter 11: Implementing File Systems File-System Structure File-System Implementation Directory Implementation Allocation

More information

Chapter 11: Implementing File Systems

Chapter 11: Implementing File Systems Chapter 11: Implementing File Systems Chapter 11: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency

More information

Principles of Operating Systems

Principles of Operating Systems Principles of Operating Systems Lecture 24-26 - File-System Interface and Implementation Ardalan Amiri Sani (ardalan@uci.edu) [lecture slides contains some content adapted from previous slides by Prof.

More information

File Systems. CS170 Fall 2018

File Systems. CS170 Fall 2018 File Systems CS170 Fall 2018 Table of Content File interface review File-System Structure File-System Implementation Directory Implementation Allocation Methods of Disk Space Free-Space Management Contiguous

More information

Chapter 12: File System Implementation

Chapter 12: File System Implementation Chapter 12: File System Implementation Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency

More information

OPERATING SYSTEM. Chapter 12: File System Implementation

OPERATING SYSTEM. Chapter 12: File System Implementation OPERATING SYSTEM Chapter 12: File System Implementation Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management

More information

File System Implementation

File System Implementation File System Implementation Last modified: 16.05.2017 1 File-System Structure Virtual File System and FUSE Directory Implementation Allocation Methods Free-Space Management Efficiency and Performance. Buffering

More information

Chapter 11: Implementing File

Chapter 11: Implementing File Chapter 11: Implementing File Systems Chapter 11: Implementing File Systems File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency

More information

File-System Structure. Allocation Methods. Free-Space Management. Directory Implementation. Efficiency and Performance. Recovery

File-System Structure. Allocation Methods. Free-Space Management. Directory Implementation. Efficiency and Performance. Recovery CHAPTER 11: FILE-SYSTEM IMPLEMENTATION File-System Structure Allocation Methods Free-Space Management Directory Implementation Efficiency and Performance Recovery Operating System Concepts, Addison-Wesley

More information

Chapter 11: Implementing File Systems. Operating System Concepts 9 9h Edition

Chapter 11: Implementing File Systems. Operating System Concepts 9 9h Edition Chapter 11: Implementing File Systems Operating System Concepts 9 9h Edition Silberschatz, Galvin and Gagne 2013 Chapter 11: Implementing File Systems File-System Structure File-System Implementation Directory

More information

File System Implementation. Sunu Wibirama

File System Implementation. Sunu Wibirama File System Implementation Sunu Wibirama File-System Structure Outline File-System Implementation Directory Implementation Allocation Methods Free-Space Management Discussion File System Structure File

More information

Chapter 10: File System Implementation

Chapter 10: File System Implementation Chapter 10: File System Implementation Chapter 10: File System Implementation File-System Structure" File-System Implementation " Directory Implementation" Allocation Methods" Free-Space Management " Efficiency

More information

Chapter 10: File-System Interface

Chapter 10: File-System Interface Chapter 10: File-System Interface Objectives: To explain the function of file systems To describe the interfaces to file systems To discuss file-system design tradeoffs, including access methods, file

More information

File-System. File Concept. File Types Name, Extension. File Attributes. File Operations. Access Methods. CS307 Operating Systems

File-System. File Concept. File Types Name, Extension. File Attributes. File Operations. Access Methods. CS307 Operating Systems CS307 File Concept A file is a named collection of related information that is recorded on secondary storage. File-System Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University

More information

Chapter 10: File-System Interface

Chapter 10: File-System Interface Chapter 10: File-System Interface Objectives: To explain the function of file systems To describe the interfaces to file systems To discuss file-system design tradeoffs, including access methods, file

More information

Chapter 11: Implementing File Systems. Operating System Concepts 8 th Edition,

Chapter 11: Implementing File Systems. Operating System Concepts 8 th Edition, Chapter 11: Implementing File Systems, Silberschatz, Galvin and Gagne 2009 Chapter 11: Implementing File Systems File-System Structure File-System Implementation Directory Implementation Allocation Methods

More information

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto Ricardo Rocha Department of Computer Science Faculty of Sciences University of Porto Slides based on the book Operating System Concepts, 9th Edition, Abraham Silberschatz, Peter B. Galvin and Greg Gagne,

More information

OPERATING SYSTEMS II DPL. ING. CIPRIAN PUNGILĂ, PHD.

OPERATING SYSTEMS II DPL. ING. CIPRIAN PUNGILĂ, PHD. OPERATING SYSTEMS II DPL. ING. CIPRIAN PUNGILĂ, PHD. File System Implementation FILES. DIRECTORIES (FOLDERS). FILE SYSTEM PROTECTION. B I B L I O G R A P H Y 1. S I L B E R S C H AT Z, G A L V I N, A N

More information

A file system is a clearly-defined method that the computer's operating system uses to store, catalog, and retrieve files.

A file system is a clearly-defined method that the computer's operating system uses to store, catalog, and retrieve files. File Systems A file system is a clearly-defined method that the computer's operating system uses to store, catalog, and retrieve files. Module 11: File-System Interface File Concept Access :Methods Directory

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 10: File System Interface Prof. Alan Mislove (amislove@ccs.neu.edu) Contiguous logical address space File Concept Types: Data numeric character

More information

Chapter 12: File System Implementation. Operating System Concepts 9 th Edition

Chapter 12: File System Implementation. Operating System Concepts 9 th Edition Chapter 12: File System Implementation Silberschatz, Galvin and Gagne 2013 Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods

More information

File System Internals. Jo, Heeseung

File System Internals. Jo, Heeseung File System Internals Jo, Heeseung Today's Topics File system implementation File descriptor table, File table Virtual file system File system design issues Directory implementation: filename -> metadata

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2017 Lecture 24 File Systems Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 Questions from last time How

More information

File System Interface and Implementation

File System Interface and Implementation Unit 8 Structure 8.1 Introduction Objectives 8.2 Concept of a File Attributes of a File Operations on Files Types of Files Structure of File 8.3 File Access Methods Sequential Access Direct Access Indexed

More information

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University Chapter 10: File System Chapter 11: Implementing File-Systems Chapter 12: Mass-Storage

More information

Virtual Memory cont d.; File System Interface. 03/30/2007 CSCI 315 Operating Systems Design 1

Virtual Memory cont d.; File System Interface. 03/30/2007 CSCI 315 Operating Systems Design 1 Virtual Memory cont d.; File System Interface 03/30/2007 CSCI 315 Operating Systems Design 1 1 Thrashing If a process does not have enough pages, the page-fault rate is very high. This leads to: Low CPU

More information

File System Interface: Overview. Objective. File Concept UNIT-IV FILE SYSTEMS

File System Interface: Overview. Objective. File Concept UNIT-IV FILE SYSTEMS UNIT-IV FILE SYSTEMS File System Interface: File Concept Access Methods Directory Structure File System Mounting Protection Overview For most users, the file system is the most visible aspect of an operating

More information

Chapter 12: File System Implementation

Chapter 12: File System Implementation Chapter 12: File System Implementation Silberschatz, Galvin and Gagne 2013 Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods

More information

Computer Systems Laboratory Sungkyunkwan University

Computer Systems Laboratory Sungkyunkwan University File System Internals Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics File system implementation File descriptor table, File table

More information

MODULE 4. FILE SYSTEM AND SECONDARY STORAGE

MODULE 4. FILE SYSTEM AND SECONDARY STORAGE This document can be downloaded from www.chetanahegde.in with most recent updates. 1 MODULE 4. FILE SYSTEM AND SECONDARY STORAGE File system provides the mechanism for storage of data and access to data

More information

File System Internals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

File System Internals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University File System Internals Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics File system implementation File descriptor table, File table

More information

Operating Systems. No. 9 ศร ณย อ นทโกส ม Sarun Intakosum

Operating Systems. No. 9 ศร ณย อ นทโกส ม Sarun Intakosum Operating Systems No. 9 ศร ณย อ นทโกส ม Sarun Intakosum 1 Virtual-Memory Management 2 Background Virtual memory separation of user logical memory from physical memory. Only part of the program needs to

More information

Week 12: File System Implementation

Week 12: File System Implementation Week 12: File System Implementation Sherif Khattab http://www.cs.pitt.edu/~skhattab/cs1550 (slides are from Silberschatz, Galvin and Gagne 2013) Outline File-System Structure File-System Implementation

More information

Chapter 11: File-System Interface

Chapter 11: File-System Interface Chapter 11: File-System Interface Silberschatz, Galvin and Gagne File Concept Contiguous logical address space Types: Data numeric character binary Program 11.2 Silberschatz, Galvin and Gagne File Structure

More information

File Directories Associated with any file management system and collection of files is a file directories The directory contains information about

File Directories Associated with any file management system and collection of files is a file directories The directory contains information about 1 File Management 2 File Directories Associated with any file management system and collection of files is a file directories The directory contains information about the files, including attributes, location

More information

Chapter 11: File-System Interface

Chapter 11: File-System Interface 1 Chapter 11: File-System Interface File Concept Access Methods Directory Structure File System Mounting File Sharing Protection 11.1 2 File Concept Contiguous logical address space Types: Data numeric

More information

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto Ricardo Rocha Department of Computer Science Faculty of Sciences University of Porto Slides based on the book Operating System Concepts, 9th Edition, Abraham Silberschatz, Peter B. Galvin and Greg Gagne,

More information

CS307: Operating Systems

CS307: Operating Systems CS307: Operating Systems Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building 3-513 wuct@cs.sjtu.edu.cn Download Lectures ftp://public.sjtu.edu.cn

More information

Chapter 11: File-System Interface

Chapter 11: File-System Interface Chapter 11: File-System Interface Silberschatz, Galvin and Gagne 2013 Chapter 11: File-System Interface File Concept Access Methods Disk and Directory Structure File-System Mounting File Sharing Protection

More information

Chapter 11: File-System Interface. File Concept. File Structure

Chapter 11: File-System Interface. File Concept. File Structure Chapter 11: File-System Interface File Concept Access Methods Directory Structure File System Mounting File Sharing Protection 11.1 File Concept Contiguous logical address space Types: Data numeric character

More information

There is a general need for long-term and shared data storage: Files meet these requirements The file manager or file system within the OS

There is a general need for long-term and shared data storage: Files meet these requirements The file manager or file system within the OS Why a file system? Why a file system There is a general need for long-term and shared data storage: need to store large amount of information persistent storage (outlives process and system reboots) concurrent

More information

MEMORY MANAGEMENT/1 CS 409, FALL 2013

MEMORY MANAGEMENT/1 CS 409, FALL 2013 MEMORY MANAGEMENT Requirements: Relocation (to different memory areas) Protection (run time, usually implemented together with relocation) Sharing (and also protection) Logical organization Physical organization

More information

CSE325 Principles of Operating Systems. File Systems. David P. Duggan. March 21, 2013

CSE325 Principles of Operating Systems. File Systems. David P. Duggan. March 21, 2013 CSE325 Principles of Operating Systems File Systems David P. Duggan dduggan@sandia.gov March 21, 2013 External View of File Manager Application Program mount() write() close() open() lseek() read() WriteFile()

More information

CSE 4/521 Introduction to Operating Systems. Lecture 23 File System Implementation II (Allocation Methods, Free-Space Management) Summer 2018

CSE 4/521 Introduction to Operating Systems. Lecture 23 File System Implementation II (Allocation Methods, Free-Space Management) Summer 2018 CSE 4/521 Introduction to Operating Systems Lecture 23 File System Implementation II (Allocation Methods, Free-Space Management) Summer 2018 Overview Objective: To discuss how the disk is managed for a

More information

File System. Minsoo Ryu. Real-Time Computing and Communications Lab. Hanyang University.

File System. Minsoo Ryu. Real-Time Computing and Communications Lab. Hanyang University. File System Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr File Concept Directory Structure File System Structure Allocation Methods Outline 2 2 File Concept

More information

Part Four - Storage Management. Chapter 10: File-System Interface

Part Four - Storage Management. Chapter 10: File-System Interface Part Four - Storage Management Chapter 10: File-System Interface Chapter 10: File-System Interface 10.1 File Concept 10.2 Access Methods 10.3 Directory and Disk Structure 10.4 File-System Mounting 10.5

More information

CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018

CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018 CSE 4/521 Introduction to Operating Systems Lecture 27 (Final Exam Review) Summer 2018 Overview Objective: Revise topics and questions for the final-exam. 1. Main Memory 2. Virtual Memory 3. Mass Storage

More information

File System Internals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

File System Internals. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University File System Internals Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics File system implementation File descriptor table, File table

More information

Chapter 4 File Systems. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved

Chapter 4 File Systems. Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved Chapter 4 File Systems File Systems The best way to store information: Store all information in virtual memory address space Use ordinary memory read/write to access information Not feasible: no enough

More information

Chapter 6 Storage Management File-System Interface 11.1

Chapter 6 Storage Management File-System Interface 11.1 Chapter 6 Storage Management File-System Interface 11.1 Chapter 6: File-System Interface File Concept Access Methods Disk and Directory Structure File-System Mounting File Sharing Protection 11.2 Objectives

More information

File System Management

File System Management Lecture 8: Storage Management File System Management Contents Non volatile memory Tape, HDD, SSD Files & File System Interface Directories & their Organization File System Implementation Disk Space Allocation

More information

Chapter 11: File-System Interface

Chapter 11: File-System Interface Chapter 11: File-System Interface Chapter 11: File-System Interface File Concept Access Methods Disk and Directory Structure File-System Mounting File Sharing Protection Objectives To explain the function

More information

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture) EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture) Dept. of Computer Science & Engineering Chentao Wu wuct@cs.sjtu.edu.cn Download lectures ftp://public.sjtu.edu.cn User:

More information

Chapter 14: File-System Implementation

Chapter 14: File-System Implementation Chapter 14: File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency and Performance Recovery 14.1 Silberschatz, Galvin and Gagne 2013 Objectives To describe

More information

Outlook. File-System Interface Allocation-Methods Free Space Management

Outlook. File-System Interface Allocation-Methods Free Space Management File System Outlook File-System Interface Allocation-Methods Free Space Management 2 File System Interface File Concept File system is the most visible part of an OS Files storing related data Directory

More information

Chapter 8 & Chapter 9 Main Memory & Virtual Memory

Chapter 8 & Chapter 9 Main Memory & Virtual Memory Chapter 8 & Chapter 9 Main Memory & Virtual Memory 1. Various ways of organizing memory hardware. 2. Memory-management techniques: 1. Paging 2. Segmentation. Introduction Memory consists of a large array

More information

Chapter 11: File System Implementation

Chapter 11: File System Implementation Chapter 11: File System Implementation File System Structure File System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency and Performance Recovery Log-Structured

More information

Chapter 11: Implementing File Systems

Chapter 11: Implementing File Systems Silberschatz 1 Chapter 11: Implementing File Systems Thursday, November 08, 2007 9:55 PM File system = a system stores files on secondary storage. A disk may have more than one file system. Disk are divided

More information

Chapter 10: File System. Operating System Concepts 9 th Edition

Chapter 10: File System. Operating System Concepts 9 th Edition Chapter 10: File System Silberschatz, Galvin and Gagne 2013 Chapter 10: File System File Concept Access Methods Disk and Directory Structure File-System Mounting File Sharing Protection 10.2 Silberschatz,

More information

Chapter 11: File-System Interface. Operating System Concepts 9 th Edition

Chapter 11: File-System Interface. Operating System Concepts 9 th Edition Chapter 11: File-System Interface Silberschatz, Galvin and Gagne 2013 Chapter 11: File-System Interface File Concept Access Methods Disk and Directory Structure File-System Mounting File Sharing Protection

More information

Chapter 8 Virtual Memory

Chapter 8 Virtual Memory Chapter 8 Virtual Memory Contents Hardware and control structures Operating system software Unix and Solaris memory management Linux memory management Windows 2000 memory management Characteristics of

More information

Advanced Operating Systems. File Systems Lecture 9

Advanced Operating Systems. File Systems Lecture 9 Advanced Operating Systems File Systems Lecture 9 File System Implementation File Concept Access Methods Disk and Directory Structure File-System Mounting File Sharing File-System Structure File-System

More information

Directory Structure and File Allocation Methods

Directory Structure and File Allocation Methods ISSN:0975-9646 Mandeep Kaur et al, / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 7 (2), 2016, 577-582 Directory Structure and ile Allocation Methods Mandeep Kaur,

More information

File System & Device Drive Mass Storage. File Attributes (Meta Data) File Operations. Directory Structure. Operations Performed on Directory

File System & Device Drive Mass Storage. File Attributes (Meta Data) File Operations. Directory Structure. Operations Performed on Directory CS341: Operating System Lect39: 12 th Nov 2014 Dr. A. Sahu Dept of Comp. Sc. & Engg. Indian Institute of Technology Guwahati File System & Device Drive Mass Storage Disk Structure, Disk Arm Scheduling,

More information

Modulo V Sistema de Arquivos

Modulo V Sistema de Arquivos April 05 Prof. Ismael H. F. Santos - ismael@tecgraf.puc-rio.br 1 Modulo V Sistema de Arquivos Prof. Ismael H F Santos Ementa File-System Interface File Concept Directory Structure File Sharing Protection

More information

Chapter 10: File System

Chapter 10: File System Chapter 10: File System Chapter 10: File-System File Concept File attributes, File operations, File types, File structures Access Methods Directory Structure File-System Mounting File Sharing Protection

More information

CMSC421: Principles of Operating Systems

CMSC421: Principles of Operating Systems CMSC421: Principles of Operating Systems Nilanjan Banerjee Assistant Professor, University of Maryland Baltimore County nilanb@umbc.edu http://www.csee.umbc.edu/~nilanb/teaching/421/ Principles of Operating

More information

Chapter 8 Virtual Memory

Chapter 8 Virtual Memory Operating Systems: Internals and Design Principles Chapter 8 Virtual Memory Seventh Edition William Stallings Operating Systems: Internals and Design Principles You re gonna need a bigger boat. Steven

More information

File System CS170 Discussion Week 9. *Some slides taken from TextBook Author s Presentation

File System CS170 Discussion Week 9. *Some slides taken from TextBook Author s Presentation File System CS170 Discussion Week 9 *Some slides taken from TextBook Author s Presentation File-System Structure File structure Logical storage unit Collection of related information File system resides

More information

Chapter 12: File System Implementation

Chapter 12: File System Implementation Chapter 12: File System Implementation Virtual File Systems. Allocation Methods. Folder Implementation. Free-Space Management. Directory Block Placement. Recovery. Virtual File Systems An object-oriented

More information

SMD149 - Operating Systems - File systems

SMD149 - Operating Systems - File systems SMD149 - Operating Systems - File systems Roland Parviainen November 21, 2005 1 / 59 Outline Overview Files, directories Data integrity Transaction based file systems 2 / 59 Files Overview Named collection

More information

DATA STRUCTURES USING C

DATA STRUCTURES USING C DATA STRUCTURES USING C File Management Chapter 9 2 File Concept Contiguous logical address space Types: Data numeric character binary Program 3 File Attributes Name the only information kept in human-readable

More information

Chapter 11: File System Interface Capítulo 10 no livro adotado!

Chapter 11: File System Interface Capítulo 10 no livro adotado! Chapter 11: File System Interface Capítulo 10 no livro adotado! File Concept Access Methods Directory Structure File System Mounting File Sharing Protection 11.1 File Concept Contiguous logical address

More information

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Operating System Third Year CSE( Sem:I) 2 marks Questions and Answers UNIT I

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Operating System Third Year CSE( Sem:I) 2 marks Questions and Answers UNIT I DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Operating System Third Year CSE( Sem:I) 2 marks Questions and Answers UNIT I 1. What is an Operating system? An operating system is a program that manages

More information