Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Jovy E.

Ilan BSIT II-A FILE MANAGEMENT Organization of Data DATA Bit Byte DESCRIPTION A binary digit Collection of bits 9 bits representing a character Collection of bytes Holds a single fact Typified by its length and type Collection of related fields Maybe fixed or varied in length Collection of related records Collection of files

February 11, 2012

EXAMPLE 0 or 1 11000001 which is the value of A

Field

DOB (data of birth) field 060690 6numeric Student record which may contain student number, name, address, contact number, course Record of BSIT student Employee database containing Employee file, supplier file, buyer file, Department file

Record

File Database

Data are systematically organized in hierarchical form. File - a collection of related information. - Represents programs ( source and objects ) FILE TYPES File Type Executable Object Source Code Batch Extension Name exe., com, bin, dll O, so, elf Cxx, hxx, cpp, cx, c, cls, cob, java Vb, hpp Bat, sh Function Executable programs Compiled, not linked, machine language Source code in various language

Command to the command interpreter

Text Database Library Archive Graphics Webpages

Text, doc, docx, rtf, pages, pdax, odt, xml, html Db, dbf, frm, mdb, ldb, ora, myd, odb Lib, a Arc, zip, tar, arj, bke, dmg, gzip, rar, z, deb Jpeg, jpg, tiff, png, gif, bmp, cgm, pdf Html, xml, asp, aspx, adp, bml, jsp, php, cgi, mnht

Textual data, documents Database programs Libraries of routines for programmers Related files grouped into a file, sometimes compressed, for archiving or storage For storing images Web-based documents

File Manager Responsible for secondary storage. Gives the user and computer system the ability to work with files. Provides commands to allow the user to perform a variety of file-related functions. Responsible for maintaining the directory structure.

Acc. to Nutt
File is a named collection of data stored in a device. File manager implements abstraction and provides directories for organizing also provides a spectrum of commands to read and write the contents of a file, to set the file read/write position, to set and use the protection mechanism, to change the ownership to list files in a mechanism, to allow machine users to administer how processes executing on behalf of the different users can access the information in the files. File protection is a fundamental property of files.

Acc. to Brookshear
Directory or folder group or bundle of files. Subdirectories directories containing other directories.

File Management
Objectives 1. To meet user requirements regarding data management needs which includes storage of data and capability to perform file operations such as create, delete, read, change files. A minimal set of requirements maybe: a. Able to create, delete, read, and change file. b. Able to control access to other user s file. c. Able to control the type of access to other users file. d. Able to reformat the user file in a form suitable to the problem. e. Able to transfer data between files. f. Able to back-up and recovery files if damaged. g. Able to access files using a file name. 2. To assure that the data in the file are valid. 3. To maximize performance in terms of throughput and response time . 4. To give I/O support for different storage device types. 5. To minimize if not eliminate the possible destruction or loss of data. 6. To give a standard set of I/O interface routines. 7. To give I/O support for many users.

File System Is a method of keeping and managing files and their content for easy search, navigation, manipulation and retrieval. Classification / Types of File System Disk file systems Network file systems Special purpose file systems

Types of File System


TYPE Disk file systems Description A fuke system designed to store files on a data storage device using magnetic optical media or solid state media like the flash memory. Examples of Disk file system include FAT (FAT12, FAT16, FAT32) NTFS, HFS, HFS+, ext2, ext3, ISO 9660, ODS -5 and UDF. A file system that acts as client for remote file access protocol providing access to file on a server examples of network file systems include clients for the NFS, AFS, SMB, protocols , and file system-like clients for FTP and WebDAV. Any file system that is not a disk file system or network file system includes systems where the files are arranged dynamically by software intended for such purposes as communication between computer processes or temporary file space. Examples are devfs, sysfs, udev, proc, procfs.

Network file systems Special purpose file systems

Basic File System Software Architecture

File Organization
Refers to the logical structuring of the records as determined by the way in which they are accessed.

Criteria for choosing file organization: 1. 2. 3. 4. 5. Fast access Easy update Low cost storage Easy to maintain Reliability

File Organization Access Methods


Access Methods Pile Description Data collected in the order of arrival Variable length records Variable set of fields No structure, hence record access use exhaustive search Use space well when the stored data vary in size and structure Easy to update Unsuitable for most applications Contains a key field which uniquely identifies a record Fixed length with fixed set of fields in a fixed order Stored in key sequence whether key field is alphabetic or numeric Used in batch application but poor performance in interactive application involving queries Appropriate in processing applications involving the whole file example is payroll. Addition of data to existing file may cause a problem

Sequential

Indexed Indexed Sequential

Hashed or Direct

Indexed

Partial organized index contains entries to record where field of interest Records in sequence using key field just like other than the key field exists sequential Index is organized as sequential file for east search file Additional features added: index file and an overflow Adding new records means updating all indexes Index to file added to support random access Used mostly in real time application Index file contains a key field ( same as the key field found in the main file) and a pointer to the main file Direct access toto any block of known address Overflow file used record any addition or update to an existing Key field fileis required but may not be in sequential order Use hashing key value Reduced time on to access single record without sacrificing sequential Often used for application nature of the life with the following characteristics Requires immediatethan access Greater performance sequential access. Uses fixed length records Multiple indexes used to achieve flexibility in searching for Access is doneare one record at a time fields other than the key field Records are accessed through indexes May have variable length Two types in indexes used: exhaustive index and partial index Exhaustive index contains an entry for every record in the main file

Elements of the File Directory


Elements Contents of each element File name Basic Information File type File organization Volume Address Information Starting address Sized used Size allocated Owner Access Control Information Description

Name chosen by creator to identify the file must be unique Identifies the type of file if text source Identifies the file organization used Indicates device on which file is stored Provides physical location on secondary storage, ex Cylinder track sector Current size of the file in bytes Maximum size of file User assigned to control the file User determines access rights of other users with regard to this file Controls the reading, writing, executing, transmitting over a network Data when file was placed in Directory Date when file was placed in Directory Current owner of the file Date of the last time record was read Identify the user who last modified date of the last update insertion or deletion Identity the user who last modified Date when the file was last backed up on another storage device

Access information Permitted Action

Usage Information

Data Created Identity of creator Date Last Read Access Identity of Last Reader Date Last Modified Identity of Last Modifier Date Last back-up

Current usage

Current activity on file like processes that are currently using the file or if it was locked by a process or if the file has been updated in primary memory but not yet on secondary storage device.

Methods of File Allocation


File Allocation Contiguous Description Data stored in a continuous section of a disk Directory entry for each file contains file name start block and the file size Advantage Simple implementa tion Ease in sequential and linear access Disadvantage Expansion of file not allowed Suffers from external fragmentatio n Needs compaction (which is time consuming) Must provide extra continuous space when file is created Inefficient to support direct access Pointer consumes extra space May become unreliable in case of hardware failure pointer might be lost or may be directed to

Linked

Data blocks of file are scattered anywhere on disk Directory entry for each file contains the start block and file name Data block uses 4 bytes additional for the pointer to

External fragmentati on does not occur Any used space maybe used to enter a part of the file File may expand no need to declare a file size when file is 1st created

the next block of file. Indexed Index block is allotted for each file that is created Index block contains all point to the data blocks of the file Directory entry for each file contains the index block and the file name

No need of compaction Reliable because all pointers are groped in the index block Direct access is efficient

wrong file Entire block is allocated to hold all pointers even if few pointers are used hence internal fragmentatio n may occur

You might also like