• About WordPress
    • WordPress.org
    • Documentation
    • Support
    • Feedback
  • Log In
  • Register
  • Home
  • Courses
  • Past Paper
  • FYP
  • Interview Questions
  • University Events
  • Contact
  • Quiz & Assignment
Cuitutorial
  • Home
  • Courses
  • Past Paper
  • FYP
  • Interview Questions
  • University Events
  • Contact
  • Quiz & Assignment

Operating System

Home » Blog » Starvation in operating system

Starvation in operating system

  • Posted by saqib
  • Categories Operating System
  • Date January 6, 2023
  • Comments 0 comment

Starvation in operating system

It is a problem when the low-priority process gets jammed for a long duration of time because of high-priority requests being executed. A stream of high-priority requests stops the low-priority process from obtaining the processor or resources. Starvation happens usually when the process is delayed for an infinite period of duration. Resources needed for the Operating system to handle requests of the process

  • Memory
  • CPU time
  • Disk space
  • Bandwidth of network
  • I/O access to disk or network

What Causes Starvation in OS

Here are a few reasons why starvation in OS occurs

  • In starvation, a process with low priority might wait forever if the process with higher priority uses a processor constantly.
  • Because the low-priority processes are not interacting with resources the deadlock does not occur but there are chances of starvation as the low-priority processes are kept in a wait state.
  • Hence starvation is precisely a fail-safe method, that is it prevents deadlock temporarily but it affects the system in general.
  • The important cause of starvation might be that there are not enough resources to provide for every resource.
  • If a process selection is random then there can be a possibility that a process might have to wait for a long duration.
  • Starvation can also occur when a resource is never provided to a process for execution due to faulty allocation of resources.

Various Methods to Handle Starvation in OS

Here are the following ways in which the starvation situation in OS can be handled:

  • The allocation of resources by CPU should be taken care of by a freelance manager to ensure that there is an even distribution of resources.
  • Random choice of process method should be avoided due to which starvation occurs.
  • The aging criteria of processes should be taken into consideration while resource allocation to avoid starvation.
  • Scheduling algorithm with priority queue can also be used to handle starvation.
  • If the random technique is to be used then use it with a priority queue to handle starvation.
  • Multilevel feedback queue can also be used for avoiding starvation in the operating system.

Example of Starvation In Operating System

Starvation In Operating System

In the given example, the P2 process has the highest priority and process P1 has the lowest priority. In the diagram, it can be seen that there is n number of processes ready for their execution. So in the CPU, the process with the highest priority will come in which is P2 and the process P1 will keep waiting for its turn because all other processes are at a high priority concerning that P1. This situation in which the process is waiting is called starvation.

  • Starvation is a problem of resource management where in the OS, the process does not has resources because it is being used by other processes.
  • It is a problem when the low-priority process gets jammed for a long duration of time because of high-priority requests being executed.
  • Share:
author avatar
saqib

Previous post

Beautiful UI design in flutter
January 6, 2023

Next post

Aging in operating system
January 6, 2023

You may also like

Aging in operating system
6 January, 2023

Aging in operating system In Operating systems, Aging is a scheduling technique used to avoid Starvation. Fixed priority scheduling is a scheduling discipline in which tasks queued for utilizing a system resource is assigned each priority. A task with a …

Dead Lock in operating system
3 January, 2023

Dead Lock in operating system A Deadlock is a situation where each of the computer process waits for a resource which is being assigned to some another process. In this situation, none of the process gets executed since the resource …

Round Robin Scheduling Algorithm in Operating system
2 January, 2023

Round Robin Scheduling algorithm with Example The round-robin scheduling takes its name from the round-robin scheduling idea. This principle states that everyone will divide anything they possess equally among themselves. Round Robin scheduling algorithm is used in a time-sharing system. …

Leave A Reply Cancel reply

You must be logged in to post a comment.

admin@cuitutorial.com
Facebook-f Twitter Youtube Linkedin Instagram Stack-overflow Pinterest Github Quora Whatsapp
Courses
  • All Courses
  • Past Paper
  • Final year projects
  • Interview Questions
  • Contact
Important Pages
  • Privacy Policy
  • Terms of Service
  • Cookie Policy
Links
  • University Events
  • Team
Education & learning platform for All Computer science subjects
Final year projects
Past Paper
Interview questions
Programming, C/C++, Asp.net/MVC. Android, MySql, Jquery, Ajax, javascript, Php, Html5, Bootstrap4.
NTS, GAT, PPSC, FPSC

Copyright © 2021 | Cuitutorial