Operating System (ix)--File management

Source: Internet
Author: User

            
  
                                                 
                       file management of four functions of operating system
  

 

in today's information age, tens of thousands of messages abound around us every day, and in this we need our

Learn to pack and dry, in the operating system, file management is such a role, to speak our information, process

and data, etc. for the management of sub-block packaging.

 
File: The information collectively known as a logically complete meaning.


file Management : Generally speaking is in the operating system (OS) file system is responsible for the management of stored files, and the text

Access, sharing, and protection are provided to the OS and users.




First, the basis of document management :

1. What is a file? : documents We usually also commonly used, often said the classification of the "block" in the collation. There are several related notes

Record A collection of components that describe objects. A narrow "document" is generally referred to as an instrument, or an official document. Usually the file is

people The records that they generate in various social activities. However, the narrow "document" does not equate to the " document

case ", The main difference between documents and archives is whether they have the preservation value and the nature of the original record. As

Fruit both are available, they can be called "archives", otherwise they may be counted as files.


2, file management: Popular is that the file system is responsible for the management of stored files, and file access, sharing and security

Protection available to OS and users .



3, target : Accelerated storage space utilization.


4, the task : The user files and system files management, convenient for our daily use and ensure file security.
                                        



II. Structure of the document

1. Storage media: Our common tapes and closing in our life can be considered as files, which can store information data

We can call the file storage media, his unit is generally the volume. such as a disc, a tape is called a

Volume.

2. Document organization:
file organization is actually the way of construction, there are logical structure and storage structure of two ways,
     


Iii. file System (accessed by name)



Features:
1. Convert from logical file to physical file
2, provide a set of questions operation
3. Create a file directory
4. Effective allocation of file storage space
5. Provide suitable storage method
6. Ensure file security


Category:
1, according to the use of : System files, library files, user files
2, by information protection level : Read-only, write-only, execute the file, do not protect the file
3, information flow to : input, output, input and output
4, storage time : temporary, permanent, file
5. Organization mode : Logical file, physical file


file storage media:
storage Media is removable from the storage device, for example: a tape drive is a storage device, and a tape is a storage medium
1, the Physical unit is: volume
2. Can continuously store information an area becomes: block
3, the tape drive is a sequential access storage device, the tape drive is directly accessed by the address


Magnetism Number one: the number of read-write heads.
The track disc has an outward order number called a cylinder number .
Each disk is divided into a number of equal sectors, each sector number is called the sector area code .


So the disk storage space location is the number of magnetic, cylinder number, sector area code three decisions.



access information is mobile arm lateral movement (only one head is allowed to read or write at a time)




Iv. How the file is structured:



File organization only file construction method

Logical Structure : Users organize files from the perspective of use, the user can observe and can be processed information, more so

The way the file is constructed with requirements.

Storage Structure : File system from file storage, retrieve storage media mode.


1. Classification:
(1) Logical file: A user-organized file.
(2) Loss of documents: the information within the file is no longer divided into units, by a string of information in sequence.
(3) Documentary: User bar information is divided into logical independent (logical records) meaning units, each unit is a logical record.
(4) Physical file: A file stored on a storage medium.


2, the file on the disk three structure :

(1) sequential structure : Logical record sequence is consistent with physical block order. Sequential structures are organized on disk-creating a

a directory, the directory indicates the file name, the document storage address.

(2) link structure : Logical records are independent of the Order of storage space on disk. Compared to the sequential structure, it is also based on

Shun Sequential structures must be sequential, but the index structure can have empty links.

(3) index structure : The ability of a class to randomly access any record. To be like that there is a pointer that directly points to

that a need for it.



3, access mode;

Sequential access: read/write access by file in logical order or record order (in order to improve efficiency, the text

Pieces Group weave a sequential file or linked file .

Random access: Not necessarily in logical order read/write, can randomly read and write the file information in any order (its

Make up the index file. )



4, the records of the group and decomposition : The exchange of information in "block" units.

(1) Group : Several records merged into a group of files (must use main memory buffer) where main memory is slow

rushed The area length is the maximum logical length multiplied by the number of logical groups.

Advantage : Improves storage space utilization and retrieves storage device boot times.
Disadvantage : The main memory buffer is occupied, which increases the system overhead.


(2) Decomposition: The work of separating a logical record from a set of logical records.



5. Space allocation:
figure: know that space is free, unused


Free Block Join method:

Unit Link: each free block is set to a pointer, another free block of pointers into an idle block chain.
Group Link:UNIX OS disk storage block Group links.


allocation is free block minus 1
Recycle is new group plus 1


6, file directory : File system by name Access means (composed of several directory items)
(1) The contents are composed of:
file name
Storage site
How to control the management of file information
For each new document in the catalogue, add a table of contents, and delete the item by deleting it.


(2) One- level catalogue : (General microcomputer, single-user system)

The index table on the disk, to read and write, read to the main memory and then check the address---so should register the index table storage

Address.



(3) Level Two directory : (Multi-channel program design)--different users can use the same file name can also be shared with different file names

Thing

User Files directory: Headphone directory set up a directory table for each user the user files directory
Master File directory: Registers a user directory table with the overall directory table to store the address.


(4) tree directory : the creation of subdirectories in the file, there is a sub-directory to build a directory-level directory structure.

For example, a node is a directory, a radical main directory, called the root directory, and the last node is a file.




(5) to access a file, you must indicate the file "path name", all levels of directories and file names are spelled out,

Make an absolute path separated by "\". For example: \daniel\ learning \ Video Material \kongfu Panda

Each user can set a and directory to "current working directory", when accessing the file, starting from the current directory

Road The path is called relative.



7. File Security :
File Protection: only prevent the question from being destroyed.
(1) Anti-natural disasters

(2) Anti-system failure : The solution must be transferred, two set up a copy (in the page-based management and virtual management has also built

Can be built on different media of the same type, or on different types of storage media.

(3) User sharing file is corrupt : set access rights to files


UNIX divides the user into: The file master (with all rights), the same group of users, other users.


The user has three permissions : Read, Write, and execute.

(4) computer virus: the method is prevention.


file encryption : Only prevent others from stealing files.

The most important documents can be stored in the form of a password, only the file owner and the same group of users know it.




8, the operation and use of the file:






Operating System (ix)--File management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.