Join 75,000+ students acing their exams with Studygenie
Unlimited practice
Flashcards, multiple choice and written questions, as many as you want.
Study sets in seconds
Turn your notes and files into a set with AI.
See your progress
Always know what you've learned and what's left.
Questions in this set (43)
What are the two possible data structures that file systems use to keep track of free blocks?
File systems can use either a free list or a bitmap to keep track of free blocks.
What are system calls used for?
System calls are the interface between user programs and the operating system, allowing user-level processes to request services of the operating system.
What are semaphores primarily used for?
Semaphores are used for managing resource allocation, mutual exclusion, and process synchronization.
What does the string "-rwxr-xr--" represent in the output of a directory listing?
The string "-rwxr-xr--" represents file permissions, indicating the owner has read, write, and execute permissions, the group has read and execute permissions, and others have read-only permissions.
What is the purpose of a device driver?
A device driver is software that allows the operating system to communicate with hardware devices.
When does a page fault occur?
A page fault occurs when a program tries to access data or code that is in its address space but is not currently in physical memory.
What is a process group?
A process group is a collection of one or more processes that can receive signals as a unit.
What is the dining philosophers problem used to illustrate?
The dining philosophers problem illustrates challenges in resource allocation without causing deadlock or starvation.
What is the file allocation table (FAT), and do all known file systems use it?
The FAT is a file system architecture used to keep track of the allocation of disk space for files. Not all file systems use FAT; for example, NTFS and ext4 use different structures.
What does the fork system call do?
The fork system call creates a new process by duplicating the calling process.
What are the four principal events that cause processes to be created?
The four principal events that cause processes to be created are: 1. System initialization, 2. Execution of a process creation system call by a running process (e.g., fork()), 3. User request to create a new process, 4. Initiation of a batch job.
What is a device controller?
A device controller is a hardware component that manages a device and its operations.
What is the purpose of the TLB (translation lookaside buffer)?
The TLB is a cache used by the CPU to reduce the time taken to access the page table by storing recent translations of virtual memory addresses to physical memory addresses.
How is CPU utilization calculated?
CPU utilization is calculated by measuring the percentage of time the CPU is actively executing processes.
When is a process considered IO-bound?
A process is IO-bound if it spends more time waiting for I/O operations than doing computations.
What is the purpose of the R and M bits in a page table?
The R (Referenced) bit indicates whether a page has been accessed, and the M (Modified) bit indicates whether a page has been modified.
What is a mutex, and give an example of its application?
A mutex (mutual exclusion) is a synchronization primitive used to prevent multiple threads from simultaneously accessing a critical section of code. Example: Ensuring that only one thread updates a shared variable at a time.
What is the purpose of special files in Unix?
Special files in Unix provide an interface to device drivers, allowing programs to interact with hardware devices via standard file operations.
If the FAT (file allocation table) is destroyed, can the data be restored?
If the FAT is destroyed, data recovery is possible by reconstructing the table from the existing data on the disk, but it is complex and not always guaranteed.
What are the three properties of ideal memory, and what is the memory hierarchy?
The three properties of ideal memory are: 1) Large capacity to hold all data, 2) Fast access speed, and 3) Inexpensive cost. The memory hierarchy refers to the levels of memory with different speeds and costs, from fastest and most expensive (registers, cache) to slowest and cheapest (disk storage).
What is the difference between static relocation and dynamic relocation in an operating system without virtual memory?
Static relocation adjusts addresses at compile or load time before execution, while dynamic relocation adjusts addresses during program execution using a relocation register.
What are two real-time scheduling algorithms, and what do Ci and Pi represent in the equation Σmi=1 (Ci / Pi) ≤ 1?
Two real-time scheduling algorithms are: 1) Rate-Monotonic Scheduling (RMS) which assigns priority based on task periodicity, and 2) Earliest Deadline First (EDF) which assigns priority based on deadlines. In the equation, Ci is the computation time of task i, and Pi is the period of task i. The equation ensures CPU utilization does not exceed 100% for schedulability.
How are directed graphs used to model deadlocks?
Directed graphs, or wait-for graphs, are used to model deadlocks by representing processes and resources as nodes and the dependencies between them as edges. A cycle in the graph indicates a deadlock.
In a resource allocation graph, what do the dashed line and rectangles typically represent?
The dashed line typically represents the boundary between safe and unsafe states, while the rectangles represent resource allocation or the state of processes.
What does the fork system call do?
The fork system call creates a new process by duplicating the calling process.
Other than fork, give four examples of system calls.
Four examples of system calls other than fork are: exec(), wait(), open(), and read().
What techniques can be used to reduce the size of a large page table when the virtual address space is large?
To reduce the size of a page table, techniques such as multi-level paging, inverted page tables, and hashed page tables can be used.
What are the purposes of the Master Boot Record (MBR) and partition table on a hard disk?
The MBR contains the bootloader to initialize the operating system and the partition table that describes the partitions on the disk, including their locations and sizes.
What does the Optimal page replacement algorithm do?
Replaces the page that will not be used for the longest time in the future.
When does a page fault occur in virtual memory management?
A page fault occurs when a program accesses a page not currently in physical memory.
How does the semaphore-based solution to the dining philosophers problem work?
It uses semaphores to control access to forks, ensuring philosophers can only pick up both forks if both are available.
What are the three properties of an ideal memory system?
Large capacity, fast access, and cost-effective production.
In the time command output "real 0m5.344s user 0m7.158s sys 0m39.197s", what does the "sys" time represent?
The CPU time spent in kernel mode.
What is the advantage of the one-to-one multithreading model over the many-to-one model?
It provides better concurrency and utilization of multiprocessor architectures.
What is the problem that arises if the time quantum in Round-Robin scheduling is too large?
It behaves like First-Come, First-Served, reducing responsiveness.
What is a daemon in the context of operating systems?
A daemon is a background process that handles requests for services.
What is the purpose of a DMA (Direct Memory Access) controller?
It allows devices to transfer data directly to/from memory without involving the CPU.
What are the main functions of the kernel in an operating system?
Process management, memory management, device management, and system calls handling.
What are the two sections of a process's memory layout that store dynamically allocated memory and local variables/function call information?
The heap stores dynamically allocated memory, and the stack stores local variables and function call information.
What model maps multiple user threads to a single kernel thread, limiting concurrency?
The many-to-one model
What are the basic states of a process?
The basic states of a process are: New, Ready, Running, Waiting, and Terminated.
What is the purpose of the linker?
The linker combines object files into a single executable or library.
What is the difference between static and dynamic linking?
Static linking includes all necessary libraries in the executable at compile time, while dynamic linking includes only references to libraries, loading them at runtime.