1. Trang chủ
  2. » Giáo án - Bài giảng

The architecture of computer hardware and systems software an information technology approach ch16

40 199 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 40
Dung lượng 1,95 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Chapter 16 File Management The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander John Wiley and Sons 2003... Datab

Trang 1

Chapter 16

File Management

The Architecture of Computer Hardware

and Systems Software:

An Information Technology Approach

3rd Edition, Irv Englander John Wiley and Sons 2003

Trang 3

Database File – Table Image

Trang 4

Database File – Form Image

Trang 5

Database File – Stream Image

Trang 6

Logical View vs Physical View

Trang 7

File Management System

 Provides a logical view for the user and hides the physical implementation

 Manages directory structures and space

allocation for each I/O device

 Permits manipulation of data within a file

 Requests data transfers from I/O device

drivers

Trang 8

File Management and I/O Functions

Separation between the two allows

the file system the same

Trang 9

File Manager Request Handling

Trang 10

File Operations

 Copy, Move

 List, Print

 Load and execute a program

 Load file into memory

 Store file from memory

 Append data from memory to file

 Compile, assemble a file

Trang 11

File Operations

 Open a file

 Read a number of bytes from file

 Write a number of bytes to a file

 Move the file pointer forward or backward

 Move file pointer to beginning of a file

 Close a file

Trang 12

File Operations

 Retrieve a record (read)

 Store a record (write)

 Add a record to a file

 Delete a record

 Modify contents of a record

Trang 13

File Directory Operations

 Create a new (empty) file

 Move a file from one directory to another

 Rename a file

 Append one file to another

 Delete a file

Trang 14

File Access Methods

 Sequential Access

 File is read in sequence from beginning to end

 Majority of all files

 Program source and binary files

 Random Access

 Assumes file is made up of fixed length logical records

 Hashing is a common method used to calculate the location

of an internal logical record

 Indexed Access

 Additional means for accessing and viewing records in a file

 Key indexes

Trang 15

Physical File Storage

Trang 16

Contiguous Storage Allocation

 Assign blocks (all in a row) to hold the file

 Access is simple for both sequential and

random methods

 Disadvantages

 Space must be large enough

 Have to take into account file growth

 May need to be moved if it outgrows its space

 Fragmentation of disk

 Allocation strategies to minimize fragmentation

 First-fit, best-fit

Trang 17

Contiguous Storage Allocation

Trang 18

Linked Allocation

 Non-contiguous

 Each block contains a link to the next physical block

 Variant – links in both directions

 Advantages

 no fragmentation

 Adding to a file is easy

 Disadvantages

Not usable for random access

 Additional disk head searching

 Overhead in storing the pointers

Trang 19

Linked Allocation

Trang 20

MS-DOS FAT

on the disk or disk partition

Trang 21

MS-DOS FAT

Linked Allocation and File Allocation Table

Trang 22

 Slower due to additional access of the index block

 Additional disk head searching

Trang 23

Indexed Allocation

Trang 24

Unix i-nodes

 Indexed file allocation

 Fast for small blocks

 Can accommodate very large files – 100’s of

Trang 25

Unix i-nodes

Trang 26

Windows 2000 - NTFS

span many disks

 1st 16 records are attributes of the MFT

 Each file has an MFT entry

Trang 27

NTFS Volume Layout

Trang 28

Free Space Management

 one bit for each block

to indicate if it is used

or free

 Linked list method

 Pointer to first free block

 Each free block has a pointer to the next

 Blocks are allocated from the beginning

Trang 29

Other Secondary Storage

Allocation

 Tape Allocation

 Not practical to reallocate space in the middle of the tape

 Files that grow must be re-written

 Files are stored contiguously whenever possible

 CD-ROM and DVD-ROM Allocation

 Block system described in Chapter 10

 Eight levels of subdirectories

 Directory format similar to MS-DOS although

Trang 30

 Directory structure for a particular partition

 Needs to be mounted to be incorporated into the

overall file system structure

Trang 31

 Absolute – full pathname starting from the root directory

 Relative – pathname is created starting from the current directory

Trang 32

Tree-Structure Directory

Trang 33

Acyclic Directory Structures

 Tree-structure that permits links between

separate branches of the tree

Trang 34

An Acyclic-Graph Directory

Trang 35

Graph with a Cycle

Cycle

Trang 36

Hard Links vs Symbolic Links

Trang 37

Network File Access

 File Transfer Protocol

 Part of the TCP/IP protocol family

 Windows

 Drive letters aliased to remote file systems

 UNIX

Trang 38

Typical NFS Configuration

Trang 39

File Protection

Trang 40

Unix File Directory Showing

Protection

ls –lF list files in directory using a long format and indicate file type

10-char code for file protection

1 st char d for directory, - for file, s for symbolic link

r read permission

w write permission

Ngày đăng: 10/01/2018, 16:24

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm