scheduling

Scheduling Algorithm for Maintining Two Dimensional Constraint

馋奶兔 提交于 2019-12-21 05:41:12
问题 I have been tasked to do a scheduling program in my company. Basically given N employee you should schedule them shift for the month. I tried to do this via brute force and ordered priority of constraint. However, I am having problem when trying to maintain vertical and horizontal constraints. Vertical constraints, all person should have equal number of shift per month. (e.g. They should be within the average number of day shift, night shift, rest day, early shift) However, there is also a

Java scheduled executor accuracy

纵然是瞬间 提交于 2019-12-21 03:59:12
问题 There is a peculiarity that I encountered while using Java scheduled executors and was wondering if what I experienced is normal. I need to schedule tasks that execute at a predefined rate of 5 seconds. It is expected that these tasks will take longer than 5 seconds to execute from time to time, but when the time to run them goes below 5 seconds, the backed up list of tasks should run in quick succession to catch up. When running the tasks, it is important to know what the original scheduled

get current->pid while in interrupt

99封情书 提交于 2019-12-21 03:15:10
问题 I'm writing something on the linux scheduler and I need to know which process was running before my interrupt came in.. is the current structure available? If I do current->pid while in the interrupt handler, do I get the pid of the process I interrupted? 回答1: You can, current->pid exists and is the process that was interrupted (may be the idle thread, or any). If you're writing inside the Linux scheduler, you should be very careful. current is changed by the scheduler as it chooses a new

Scheduling algorithm/problem

戏子无情 提交于 2019-12-21 02:42:22
问题 I'm bored, and this problem just haunted me again. Back at university, I used to always wonder how they schedule exams. The ability to schedule 10k student to do exams in 2 weeks and guarantee that no student will have an exam in two consecutive periods. I'm assuming some form of heuristics be applied. I'm bored tonight, and if you give me the right tools, I'll work on it tonight and up to the weekend cheers, dassouki EDIT 1: I guess the assumption would be that all we know is the following:

SCHED_FIFO process with priority of 99 gets preempted?

人盡茶涼 提交于 2019-12-20 23:52:14
问题 this is from sched_setscheduler(2) - Linux man page: "Processes scheduled under one of the real-time policies (SCHED_FIFO, SCHED_RR) have a sched_priority value in the range 1 (low) to 99 (high)." "A SCHED_FIFO process runs until either it is blocked by an I/O request, it is preempted by a higher priority process, or it calls sched_yield(2)." I have the following code: struct sched_param sp; memset( &sp, 0, sizeof(sp) ); sp.sched_priority = 99; sched_setscheduler( 0, SCHED_FIFO, &sp ); Now

SCHED_FIFO process with priority of 99 gets preempted?

旧城冷巷雨未停 提交于 2019-12-20 23:51:01
问题 this is from sched_setscheduler(2) - Linux man page: "Processes scheduled under one of the real-time policies (SCHED_FIFO, SCHED_RR) have a sched_priority value in the range 1 (low) to 99 (high)." "A SCHED_FIFO process runs until either it is blocked by an I/O request, it is preempted by a higher priority process, or it calls sched_yield(2)." I have the following code: struct sched_param sp; memset( &sp, 0, sizeof(sp) ); sp.sched_priority = 99; sched_setscheduler( 0, SCHED_FIFO, &sp ); Now

Goroutines are cooperatively scheduled. Does that mean that goroutines that don't yield execution will cause goroutines to run one by one?

被刻印的时光 ゝ 提交于 2019-12-20 23:29:00
问题 From: http://blog.nindalf.com/how-goroutines-work/ As the goroutines are scheduled cooperatively, a goroutine that loops continuously can starve other goroutines on the same thread. Goroutines are cheap and do not cause the thread on which they are multiplexed to block if they are blocked on network input sleeping channel operations or blocking on primitives in the sync package. So given the above, say that you have some code like this that does nothing but loop a random number of times and

“Work stealing” vs. “Work shrugging”?

谁说我不能喝 提交于 2019-12-20 12:02:57
问题 Why is it that I can find lots of information on "work stealing" and nothing on "work shrugging" as a dynamic load-balancing strategy? By "work-shrugging" I mean pushing surplus work away from busy processors onto less loaded neighbours, rather than have idle processors pulling work from busy neighbours ("work-stealing"). I think the general scalability should be the same for both strategies. However I believe that it is much more efficient, in terms of latency & power consumption, to wake an

“Work stealing” vs. “Work shrugging”?

☆樱花仙子☆ 提交于 2019-12-20 12:00:31
问题 Why is it that I can find lots of information on "work stealing" and nothing on "work shrugging" as a dynamic load-balancing strategy? By "work-shrugging" I mean pushing surplus work away from busy processors onto less loaded neighbours, rather than have idle processors pulling work from busy neighbours ("work-stealing"). I think the general scalability should be the same for both strategies. However I believe that it is much more efficient, in terms of latency & power consumption, to wake an

Worker Scheduling Algorithm

浪子不回头ぞ 提交于 2019-12-20 10:38:03
问题 The Problem Here's the essence of the problem I want to solve. We have workers taking care of children in a nursery for set times during the weekend. There's 16 different slots to fill in one weekend. So for a 4-week month there's 64 slots to fill. We have at max 30 nursery workers (though we need much more. anybody like kids?). EDIT: Each time slot is discrete - they don't overlap. Currently there's a person who comes up with the nursery schedule each month. It's a complex and time consuming