Unit 6: File Management, Device Management and Inter Process Communication - Practice Quiz

CSE316 — Operating Systems 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 Which of the following is NOT a standard file attribute maintained by the operating system?

A. Name
B. Location
C. Current file contents
D. Identifier

2 In which file access method is information in the file processed in order, one record after the other?

A. Direct Access
B. Relative Access
C. Indexed Access
D. Sequential Access

3 Which directory structure allows a user to create their own subdirectories and organizes files into a hierarchy?

A. Hash-structured directory
B. Flat directory
C. Tree-structured directory
D. Single-level directory

4 What is the specific operation called when a file system is attached to an existing directory structure?

A. Formatting
B. Spooling
C. Linking
D. Mounting

5 Which allocation method suffers from external fragmentation?

A. Indexed allocation
B. Contiguous allocation
C. Hashed allocation
D. Linked allocation

6 In Linked Allocation, what is the major disadvantage regarding file access?

A. It uses too much disk space for pointers
B. It requires a File Allocation Table (FAT)
C. It creates external fragmentation
D. It only supports efficient sequential access

7 Which allocation method solves the external fragmentation problem and supports efficient direct access by bringing all pointers together into one block?

A. Indexed allocation
B. Dynamic allocation
C. Linked allocation
D. Contiguous allocation

8 A Bit Vector is used for which purpose in file management?

A. Directory implementation
B. File protection
C. File compression
D. Free-space management

9 Which directory implementation method requires a linear search to find a file?

A. Linear List
B. B+ Tree
C. Indexed List
D. Hash Table

10 What is the primary problem with using a Hash Table for directory implementation?

A. External fragmentation
B. Collisions
C. Linear search time
D. Inability to store metadata

11 Which of the following is a 'Dedicated Device'?

A. CPU
B. Hard Disk Drive
C. Main Memory
D. Tape Drive

12 What technique allows a dedicated device (like a printer) to appear as a shared device?

A. Polling
B. Caching
C. Swapping
D. Spooling

13 In the context of device management, which devices transfer data one character at a time?

A. Block devices
B. Network devices
C. Character devices
D. Storage devices

14 What is the time taken for the disk arm to move the heads to the cylinder containing the desired sector called?

A. Transfer time
B. Seek time
C. Response time
D. Rotational latency

15 Which disk scheduling algorithm selects the request with the least seek time from the current head position?

A. SSTF
B. SCAN
C. FCFS
D. C-LOOK

16 What is a major disadvantage of the SSTF disk scheduling algorithm?

A. It may cause starvation of some requests
B. It causes head crashing
C. It is slower than FCFS
D. It is difficult to implement

17 Which disk scheduling algorithm is also known as the 'Elevator Algorithm'?

A. FCFS
B. SSTF
C. SCAN
D. C-SCAN

18 In C-SCAN disk scheduling, what happens when the head reaches the end of the disk?

A. It stops and waits for new requests
B. It returns to the beginning without servicing requests on the return trip
C. It reverses direction immediately and services requests
D. It randomly jumps to a new cylinder

19 What is a Direct Access Storage Device (DASD)?

A. Magnetic Tape
B. Magnetic Disk
C. Keyboard
D. Punch Card

20 Which hardware component is responsible for handling the details of specific device control and data transfer, offloading this work from the main CPU?

A. ALU
B. Cache
C. I/O Channel / IOP
D. System Bus

21 What is the primary purpose of Inter Process Communication (IPC)?

A. To allow processes to exchange data and synchronize actions
B. To manage disk space allocation
C. To increase the CPU clock speed
D. To prevent processes from running simultaneously

22 Which of the following is NOT a standard IPC mechanism?

A. Pipes
B. Shared Memory
C. Message Passing
D. Fragmentation

23 In the context of IPC, what is a 'Race Condition'?

A. When a process runs faster than the CPU
B. When two processes try to read the same file
C. When the outcome of execution depends on the specific order in which access takes place
D. When two processes communicate via a pipe

24 What is a fundamental characteristic of a standard (anonymous) Pipe?

A. It allows communication between unrelated processes
B. It persists after the creating process terminates
C. It is bidirectional by default
D. It is unidirectional

25 What limitation applies to standard (anonymous) pipes?

A. They require a network connection
B. They can only be used by processes with a common ancestor (parent-child)
C. They are slower than message queues
D. They store data permanently on disk

26 The popen() function in C library is used to:

A. Create a pipe, fork a child, and invoke a shell
B. Open a file for direct access
C. Allocate shared memory
D. Create a new thread

27 Which function is used to close a stream opened by popen()?

A. fclose()
B. exit()
C. close()
D. pclose()

28 Which IPC method is generally considered the fastest?

A. Sockets
B. Shared Memory
C. Message Queues
D. Pipes

29 What is a mandatory requirement when using Shared Memory?

A. Serial access
B. Disk mounting
C. Network protocols
D. Synchronization mechanism

30 What is another name for a Named Pipe?

A. LIFO
B. Signal
C. FIFO
D. Socket

31 How does a FIFO differ from a standard Pipe?

A. FIFO allows bidirectional communication only
B. FIFO exists as a device special file in the file system
C. FIFO can only be used by a parent and child
D. FIFO is faster

32 Which system call is typically used to create a FIFO?

A. shmget()
B. mkfifo()
C. msgget()
D. pipe()

33 In a Message Queue, how are messages typically retrieved?

A. By message type or priority
B. Strictly FIFO only
C. Randomly
D. By message size

34 Which protection mechanism involves associating a list of users and their access rights with each file?

A. Key locks
B. Password protection
C. Access Control List (ACL)
D. Capability Lists

35 In an Acyclic-Graph Directory structure, what is the main benefit over a Tree structure?

A. Smaller size
B. Faster searching
C. No cycle detection required
D. Ability to share files and subdirectories

36 What happens to a file in a 'DAG' directory structure if one of the links to it is deleted?

A. The file system crashes
B. The file becomes hidden
C. The file is deleted immediately
D. The file remains if other links exist

37 Which file access pattern is best suited for CD-ROMs?

A. Random Access
B. Write-only
C. Sequential Access
D. Read-Write

38 Group 'world' or 'others' in Unix file protection refers to:

A. The owner of the file
B. All users in the system other than owner and group
C. Users in the same group as the owner
D. System Administrators only

39 What does the acronym NFS stand for?

A. Network Folder Service
B. New File System
C. Non-fragmented System
D. Network File System

40 In Free-Space Management, what is a disadvantage of the Linked List method?

A. It requires traversing the list to find multiple free blocks
B. It wastes space
C. It is hard to implement
D. It causes internal fragmentation

41 Which device type is strictly sequential access?

A. Flash Drive
B. Magnetic Disk
C. Magnetic Tape
D. Solid State Drive

42 What is the role of the Device Controller?

A. To manage user logins
B. To interface between the OS and the device hardware
C. To schedule processes
D. To compile code

43 Blocking I/O means:

A. The process is suspended until I/O is completed
B. The I/O device is blocked
C. The kernel crashes
D. The process continues while I/O executes

44 Which IPC method utilizes a kernel-managed linked list of messages?

A. Message Queues
B. Pipes
C. Shared Memory
D. Semaphores

45 In File Management, what is an Absolute Path Name?

A. Path of a hidden file
B. Path starting from the current directory
C. Path containing no spaces
D. Path starting from the root directory

46 What does the open() system call typically return?

A. The file content
B. The file size
C. True or False
D. A file handle or file descriptor

47 Which disk scheduling algorithm is theoretically optimal but impossible to implement without knowing future requests?

A. SCAN
B. Look
C. FCFS
D. Shortest Seek Time First

48 With respect to Directory Implementation, what is a Hash Table bucket?

A. A physical storage unit
B. A trash can for deleted files
C. A list of entries that hash to the same value
D. A type of file

49 The logic that prevents a user from reading another user's file is handled by:

A. Directory Structure
B. Disk Scheduling
C. File Allocation Table
D. File Protection Mechanism

50 What is the main function of a Control Unit in I/O systems?

A. Manage RAM
B. Decode instructions and generate control signals for the device
C. Execute arithmetic operations
D. Store data permanently