Bachelor of Computer Engineering Operating System Flashcards
16 cards from real B CompE Bachelor of Computer Engineering practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 16 Bachelor of Computer Engineering Operating System flashcards as text
What exactly is an operating system?
Answer: All of the above
An operating system (OS) serves multiple crucial roles in a computer system. It acts as an interface between the hardware and application programs, allowing software to interact with hardware resources. Additionally, it manages these hardware resources efficiently and provides essential system services to application programs. Therefore, all the listed statements accurately describe what an operating system is.
What is the command interpreter's primary purpose?
Answer: to get and execute the next user-specified command
The command interpreter, often called a shell, is a crucial component of an operating system. Its primary purpose is to read and parse commands entered by the user. Once a command is interpreted, the command interpreter is responsible for executing that command, typically by invoking the appropriate system calls or programs.
The interface is given by the operating system and allows users to access its functions.
Answer: System calls
System calls provide the programmatic interface through which user-level applications request services from the operating system kernel. They are the fundamental mechanism for interacting with the OS, allowing programs to perform privileged operations like file I/O, process creation, and memory management. APIs often build upon these system calls to offer higher-level functionality.
Which of the following statements is untrue?
Answer: kernel is made of various modules which can not be loaded in running operating system
Modern operating system kernels, especially monolithic kernels with modules or hybrid kernels, are designed to be modular. This means that various kernel components, such as device drivers or file systems, can be loaded into and unloaded from the kernel while the system is running. This dynamic loading capability enhances flexibility, reduces memory footprint, and allows for easier updates and extensions without requiring a full system reboot.
Which of the following errors will the operating system deal with?
Answer: All of the above
An operating system is responsible for handling a wide range of errors to maintain system stability and provide a robust computing environment. This includes managing hardware-related issues like power failures and printer problems, as well as network connection failures. By detecting and responding to these errors, the OS ensures that the system can recover or inform the user appropriately.
Most operating systems record error information in a _____ whenever a process fails.
Answer: log file
When a process fails or other significant system events occur, most operating systems record detailed information in a 'log file'. These log files serve as a historical record of system activities, errors, and warnings. They are invaluable for debugging, troubleshooting, and auditing system behavior, helping administrators diagnose problems and understand system performance.
Which of the following is not an operating system that runs in real time?
Answer: Palm OS
Real-time operating systems (RTOS) are specifically designed for applications requiring precise and predictable timing, with strict deadlines for tasks. QNX, RTLinux, and VxWorks are all examples of RTOS. Palm OS, on the other hand, was a general-purpose mobile operating system for PDAs and early smartphones, not built with the stringent timing guarantees characteristic of real-time systems.
What features does OS X have?
Answer: hybrid kernel
OS X (now macOS) utilizes a 'hybrid kernel' architecture. This design combines elements of both monolithic and microkernel approaches. It places some services, traditionally found in user space in microkernels, directly into the kernel for performance, while still maintaining a modular structure and the ability to run some components as user-space processes.
Each process in an operating system has its own ________ .
Answer: All of the above
In an operating system, each process is designed to be an independent execution environment. This isolation means that each process has its own dedicated address space, preventing it from directly interfering with other processes' memory. Furthermore, processes manage their own set of open files, pending alarms, signals, and signal handlers, ensuring a high degree of autonomy and protection between concurrent tasks.
When the time slot allotted to a process in a timeshare operating system expires, the process transitions from the current state to?
Answer: Ready state
In a time-sharing operating system, processes are allocated a small time slice to execute. When a process's allotted time slice expires, it is preempted by the scheduler. The process does not terminate or block; instead, it transitions from the running state back to the 'ready state', where it waits in the ready queue for its next turn to be allocated CPU time.
When a parent process terminates, all child processes also end, which is known as cascading termination.
Answer: Normally or abnormally
Cascading termination refers to the scenario where the termination of a parent process automatically leads to the termination of all its child processes. This can occur whether the parent process terminates 'normally' (e.g., by completing its task) or 'abnormally' (e.g., due to an error or system signal). The operating system ensures that child processes do not become 'orphans' and consume resources indefinitely after their parent has ceased to exist.
When a process is waiting for an I/O service and is in the "Blocked" state.
Answer: Ready state
When a process finishes waiting for an I/O service, it transitions from the 'Blocked' state to the 'Ready' state. In the Ready state, the process is prepared to execute and is waiting for the CPU to become available. It does not immediately go to the Running state because the CPU might be busy with another process.
For ________, the FCFS method is particularly problematic.
Answer: time sharing systems
The First-Come, First-Served (FCFS) scheduling algorithm is problematic for time-sharing systems because it can lead to long average waiting times and poor response times. A long CPU-bound process arriving first can monopolize the CPU, causing subsequent interactive processes to wait excessively. This defeats the purpose of time-sharing, which aims to provide quick responses to multiple users.
When should an operating system check for deadlock?
Answer: every time a resource request is made at fixed time intervals
Deadlock detection should ideally occur both when a resource request is made and at fixed time intervals. Checking at every resource request helps to identify deadlocks promptly, while periodic checks can catch deadlocks that might have formed due to complex interactions or resource releases. This combined approach offers a balance between overhead and responsiveness, ensuring the system doesn't remain deadlocked for too long.
An algorithm for avoiding deadlocks dynamically checks the Data to make sure that a cyclic wait condition is never possible.
Answer: resource allocation state
Deadlock avoidance algorithms, like the Banker's algorithm, dynamically check the 'resource allocation state' to prevent deadlocks. This involves analyzing the current allocation of resources, the available resources, and the maximum demands of each process. By ensuring that the system can always find a safe sequence for all processes to complete, it guarantees that a cyclic wait condition, which is a prerequisite for deadlock, never occurs.
Interrupt latency for real-time operating systems should be
Answer: minimal
Interrupt latency in real-time operating systems (RTOS) must be minimal to ensure timely responses to external events. RTOS are designed for applications where precise timing and predictable execution are critical, such as industrial control or medical devices. High interrupt latency could cause missed deadlines or system failures, making low latency a fundamental requirement.