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
20
votes
6 answers

Are all scheduling problems NP-Hard?

I know there are some scheduling problems out there that are NP-hard/NP-complete ... however, none of them are stated in such a way to show this situation is also NP. If you have a set of tasks constrained to a startAfter, startBy, and duration all…
20
votes
8 answers

What scheduling algorithms does Linux kernel use?

What scheduling algorithms does Linux kernel use? Where can I get more info about linux's kernel? (OS first course... student level)
Nick
  • 201
  • 1
  • 2
  • 3
19
votes
7 answers

Azure Task Scheduler

While this question is particular to Azure, I'm sure that it is a common situation for cloud computing in general. I have a list of tasks that I need run at a certain time. With a window's server, I can use Task Scheduler and schedule my program to…
m heyd
19
votes
4 answers

What factors decide the number of executors in a stand alone mode?

Given a Spark application What factors decide the number of executors in a stand alone mode? In the Mesos and YARN according to this documents, we can specify the number of executers/cores and memory. Once a number of executors are started. Does…
Praveen Sripati
  • 32,799
  • 16
  • 80
  • 117
18
votes
11 answers

Run once a day in C#

Is there any clever method out there to make my executeEveryDayMethod() execute once a day, without having to involve the Windows TaskScheduler?
Anders R
  • 1,181
  • 2
  • 10
  • 10
18
votes
6 answers

Is there a timer class in C# that isn't in the Windows.Forms namespace?

I want to use a timer in my simple .NET application written in C#. The only one I can find is the Windows.Forms.Timer class. I don't want to reference this namespace just for my console application. Is there a C# timer (or timer like) class for…
MrDatabase
  • 43,245
  • 41
  • 111
  • 153
17
votes
1 answer

Comparing DateTime structs to find free slots

I would like to search through the events of all of the users in a list and retrieve all times where every user is free of 30mins or greater between 7AM-7PM. There is a catch however, if a method is marked as 'recurring', ie the bit recurring is set…
Simon Kiely
  • 5,880
  • 28
  • 94
  • 180
17
votes
4 answers

how dispatcher works?

I have recently started my OS course. As far as i know the work of dispatcher is to save the context of current process and load context of process to be run next. But how does it do that? When a process is preempted then as soon as dispatcher will…
Terminal
  • 1,969
  • 5
  • 21
  • 37
17
votes
3 answers

How to do “sequential” Job Scheduling (Quartz?)

I'm making use of Quartz Scheduling and there are 2 jobs. First Job is performing the tasks for around 2 minutes and the Second one is to be setup for Cleaning Operations of Temporary Files. So, I need to setup the Schedule to work in a way that…
Sanchit
  • 428
  • 1
  • 5
  • 24
16
votes
2 answers

sys.setswitchinterval in Python 3.2 and beyond

Python 3.2 introduced a new GIL implementation by Antoine Pitrou which exposes the function sys.setswitchinterval. When would changing this be useful, and why?
Matt Joiner
  • 112,946
  • 110
  • 377
  • 526
16
votes
5 answers

Can the order of execution of fork() be determined?

I'm working on an exercise on the textbook "Operating System Concepts 7th Edition", and I'm a bit confused about how does fork() work. From my understanding, fork() creates a child process which runs concurrently with its parent. But then, how do we…
roxrook
  • 13,511
  • 40
  • 107
  • 156
16
votes
2 answers

How do I schedule a task with Celery that runs on 1st of every month?

How do I schedule a task with celery that runs on 1st of every month?
Olchik
  • 161
  • 1
  • 4
16
votes
8 answers

How do you handle scheduling/deadlines around programmers?

Do programmers like to create deadlines? Im a web developer, and schedules/deadlines are all over the place in my field. But I've worked with some software engineers/programmers who hate deadlines, is there a way around that?
jrutter
  • 3,173
  • 9
  • 42
  • 51
16
votes
2 answers

Relational Schema for Fowler's Temporal Expressions

Martin Fowler defines an elegant object model for the scheduling of recurring tasks here, which maps to OO code very nicely. Mapping this to a relational database schema for persistence, however, is tricky. Can anyone suggest a schema + SQL…
majelbstoat
  • 12,889
  • 4
  • 28
  • 26
15
votes
3 answers

Difference between AlarmManager and ScheduledExecutorService

Besides setting and exact time (i.e. midnight) versus setting a delay (i.e. 24 hours), what's the difference between using AlarmManager and ScheduledExecutorService to run a task periodically? In my case, I need to run a little bit of code to check…
Computerish
  • 9,590
  • 7
  • 38
  • 49