B A Mahayana Studies 000 209 Introduction to
B. A. (Mahayana Studies) 000 -209 Introduction to Computer Science November 2005 - March 2006 4. Files and Data Storage What are the different kinds of file you'll meet? n How can data (files) be stored? n 000 -209 Intro to CS. 4/Data
Overview n . 1 What is a File? 4 the n different types of file you may meet . 2 Drives, Folders, and Files 4 how n files are organized on a storage device . 3 Storage Devices 4 different n n 000 -209 Intro to CS. 4/Data types of storage device . 4 Magnetic Storage (e. g. hard disks(. 5 Optical Storage (e. g. CDs( 2
1. What is a File? n n n A file contains data. Every file has a filename. Most filenames end with an extension (after the dot): 4 e. g n 000 -209 Intro to CS. 4/Data slides. ppt, report. doc The file may be stored on your computer, or on a floppy/CD/flash drive. 3
1. 1. What is an Executable File? n An executable file contains program instructions that tell a computer how to do a task. n Most have. exe or. com extensions. 000 -209 Intro to CS. 4/Data 4
1. 2. What is a Data File? n A data file contains words, numbers, or pictures that you can view, edit, save, send, and print. 4 no program instructions 4 created using application software n 000 -209 Intro to CS. 4/Data You manipulate a data file using the same software that created it. 5
1. 3. Accessing a Data File n Try double clicking on the file's icon, or start an application and use its 'open' command. n Often the filename extension is associated with a particular application 4 e. g. . doc is associated with MS Word 4 double clicking on a. doc file causes Word to start, and open the file 000 -209 Intro to CS. 4/Data 6
1. 4. Common OS Files 000 -209 Intro to CS. 4/Data 7
1. 5. File Management Windows Explorer in MS Windows 000 -209 Intro to CS. 4/Data 8
2. Drives, Folders, and Files n Files are grouped into folders (directories. ( n Folders may be grouped together inside other folders. n Folders are located on drives 4 a drive may be your computer's hard disk, floppy, flash drive, CD 4 a drive is a storage device 000 -209 Intro to CS. 4/Data 9
folders drives folders 000 -209 Intro to CS. 4/Data files 10
2. 1. Visualizing a Drive n You can think of a drive as a tree on its side. 4 the trunk and branches are the drive's folders 4 the leaves are the files 000 -209 Intro to CS. 4/Data 11
Windows Explorer 000 -209 Intro to CS. 4/Data 12
2. 2. Drive Letters n A drive is identified by a letter. 4 floppy disk drive = A 4 main hard disk = C 4 additional storage devices = D through Z 000 -209 Intro to CS. 4/Data 13
2. 3. Directory Information n The folder can show each file's: 4 name 4 extension 4 date and time file it was created/modified 4 file size n 000 -209 Intro to CS. 4/Data Extensions are often hidden in these displays, which can be confusing. 14
2. 4. The Path to a File n A path to a file includes its drive letter, folder(s), filename, and extension. A: WordReportsTo-Do. doc drive letter 000 -209 Intro to CS. 4/Data folders (subdirectories) extension filename 15
3. Storage Devices n Storage devices include: 4 floppy 000 -209 Intro to CS. 4/Data disks, hard disks, CDs, flash drives, tapes 16
3. 1. Which Storage Device to Use? n Durability: how easy is it to damage the device? n Storage capacity: how much data can be stored on the device? 4 kilobyte (KB) = about 1000 bytes 4 megabyte (MB) = about 1 million bytes (106) 4 gigabyte (GB) = about 1 billion bytes (109) 4 terabyte (TB) = about 1 trillion bytes (1012) 000 -209 Intro to CS. 4/Data 17
n Speed: read/write time and data transfer rate n Access time: average time to locate data 4 millisecond n = one-thousandth of a second (10 -3) Random access: can the device go directly to the track or sector holding the data? 4 possible with floppy disks, hard drives, CDs, DVDs 4 not possible with magnetic tape 000 -209 Intro to CS. 4/Data 18
3. 2. How is Data Stored? n The text/images/sound/etc. in a file are converted to a (very) long series of 1's and 0's. n A single '1' or '0' is called a bit. Bits are grouped together into bytes n 4 a n 000 -209 Intro to CS. 4/Data byte is 8 bits When text is converted, each character is translated into one byte. 19
4. Magnetic Storage n A file is just a series of bits. n Each bit is either '1' or '0', so can be represented by a magnetized particle with a positive or negative charge. n Bits are stored as a series of magnetized particles on the surface of a magnetic disk or tape. 000 -209 Intro to CS. 4/Data 20
n The particles are magnetized (written) or examined (read) using a read-write head that moves over the disk/tape. n Example magnetic devices are: 4 hard 000 -209 Intro to CS. 4/Data drives, floppy disks, tapes 21
Disk Storage Diagram Disk surface Read-write head Mylar disk 000 -209 Intro to CS. 4/Data 22
4. 1. Limitations of Magnetic Storage n Data stored on magnetic media, such as a floppy disks, can be altered by dust, smoke, heat, and mechanical problems. n The reliable life span of data stored on magnetic media is only about 3 years. 000 -209 Intro to CS. 4/Data 23
4. 2. How a Hard Disk is Organized track spindle actuator sector cylinder : read-write head arm platter 000 -209 Intro to CS. 4/Data rotation 24
Track/Sector in Close-up sector track 000 -209 Intro to CS. 4/Data 25
Hard Disk Picture 000 -209 Intro to CS. 4/Data 26
4. 3. How a File is Stored n The OS looks for sequences of empty tracks (called clusters) to store the file's data. n Data that is too big for one cluster is split up over nearby clusters. 000 -209 Intro to CS. 4/Data 27
4. 4. Undeleting a file n When a file is deleted, its clusters are marked as 'empty' but the old data is left in the clusters until new data is stored there. n You may be able to retrieve the old data using an undelete utility. 4 e. g. Window’s Restore utility, Norton System. Works 4 the data will only be available if the clusters have not been reused 000 -209 Intro to CS. 4/Data 28
4. 5. Data Fragmentation n Files stored in many widley-spaced clusters become fragmented. 4 read/write speed is slow 4 finding clusters requires a longer search n A defragmentation utility rearranges a file into nearby clusters 4 improves read/write/search speed 4 e. g Windows Disk Defragmenter 000 -209 Intro to CS. 4/Data 29
4. 6. What is a Hard Disk Crash? n A head crash occurs when a read-write head runs into a dust particle or other dirt on the disk 4 the head crash may damage some of the magnetic particles on the disk, changing or losing the data stored there n 000 -209 Intro to CS. 4/Data A head crash may also be triggered by knocking the hard disk while it is in use. 30
4. 7. RAID n RAID - redundant array of independent disks 4 used in large mainframe and microcomputer installations 4 provides faster data access since can do several accesses at once 4 resists failure since data can be duplicated 000 -209 Intro to CS. 4/Data 31
5. Optical Storage n An optical storage device stores bits as microscopic light spots (lands) and dark spots (pits) on its surface 4 examples n 000 -209 Intro to CS. 4/Data are CDs, DVDs Data stored on an optical storage device is less easy to damage. 32
Optical Storage Illustrated Read the data using reflected laser light. 000 -209 Intro to CS. 4/Data 33
5. 1. CDs n CD-ROM 4 Compact Disc Read-Only Memory 4 holds up to 680 MB 4 estimated life exceeds 500 years 4 cheap to make 4 ideal for large files (e. g. multimedia applications) 000 -209 Intro to CS. 4/Data 34
n CD-RW (compact disc-rewritable) allows you to write on a CD, then change the data later 4 uses n 000 -209 Intro to CS. 4/Data phase change technology Phase change technology: alter the crystal structure on the disk surface 35
5. 2. DVDs n Digital Video Disc 4 4 n DVD-ROM 4 4 n stamped with data when manufactured cannot change or add data stores 4. 7 GB ideal for games, maps, large databases DVD+RW 4 000 -209 Intro to CS. 4/Data variation of CD technology designed to provide enough storage capacity for a full length movie uses phase change technology for reuseability 36
- Slides: 36