Operations Systems C4 Flashcards

1
Q

Define Multiprogramming Environment and its Requirements

A

Multiprogramming Environment refers to a scenario where multiple processes “compete” for execution on a single CPU. Its requirements include fair and efficient CPU allocation for each job, ensuring that each job gets its fair share of CPU time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain the concept of Multithreading and its significance

A

Multithreading involves managing multiple threads within a single process, allowing applications to execute multiple tasks simultaneously. This capability enhances responsiveness and efficiency in applications, such as web browsers, by enabling simultaneous execution of multiple operations

Multithreading involves managing multiple threads within a single process, enabling applications like web browsers to execute multiple tasks simultaneously, improving responsiveness and efficiency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe the functions and responsibilities of a Job Scheduler and a Process Scheduler

A

The Job Scheduler is responsible for selecting incoming jobs, placing them in a queue, and deciding on job initiation criteria. On the other hand, the Process Scheduler determines which job receives CPU resources, when and for how long, handles interrupt processing, and manages queues for job movement during execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Differentiate between CPU-bound and I/O-bound jobs. Provide examples for each

A

CPU-bound jobs involve tasks that require extensive computational resources with shorter I/O cycles, such as mathematical calculations. In contrast, I/O-bound jobs involve tasks with frequent I/O operations and shorter CPU cycles, like printing documents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain the concept of Thread States and transitions in thread execution

A

Thread States represent different stages a thread undergoes during its execution. These states include READY, RUNNING, WAITING, DELAYED, and BLOCKED. Transitions between these states occur based on events such as thread creation, external events, or I/O operations.

Ready to Run but you have to wait coz the Block is Delayed

-
RR with DB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Discuss the role of Control Blocks in process and thread management

A

Control Blocks, such as Process Control Blocks (PCBs) for processes and Thread Control Blocks (TCBs) for threads, are data structures used to store and manage information related to processes and threads. They contain essential details required for scheduling and resource allocation, facilitating orderly management of queues.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Mention the criteria for a good process scheduling policy

A
  • max throughput
  • min response/turnsaround/waiting time
  • ensuring cpu eff for all jobs
  • des making by the sys designers/admin
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe the preemptive and nonpreemptive scheduling policies, providing examples of each

A

Preemptive scheduling interrupts job processing and transfers CPU to another job, commonly used in time-sharing environments. An example is the Round Robin algorithm. Nonpreemptive scheduling functions without external interrupts and is used in scenarios where infinite loops can be interrupted, such as First-Come, First-Served (FCFS) scheduling.

Preemptive Scheduling: Allows the operating system to interrupt a process and allocate the CPU to another process with a higher priority.Round Robin

Non-preemptive Scheduling: Once a process starts, it continues to run until completion or voluntary waiting without interruption by the operating system.FCFS and SJF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain the Shortest Job Next (SJN) scheduling algorithm and its limitations

A

SJN, also known as Shortest Job First, prioritizes jobs based on their CPU cycle time. It works well in batch environments where CPU time requirements are known in advance but doesn’t perform effectively in interactive systems due to the unpredictability of job arrival times, leading to variable turnaround times.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

*Discuss the significance of scheduling policies in ensuring system efficiency.

A

Scheduling policies play a crucial role in optimizing system performance by allocating system resources efficiently, maximizing throughput, minimizing response time, and ensuring fair resource allocation among jobs. They are instrumental in achieving balanced system utilization and responsiveness to user requests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain the concept of Priority Scheduling in nonpreemptive environments. Provide methods for assigning priorities and their implications

A

Priority Scheduling involves giving specal treatment to important jobs, where the highest priority programs are processed first. Priority assignment methods include considering factors such as

-memory requirements,
-number and type of peripheral devices needed,
-total CPU time required,
-the amount of time a job has spent in the system (aging).

These methods ensure efficient resource allocation based on job characteristics.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Describe the Shortest Remaining Time (SRT) scheduling algorithm. Highlight its advantages and limitations

A

SRT is a preemptive version of Shortest Job Next (SJN) where the processor is allocated to the job closest to completion. It is often used in batch environments where short jobs are given priority. However, SRT requires advance CPU time knowledge and involves more overhead compared to SJN. It’s not suitable for interactive systems due to its preemptive nature.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Explain the Round Robin scheduling algorithm. Discuss its implementation, efficiency, and factors influencing its time quantum size.

A

Round Robin is a preemptive scheduling algorithm extensively used in interactive systems. It assigns a predetermined time slice (time quantum) to each job, ensuring fair CPU allocation. The efficiency of Round Robin depends on the time quantum size, which should be balanced to avoid either monopolization by one job or excessive context switching overhead. Factors influencing time quantum size include system performance requirements and job characteristics.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Discuss the concept and implementation of Multiple-Level Queues in scheduling. Provide examples of environments where it works well.

A

Multiple-Level Queues involve organizing jobs into different queues based on priority or characteristics. It works well in systems with jobs grouped by common characteristics, such as CPU-bound and I/O-bound jobs. In such environments, priority-based queues ensure efficient resource allocation and performance optimization based on job requirements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Explain the four primary methods of moving jobs between queues in Multiple-Level Queues. Discuss their advantages and scenarios where they are suitable

A

The four primary methods include: No Movement Between Queues, Movement Between Queues, Variable Time Quantum Per Queue, and Aging. These methods offer flexibility in managing job priorities and resource allocation. They are suitable for various environments based on factors such as job characteristics, system workload, and performance requirements, ensuring efficient job scheduling and system optimization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe the Earliest Deadline First (EDF) scheduling algorithm. Discuss its primary goal and challenges in real-time systems.

A

EDF is a preemptive dynamic priority algorithm used in real-time systems to meet critical processing requirements, particularly deadlines. Its primary goal is to process jobs in an order most likely to allow each to run to completion before their respective deadlines. Challenges include handling missed deadlines, unpredictable job throughput due to changing priorities, and high overhead in continually evaluating deadlines.

17
Q

Explain the concept of managing interrupts in operating systems. Provide examples of interrupt types and their handling process

A

Interrupts in operating systems are events that require immediate attention and can originate from various sources such as memory manager, time quantum expiration, I/O operations, or arithmetic operations. Interrupts are handled by interrupt handlers, which save the interrupted process state, process the interrupt, and resume normal operation. Examples include page interrupt, time quantum expiration interrupt, I/O interrupt, internal interrupt, illegal arithmetic operation interrupt, and illegal job instruction interrupt.

18
Q

Explain the Shortest Remaining Time (SRT) scheduling algorithm and its limitations

A

its preemptive
processor allocated jobs which are closer to compl
short jobs = priority
req advan cpc time and knowl and more overhead
good/used at batch
bad at intercative……why? dur to its preemptive nature

19
Q

Explain the Round Robin (RR) scheduling algorithm and its limitations

A

pre
used in intercative sys
assigned predetermined time slice (TQ)
Eff depends on TQ slice
TQ = Bal to avoid Monopolization by 1 job OR excessive context switching overhead
Fac influences TQ sliices are 1-sys performance req
2- job characteristics
READY queue FCFS
timer expires if cpu cycle > TQ = job preempted are placed at end of ready queue
if job cpu cycle < TQ = Job fin!