π From Operating System β’ 11. File System Interface β’ 10 questions available
Practice MCQs for Other file access methods. Test your knowledge with carefully crafted questions across easy, medium, and hard difficulty levels.
π Last updated: 2026-07-26
Q1. What is the main difference between mandatory and advisory file locking?
π‘ Difficulty: easy | β Correct: A
Q2. If a process acquires an exclusive lock on the first 200 bytes of a file, what will happen when another process attempts to acquire a shared lock on bytes 150β250?
π‘ Difficulty: medium | β Correct: A
Q3. A Java program needs to ensure that two different threads can write to the first half of a file while multiple threads read the second half concurrently. Which lock strategy using FileChannel.lock best satisfies this requirement?
π‘ Difficulty: hard | β Correct: B
β¬οΈ View all questions in the quiz below