📖 From Operating System • 11. File System Interface • 9 questions available
Practice MCQs for Sequential file access Method. Test your knowledge with carefully crafted questions across easy, medium, and hard difficulty levels.
🔄 Last updated: 2026-07-26
Q1. A program wants to lock the first half of a file exclusively using a FileChannel. If the file length is retrieved by raf.length(), which call correctly acquires that lock?
💡 Difficulty: easy | ✅ Correct: A
Q2. Process A obtains an exclusive lock on bytes 0–500 of a file. Process B then attempts to acquire a shared lock on bytes 400–800. What will happen?
💡 Difficulty: medium | ✅ Correct: A
Q3. A file is 2000 bytes long. Which FileChannel.lock call will correctly lock the second half (bytes 1001‑2000) as a shared lock?
💡 Difficulty: hard | ✅ Correct: B
⬆️ View all questions in the quiz below