OS Sheet (5) Solution
OS Sheet (5) Solution
University ID:
3- The operating system allows users to organize the computer’s contents in a hierarchical structure
of directories that include all of the following EXCEPT:
A. files. B. folders.
B. drives. D. systems.
6- a collection of files
d. file systems.
Second : Answer the following (2 mark)
1.What is a file?
Answer: A named collection of related data defined by the creator, recorded on secondary
storage.
2. List some file types.
Answer:
_ source-language for programs (.BAS, COB, .FOR, .MAR, .PAS, .PLI, ...)
_ binary language (.OBJ, .EXE)
_ ASCII code (.TXT)
_ mail format (.MAI)
Answer:
A Text File is a sequence of characters organized into lines.
7. What is meant by Source File?
Answer:
A Source File is a sequence of subroutines and functions, each of which is further
organized as declarations followed by executable statements.
Answer:
The file manager is responsible for the maintenance of secondary storage (e.g., hard disks). This
includes providing directories to organize files and providing 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 directory, and to remove files.
16. What is meant by Identifier in Files?
Answer:
This has a unique tag, which is always a number that identifies the file within the filesystem
and it is non-human readable name for the file.
17. What is meant by File Pointer?
Answer:
This pointer is unique to each process operating on the file and it is the pointer used by
the pointer used by the system to track the last read-write location as a current - file position
pointer.
2) Hash table:
- a hash table can also be used to speed up searches
- hash table are generally implemented in addition to a linear or other structure
22. Name three ways in which storage blocks can be organized in secondary storage
devices.
Answer:
Contiguous Allocation, Linked Allocation, and Indexed Allocation.
Indexed allocation: This allocation method is the solution to the problem of both
the above allocation. This is done by bringing all the pointers together into one location
called the index block. Each file has its own index block, which is an array of disk
sector of addresses. The directory contains the address of the index block of a file.
Answer:
Most file managers allow files to be grouped into a bundle called a directory or folder. This
approach allows a user to organize his or her files according to their purpose by placing related
files in the same directory. Moreover, by allowing directories to contain other directories, called
subdirectories, a hierarchical organization can be constructed.