Earliest deadline first scheduling

Earliest deadline first (EDF) or least time to go is a dynamic priority scheduling algorithm used in real-time operating systems to place processes in a priority queue. Whenever a scheduling event occurs (task finishes, new task released, etc.) the queue will be searched for the process closest to its deadline. This process is the next to be scheduled for execution.

EDF is an optimal scheduling algorithm on preemptive uniprocessors, in the following sense: if a collection of independent jobs, each characterized by an arrival time, an execution requirement and a deadline, can be scheduled (by any algorithm) in a way that ensures all the jobs complete by their deadline, the EDF will schedule this collection of jobs so they all complete by their deadline.

With scheduling periodic processes that have deadlines equal to their periods, EDF has a utilization bound of 100%. Thus, the schedulability test[1] for EDF is:

where the are the worst-case computation-times of the processes and the are their respective inter-arrival periods (assumed to be equal to the relative deadlines).[2]

That is, EDF can guarantee that all deadlines are met provided that the total CPU utilization is not more than 100%. Compared to fixed-priority scheduling techniques like rate-monotonic scheduling, EDF can guarantee all the deadlines in the system at higher loading.

Note that use the schedulability test formula under deadline as period. When deadline is less than period, things are different. Here is an example: The four periodic tasks needs scheduling, where each task is depicted as TaskNo( computation time, relative deadline, period). They are T0(5,13,20), T1(3,7,11), T2(4,6,10) and T3(1,1,20). This task group meets utilization is no greater than 1.0, where utilization is calculated as 5/20+3/11+4/10+1/20 = 0.97 (two digits rounded), but it's still unscheduable, check EDF Scheduling Failure figure for details.

EDF Scheduling Failure


EDF is also an optimal scheduling algorithm on non-preemptive uniprocessors, but only among the class of scheduling algorithms that do not allow inserted idle time. When scheduling periodic processes that have deadlines equal to their periods, a sufficient (but not necessary) schedulability test for EDF becomes:[3]

Where p represents the penalty for non-preemption, given by max / min . If this factor can be kept small, non-preemptive EDF can be beneficial as it has low implementation overhead.

However, when the system is overloaded, the set of processes that will miss deadlines is largely unpredictable (it will be a function of the exact deadlines and time at which the overload occurs.) This is a considerable disadvantage to a real time systems designer. The algorithm is also difficult to implement in hardware and there is a tricky issue of representing deadlines in different ranges (deadlines can not be more precise than the granularity of the clock used for the scheduling). If a modular arithmetic is used to calculate future deadlines relative to now, the field storing a future relative deadline must accommodate at least the value of the (("duration" {of the longest expected time to completion} * 2) + "now"). Therefore EDF is not commonly found in industrial real-time computer systems.

Instead, most real-time computer systems use fixed-priority scheduling (usually rate-monotonic scheduling). With fixed priorities, it is easy to predict that overload conditions will cause the low-priority processes to miss deadlines, while the highest-priority process will still meet its deadline.

There is a significant body of research dealing with EDF scheduling in real-time computing; it is possible to calculate worst case response times of processes in EDF, to deal with other types of processes than periodic processes and to use servers to regulate overloads.

Example

Consider 3 periodic processes scheduled on a preemptive uniprocessor. The execution times and periods are as shown in the following table:

Process Timing Data
Process Execution Time Period
P1 1 8
P2 2 5
P3 4 10

In this example, the units of time may be considered to be schedulable time slices. The deadlines are that each periodic process must complete within its period.

Timing diagram

Timing Diagram showing part of one possible schedule for the example.

In the timing diagram, the columns represent time slices with time increasing to the right, and the processes all start their periods at time slice 0. The timing diagram's alternating blue and white shading indicates each process's periods, with deadlines at the color changes.

The first process scheduled by EDF is P2, because its period is shortest, and therefore it has the earliest deadline. Likewise, when P2 completes, P1 is scheduled, followed by P3.

At time slice 5, both P2 and P3 have the same deadline, needing to complete before time slice 10, so EDF may schedule either one.

Utilization

The utilization will be:

Since the least common multiple of the periods is 40, the scheduling pattern can repeat every 40 time slices. But, only 37 of those 40 time slices are used by P1, P2, or P3. Since the utilization, 92.5%, is not greater than 100%, the system is schedulable with EDF.

Deadline interchange

Undesirable deadline interchanges may occur with EDF scheduling. A process may use a shared resource inside a critical section, to prevent it from being pre-emptively descheduled in favour of another process with an earlier deadline. If so, it becomes important for the scheduler to assign the running process the earliest deadline from among the other processes waiting for the resource. Otherwise the processes with earlier deadlines might miss them.

This is especially important if the process running the critical section has a much longer time to complete and exit from its critical section, which will delay releasing the shared resource. But the process might still be pre-empted in favour of others that have earlier deadlines but do not share the critical resource. This hazard of deadline interchange is analogous to priority inversion when using fixed-priority pre-emptive scheduling.

To speed up the deadline search within the ready queue, the queue entries be sorted according to their deadlines. When a new process or a periodic process is given a new deadline, it is inserted before the first process with a later deadline. This way, the processes with the earliest deadlines are always at the beginning of the queue.

Heavy traffic analysis for EDF queues with reneging

In a heavy-traffic analysis of the behavior of a single-server queue under an earliest-deadline-first scheduling policy with reneging,[4] the processes have deadlines and are served only until their deadlines elapse. The fraction of "reneged work", defined as the residual work not serviced due to elapsed deadlines, is an important performance measure.

Comparison with fixed-priority schedulers

It is commonly accepted that an implementation of fixed-priority pre-emptive scheduling (FPS) is simpler than a dynamic priority scheduler, like the EDF. However, when comparing the maximum usage of an optimal scheduling under fixed priority (with the priority of each thread given by the rate-monotonic scheduling), the EDF can reach 100% while the theoretical maximum value for rate-monotonic scheduling is around 69%. In addition, the worst-case overhead of an EDF implementation (fully preemptive or limited/non-preemptive) for periodic and/or sporadic tasks can be made proportional to the logarithm of the largest time representation required by a given system (to encode deadlines and periods) using Digital Search Trees.[5] In practical cases, such as embedded systems using a fixed, 32-bit representation of time, scheduling decisions can be made using this implementation in a small fixed-constant time which is independent of the number of system tasks. In such situations experiments have found little discernible difference in overhead between the EDF and FPS, even for task sets of (comparatively) large cardinality.[5]

Note that EDF does not make any specific assumption on the periodicity of the tasks; hence, it can be used for scheduling periodic as well as aperiodic tasks.[2]

Kernels implementing EDF scheduling

Although EDF implementations are not common in commercial real-time kernels, here are a few links of open-source and real-time kernels implementing EDF:

  • SHARK The SHaRK RTOS, implementing various versions of EDF scheduling and resource reservation scheduling algorithms
  • ERIKA Enterprise ERIKA Enterprise, which provides an implementation of EDF optimized for small microcontrollers with an API similar to the OSEK API.
  • The Everyman Kernel The Everyman Kernel implements either EDF or Deadline Monotonic scheduling depending on the user's configuration.
  • MaRTE OS MaRTE OS acts as a runtime for Ada applications and implements a wide range of scheduling algorithms including EDF.
  • The AQuoSA project constitutes a modification to the Linux kernel enriching the process scheduler with EDF scheduling capabilities. The timing of the scheduling cannot be as precise as in the case of the above hard real-time Operating Systems, yet it is sufficiently precise so as to greatly enhance predictability, and thus fulfill the real-time requirements, of multimedia applications. AQuoSA is one of a few projects that provides real-time scheduling capabilities to unprivileged users on a system in a controlled way, by means of a properly designed access-control model.[6]
  • The Linux kernel has an earliest deadline first implementation named SCHED DEADLINE which is available since the release 3.14.
  • The real-time scheduler developed in the context of the IRMOS Archived 2018-10-10 at the Wayback Machine European Project is a multi-processor real-time scheduler for the Linux kernel, particularly suitable for temporal isolation and provisioning of QoS guarantees to complex multi-threaded software components and also entire virtual machines. For example, when using Linux as host OS and KVM as hypervisor, IRMOS can be used to provide scheduling guarantees to individual VMs and at the same time isolate their performance so as to avoid undesired temporal interferences. IRMOS features a combined EDF/FP hierarchical scheduler. At the outer level there is a partitioned EDF scheduler on the available CPUs. However, reservations are multi-CPU, and global FP over multi-processors is used at the inner level in order to schedule the threads (and/or processes) attached to each outer EDF reservation. See also this article on lwn.net for a general overview and a short tutorial about the subject.
  • Xen has had an EDF scheduler for some time now. The man page contains a short description.
  • The Plan 9 OS from Bell Labs incorporates EDFI, a "lightweight real-time scheduling protocol that combines EDF with deadline inheritance over shared resources."[7]
  • RTEMS: The EDF scheduler will be available in version 4.11. RTEMS SuperCore
  • Litmus-RT is a real-time extension of the Linux kernel with a focus on multiprocessor real-time scheduling and synchronization. Its set of real-time algorithms include Partitioned-EDF, Global-EDF, and Clustered-EDF schedulers.
  • XNU Clutch Scheduler As of 2018, Apple's XNU kernel implements the EDF algorithm in its Clutch Scheduler with the goal of improving responsiveness.

See also

References

  1. ^ Xu, J.; Parnas, D.L. (1990). "Scheduling processes with release times, deadlines, precedence and exclusion relations". IEEE Transactions on Software Engineering. 16 (3): 360–369. doi:10.1109/32.48943.
  2. ^ a b Buttazzo, Giorgio (2011), Hard Real-Time Computing Systems: Predictable Scheduling Algorithms and Applications (Third ed.), New York, NY: Springer, p. 100, ISBN 9781461406761
  3. ^ Short, Michael (2011). "Improved schedulability analysis of implicit deadline tasks under limited preemption EDF scheduling". 2011 IEEE International Conference on Emerging Technology and Factory Automation. pp. 1–8. doi:10.1109/ETFA.2011.6059008. ISBN 978-1-4577-0017-0. S2CID 7656331.
  4. ^ Kruk, Łukasz; Lehoczky, John; Ramanan, Kavita; Shreve, Steven (2011). "Heavy traffic analysis for EDF queues with reneging" (PDF). The Annals of Applied Probability. 21 (2). doi:10.1214/10-AAP681. S2CID 12268649.
  5. ^ a b Short, Michael (April 2010). "Improved Task Management Techniques for Enforcing EDF Scheduling on Recurring Tasks". 2010 16th IEEE Real-Time and Embedded Technology and Applications Symposium. pp. 56–65. doi:10.1109/RTAS.2010.22. ISBN 978-1-4244-6690-0. S2CID 13940378.
  6. ^ Cucinotta, Tommaso (2008). "Access Control for Adaptive Reservations on Multi-User Systems". 2008 IEEE Real-Time and Embedded Technology and Applications Symposium. pp. 387–396. doi:10.1109/RTAS.2008.16. ISBN 978-0-7695-3146-5. S2CID 1008365.
  7. ^ Pierre G. Jansen, Sape J. Mullender, Paul J.M. Havinga, Hans Scholten. Lightweight EDF Scheduling with Deadline Inheritance

Read other articles:

Regering-Pierlot VII Regeringsleider Hubert Pierlot Coalitie ​ Katholiek Blok ​ BSP-PSB ​ Liberale Partij Zetels Kamer 170 van 202 (2 april 1939) Premier Hubert Pierlot Aantreden 16 november 1944 Einddatum 12 februari 1945 Voorganger Pierlot VI Opvolger Van Acker I Portaal    België De regering-Pierlot VII (16 november 1944 - 12 februari 1945) was een Belgische regering. Het was een coalitie van de Katholieke Unie (73 zetels), de BWP (64 zetels) en de Liberale Par...

Artikel ini tidak memiliki referensi atau sumber tepercaya sehingga isinya tidak bisa dipastikan. Tolong bantu perbaiki artikel ini dengan menambahkan referensi yang layak. Tulisan tanpa sumber dapat dipertanyakan dan dihapus sewaktu-waktu.Cari sumber: Pembakar alkohol – berita · surat kabar · buku · cendekiawan · JSTOR Pembakar alkohol yang terbuat dari kaca Pembakar alkohol merupakan bagian dari instrumen peralatan laboratorium yang digunakan untuk m...

Існує декілька осіб з таким іменем та прізвищем. Ця сторінка значень містить посилання на статті про кожну з них.Якщо ви потрапили сюди за внутрішнім посиланням, будь ласка, поверніться та виправте його так, щоб воно вказувало безпосередньо на потрібну статтю.@ пошук посил

Система видобування, збирання і підготовки газу і газоконденсату (англ. system of recovery and gathering as well as treatment of gas and gas-condensate; нім. Fördersammlung-, Erdgasvorbereitung- und Erdgaskondensatvorbereitungssystem n; Erdgas- und Gaskondensat-Förder-, Sammlung- und Vorbereitungssystem n) — комплекс споруд, устаткування і трубопроводів, які забезпечую�...

Andrés de Olmos Nascimento 1480Oña, Burgos Morte 8 de outubro de 1568 (88 anos)Pueblo Viejo, Veracruz Andrés de Olmos (Oña, 1480[1] – Canton de Tampico ou Villa de San Luis de Tampico, atualmente Pueblo Viejo, 8 de outubro de 1568[2][3]) foi um sacerdote franciscano, gramático e etno-historiador dos índios mexicanos. É mais conhecido por seu trabalho em Linguística, o primeiro do Novo Mundo, em náuatle clássico. Biografia Página de sua obra Arte de la Lengua Mexicana Andr

Vous lisez un « article de qualité » labellisé en 2021. Pour les articles homonymes, voir symbolisme. Pierre Puvis de Chavannes, Jeunes Filles au bord de la mer, Paris, Musée d'Orsay, 1879. Le symbolisme est un mouvement artistique européen qui se développe dans les années 1870 et qui atteint son apogée dans les années 1890. Il apparaît d'abord en poésie avant de gagner la peinture, la musique et le théâtre. Il est difficile de définir clairement un style symboliste, ...

Thermococcus gammatolerans Thermococcus gammatolerans Klasifikasi ilmiah Domain: Archaea Filum: Euryarchaeota Kelas: Thermococci Ordo: Thermococcales Famili: Thermococcaceae Genus: Thermococcus Spesies: T. gammatolerans Nama binomial Thermococcus gammatoleransJolivet , 2003 Thermococcus gammatolerans adalah arkea yang bersifat ekstremofil dan hingga kini dikenal sebagai organisme yang paling tahan terhadap radiasi. Ditemukan pada tahun 2003 di sebuah lubang hidrotermal di Guaymas Basin s...

Jilid 3Album studio karya Padhyangan ProjectDirilis1 Maret 1996Direkam1995GenrePop, ParodiLabelMusica Studio'shemagitaProduserYokee AgustianKronologi Padhyangan Project Jilid 2(1994)Jilid 21994 Jilid 3(1996) Jilid Lebaran(1997)Jilid Lebaran1997 Jilid 3 adalah album parodi dari grup komedi P Project pada tahun 1996. Konsep dari album ini memparodikan lagu hit Indonesia dan beberapa lagu manca negara yang populer di sekitar tahun 1995. Contoh lagu yang diparodikan antara lain, Sudikah Kamu?...

Artikel ini sebagian besar atau seluruhnya berasal dari satu sumber. Diskusi terkait dapat dibaca pada the halaman pembicaraan. Tolong bantu untuk memperbaiki artikel ini dengan menambahkan rujukan ke sumber lain yang tepercaya. Sultan Hasanuddin beralih ke halaman ini. Artikel ini membahas mengenai biografi Sultan Gowa ke-16. Untuk Sultan Banten dengan nama yang sama, lihat Sultan Hasanuddin. Untuk pengertian lain, lihat Hasanuddin (disambiguasi). Sultan HasanuddinMuhammad Bakir I Mallombasi...

Bilateral relationsMexico-Portugal relations Mexico Portugal Mexico–Portugal relations are the diplomatic relations between Mexico and Portugal. Both nations are members of the Organization of Ibero-American States, Organisation for Economic Co-operation and Development and the United Nations. History The first official diplomatic contacts between Mexico and Portugal took place in 1843 in when ambassadors of both nations met in Washington, D.C. Diplomatic relations were not established offi...

In this Chinese name, the family name is Li.For the Three Kingdoms lady, see Lady Li (Three Kingdoms). For other uses, see Lady Li (disambiguation). Lady Li李夫人An illustration of Lady Li from the Qing dynasty book Baimei xinyong tuzhuanBornZhongshanDiedbetween 104 and 101 BCBurialYingling, near MaolingSpouseEmperor Wu of HanIssueLiu Bo, Prince Ai of ChangyiPosthumous nameEmpress Xiàowǔ孝武皇后ClanLi (李)RelativesLi Yannian (brother)Li Guangli (brother)Liu He (grandson) Lady Li (�...

American motorcycle manufacturer Arch MotorcycleFounded2011; 12 years ago (2011)FounderKeanu ReevesGard HollingerHeadquartersHawthorne, California,U.S.Key peopleKeanu ReevesGard HollingerProductsMotorcyclesWebsitewww.archmotorcycle.com Arch Motorcycle Company, LLC is a high-end custom American motorcycle manufacturer founded by Keanu Reeves and Gard Hollinger in 2011.[1][2] History In 2007 Keanu Reeves, well known for his passion for motorcycles, met custom b...

Coach of Romanian national artistic gymnastics team Mariana Bitang (born August 3, 1962, in Râmnicu Sărat) is a coach for the Romanian national women's artistic gymnastics team. Along with her partner, Octavian Bellu, she helped Romania win five consecutive team gold medals at the World Championships from 1994 to 2001 and team gold medals at the 2000 and 2004 Summer Olympics.[1] In 2005, Bitang retired from coaching and became an adviser to Romanian President Traian Băsescu.[2&...

Hasapi satu dawai. Hasapi adalah salah satu alat musik tradisional Batak Toba yang dikelompokkan ke dalam alat musik dawai atau senar, dalam bahasa Indonesia sering disebut Kecapi Batak.[1] Jenis-jenis Hasapi Hasapi terdiri dari: Hasapi ende (pluked lute dua senar) adalah instrumen pembawa melodi dan merupakan instrumen yang dianggap paling utama dalam ensambel gondang hasapi. Hasapi doal (pluked flude dua senar), instrumen ini sama dengan hasapi ende namun dalam permainannya hasapi d...

American architect Karen BausmanBausman in 2018BornAllentown, Pennsylvania, U.S.NationalityAmericanAlma materThe Cooper UnionOccupationArchitectAwardsRome PrizePracticeKaren Bausman + Associates Karen Bausman (born February 8, 1958, in Allentown, Pennsylvania) is an American architect. Bausman is the Eliot Noyes Chair at the Graduate School of Design, Harvard University, and the Eero Saarinen Chair at Yale School of Architecture, Yale University, the only American woman to hold both desi...

Island in Russia For the island in the Saint Lawrence River, see Adelaide Island (Saint Lawrence River). For the island in Antarctica, see Adelaide Island. AdelaideRussian: остров АделаидыSentinel-2 image (2020)Location of Belaya Zemlya in the Kara SeaGeographyLocationRussian ArcticCoordinates81°37′31.70″N 61°55′46.11″E / 81.6254722°N 61.9294750°E / 81.6254722; 61.9294750ArchipelagoFranz Josef LandHighest elevation48 m (157 ft)A...

Railway line in Japan This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Ōimachi Line – news · newspapers · books · scholar · JSTOR (September 2019) (Learn how and when to remove this template message) Ōimachi LineOMA 6020 series EMU on an Ōimachi Line express service in December 2018OverviewNative name大�...

Batalyon Infanteri Para Raider 431/Satria Setia PerkasaLambang Yonif Para Raider 431/Satria Setia PerkasaDibentuk9 Desember 1986NegaraIndonesiaCabangInfanteriTipe unitPara RaiderPeranPasukan Pemukul Reaksi Cepat Lintas UdaraBagian dariBrigif Para Raider 3/Tri Budi SaktiMarkasKariango, Desa Sudirman, Kecamatan Tanralili, Kabupaten Maros, Sulawesi SelatanJulukanYonif PR 431/SSPMotoSatria Setia PerkasaBaretHijau LumutUlang tahun9 Desember Batalyon Infanteri Para Raider 431/Satria Setia Perkasa a...

This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help to improve this article by introducing more precise citations. (September 2017) (Learn how and when to remove this template message) Jean-Pierre Batut (born Paris 3 July 1954) is a French bishop and theologian. Appointed bishop of Blois (22 November 2014) and installed there on 11 January 2015, he served in the Issy-lès-Moulineaux semin...

Sports and events arena in Buenos Aires, Argentina For any of the amusement parks of the same name, see Luna Park; for any other use of the term, see Luna Park (disambiguation). Luna Park StadiumEstadio Luna ParkAerial view of the venue in 2016Former namesEstadio de Corrientes y Bouchard (planning/construction)AddressAvenida Madero 420C1106ABE Buenos AiresArgentinaLocationSan Nicolás neighborhood, Buenos AiresCoordinates34°36′08″S 58°22′07″W / 34.60222°S 58.36861°...