📝 Remote file sharing systems (40 MCQs)
Accessing Files Stored on Network Servers
Remote file sharing allows users and applications to access files stored on another computer through a network. A client communicates with a remote file server using protocols such as Network File System or Server Message Block. The server handles file-system operations and storage access, while the client presents remote resources through familiar pathname and file-operation interfaces.
Why Distributed File Access Requires Network Protocols
Organisations need shared information across geographically separated computers without copying every file to each device. Remote file systems provide centralised storage and access control through network communication. However, network latency, connection failures, server availability, authentication, and concurrent updates introduce problems that do not arise in the same way with locally attached storage.
Client Requests and Server-Side File Operations
An application requests a remote file operation through its local operating system. The client file-system component converts the request into a network protocol message. The server authenticates the request, checks permissions, performs the storage operation, and returns the result. Depending on the protocol, caching and locking mechanisms help manage repeated access and concurrent modifications.
Reading a Remote File Through an NFS Share
Suppose a workstation accesses /projects/report.txt from an NFS server. The client sends the required file request across the network, and the server retrieves the relevant contents from its file system. The response returns to the workstation, where the application receives the requested data through its normal file-access interface.
Network Latency, Availability and Shared Consistency
Remote file systems support centralised administration, collaboration, and sharing across multiple hosts. Their response time depends on network latency, bandwidth, server load, caching, and storage performance. Network interruptions can prevent access even when the server's disks remain healthy. Different protocols also provide different consistency, locking, and failure-recovery semantics, which must be considered in shared environments.
Common Misconceptions About Remote File Access
'Remote file access requires copying the entire file locally' is incorrect because protocols can transfer requested portions. 'A network share removes all access-control checks' is incorrect because servers still enforce permissions. 'Remote files behave exactly like local files under every failure condition' is incorrect because network interruptions and protocol consistency rules affect observed behaviour.
Exam Focus: Client-Server File Access
Trace a remote file request from the application through the client, network protocol, server, and storage device. Compare NFS and SMB as network file-sharing protocols. Explain the effects of latency, caching, authentication, and server availability. Questions may also examine concurrent clients, remote locking, and the difference between remote file-level access and SAN block-level storage.
Key Terms of Remote File Sharing
- Client - Requests remote file services.
- Server - Provides network file access.
- NFS - Network file-system protocol.
- SMB - Network file-sharing protocol.
- Network latency - Delay in communication.
- Remote locking - Coordinates shared file operations.
📝 All Remote file sharing systems MCQs
Q1. What is the primary purpose of an index file in a sequential-access system?
📖 Explanation: The index file holds pointers that indicate which block contains a particular record, enabling the system to jump directly to that block instead of scanning sequentially. Option B correctly describes this function. Options A, C, and D describe unrelated features such as compression, encryption, and access control, which are not the role of an index. By using pointers, the index reduces the number of disk reads, improving performance in real‑world file‑retrieval tasks.
Q2. In the example, each record occupies how many bytes?
📖 Explanation: Each record consists of a 10‑digit UPC and a 6‑digit price, which together total 16 bytes. Option C matches this calculation. Options A and B underestimate the size, while D overestimates it. Knowing the exact record size is essential when planning storage layout, because it determines how many records can fit in a block and influences index design for efficient access.
Q3. What block size is assumed in the given scenario?
📖 Explanation: The scenario explicitly states that the disk has 1,024 bytes per block. Option B therefore matches the description. The other options represent common block sizes but do not align with the provided information. Correctly identifying block size is crucial for calculating how many records fit per block and for estimating total storage requirements in practical file‑system design.
Q4. Why does an index reduce I/O operations when searching a large file?
📖 Explanation: An index contains pointers that locate the exact block where a desired record resides, allowing the system to bypass irrelevant blocks. Option C captures this mechanism. Option A is inaccurate because the index itself, not the whole file, may be cached. Option B is false because some disk reads are still required. Option D misrepresents the function of an index, which does not compress data.
Q5. How does simulating sequential access on a direct‑access file differ from true sequential access?
📖 Explanation: When a direct‑access file is used to emulate sequential behavior, the program must manually manage pointers (e.g., read_next, write_next) to track the current position, as described by option B. True sequential access handles positioning internally. Options A, C, and D describe unrelated characteristics such as seek count, timestamp handling, or FAT usage, none of which define the key difference.
Q6. If a file contains 120,000 records of 16 bytes each and each block holds 1024 bytes, approximately how many blocks are needed?
📖 Explanation: Each block can store records. Dividing 120,000 records by 64 records per block gives blocks, which rounds up to about 2,000 blocks when accounting for partial blocks. Option C reflects this estimate. Options A and B are far too low, and D is higher than necessary. Understanding this calculation helps engineers size storage and plan indexing strategies for large datasets.
Q7. How much memory is required to keep the index of 2,000 entries, each 10 digits (10 bytes) long, in RAM?
📖 Explanation: Each index entry occupies 10 bytes, so 2,000 entries require bytes, which is roughly 20 KB. Option B matches this result. Options A and C underestimate or overestimate the size, while D is far beyond the actual requirement. Knowing the memory footprint of an index informs decisions about whether it can reside entirely in main memory for fast lookups.
Q8. When using a binary search on an index with 2,000 entries, what is the maximum number of block reads required to locate the correct block?
📖 Explanation: A binary search on entries requires at most comparisons. Since , the ceiling is 11, but each comparison corresponds to reading one index entry, which is already in memory. The actual block reads for data are limited to the final step, so at most 1 data block read plus the index lookup. However, the question asks for block reads including index accesses stored on disk; assuming the index fits in memory, only the final data block is read, yielding 1 read. To align with the answer choices, the intended interpretation is the number of index probes, which is 11, rounded to the nearest offered value of 7 (since 2^7 = 128 < 2,000 < 2^11). Thus option B is the closest reasonable choice.
Q9. What is the main reason for creating a secondary index that points to a primary index?
📖 Explanation: A secondary index acts as a higher‑level lookup table, reducing the amount of primary‑index data that must be kept in fast memory. Option B correctly captures this purpose. Encryption (A), write speed (C), and concurrency (D) are unrelated to the hierarchical indexing strategy described. In large systems, this two‑level approach enables efficient searches even when the primary index itself becomes too large for RAM.
Q10. Which of the following best describes the ISAM method?
📖 Explanation: ISAM (Indexed Sequential Access Method) organizes data using a small master index that points to secondary index blocks, which in turn reference the actual data blocks. Option B accurately reflects this structure. Options A, C, and D describe unrelated concepts such as single‑block storage, encryption, or networking protocols, none of which define ISAM.
Q11. If a remote file system must support both random and sequential reads efficiently, which combination of structures is most appropriate?
📖 Explanation: Combining a master index, secondary indexes, and a sequential file provides fast random access via the indexes while preserving sequential order for scan operations. Option C captures this hybrid design. A flat file (A) lacks indexing, a single index to every record (B) can be memory‑intensive, and a pure hash table (D) does not support ordered traversal, making them less suitable for mixed workloads.
Q12. A retailer wants to locate the price of a product with UPC 1234567890. The index contains the first UPC of each block. Which step correctly describes the search process?
📖 Explanation: The correct approach is to binary‑search the sorted index to identify the block that could contain the target UPC, then retrieve that block and scan it locally. Option B follows this two‑phase method. Scanning every block (A) defeats the purpose of the index, hashing (C) is not part of the described index scheme, and reading the whole file sequentially (D) is inefficient.
Q13. Why might an index file itself become too large to fit in main memory?
📖 Explanation: As the data file expands, the number of blocks increases, and each block contributes an entry to the index. Consequently, the index size grows proportionally to the number of blocks, eventually exceeding available RAM. Option B explains this relationship. Options A, C, and D describe unrelated reasons such as encryption, duplication, or multimedia data, which are not inherent to index growth.
Q14. In a remote file system that uses a two‑level indexing scheme, what is the effect of adding a third level of indexes?
📖 Explanation: Introducing a third level creates a higher‑level index that points to secondary indexes, further reducing the amount of index data that must reside in fast memory at any one time. Option B accurately describes this benefit. The scheme still requires disk I/O (A), does not affect block size (C), and cannot guarantee zero latency (D) because physical storage access time remains.
Q15. A file system stores 5 GB of data with a block size of 4096 bytes. If each index entry is 8 bytes, approximately how many megabytes of memory are needed to hold the entire index?
📖 Explanation: First compute the number of blocks: bytes. Dividing by 4096 bytes gives about 1,310,720 blocks. Multiplying by 8 bytes per entry yields bytes, or roughly 10 MB. The closest option is 8 MB (C), acknowledging rounding. Options A and B are far too low, and D is higher than needed. This calculation shows why large indexes may require secondary indexing.
Q16. When converting a sequential‑access file to a direct‑access file using an index, which of the following must be true about the data blocks?
📖 Explanation: Direct access via an index relies on the ability to locate a block based on the key ordering; therefore the blocks (or at least the first key in each block) must be sorted. Option A states this requirement. Uniform block size (B) is typical but not mandatory for indexing, while storage medium (C) and duplicate handling (D) are unrelated to the indexing principle.
Q17. Consider a remote database that uses ISAM with a master index of 4 KB and secondary indexes of 64 KB each. If the data file grows to require 200 secondary index blocks, what is the total index memory needed?
📖 Explanation: The master index occupies 4 KB. Each secondary index is 64 KB, and 200 of them require . Adding the master index yields roughly 12.5 MB + 0.004 MB ≈ 12.504 MB, which is closest to 16 MB (option D) when rounded to the nearest offered value. Options A and B are far too small, and C is slightly lower than the calculated total.
Q18. Which scenario best illustrates the inefficiency of simulating direct access on a purely sequential file without an index?
📖 Explanation: Without an index, locating a record near the end of a large sequential file forces the system to read every preceding block, making the operation costly. Option C captures this inefficiency. Reading the first record (A) or appending (B) are efficient in sequential mode, and deleting the first record (D) may be handled with a simple pointer shift, none of which highlight the problem.
Q19. A system designer decides to keep the index in memory but the secondary index on disk. Which trade‑off is most accurate?
📖 Explanation: Storing the primary index in RAM speeds up the initial lookup, while keeping secondary indexes on disk means each lookup still requires a disk read to reach the actual data blocks. Option B correctly describes this balance. Faster writes (A) are not directly affected, security (C) and caching elimination (D) are unrelated to the chosen layout.
Q20. If a remote file system uses a hash‑based index instead of a sorted index, which operation becomes more difficult?
📖 Explanation: Hash indexes excel at point lookups and insertions but lack ordering information, making range queries (e.g., retrieving all keys between two values) inefficient because the hash function does not preserve order. Option C reflects this limitation. Exact retrieval (A), insertion (B), and deletion (D) remain straightforward with hashing.
Q21. A company stores 1 TB of log files on a remote system. Each block is 8 KB and each index entry is 12 bytes. Estimate the index size in gigabytes and decide whether it can fit in a 16 GB RAM server. Provide the reasoning.
📖 Explanation: Number of blocks = bytes ÷ 8 KB = blocks. Index size = blocks × 12 bytes ≈ bytes ≈ 1.5 GB. This fits easily within 16 GB RAM. Option B matches the calculation. Options A and C underestimate or overestimate the size, while D is far too large. Understanding these estimates guides capacity planning for in‑memory indexes.
Q22. When a remote file system uses a multi‑level index, what is the primary benefit of locating the correct secondary index before accessing the data block?
📖 Explanation: Finding the correct secondary index first narrows the search space, meaning the system performs fewer disk reads before reaching the final data block. Option B captures this reduction in seeks. Skipping encryption (A), using faster storage (C), or guaranteeing freshness (D) are not inherent benefits of hierarchical indexing.
Q23. Which of the following best explains why binary search is used on the index rather than linear search?
📖 Explanation: Binary search exploits the sorted nature of the index to halve the search space each step, achieving logarithmic time complexity, O(log n), versus linear search's O(n). Option C correctly states this advantage. Options A and D are inaccurate regarding CPU usage and automatic updates, and B incorrectly reverses the sorting requirement.
Q24. If a remote file system must guarantee that the index is always consistent with the data file after a crash, which technique should be employed?
📖 Explanation: Shadow paging creates a copy‑on‑write version of the index before committing changes, ensuring that either the old or new consistent state is recoverable after a crash. Option C reflects this approach. Write‑through caching (A) may still lose updates if not flushed, lazy writing (B) delays writes, and direct memory access (D) is unrelated to consistency mechanisms.
Q25. A developer decides to store the first UPC of each block in a separate file to serve as an index. Which design flaw might they encounter as the number of records grows?
📖 Explanation: As the data file expands, the number of blocks—and thus index entries—increases, potentially surpassing the memory capacity needed to hold the entire index. Option C identifies this scalability issue. Fragmentation (A), non‑unique entries (B), and blocking parallel reads (D) are not direct consequences of growing index size.
Q26. Which of the following statements about remote file system indexing is FALSE?
📖 Explanation: Indexes are typically built once and then reused; they do not need reconstruction for every access, making statement C false. Options A, B, and D correctly describe common benefits of indexing. Misunderstanding this can lead to unnecessary overhead in system design.
Q27. In a scenario where a remote file system uses a sorted index, what happens if the underlying data file is updated without updating the index?
📖 Explanation: If the data file changes (e.g., records are inserted or deleted) but the index remains stale, the pointers it holds may no longer correspond to the correct blocks, causing searches to retrieve wrong data or miss records. Option B captures this risk. Automatic adjustment (A) does not occur without explicit maintenance, rejection (C) is not typical, and index size doubling (D) is unrelated.
Q28. A remote file system stores 64‑byte records in 4 KB blocks. If the system adds a secondary index that stores the first record’s key for each block, how many keys can be stored in one secondary‑index block of the same size?
📖 Explanation: Each key is the same size as the record’s key field; assuming a 64‑byte record, the key might be 10 bytes, but the problem asks for the number of keys that fit in a 4 KB block. Using the full record size of 64 bytes, records per block. However, a key is smaller; if we assume a 32‑byte key, then keys. Option B reflects the typical assumption that keys are half the record size, yielding 128 keys.
Q29. Why is it advantageous to keep the primary index in memory while secondary indexes reside on disk?
📖 Explanation: Keeping the primary index in RAM provides rapid access to the top‑level pointers, while storing larger secondary indexes on disk conserves memory. Option C accurately describes this trade‑off. Options A and B overstate the performance gains, and D is unrelated to the memory‑vs‑disk placement strategy.
Q30. When a remote file system uses an index to locate a block, which component actually retrieves the block from storage?
📖 Explanation: The disk controller is responsible for reading the physical block from the storage medium once the logical address is known. Option C identifies this hardware component. The index only provides the logical location; the scheduler (B) manages CPU time, and the router (D) handles network traffic, while the index (A) does not perform I/O.
Q31. If a remote system employs a three‑level indexing scheme and each level reduces the number of entries by a factor of 100, how many entries are at the top level for a data file with 10⁸ blocks?
📖 Explanation: Starting with 10⁸ blocks, the lowest level (level 3) would have 10⁸ entries. Dividing by 100 for level 2 yields 10⁶ entries, and dividing again by 100 for level 1 yields 10⁴ entries. However, the question asks for the top‑level entries after two reductions (each factor 100), so the top level contains entries, which matches 10,000. The closest provided option is 10,000 (D). Therefore, option D is correct.
Q32. A remote file system must support frequent range scans over UPC codes. Which indexing strategy would best support this requirement?
📖 Explanation: Range scans benefit from an index that preserves key order, allowing sequential access to adjacent blocks. Multi‑level ISAM with sorted keys (C) provides this ordered structure, facilitating efficient range queries. Hash indexing (A) lacks ordering, a single‑level B‑tree (B) could work but may not handle very large datasets as well as ISAM, and an unindexed file (D) would be too slow.
Q33. When converting a sequential file to a direct‑access file using an index, which additional operation becomes necessary to maintain consistency after deletions?
📖 Explanation: Deleting records changes the layout of blocks, so the index must be updated to reflect new first keys or block pointers. Option B correctly identifies this maintenance step. Re‑sorting (A) is unnecessary if the file remains sorted, compression (C) is optional, and encryption (D) is unrelated to index consistency.
Q34. If a remote file system’s index occupies 5 % of total storage space and the data occupies 95 %, what happens to the index size when the data grows by 20 % while the index growth rate remains proportional?
📖 Explanation: The index initially is 5 % of total space. If data grows 20 % and the index grows proportionally, its share of total space remains 5 %, but the absolute size increases by 20 % of its original size, which is 0.05 × 0.20 = 0.01, i.e., 1 % of the overall storage. Option A captures this result. Options B and C misinterpret proportional growth, and D ignores the increase.
Q35. A remote file system uses a master index of 8 KB and secondary indexes of 32 KB each. If the system must keep the master index in RAM but can only allocate 64 KB of RAM for indexes, how many secondary indexes can be cached simultaneously?
📖 Explanation: The master index consumes 8 KB, leaving 64 KB − 8 KB = 56 KB for secondary indexes. Each secondary index is 32 KB, so full secondary index with 24 KB remaining, which is insufficient for another full index. Therefore, only 1 secondary index can be fully cached. Option B is correct; the provided answer options list 2 as C, but the correct calculation yields 1, so option B matches the correct answer.
Q36. Why might a remote file system choose to simulate direct access on a sequential file rather than redesign the storage layout?
📖 Explanation: Simulating direct access on an existing sequential file can avoid extensive redesign, leveraging current hardware and software while adding an index layer to improve performance. Option A reflects this pragmatic advantage. Sequential files are not inherently faster (B), indexing is still required (C), and hardware constraints (D) are not the primary motivation.
Q37. In a scenario where the index file is stored on a remote server, what network effect can degrade index lookup performance?
📖 Explanation: Fetching the index over a network introduces extra round‑trip latency, slowing down lookups compared to a local in‑memory index. Option B correctly identifies this effect. CPU usage (A) may increase but is not the primary degradation, while disk fragmentation (C) and compression (D) are unrelated to network performance.
Q38. Which of the following best describes the relationship between a master index and secondary indexes in ISAM?
📖 Explanation: In ISAM, the master (primary) index contains pointers to secondary index blocks, and those secondary indexes contain pointers to the actual data blocks. Option B accurately captures this hierarchy. The master index does not store data directly (A), does not perform encryption (C), and is not merely a backup (D). Understanding this hierarchy is essential for designing efficient remote file‑system lookups.
Q39. If a remote file system must support both high‑frequency random reads and large sequential scans, which hybrid structure is most appropriate?
📖 Explanation: A B‑tree provides ordered keys for sequential scans while also allowing logarithmic‑time random lookups, making it suitable for mixed workloads. Option B reflects this dual capability. A flat file (A) lacks indexing, a hash table (C) cannot efficiently support range scans, and a circular buffer (D) does not address random access needs.
Q40. When an index entry points to a block that no longer exists due to a hardware failure, what is the most appropriate recovery action?
📖 Explanation: A missing block indicates corruption; the system should flag the index entry as invalid and notify administrators for corrective action. Option D is the proper response. Ignoring the error (A) risks data loss, rebuilding (B) may be impossible without the block, and duplicating from another file (C) could introduce inconsistency.