Practice IT Operating System Questions and Answers
- A system uses demand paging with an average page fault service time of 10 milliseconds and a memory access time of 100 nanoseconds. If the desired effectiv...
- Which of the following is a potential problem when multiple threads access and modify shared data concurrently without proper synchronization?
- A process is currently in the "Running" state. If its allocated time slice expires, to which state will it typically transition?
- Consider three processes P1, P2, and P3 with burst times 10ms, 10ms, and 10ms respectively. If they arrive at time 0 and are scheduled using FCFS (First-Co...
- What is the primary function of the Program Counter (PC) in a CPU?
- Which of the following is NOT one of the four necessary conditions for a deadlock to occur?
- A semaphore is initialized to 1. If two processes P1 and P2 both try to execute a `wait()` (P) operation on this semaphore, what is the maximum number of p...
- A system uses paging with a logical address space of 2^26 bytes and a page size of 4 KB. How many bits are required for the page number in the logical addr...
- Which memory management technique divides the logical address space into fixed-size blocks and the physical memory into frames of the same size?
- What is the phenomenon where a process spends more time paging (swapping pages between main memory and disk) than executing instructions?
- Which of the following is NOT a primary function of an operating system?
- A system call is typically implemented as a(n):
- Which of the following process states represents a process waiting for an I/O operation to complete?
- In multithreading programming, what is a critical section?
- Which CPU scheduling algorithm gives preference to processes with shorter CPU burst times?
- Deadlock can arise if four necessary conditions hold simultaneously. Which of the following is NOT one of them?
- Which memory management technique divides logical memory into blocks of the same size, called pages, and physical memory into blocks of the same size, call...
- A system uses a 32-bit logical address space and a page size of 4KB. If each page table entry (PTE) is 4 bytes, how many entries can a single-level page ta...
- Consider three processes P1, P2, P3 with burst times 10, 5, 8 milliseconds respectively. All arrive at time 0. If they are scheduled using the Shortest Job...
- Which of the following is a primary reason for using threads instead of multiple processes for concurrent execution within a single application?
- Β A deadlock situation can be completely prevented if which of the following conditions is eliminated?
- Which system call is typically used by a parent process to wait for a child process to terminate?
- In the context of file systems, what is the primary purpose of an inode?
- Consider a delete_node(head, key) function for a singly linked list that removes the first occurrence of a node with a given key. The function works for mo...
- A custom stack implementation has a pop() method that is supposed to remove and return the top element. However, when the stack is empty, calling pop() cau...
- A recursive function calculate_height(node) is designed to find the height of a binary tree (where a single node has height 0). The function is implemented...
- An insert(root, value) function for a Binary Search Tree (BST) is implemented recursively. After inserting several elements, a search(root, value) function...
- A hash map (or dictionary) implemented with separate chaining is exhibiting very poor performance, even with a seemingly good hash function. Operations lik...
- A function sum_matrix_elements(matrix, R, C) is designed to sum all elements of a matrix with R rows and C columns. The implementation uses nested loops: t...
- Consider the array arr = [1, 2, 3, 4, 5] and the following operations: 1.Β arr.insert(2, 9) (inserts 9 at index 2) 2.Β arr.pop(3) (removes element at ind...
- Consider a singly linked list: 1 -> 2 -> 3 -> 4 -> None. If a delete_node(head, 3) function is called (which deletes the node with value 3), what will be t...
- A queue initially empty undergoes the following sequence of operations: 1.Β enqueue(10) 2.Β enqueue(20) 3.Β dequeue() 4.Β enqueue(30) 5.Β dequeue() 6....
- Consider the Quick Sort algorithm with the last element as the pivot. For the array [7, 2, 1, 6, 8, 5, 3, 4], what will be the state of the array *after th...
- Given the array [38, 27, 43, 3, 9, 82, 10], what would be the two sorted subarrays immediately *before the final merge step* in a Merge Sort algorithm?
- Perform a dry run of Binary Search for target = 29 in the sorted array [2, 12, 15, 17, 27, 29, 45]. What are the values of mid in each iteration until the ...
- Consider a graph with vertices A, B, C, D and edges with weights: (A,B)=1, (A,C)=7, (A,D)=10, (B,C)=3, (C,D)=4, (D,E)=2. (Assume E is another vertex). If y...
- Given a set of activities with start and finish times: (1,4), (3,5), (0,6), (5,7), (3,9), (5,9), (6,10), (8,11), (8,12), (2,14), (12,16). If you apply the ...
- Using a bottom-up dynamic programming approach to calculate the 6th Fibonacci number (F(0)=0, F(1)=1), what are the values stored in the DP table F at indi...
- For matrix dimensions p = {10, 20, 30, 40}, representing matrices A (10x20), B (20x30), C (30x40). What is the minimum number of scalar multiplications req...
- Consider generating all permutations of the string "ABC" using a backtracking approach. Which of the following sequences represents a valid path in the rec...
More Topics
- Algorithms Questions
- Analog and Digital Communication Questions
- Artificial Intelligence & Machine Language Questions
- Basics of Computers Questions
- Big Data Analytics Questions
- C Programming Questions
- C++ Questions
- Compiler Design Questions
- Computer Architecture and Design Questions
- Cyber Security Questions
- Data Analytics Languages Questions
- Data Structure Questions
- Data Warehousing Questions
- Digital Logic Questions
- IOT and mobile Computing Questions
- IT DBMS Questions
- IT Networking Questions
- Java Language Questions
- Machine Learning Questions
- Memory Management Questions
- Microsoft Office Questions
- Miscellaneous Questions Questions
- Network Layer and IP Protocol Questions
- Numerical and Statistical Computing Questions
- Object Oriented Programming Questions
- OOPS Concepts Questions
- Previous Year Questions Questions
- Programming Concept Questions
- Python Questions
- Shell Scripting Questions
- Software Engineering and Web Technology Questions
- SQL Questions
- String Manipulation Questions
- TCP IP and OSI Questions