XTREEMIST / Member

Forum Posts Following Followers
45 11 0

XTREEMIST Blog

Algorithm Evaluation

Deterministic modeling - takes a particular predetermined workload and defines the performance of each algorithm for that workload.
Queuing models, Implementation, etc

Linux Scheduling

1. Time-sharing
a. Prioritized credit-based -process with most credits is scheduled next
b. Credit subtracted when timer interrupt occurs
c. When credit = 0, another process chosen
d. When all processes have credit = 0, reaccrediting occurs
e. Based on factors including priority and history

2. Real-time
a. Soft real-time
b. Posix.1b compliant - two ****s:
FCFS and RR
Highest priority process always runs first

Thread Scheduling

Local Scheduling - How the threads library decides which thread to put onto an available LWP
Global Scheduling - How the kernel decides which kernel thread to run next

Real-Time Scheduling

1. Hard real-time systems: required to complete a critical task within a guaranteed amount of time
2. Soft real-time computing: requires that critical processes receive priority over less fortunate ones

Multiple-Processor Scheduling

1. CPU scheduling more complex when multiple CPUs are available
2. Homogeneous processors within a multiprocessor
3. Load sharing
4. Asymmetric multiprocessing-only one processor accesses the system data structures, alleviating the need for data sharing

Scheduling must be done between the queues

1. Fixed priority scheduling; (i.e., serve all from foreground then from background). There is a possibility of starvation.
2. Time slice -each queue gets a certain amount of CPU time which it can schedule amongst its processes; i.e., 80% to foreground in RR
3. 20% to background in FCFS

Multilevel Feedback Queue

A process can move between the various queues; aging can be implemented this way. Multilevel-feedback-queue scheduler defined by the following parameters:

1. Number of queues
2. Scheduling algorithms for each queue
3. Method used to determine when to upgrade a process
4. Method used to determine when to demote a process
5. Method used to determine which queue a process will enter when that process needs servicet

Multilevel Queue

Ready queue is partitioned into separate queues. Each queue has its own scheduling algorithm:

1. Foreground (interactive) - Round Robin
2. Background (batch) - First Come First Serve

Round Robin

Each process gets a small unit of CPU time (time quantum), usually 10-100 milliseconds. After this time has elapsed, the process is preempted and added to the end of the ready queue.

If there are n-processes in the ready queue and the time quantum is q, then each process gets 1/nof the CPU time in chunks of at most q-time units at once. No process waits more than (n-1)q time units.