WorksheetsOperating System Unit 3
Total questions: 20
Worksheet time: 10mins
What is the primary goal of CPU scheduling?
Prioritize user input over process execution.
Reduce memory usage and increase disk space.
Maximize CPU utilization and ensure efficient process execution.
Minimize power consumption at all costs.
Name three common CPU scheduling algorithms.
Priority Scheduling (PS)
First-Come, First-Served (FCFS), Shortest Job Next (SJN), Round Robin (RR)
Dynamic Time Sharing (DTS)
Multilevel Queue Scheduling
What is a Process Control Block (PCB)?
A Process Control Block (PCB) is a software application for managing files.
A Process Control Block (PCB) is a type of hardware component.
A Process Control Block (PCB) is a data structure that contains information about a process, including its state, process ID, and resource allocation.
A Process Control Block (PCB) is a network protocol for data transmission.
components of a Process Control Block.
thread count
process priority
file descriptor table
CPU registers, memory management information
What are the different states a process can be in?
Paused
Completed
Blocked
New, Ready, Running, Waiting, Terminated
Describe the process transition diagram.
A diagram showing only the final state of a process.
A visual representation of states and transitions in a system.
A flowchart depicting unrelated processes.
A method for calculating probabilities in a system.
What is the role of a scheduler in an operating system?
To store data in memory for quick access.
To handle network communications between devices.
To manage user accounts and permissions.
The role of a scheduler in an operating system is to manage process execution and allocate CPU time.
How does a thread differ from a process?
A process is a lightweight unit of a thread that shares resources.
A thread is a lightweight unit of a process that shares memory and resources, while a process is an independent execution environment with its own memory.
Threads cannot communicate with each other while processes can.
A thread is a separate program that runs independently of a process.
What are the advantages of using threads?
Increased memory usage
Advantages of using threads include improved performance, lower overhead, responsive user interfaces, and simplified program structure.
Complex program structure
Slower execution speed
Explain the concept of process identification information.
Process identification information includes the process's memory usage statistics.
Process identification information is the data that uniquely identifies a process, including attributes like process ID, parent process ID, and user ID.
Process identification information is used for network security protocols.
Process identification information is a method for tracking user login times.
What performance criteria are used to evaluate scheduling algorithms?
CPU utilization, throughput, turnaround time, waiting time, response time, fairness.
Disk space
Network latency
Memory usage
Define the term 'throughput' in the context of CPU scheduling.
Throughput refers to the speed of the CPU clock.
Throughput is the total memory used by processes.
Throughput is the amount of data transferred over a network.
Throughput is the number of processes completed in a given time period.
What is 'turnaround time' and how is it calculated?
Turnaround time is the average time taken to complete a process, calculated as Start Time plus Completion Time.
Turnaround time refers to the time taken to initiate a process, calculated as End Time minus Start Time.
Turnaround time is the time taken to prepare a process, calculated as Start Time divided by Completion Time.
Turnaround time is the total time taken to complete a process, calculated as Completion Time minus Start Time.
Describe the difference between preemptive and non-preemptive scheduling.
Non-preemptive scheduling is faster than preemptive scheduling in all cases.
Preemptive scheduling interrupts processes; non-preemptive scheduling does not.
Preemptive scheduling is only used in real-time systems; non-preemptive scheduling is not.
Preemptive scheduling allows processes to run indefinitely; non-preemptive scheduling interrupts them.
What is the purpose of multiprocessor scheduling?
To increase the number of processes running on a single processor.
To reduce the overall execution time of a single process.
The purpose of multiprocessor scheduling is to efficiently manage the execution of processes across multiple processors.
To limit the number of processors available for process execution.
How can deadlock be characterized in a system?
Deadlock can be resolved by increasing system resources.
Deadlock is characterized by mutual exclusion, hold and wait, no preemption, and circular wait.
Deadlock is characterized by resource allocation and release.
Deadlock occurs only in single-threaded systems.
What are the strategies for deadlock prevention?
Mutual Exclusion, Hold and Wait, No Preemption, Circular Wait
Immediate Resource Release, Circular Allocation, Mutual Sharing
Resource Allocation, Wait and Release, Preemption Allowed
Sequential Execution, Resource Sharing, No Waiting
Explain the difference between deadlock avoidance and detection.
Deadlock detection prevents deadlocks from occurring, while avoidance allows them to happen.
Deadlock avoidance and detection are the same processes.
Deadlock avoidance allows deadlocks to occur, while detection prevents them.
Deadlock avoidance prevents deadlocks from occurring, while deadlock detection allows deadlocks to happen and then identifies and resolves them.
What is a deadlock recovery method?
Strategies for user authentication
Methods to increase system performance
Deadlock recovery methods are strategies to resolve deadlocks in systems.
Techniques for data encryption
How does resource allocation affect deadlock situations?
Deadlocks occur only when there are too many processes running simultaneously.
Resource allocation can cause deadlocks if it leads to circular wait conditions among processes.
Resource allocation has no impact on the occurrence of deadlocks.
Resource allocation prevents deadlocks by ensuring all processes have enough resources.
