What Is File System
What Is File System
FILES:
A file is a sequence of bits, bytes, or records whose meaning is defined by the file creator and user. Every File
has a logical location where they are located for storage and retrieval.
Files are stored on disk or other storage and do not disappear when a user logs off.
Files have names and are associated with access permission that permits controlled sharing.
Files could be arranged or more complex structures to reflect the relationship between them.
File structure
A File has a certain defined structure according to its types. Three types of files structure in OS:
In windows 7:
Time, date and security: It is used for protection, security, and also used for monitoring
Protection. This attribute assigns and controls the access rights of reading, writing, and executing the file.
File Operations:
Create file: when we create a file in operating system, file system finds space on disk for a file, and
make an entry in the directory.
Write to file, requires positioning within the file (System Call)
Read from file involves positioning within the file (System Call)
Delete: content and metadata of the file is deleted..
Reposition: move read/write position.
Truncating a file : only content of a file is delete, meta data of a file still remains.
Ordinary files
Directory Files
Directory contains files and other related information about those files. It’s basically a folder to hold and
organize multiple files.
Sequential access
Direct random access
Index sequential access
Sequential Access
In this type of file access method, records are
accessed in a certain pre-defined sequence.
In the sequential access method, information
stored in the file is also processed one by
one. Most compilers access files using this
access method.
Advantage:
1. Sequential and random access both
perform better in contiguous allocation
2. Seek Time is low
Disadvantage:
1. External Fragmentation
2. extending the size of file
Directory
ry comprises the addresses of index
blocks of the specific files.
An index block is created, having all the pointers
for specific files.
All files should have individual index blocks to
store the addresses for disk space.
File management
File management is also referred to as a file system that is a process of creating an organized structure and
retrieving files from a storage medium such as a hard drive. It is a type of software that usually comprise files
separated into groups, which is called directories.
File Allocation Table (FAT) is a file system that was developed by Microsoft to support small disks
and simple folder structures.
The file system is named File Allocation Table because it uses a table to track the clusters on a
storage volume, as well as how those clusters are linked together through their associated files and
directories.
FAT is still used for floppy disks, USB flash drives and storage media in smaller, portable devices such
as digital cameras.
NTFS is the newer file system which organize files into sorted directories, introduced in 1993 by Microsoft. This
file system is mostly used in all windows versions in and after Windows NT updates. NTFS provides mostly
features like long file names, large volumes, data security. As compared to FAT 32, some basic difference
between NTFS and FAT 32 are :
A file extension is an identifier that helps identify the type of file in operating systems, such as Microsoft
Windows. It can be classified as a type of metadata, and it helps the operating systems to understand the
intended use of a file and the characteristics. The filename extension may be contained one to four characters
and used as a suffix to the file name. For example, in Microsoft Windows, the file extension is often followed by
three characters.
A dot (.) symbol is used to separate the file extension from the filename. The filename is considered
incomplete without file extension; therefore, to complete a filename, it must be included in the file extension.
Generally, file extensions are hidden from the users in Windows operating systems. Although file extensions
can be renamed, it is not necessarily by renaming a file extension will convert one file format to another. File
extensions are helpful for both users and the file system in two ways:
1. It helps in identifying the type of data that a file hold.
2. It allows the operating system to select the proper program or application with which to open a file.
Note :
Ms-Dos operating system allowed 8 characters for the filename and 3 characters for the extension, for the
total of 12 characters including dot.
23. Which of the following file with extension 30. Which of the following is known as batch file?
______is the binary executable file? A. exe, com, bin or none
A. .txt B. obj, o
B. .docx C. lib, a, so, dll
C. .sh D. bat, sh
D. .com
31. Which of the following file extension is for the
24. _________ is a shell script containing, in ASCII file containing source code in various languages?
format, commands to the operating system. A. exe, com, bin or none
A. .txt B. obj, o
B. .docx C. lib, a, so, dll
C. .sh D. c, cc, java, perl
D. .com
32. ________file extension has the function of
25. binary file containing audio or A/V information compiled, machine language, not linked.
A. exe, com, bin or none A. exe, com, bin or none
B. c, cc, java, perl, asm B. obj, o
C. xml, html, tex C. lib, a, so, dll
D. mpeg, mov, mp3, mp4, avi D. c, cc, java, perl
26. related files grouped into one file, sometimes 33. Mapping of file is managed by
compressed, for archiving or storage a) file metadata b) page table
A. exe, com, bin or none c) virtual memory d) file system
B. rar, zip, tar
C. xml, html, tex 34. Mapping of network file system protocol to local
D. mpeg, mov, mp3, mp4, avi file system is by ____________
a) network file system b) local file system
27. libraries of routines for programmers c) volume manager d) remote mirror
A. exe, com, bin or none 35. When will file system fragmentation occur?
B. rar, zip, tar a) unused space or single file are not contiguous
C. xml, html, tex b) used space is not contiguous
D. lib, a, so, dll c) unused space is non-contiguous
d) multiple files are non-contiguous
28. which of the following are various word- Answer: unused space or single file are not
processor formats?
A. exe, com, bin or none 36. Which one of the following explains the
B. rar, zip, tar sequential file access method?
C. xml, html, tex a) random access according to the given byte
D. xml, rtf, docx number
b) read bytes one at a time, in order
Notes By: Shishav Jain(8949988236) P a g e 10
c) read/write sequentially by record 44. What is raw disk?
d) read/write randomly by record a) disk without file system
b) empty disk
37. What is the mounting of file system? c) disk lacking logical file system
a) crating of a filesystem d) disk having file system
b) deleting a filesystem
c) attaching portion of the file system into a 45. For a direct access file ____________
directory structure a) there are restrictions on the order of reading and
d) removing the portion of the file system into a writing
directory structure b) there are no restrictions on the order of reading
and writing
38. To create a new file application program calls c) access is restricted permission wise
____________ d) access is not restricted permission wise
a) basic file system
b) logical file system 46. The index contains ____________
c) file-organization module a) names of all contents of file
d) none of the mentioned b) pointers to each page
c) pointers to the various blocks
39. If the block of free-space list is free then bit will d) all of the mentioned
____________
a) 1 b) 0 47. A relative block number is an index relative to
c) any of 0 or 1 d) none of these ____________
a) the beginning of the file
40. The data structure used for file directory is b) the end of the file
called ____________ c) the last written position in file
a) mount table b) hash table d) none of the mentioned
c) file table d) process table
41. A file control block contains the information 48. Data cannot be written to secondary storage
about ____________ unless written within a ______
a) file ownership a) file b) swap space
b) file permissions c) directory d) text format
c) location of file contents
d) all of the mentioned 49. A file is a/an _______ data type.
a) abstract b) primitive
42. Management of metadata information is by c) public d) private
____________
a) file-organization module 50. The direct access method is based on a
b) logical file system ______ model of a file
c) basic file system a) magnetic tape b) tape
d) application programs c) disk d) all of these
43. In which type of allocation method each file 51. For large files, when the index itself becomes
occupy a set of contiguous block on the disk? too large to be kept in memory?
a) contiguous allocation a) index is called
b) dynamic-storage allocation b) an index is created for the index file
c) linked allocation c) secondary index files are created
d) indexed allocation d) all of the mentioned
Notes By: Shishav Jain(8949988236) P a g e 11
52. FAT stands for _____________ 58) The yellow smaller sections that is created on
a) File Attribute Transport each drives, when given meaningful names will
b) File Allocation Table reflect the type and contents of file in them.
c) Fork At Time a) Folder b) File
d) None of the mentioned
c) Data d) Information
1 B 16 A 31 D 46 C 61 C
2 A 17 C 32 B 47 A 62 A
3 B 18 D 33 A 48 A 63 D
4 C 19 B 34 A 49 A 64 C
5 A 20 A 35 C 50 C 65 A
6 B 21 D 36 b 51 B 66 A
7 B 22 D 37 c 52 B 67 B
8 D 23 D 38 D 53 A 68 C
9 B 24 C 39 A 54 C 69 D
10 A 25 D 40 B 55 D 70
11 B 26 B 41 D 56 A 71
12 A 27 D 42 B 57 C 72
13 C 28 D 43 A 58 A 73
14 C 29 C 44 A 59 D 74
15 C 30 D 45 B 60 A 75