icom 5007 - noack scheduling for distributed systems classification – degree of coupling...
TRANSCRIPT
ICOM 5007 - Noack
Scheduling For Distributed Systems
Classification – degree of couplingClassification – granularity
Local vs centralized schedulingMethods
ICOM 5007 - Noack
Motivation
Additional computing capability can be added more easily by adding than enlarging processors
Users and tasks are distributed, but in different ways
Many applications and languages are now threaded
ICOM 5007 - Noack
Classification – degree of coupling
DegreeOf coupling
Description
Loosely coupled
Autonomous systems with individual memory and I/O – networked systems
Functionally specialized
Separate specialized processors for I/O, networking, DSP, etc.
Tightly coupled
I/O and usually main memory are in common, CPU’s usually have semiprivate caches
ICOM 5007 - Noack
Classification – granularity
Grain size DescriptionSynch interva
l
fine Single instruction stream – domain of processor and compiler design
<20
medium Parallel processing or multiprocessing within application
20-200
coarse Multiprocessing of applications inside an operating system
200-2000
very coarse Distributed processing across network 2000-1M
independent
Multiple unrelated processes ∞
ICOM 5007 - Noack
What scheduling involves
Assigning processes to processorsstatic assignment – process runs there until completion
Common queue – time slot is the unit of assignment
Peer architecture – each processor selects process to run
Using multiprogramming on individual processorsPrimary issue is how threads are handled
Goal is best performance rather than 100% utilization
Actual dispatching of a processCoefficient of variance idea – variability of service times
Simpler scheduling can work for multiprocessors without causing bottlenecks
ICOM 5007 - Noack
Thread scheduling
Load sharingGlobal queue of ready threads – this is not load balancing
Gang schedulingRelated threads are scheduled to run on a set of processors at the
same time
Dedicated processor assignmentApplication is alloted a processor per thread until done
Dedication of processors reduces thread-switching overhead
Dynamic schedulingNumber of threads in a process can change while it runs
Scheduler allots processors on a demand basis (it can take them away)
ICOM 5007 - Noack
Real-time Scheduling
Classification – hard vs soft real-timeClassification – aperiodic/periodic
Responsiveness requirementsReliability requirements
ICOM 5007 - Noack
Real-time OS characteristics
Characteristic Comments
Determinism Predictable response time to event acknowledgement – latency much faster than non-RT OS
Responsiveness Predictable service time (after acknowledgement)
User control User needs to be able to assign task priorities
Reliability Governed by needs of system under control – can be life-threatening
Fail-soft operation Useful behavior (partial functioning) even after failure – crash survival
ICOM 5007 - Noack
RT scheduling approaches
Approach Comments
Static - table-driven Static analysis of tasks before run-time – result is schedule
Static – priority-driven
Static analysis determines priority table – result is priority list for standard scheduler
Dynamic - planning Feasilility is determined at run time – table-driven, arriving tasks are accepted only if they can be done
Dynamic – best effort
System tries to meet all deadlines – aborts those whose deadline has expired
* Tacit assumption – tasks are identified with deadlines and durations
ICOM 5007 - Noack
Deadline scheduling – explicitly
Deadline type Description
Starting When it needs to begin
Completion When it needs to finish
Processing time How long it takes
Resource requirements Resources needed (other than processor)
Priority Relative importance (hard RT tasks have priority over soft)
Subtask structure May have mandatory and optional parts
ICOM 5007 - Noack
Rate monotonic scheduling (RMS)
Basic ideaSuboptimal algorithm
High arrival rate = high priority
Empirical observationsRMS is almost as good as earliest-deadline scheduling
Soft-RT parts of tasks can be scheduled to use the CPU time not used by the hard-RT work
Stability is better than earliest-deadline
ICOM 5007 - Noack
UNIX SVR4 scheduling
Single priority queueThree priority classes
Real-time – 100-159
Kernel – 60-99
Time-shared – 0-59
Each level is actually a priority queue
Preemption is done when a high-priority RT process arrives
Time-sharing classPenalty box – priority is reduced if process uses all its time
Time allowed varies from10 ms – priority 59
100 ms – priority 0
Observations – system has much adaptability
ICOM 5007 - Noack
Linux RT scheduling
Basic approachLike non-RT Linux – except RT processes have highest priority
Three task queues SCHED_FIFO
SCHED_RR – also has time quota
SCHED_OTHER – executes only if no RT is waiting
Multiple priorities within each class
This description differs from present methods Continuous revision area of Linux
ICOM 5007 - Noack
Windows 2K Scheduling
Priority-driven preemptive scheduler2 bands
Real-timeAll threads have fixed priority
All threads in a given level are in a RR queue
16 levels (31-16)
OtherAll threads have variable priority
FIFO at each level – behavior-based priority modification
16 levels (15-0)
Single vs multiple processorSingle – highest priority thread
Multiple – n-1 highest priority threads each get own processor
Last processor is shared by all others