1Which of the following acts as an interface between the user and the file system to effectively manipulate files?
A.Device Driver
B.Directory Structure
C.File Attributes
D.File Control Block
Correct Answer: Directory Structure
Explanation:The directory structure organizes files and provides the mechanism for operations like file creation, deletion, and searching, acting as an interface for the user.
Incorrect! Try again.
2Which file attribute is a unique tag, usually a number, that identifies the file within the file system?
A.Name
B.Identifier
C.Location
D.Type
Correct Answer: Identifier
Explanation:The identifier is a unique tag, often a number (like an inode number in UNIX), that the file system uses to identify the file internally; humans use the name.
Incorrect! Try again.
3In 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
Correct Answer: Sequential Access
Explanation:Sequential access processes data in order. Read operations move the file pointer forward by one record size.
Incorrect! Try again.
4What is the main problem with a single-level directory structure?
A.Slow access time
B.Grouping of files is logical
C.Naming collision and grouping
D.Complex path names
Correct Answer: Naming collision and grouping
Explanation:In a single-level directory, all files are in the same directory. This causes naming collisions (users cannot use the same name) and makes grouping files by user or topic impossible.
Incorrect! Try again.
5In a tree-structured directory, a path name that begins at the root is known as:
A.Relative path name
B.Absolute path name
C.Indexed path name
D.Rooted path name
Correct Answer: Absolute path name
Explanation:An absolute path name specifies the location of a file starting from the root directory, whereas a relative path starts from the current working directory.
Incorrect! Try again.
6Which directory structure allows directories to share subdirectories and files, essentially permitting a file to appear in more than one directory?
A.Two-level directory
B.Tree-structured directory
C.Acyclic-graph directory
D.Single-level directory
Correct Answer: Acyclic-graph directory
Explanation:An acyclic-graph directory structure allows sharing of files and directories (via links or aliases), meaning the same file can be accessed from different parent directories.
Incorrect! Try again.
7The operating system function that makes a file system available for use at a specific location in the directory tree is called:
A.Formatting
B.Mounting
C.Linking
D.Spooling
Correct Answer: Mounting
Explanation:Mounting is the process by which the operating system makes a file system available at a specified point (mount point) in the logical directory structure.
Incorrect! Try again.
8In the context of file protection, which mechanism associates a list of users and their allowed access types with each file?
A.Password protection
B.Capability Lists
C.Access Control List (ACL)
D.Bit Vector
Correct Answer: Access Control List (ACL)
Explanation:An Access Control List (ACL) specifies which users or groups have access to a specific object (file) and what operations they are allowed to perform.
Incorrect! Try again.
9Which of the following file allocation methods suffers from external fragmentation?
A.Linked Allocation
B.Indexed Allocation
C.Contiguous Allocation
D.Hashed Allocation
Correct Answer: Contiguous Allocation
Explanation:Contiguous allocation requires each file to occupy a set of contiguous blocks. As files are deleted, free space becomes fragmented into small holes, leading to external fragmentation.
Incorrect! Try again.
10In Linked Allocation, if a block size is 512 bytes and 4 bytes are used for the pointer, what is the effective data size per block?
A.512 bytes
B.516 bytes
C.508 bytes
D.500 bytes
Correct Answer: 508 bytes
Explanation:Since the pointer takes up 4 bytes of the block to point to the next block, the user data available is bytes.
Incorrect! Try again.
11What is the major disadvantage of Linked Allocation used alone (without a FAT)?
A.External fragmentation
B.Declaration of size required at creation
C.Inefficient for direct (random) access
D.Directory implementation is complex
Correct Answer: Inefficient for direct (random) access
Explanation:To access the -th block in linked allocation, the OS must start at the beginning and follow the pointers through blocks, making random access extremely slow.
Incorrect! Try again.
12Indexed allocation solves the external fragmentation problem and supports direct access by using:
A.A File Allocation Table (FAT)
B.An index block containing pointers to data blocks
C.A linked list of blocks
D.A contiguous set of blocks
Correct Answer: An index block containing pointers to data blocks
Explanation:Indexed allocation brings all pointers together into one index block. The -th entry points to the -th block of the file, supporting direct access without external fragmentation.
Incorrect! Try again.
13In the UNIX 'inode' structure, what happens if a file is larger than what the direct blocks can address?
A.The file cannot be stored.
B.A single indirect block is used.
C.The system switches to contiguous allocation.
D.The file is compressed automatically.
Correct Answer: A single indirect block is used.
Explanation:If the file size exceeds the capacity of direct blocks, the inode uses a single indirect block (which points to data blocks), followed by double and triple indirect blocks for even larger files.
Incorrect! Try again.
14Which free-space management method uses a string of binary digits where 1 represents a free block and 0 represents an allocated block (or vice versa)?
A.Linked List
B.Grouping
C.Counting
D.Bit Vector / Bitmap
Correct Answer: Bit Vector / Bitmap
Explanation:A Bit Vector or Bitmap is a collection of bits where the position of the bit corresponds to the block number, and the value indicates free or allocated status.
Incorrect! Try again.
15If a disk has blocks and the bit vector method is used for free-space management, what is the size of the bit map in bytes?
A. bytes
B. bytes
C. bytes
D. bytes
Correct Answer: bytes
Explanation:There is 1 bit per block. blocks require bits. bytes (8 KB).
Incorrect! Try again.
16In Directory Implementation, which method handles naming collisions in a Hash Table structure?
A.Linear probing or Chained overflow hash table
B.Creating a new partition
C.Converting to a linear list
D.Denying file creation
Correct Answer: Linear probing or Chained overflow hash table
Explanation:Hash tables use collision resolution techniques like chaining (using a linked list for entries hashing to the same value) to handle cases where two filenames hash to the same location.
Incorrect! Try again.
17Devices that transfer data one character at a time, such as keyboards and serial ports, are known as:
A.Block devices
B.Character devices
C.Network devices
D.Direct access devices
Correct Answer: Character devices
Explanation:Character devices (like keyboards, mice, serial ports) transfer data a byte at a time and usually do not support random access or fixed block sizes.
Incorrect! Try again.
18A device that is assigned to only one process at a time (e.g., a tape drive) is called a:
A.Shared device
B.Virtual device
C.Dedicated device
D.Spooled device
Correct Answer: Dedicated device
Explanation:Dedicated devices cannot be interleaved among different processes concurrently; they are allocated to a single process for the duration of the job.
Incorrect! Try again.
19What technique allows a dedicated device (like a printer) to appear as a shared device by intercepting output and writing it to a disk buffer?
A.Swapping
B.Spooling
C.Paging
D.Caching
Correct Answer: Spooling
Explanation:Spooling (Simultaneous Peripheral Operations On-Line) buffers data to a disk, allowing processes to 'print' simultaneously, while a daemon actually sends the data to the printer sequentially.
Incorrect! Try again.
20Which component in the DASD architecture acts as an interface between the computer system's bus and the disk drives, often handling error correction?
A.Disk Platter
B.Disk Arm
C.Disk Controller / Control Unit
D.Read-Write Head
Correct Answer: Disk Controller / Control Unit
Explanation:The Disk Controller (or Control Unit) is the hardware interface that controls the disk drives, handling commands from the host and managing the low-level operation of the hardware.
Incorrect! Try again.
21The time it takes for the disk arm to move the heads to the cylinder containing the desired sector is called:
A.Rotational Latency
B.Seek Time
C.Transfer Time
D.Access Time
Correct Answer: Seek Time
Explanation:Seek time is the time required to move the disk arm to the required cylinder (track).
Incorrect! Try again.
22Which Disk Scheduling algorithm selects the request with the least seek time from the current head position?
A.FCFS
B.SSTF
C.SCAN
D.C-SCAN
Correct Answer: SSTF
Explanation:SSTF (Shortest Seek Time First) selects the request that is closest to the current head position to minimize the immediate seek movement.
Incorrect! Try again.
23What is the primary disadvantage of the SSTF (Shortest Seek Time First) algorithm?
A.It is difficult to implement.
B.It does not minimize average seek time.
C.It may cause starvation for some requests.
D.It performs unnecessary head movements.
Correct Answer: It may cause starvation for some requests.
Explanation:In SSTF, if new requests arrive near the current head position, requests far away may wait indefinitely, leading to starvation.
Incorrect! Try again.
24Which disk scheduling algorithm works like an elevator, moving the head in one direction servicing requests until it reaches the end, then reversing direction?
A.FCFS
B.SSTF
C.SCAN
D.C-LOOK
Correct Answer: SCAN
Explanation:The SCAN algorithm (elevator algorithm) moves the arm from one end of the disk to the other, servicing requests, and then reverses direction.
Incorrect! Try again.
25Consider a disk queue with requests for I/O to blocks on cylinders: 98, 183, 37, 122, 14, 124, 65, 67. If the head is at 53, what is the first request serviced by FCFS?
A.14
B.37
C.65
D.98
Correct Answer: 98
Explanation:FCFS (First-Come, First-Served) services requests in the exact order they arrive. The first request in the queue is 98.
Incorrect! Try again.
26The C-SCAN algorithm differs from SCAN in that:
A.It services requests in both directions.
B.When it reaches the end, it immediately returns to the beginning without servicing requests on the return trip.
C.It only goes as far as the last request, not the end of the disk.
D.It selects the shortest seek time next.
Correct Answer: When it reaches the end, it immediately returns to the beginning without servicing requests on the return trip.
Explanation:C-SCAN (Circular SCAN) treats the cylinders as a circular list. After reaching one end, it returns to the beginning immediately to provide a more uniform wait time.
Incorrect! Try again.
27Which version of SCAN only goes as far as the last request in each direction, rather than the full width of the disk?
A.C-SCAN
B.LOOK
C.F-SCAN
D.N-Step SCAN
Correct Answer: LOOK
Explanation:LOOK is a version of SCAN where the arm only goes as far as the last request in each direction, then reverses, rather than going all the way to the physical end of the disk.
Incorrect! Try again.
28Inter Process Communication (IPC) is required for processes that are:
A.Independent
B.Cooperating
C.Zombie
D.Orphan
Correct Answer: Cooperating
Explanation:Cooperating processes can affect or be affected by other executing processes. They require IPC to exchange data and information.
Incorrect! Try again.
29Which of the following is NOT a standard method of IPC?
A.Shared Memory
B.Message Passing
C.Pipes
D.Cache Coherence
Correct Answer: Cache Coherence
Explanation:Cache Coherence is a hardware/architecture concept regarding consistency of data in caches, not a software IPC mechanism like Shared Memory, Message Passing, or Pipes.
Incorrect! Try again.
30In a standard UNIX 'pipe' (ordinary pipe), communication is:
A.Bidirectional (Full Duplex)
B.Unidirectional (Half Duplex)
C.Network based
D.Persistent after process termination
Correct Answer: Unidirectional (Half Duplex)
Explanation:Standard ordinary pipes allow data to flow in only one direction. One end is for writing, and the other is for reading.
Incorrect! Try again.
31Ordinary pipes typically require what relationship between the communicating processes?
A.They must be unrelated.
B.They must have a Parent-Child relationship.
C.They must run on different machines.
D.They must use a shared key.
Correct Answer: They must have a Parent-Child relationship.
Explanation:Ordinary pipes are accessible only to the process that created them and its descendants. They cease to exist when the processes finish.
Incorrect! Try again.
32Which C library function creates a pipe, forks a child, and invokes the shell to execute a command?
A.pipe()
B.mkfifo()
C.popen()
D.exec()
Correct Answer: popen()
Explanation:The popen() function creates a pipe, forks a child process, and executes a shell command, connecting the command's input or output to the pipe.
Incorrect! Try again.
33The function pclose() is used to:
A.Close a standard file pointer.
B.Close a stream opened by popen() and wait for the child process to terminate.
C.Delete a named pipe.
D.Detach shared memory.
Correct Answer: Close a stream opened by popen() and wait for the child process to terminate.
Explanation:pclose() closes the file stream associated with a pipe created by popen() and waits for the associated child process to finish.
Incorrect! Try again.
34What is the primary difference between a FIFO (Named Pipe) and an ordinary pipe?
A.FIFOs are slower.
B.FIFOs exist as a device file in the file system and allow unrelated processes to communicate.
C.FIFOs only allow parent-child communication.
D.FIFOs cannot be used for writing.
Correct Answer: FIFOs exist as a device file in the file system and allow unrelated processes to communicate.
Explanation:A FIFO (Named Pipe) has a name in the file system, enabling unrelated processes to access it. It persists even after the creating process has terminated.
Incorrect! Try again.
35Which system call is used to create a Named Pipe (FIFO) in UNIX/Linux?
A.pipe()
B.shmget()
C.mkfifo()
D.msgget()
Correct Answer: mkfifo()
Explanation:The mkfifo() system call creates a FIFO special file (a named pipe) in the file system.
Incorrect! Try again.
36Which IPC method is generally considered the fastest because it avoids copying data between kernel and user space?
A.Message Queues
B.Pipes
C.Sockets
D.Shared Memory
Correct Answer: Shared Memory
Explanation:Shared Memory allows processes to access the same region of memory directly. Once set up, data access occurs at memory speeds without kernel intervention.
Incorrect! Try again.
37When using Shared Memory, what additional mechanism is usually required to prevent race conditions?
Explanation:Since multiple processes access the same memory region concurrently, a synchronization mechanism (like mutexes or semaphores) is needed to ensure data consistency.
Incorrect! Try again.
38In a Message Queue IPC, messages are stored in:
A.A contiguous block of shared memory
B.A linked list within the kernel
C.A text file on the disk
D.The CPU registers
Correct Answer: A linked list within the kernel
Explanation:Message queues are maintained by the kernel as a linked list of messages. Processes read/write messages to the queue using a queue identifier.
Incorrect! Try again.
39Which property allows Message Queues to support retrieving specific types of messages (not just FIFO order)?
A.Message Type/Priority
B.Message Timestamp
C.Sender PID
D.Queue Size
Correct Answer: Message Type/Priority
Explanation:When receiving a message from a queue (e.g., via msgrcv), a process can specify a message type, allowing it to select specific messages or prioritize them.
Incorrect! Try again.
40Which of the following describes the Producer-Consumer problem in the context of IPC?
A.One process produces data that another process consumes.
B.One process writes to disk, another reads from network.
C.Two processes try to print at the same time.
D.The OS scheduling produces time slices.
Correct Answer: One process produces data that another process consumes.
Explanation:The Producer-Consumer problem is a classic synchronization paradigm where a producer generates data and places it in a buffer (IPC channel), and a consumer removes it.
Incorrect! Try again.
41If a file system uses 4KB blocks and a file is 5KB in size, how much space is wasted due to internal fragmentation?
A.1 KB
B.2 KB
C.3 KB
D.4 KB
Correct Answer: 3 KB
Explanation:5KB requires 2 blocks (4KB + 4KB = 8KB allocated). Used space is 5KB. Wasted space = .
Incorrect! Try again.
42Which disk scheduling algorithm guarantees that the disk arm moves in only one direction until it reaches the edge of the disk platter?
A.SCAN
B.C-SCAN
C.SSTF
D.Both SCAN and C-SCAN
Correct Answer: Both SCAN and C-SCAN
Explanation:Both SCAN and C-SCAN move the head in one specific direction servicing requests until the edge (or last request in LOOK variants) is reached.
Incorrect! Try again.
43What is a 'hard link' in UNIX file systems?
A.A special file containing the path to another file.
B.A directory entry that points to the same inode as another file.
C.A link that spans across different file systems.
D.A shortcut on the desktop.
Correct Answer: A directory entry that points to the same inode as another file.
Explanation:A hard link creates a new directory entry pointing to the same underlying inode (data) as the original file. Deleting one hard link does not delete the data unless the link count drops to zero.
Incorrect! Try again.
44In the context of DASD, what is a 'Sector'?
A.The smallest addressable unit of a disk.
B.The collection of all tracks at the same radius.
C.The device controller hardware.
D.The complete surface of a platter.
Correct Answer: The smallest addressable unit of a disk.
Explanation:A disk platter is divided into tracks, and tracks are divided into sectors. A sector is the smallest unit of data that can be read or written physically.
Incorrect! Try again.
45What is the result of popen("ls -l", "r")?
A.It executes ls -l and returns a file pointer to read the output.
B.It executes ls -l and writes the output to the screen directly.
C.It creates a file named ls -l.
D.It returns a process ID of the shell.
Correct Answer: It executes ls -l and returns a file pointer to read the output.
Explanation:The "r" mode indicates that the calling process wants to read the standard output of the command ls -l via the returned stream.
Incorrect! Try again.
46Which free space management technique involves keeping the address of the first free block in a specific location, and that block contains addresses of other free blocks?
A.Bit Vector
B.Linked List
C.Grouping
D.Counting
Correct Answer: Linked List
Explanation:In the Linked List approach, the free list head points to the first free block, which points to the next, and so on. It requires traversing the disk to find multiple free blocks.
Incorrect! Try again.
47Which variation of the Linked List free space management stores free block addresses in the first free block?
A.Grouping
B.Counting
C.Bit Map
D.Indexing
Correct Answer: Grouping
Explanation:Grouping stores the addresses of free blocks in the first free block. The first are actually free. The last one contains the addresses of the next free blocks.
Incorrect! Try again.
48In a Combined Scheme (like UFS inodes), if a block is 4KB and a pointer is 4 bytes, how many direct blocks can a single index block address?
A.256
B.512
C.1024
D.2048
Correct Answer: 1024
Explanation:. Number of pointers = . An index block can store 1024 pointers.
Incorrect! Try again.
49Which access method is most suitable for a Database Management System?
A.Sequential Access
B.Direct / Random Access
C.Tape Access
D.Stack Access
Correct Answer: Direct / Random Access
Explanation:DBMS requires quick access to arbitrary records (e.g., finding a user by ID), which requires Direct/Random access rather than reading the whole file sequentially.
Incorrect! Try again.
50What happens if a process attempts to write to a pipe that has no readers?
A.The data is buffered until a reader appears.
B.The writing process receives a SIGPIPE signal.
C.The write fails silently.
D.The pipe creates a temporary file.
Correct Answer: The writing process receives a SIGPIPE signal.
Explanation:In UNIX/Linux, writing to a pipe with no active reader sends the SIGPIPE signal to the writer, usually terminating it unless handled.
Incorrect! Try again.
Give Feedback
Help us improve by sharing your thoughts or reporting issues.