Docsity

Computer Science — Operating Systems Processes, Memory, File Systems, Scheduling, Secur, Exams of Computer Science

Toggle sidebar
bg1
OPERATING SYSTEMS PRACTICE EXAMINATION.
Processes, Memory, File Systems, Scheduling, and Security.
Computer Science — Operating Systems.
Questions and Answers.
1. What is an operating system?
Answer: An operating system is system software that manages computer hardware
and software resources and provides services for application programs.
2. State four functions of an operating system.
Answer: Process management, memory management, file management,
input/output management, security, networking, and user-interface provision are
common functions.
3. What is a kernel?
Answer: The kernel is the central component of an operating system that manages
core hardware resources and provides essential system services.
4. What is a system call?
Answer: A system call is a controlled interface through which a user program
requests a service from the operating-system kernel.
5. What is a process?
Answer: A process is a program in execution together with its current state,
resources, and execution context.
6. What is a program?
Answer: A program is a passive set of instructions stored in a file, whereas a
process is an executing instance of that program.
7. What is a process control block?
pf3
pf4
pf5

Partial preview of the text

Download Computer Science — Operating Systems Processes, Memory, File Systems, Scheduling, Secur and more Exams Computer Science in PDF only on Docsity!

OPERATING SYSTEMS PRACTICE EXAMINATION.

Processes, Memory, File Systems, Scheduling, and Security.

Computer Science — Operating Systems.

Questions and Answers.

  1. What is an operating system? Answer: An operating system is system software that manages computer hardware and software resources and provides services for application programs.
  2. State four functions of an operating system. Answer: Process management, memory management, file management, input/output management, security, networking, and user-interface provision are common functions.
  3. What is a kernel? Answer: The kernel is the central component of an operating system that manages core hardware resources and provides essential system services.
  4. What is a system call? Answer: A system call is a controlled interface through which a user program requests a service from the operating-system kernel.
  5. What is a process? Answer: A process is a program in execution together with its current state, resources, and execution context.
  6. What is a program? Answer: A program is a passive set of instructions stored in a file, whereas a process is an executing instance of that program.
  7. What is a process control block?

Answer: A process control block stores information about a process, including its state, program counter, registers, scheduling information, and resource details.

  1. Name common process states. Answer: Common process states include new, ready, running, waiting or blocked, and terminated.
  2. What is a process state transition? Answer: A process state transition is a change from one process state to another caused by events such as scheduling, I/O requests, completion, or interruption. 10.What is a thread? Answer: A thread is the smallest unit of CPU execution within a process. 11.What is multithreading? Answer: Multithreading allows multiple threads within a process to execute concurrently or in parallel. 12.State one advantage of multithreading. Answer: Multithreading can improve responsiveness, resource sharing, concurrency, and CPU utilization. 13.What is a context switch? Answer: A context switch saves the state of a running process or thread and loads the saved state of another so execution can switch. 14.What is CPU scheduling? Answer: CPU scheduling selects a ready process or thread to receive processor time. 15.What is preemptive scheduling? Answer: Preemptive scheduling allows the operating system to interrupt a running process and assign the CPU to another process.

Answer: A race condition occurs when the result depends on the timing or order of concurrent operations on shared data. 25.What is a critical section? Answer: A critical section is a part of a program that accesses shared data or resources and must not be executed concurrently in an unsafe manner. 26.What is a mutex? Answer: A mutex is a mutual-exclusion mechanism that allows only one thread or process to access a protected resource at a time. 27.What is a semaphore? Answer: A semaphore is a synchronization variable used to control access to shared resources through signaling and counting. 28.What is deadlock? Answer: Deadlock occurs when processes are permanently blocked because each is waiting for a resource held by another. 29.State the four necessary conditions for deadlock. Answer: Mutual exclusion, hold and wait, no preemption, and circular wait are the four necessary conditions. 30.What is deadlock prevention? Answer: Deadlock prevention designs a system to ensure that at least one necessary deadlock condition can never hold. 31.What is deadlock avoidance? Answer: Deadlock avoidance evaluates resource-allocation decisions to ensure the system remains in a safe state. 32.What is a safe state? Answer: A safe state is one in which the system can allocate resources in some order and allow all processes to complete.

33.What is memory management? Answer: Memory management allocates, tracks, protects, and deallocates main memory for processes and the operating system. 34.What is contiguous memory allocation? Answer: Contiguous memory allocation places each process in a single continuous region of physical memory. 35.What is paging? Answer: Paging divides logical memory into fixed-size pages and physical memory into corresponding frames. 36.What is a page fault? Answer: A page fault occurs when a process references a page that is not currently in physical memory. 37.What is virtual memory? Answer: Virtual memory allows programs to use an address space larger than physical memory by storing some data on secondary storage. 38.What is demand paging? Answer: Demand paging loads a page into memory only when the process references it. 39.What is page replacement? Answer: Page replacement selects a memory page to remove when a required page must be loaded and no free frame is available. 40.Name three page-replacement algorithms. Answer: FIFO, optimal replacement, and least recently used are common page- replacement algorithms. 41.What is thrashing?

50.What is the central purpose of an operating system? Answer: The central purpose is to manage hardware and software resources efficiently, provide a convenient execution environment, and protect system operations and data.