os202

OS202


Project maintained by mhanif-82 Hosted on GitHub Pages — Theme by mattgraham

HOME


Top 10 List of Week 03

  1. File
    A computer file is a computer resource for recording data in a computer device. Why do we need a computer file? when we need a computer to remmeber our data we store it in a file. We can sually name that file so we can remember it. The computer also keep tracks our data when we create it, like when the file was last updated, the type of file, and who’s allowed to edit it. That’s called metadata, that’s aslo help us remember it more and what’s the data is all about.

  2. File types
    File format/types is a standard way that information is encoded for storage in a computer file. For example is word.txt is a “Text” format that have extention “.txt”. Files don’t always have an extension, and sometimes an extension doesn’t reflect the actual file format. One way to detect the file format is to look for clues inside the file data itself. Many file types start with a “file header” with metadata.

  3. Sequential Access
    Information in the file is processed in order, one record after the other. This mode of access is by far the most common; for example, editor and compiler usually access the file in this fashion.
    Key point:
    • Data is accessed one record right after another record in an order.
    • When we use read command, it move ahead pointer by one
    • When we use write command, it will allocate memory and move the pointer to the end of the file
  4. Direct Access
    A filed-length logical record that allows the program to read and write record rapidly. in no particular order. The direct access is based on the disk model of a file since disk allows random access to any file block

  5. Index sequential method
    This methods construct an index for the file. The index, like an index in the back of a book, contains the pointer to the various blocks. To find a record in the file, we first search the index and then by the help of pointer we access the file directly.
    Key point:
    • It is built on top of Sequential access.
    • It control the pointer by using index.
  6. FUSE
    Filesystem in Userspace (FUSE) is a software interface for Unix and Unix-like computer operating systems that lets non-privileged users create their own file systems without editing kernel code. This is achieved by running file system code in user space while the FUSE module provides only a “bridge” to the actual kernel interfaces. It consists of a kernel module (fuse.ko), a userspace library (libfuse.*) and a mount utility (fusermount).

  7. Indexed Allocation
    In this scheme, a special block known as the Index block contains the pointers to all the blocks occupied by a file. Each file has its own index block. The ith entry in the index block contains the disk address of the ith file block.
    Key point:
    • Provides solutions to problems of contiguous and linked allocation.
    • A index block is created having all pointers to files.
    • Each file has its own index block which stores the addresses of disk space occupied by the file.
  8. Linked List Allocation
    In this scheme, each file is a linked list of disk blocks which need not be contiguous. The disk blocks can be scattered anywhere on the disk.
    Key point:
    • Each file carries a list of links to disk blocks.
    • Directory contains link / pointer to first block of a file.
    • No external fragmentation
    • Effectively used in sequential access file
    • Inefficient in case of direct access file.
  9. Contiguous Allocation
    In this scheme, each file occupies a contiguous set of blocks on the disk. For example, if a file requires n blocks and is given a block b as the starting location, then the blocks assigned to the file will be: b, b+1, b+2,……b+n-1.
    Key point:
    • Each file occupies a contiguous address space on disk.
    • Assigned disk address is in linear order.
    • Easy to implement.
    • External fragmentation is a major issue with this type of allocation technique.
  10. Directory Implementation
    • Linear List : The simplest method of implementing a directory is to use a linear list of file names with pointers to the data blocks. This method is simple to program but time-consuming to execute.
    • Hash Table : With this method, a linear list stores the directory entries, but a hash data structure is also used. The hash table takes a value computed from the file name and returns a pointer to the file name in the linear list. Therefore, it can greatly decrease the directory search time.