Skip to content

[FEATURE] Add Preemptive Priority Scheduling Algorithm #1339

@dilipkjain

Description

@dilipkjain

Detailed description

Algorithm

Preemptive Priority Scheduling Algorithm

Type

Process Scheduling Algorithm

Description

The preemptive priority CPU scheduling algorithm uses a rank-based system to define a rank for each process, where lower rank processes have higher priority and higher rank processes have lower priority. The preemptive priority CPU scheduling algorithm decides the priority of a process based on its rank. The scheduler selects the first process whose arrival time is 0 because that process is only executing at time t=0. Then it checks the priority of the next available process. If the current process has a higher priority than the previous one, then it executes the current process. If the current process has a lower priority than the previous one, then it executes the previous one. If both processes have equal priorities, then it executes the one that arrived first.

Context

A process scheduling algorithm, preemptive in nature i.e., the CPU is allocated to the processes for a limited time only.
The preemptive priority CPU scheduling algorithm uses a rank-based system to define a rank for each process, where lower rank processes have higher priority and higher rank processes have lower priority. The preemptive priority CPU scheduling algorithm decides the priority of a process based on its rank. The scheduler selects the first process whose arrival time is 0 because that process is only executing at time t=0. Then it checks the priority of the next available process. If the current process has a higher priority than the previous one, then it executes the current process. If the current process has a lower priority than the previous one, then it executes the previous one. If both processes have equal priorities, then it executes the one that arrived first.

Possible implementation

Add Preemptive Priority Scheduling Algorithm in Process Scheduling Folder

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions