Questions tagged [scheduling]

In computer science, scheduling is the method by which threads, processes or data flows are given access to system resource.

Source: "Scheduling (computing)" article on Wikipedia

Types of scheduling

  • Round-robin

    Processes are given a set amount of time. For more information see

  • First come first serve

    Processes are executed in the order of the queue.

  • Shortest job first

    Processes are executed in order of estimated time.

  • Shortest remaining time

    Similar to shortest job first; however, if a new, shorter process joins the queue, then the scheduler will switch to that one.

  • Multi-level feedback queue

    There is more than just one queue, each queue has a certain priority and the scheduler can move jobs between queues when necessary. Modern operating systems like Windows use this.

2772 questions
7
votes
4 answers

How to model and store recurring tasks in rails?

Cron solutions in rails are numerous and pretty good. That's not what I'm struggling with here. Instead, what I'm having trouble with is letting users create their own recurring tasks (like reminders) - specifically how to model and store these in…
Brian Armstrong
  • 19,707
  • 17
  • 115
  • 144
7
votes
1 answer

ScheduledThreadPoolExecutor getting late

I have this simple code snippet : /** * @param args the command line arguments */ public static void main(String[] args) { ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(10); Runnable r = new Runnable() { …
uahakan
  • 576
  • 1
  • 6
  • 23
7
votes
1 answer

How does OS scheduler schedule threads that belong to two different processes (tasks)?

As far as all books say, switching between tasks/processes is more expensive than switching between threads of the same process/task. If so, then scheduler of threads-aware OS should schedule threads in such way that the threads of the same…
kachanov
  • 2,696
  • 2
  • 21
  • 16
7
votes
1 answer

Most standard calendar exchange data format

I have a system (php/MySQL) with a scheduler application. I'm about to create a service which would allow users to read their calendar from outlook, google, sunbird, ... I'm wondering what is the most standard format today for exchanging calendar…
Pierre de LESPINAY
  • 44,700
  • 57
  • 210
  • 307
7
votes
5 answers

Process niceness (priority) setting has no effect on Linux

I wrote a test program which consists of just an infinite loop with some computations inside, and performs no I/O operations. I tried starting two instances of the program, one with a high niceness value, and the other with a low niceness…
Hermann Speiche
  • 894
  • 1
  • 9
  • 16
6
votes
1 answer

How do I schedule one-time tasks from a Perl CGI application?

I am writing an application to allow users to schedule one-time long-running tasks from a web application (Linux/Apache/CGI::Application). To do this I use the Schedule::At module which is the Perl interface to the "at" command. Since the scheduled…
Gurunandan Bhat
  • 3,544
  • 3
  • 31
  • 43
6
votes
1 answer

Is it helpful to use ZeroMQ to build a peer-to-peer workload scheduler?

I am coding a workload scheduler. I would like my piece of software to be a peer-to-peer scheduler, ie. a node only knows some neighbours (other nodes) and use them to reach other nodes. Each node would have its own weighted-routing table to send…
Mathieu G.
  • 113
  • 8
6
votes
2 answers

Determining the amount of time processes spend Blocking/Executing

OK so for a programming assignment that I have (Yes, we are all allowed to turn to any source we find suitable for help) I have to find out how much time processes spend blocking/sleeping/running. My first attempt was creating a bash script... that…
Sandro
6
votes
1 answer

CPU isolation from Linux scheduler (isolcpus) doesn't work with pthreads

I have Linux with 6 CPU cores, one of which (0st) is isolated from Linux scheduler through the grub config file(/etc/default/grub) with GRUB_CMDLINE_LINUX_DEFAULT="quiet isolcpus=0 nohz_full=1". I checked isolation with cat…
red0ct
  • 4,840
  • 3
  • 17
  • 44
6
votes
2 answers

How can C-SCAN (elevator) algorithm cause starvation?

I'm reading Silberschatz's OS book. In section 16.8.1 it says: The fundamental problem with the elevator algorithm is that I/O operations cocentrated in a specific region of the disk can result in starvation of requests that need to occur in…
musa
  • 1,050
  • 4
  • 15
  • 26
6
votes
2 answers

Can WCF be auto scheduled?

I have below requirements: (1) Perform 'action A' when user requests for it. (2) We also want to perform the same 'Action A' twice in a day even if users don't request for it. I have a WCF web service which has method XYZ that performs action A.…
sharp_net
  • 737
  • 2
  • 5
  • 12
6
votes
2 answers

Does it make sense to run more PHP-FPM children than number of CPU cores?

Assuming that I have a CPU with 4 cores and 4 threads, does it make sense to run e.g. 8 PHP-FPM workers by setting pm.max_children = 8 option? As far as I'm concerned, CPU with 4 threads can only run up to 4 processes in "real" parallel. Wouldn't it…
Artur
  • 73
  • 1
  • 4
6
votes
2 answers

Understanding the linux scheduler

I am new to linux kernel and low level programming. I wanted to know how linux scheduler is supposed to be O(1) in time complexity. I came across the following article which is very informative but I have a problem understanding the pargraph I have…
Eastern Monk
  • 6,395
  • 8
  • 46
  • 61
6
votes
1 answer

What's the difference between Laravels Queue\ShouldBeUnique and Queue\Middleware\WithoutOverlapping?

I have a job that is somehow getting kicked off multiple times. I want the job to kick off once and only once. If any other attempts to run the job while it's already on the queue, I want those runs to ABORT. I've read the Laravel 8 documentation…
Ben Barreth
  • 1,675
  • 1
  • 15
  • 16
6
votes
2 answers

How are nice priorities and scheduler policies related to process (thread?) IDs in linux?

I am investigating how to have my Linux desktop experience remain smooth and interactive while I run CPU intensive tasks in the background. Here is the sample program (written in Java) which I am using to simulate CPU load: public class Spinner { …
pauldoo
  • 18,087
  • 20
  • 94
  • 116