Skip to main content

Posts

Showing posts with the label Chapter 5

Answer Chapter 5

Question File system 1.     Explain a File System. Answer a.     File system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. b.     File systems may use a data storage device such as a hard disk or CD-ROM. c.     Involve maintaining the physical location of the files. d.     Provide access to data on a file server by acting as clients for a network protocol. Objectives of the File Management 2.     List six objectives of the file management in operating system Answer a.     To minimize or eliminate the potential for lost or destroyed data. b.     To meet the data management needs and requirements of the user which include storage of data and the ability to perform the aforementioned operations. c.     To guarantee, to the extent possible, that the da...

5.1 Understand file management in OS

5.1.1 Three Type of file structure UNSTRUCTURED   Unstuctured Stream • Data are collected in the order they arrive • Purpose is to accumulate a mass of data and save it • Records may have different fields • No structure • Record access is by exhaustive search Unstructured Stream Performance •Update  –Same size record - okay  –Variable size - poor •Retrieval  –Single record - poor  –Exhaustive - okay STRUCTURED File Structure Abstractions •Three kinds of files –byte sequence –record sequence –key-based, tree structured •e.g. IBM’s indexed sequential access method (ISAM) File Structure Abstractions Stream of Bytes  • OS considers a file to be unstructured • Simplifies file management for the OS • Applications can impose their own structure • Used by UNIX, Windows, most modern OSes Records • Collection of bytes treated as a unit • Example: employee record • Operations at the level of r...

5.1.2 Describe The Various Methods of Storing Files

5.1.2 Describe the various methods of storing files   Contiguous allocation Each file occupies a set of contiguous blocks on the disk. Simple only starting location (block #) and length (number of blocks) are required. Random access. Wasteful of space (dynamic storage allocation problem). Files cannot grow. Linked List Allocation (disc block)  Each file is a linked list of disk blocks: blocks may be scattered  anywhere on the disk.  Simple – need only starting address.  Free-space management system – no waste of space.  No random access.  Mapping. Linked list allocation using index (table in main memory) Allow direct record acess. Every file  has own index block. Support  sequential and direct access. Does not necessarily improve storage space use. Larger file experience several index levels. Indexed Allocation  Brings all pointers together into the index block. ...