1/28
Comprehensive practice flashcards covering Operating System fundamentals, process management, CPU scheduling, synchronization, deadlocks, memory management, virtual memory, secondary storage, and security.
What is an operating system, and what are its primary and secondary goals?
An operating system is a program that acts as an intermediary between a user of a computer and the computer hardware. Its primary goal is to make the computer system convenient to use, and its secondary goal is to use the computer hardware in an efficient manner.

According to the abstract view of computer system components shown below, what are the four fundamental layers of a computer system?
The four fundamental components are the users (user 1,user 2,…,user n), system and application programs (such as compiler, assembler, text editor, database system), the operating system, and the computer hardware.
When was the first operating system implemented, by whom, and for which computer?
The first operating system was implemented in the early 1950’s by the General Motors Research Laboratories for their IBM 701.
What are the five major operating system activities regarding process management?
What components constitute a process in execution within the system?
A process includes the current value of the Program Counter (PC), the contents of processor registers, the value of variables, the process stack (SP) containing temporary data (subroutine parameters, return addresses, temporary variables), and a data section containing global variables.

Identify the five process states and the valid transitions between them as depicted in this diagram.
The states are:

What is a Process Control Block (PCB), and what key fields does it store?
A Process Control Block (PCB), or task control block, represents each process in the operating system. It stores the process state, process number, program counter, registers, memory limits, and list of open files.
Under which four circumstances do CPU scheduling decisions take place?
What three major operations are performed by the dispatcher?
What five criteria are commonly used to compare CPU scheduling algorithms?

How does Multilevel Queue Scheduling work, and what is the priority order of the process queues shown below?
Processes are permanently assigned to a queue based on a property such as memory size, process priority, or process type. The algorithm chooses the process from the occupied queue with the highest priority (preemptively or non-preemptively). The hierarchy from highest to lowest priority is: system processes, interactive processes, interactive editing processes, batch processes, and student processes.
What is a race condition in concurrent processing?
A race condition occurs when several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place.
What three requirements must a solution to the critical-section problem satisfy?

In what exact sequence must a process utilize a system resource, as illustrated in the cycle below?
A process may utilize a resource in only the following sequence: Request the resource, Use the resource, and Release the resource.
What four conditions must hold simultaneously for a deadlock situation to arise?
How do base and limit registers protect user processes in contiguous memory allocation?
The base register contains the value of the smallest physical address, and the limit register contains the range of logical addresses. The hardware ensures that each logical address generated by a process is strictly less than the limit register before dynamically adding it to the base register, preventing unauthorized memory access.

How does dynamic relocation using a relocation register in an MMU compute physical addresses?
The Memory-Management Unit (MMU) dynamically adds the value stored in the relocation register (such as 14000) to every logical address generated by the CPU (such as 346) at the moment it is dispatched to memory, yielding the physical address (14000+346=14346).
Compare First-fit, Best-fit, and Worst-fit dynamic storage-allocation algorithms.
First-fit and best-fit perform better than worst-fit in terms of speed and storage utilization.

Explain how segmentation hardware validates and maps an address pair ⟨s,d⟩ to physical memory.
The CPU generates logical address ⟨s,d⟩ (segment number s and offset d). The segment table uses s to look up the segment's limit and base. The hardware tests whether d<limit. If yes, the base is added to the offset (base+d) to produce the physical memory address. If no, a trap for an addressing error is generated.
What is virtual memory, and what major advantages does it offer?
Virtual memory is the separation of user logical memory from physical memory. It allows execution of programs that are only partially loaded in physical memory, enabling the logical address space to be much larger than physical address space, allowing address spaces to be shared by several processes, and enabling more efficient process creation.
What is the function of the valid-invalid bit in demand paging?
Each page table entry has a valid-invalid bit: v indicates the page is valid and in memory, while i indicates it is not in memory. Initially, all entries are set to i. If an address translation references an entry marked i, a page fault occurs.

What are the six sequential steps in handling a page fault, as depicted in the diagram?
What is the role of the modify (dirty) bit in page replacement?
The modify bit reduces the overhead of page transfers between main memory and disk. If a page has not been modified while in memory, it does not need to be written back to disk during page replacement; only modified pages are written to disk.
What are the two major components that constitute disk positioning time (random-access time)?
Positioning time consists of:

Identify the primary mechanical components of the moving-head disk mechanism illustrated below.
The mechanism includes the central rotating spindle, multiple platters, track (t), sector (s), cylinder (c), read-write heads, arms, and the arm assembly.

How does Linked Allocation organize file blocks on a disk as shown in this diagram?
Each file is stored as a linked list of disk blocks scattered across the disk. The directory entry stores pointers to the starting block (block 9) and ending block (block 25). Each block contains a pointer to the next block in the chain, with the final block holding a value of −1.

How does Indexed Allocation manage file pointers as demonstrated in this diagram?
Indexed allocation brings all pointers together into a single dedicated index block (here, index block 19 for file 'jeep'). The directory points directly to the index block, and the entries within that index block point to the individual physical data blocks (9,16,1,10,25, followed by −1 for unused entries).
What is the primary difference between a threat and an attack in computer security?
A threat is a potential security violation, whereas an attack is an actual attempt to breach security (which may be accidental or malicious).
What is authentication, and what practices help ensure password security?
Authentication is the mechanism by which a process verifies that the communication partner is who it is supposed to be and not an imposter. Password security practices include frequent changes, using non-guessable passwords, logging all invalid access attempts, encrypting passwords, and allowing passwords to be used only once.