Unit 6 - Practice Quiz

CSE316

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

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

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

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

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

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

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

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

5 Which allocation method suffers from external fragmentation?

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

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

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

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. Linked allocation
C. Indexed allocation
D. Dynamic allocation

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

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

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

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

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

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

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

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

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

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

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

A. Block devices
B. Character devices
C. Network 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. Rotational latency
B. Seek time
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. SCAN
C. SSTF
D. C-LOOK

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

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

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

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

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

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

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

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

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

A. When two processes try to read the same file
B. When the outcome of execution depends on the specific order in which access takes place
C. When a process runs faster than the CPU
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 allows communication between unrelated processes
C. It is unidirectional
D. It persists after the creating process terminates

25 What limitation applies to standard (anonymous) pipes?

A. They can only be used by processes with a common ancestor (parent-child)
B. They require a network connection
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 new thread
B. Open a file for direct access
C. Create a pipe, fork a child, and invoke a shell
D. Allocate shared memory

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

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

28 Which IPC method is generally considered the fastest?

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

29 What is a mandatory requirement when using Shared Memory?

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

30 What is another name for a Named Pipe?

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

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 is faster
D. FIFO can only be used by a parent and child

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

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

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

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

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

A. Capability Lists
B. Access Control List (ACL)
C. Password protection
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 is deleted immediately
B. The file remains if other links exist
C. The file system crashes
D. The file becomes hidden

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

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

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

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

39 What does the acronym NFS stand for?

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

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

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

41 Which device type is strictly sequential access?

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

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 process continues while I/O executes
B. The process is suspended until I/O is completed
C. The I/O device is blocked
D. The kernel crashes

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

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

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

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

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

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

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

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

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

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

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. Directory Structure
D. Disk Scheduling

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

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