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. Current file contents
B. Location
C. Identifier
D. Name

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

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

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

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

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

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

5 Which allocation method suffers from external fragmentation?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 randomly jumps to a new cylinder
C. It returns to the beginning without servicing requests on the return trip
D. It reverses direction immediately and services requests

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

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

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. Cache
B. System Bus
C. ALU
D. I/O Channel / IOP

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

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

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

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

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

A. When two processes try to read the same file
B. When a process runs faster than the CPU
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 is bidirectional by default
B. It persists after the creating process terminates
C. It allows communication between unrelated processes
D. It is unidirectional

25 What limitation applies to standard (anonymous) pipes?

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

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

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

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

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

28 Which IPC method is generally considered the fastest?

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

29 What is a mandatory requirement when using Shared Memory?

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

30 What is another name for a Named Pipe?

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

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. pipe()
C. msgget()
D. mkfifo()

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

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

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

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

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

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

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

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

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

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

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

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

39 What does the acronym NFS stand for?

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

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

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

41 Which device type is strictly sequential access?

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

42 What is the role of the Device Controller?

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

43 Blocking I/O means:

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

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

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

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

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

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

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

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

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

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

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

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

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

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