SlideShare a Scribd company logo
1 of 11
Hashed and Hierarchical Timing Wheels  A paper by   George Varghese  and   Tony Lauck
Motivation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Model & Performance Measure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Currently Used Timer Schemes a b c d e Can maintain absolute expiry  time or the timer interval START_TIMER = O(1) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(n) a b c d e f maintain absolute expiry time START_TIMER = O(n) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1)
Tree based timers a b c d a b c d maintain absolute expiry  time  START_TIMER = O(log(n)) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1) Can degenerate to a  linear list in case of equal Interval timers START_TIMER = O(n) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1)
Simple Timing Wheel ,[object Object],[object Object],[object Object],[object Object],START_TIMER = O(1) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1) 1 2 3 4 5 6 7 0
Hashed Timing Wheel ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1 2 3 4 5 6 7 0 2 4 1 2 2 1 1 2 # of rounds remaining
Hashed Timing Wheel ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hierarchical Timing Wheel 1 2 3 4 5 6 7 0 3 5 7 5 2 1 1 Hours wheel 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 Minutes wheel Seconds wheel 1 3 3 5 3 7 1 5
Hierarchical Timing Wheels ,[object Object],[object Object],[object Object],[object Object]
Comparison START_TIMER STOP_TIMER PER_TICK O(1) Straight Fwd O(1) O(n) Sequential List O(n) O(1) O(1) Tree Based O(log(n)) O(1) O(1) Simple Wheel O(1) O(1) O(1) High memory requirement Hashed Wheel (sorted) Hashed Wheel (unsorted) Hierarchical Wheels O(n) worst case O(1) avg O(1) O(m) O(1) O(1) O(1) O(1) O(n) worst case O(1) avg O(1)

More Related Content

What's hot

05 01 open-vpn
05 01 open-vpn05 01 open-vpn
05 01 open-vpn
Noël
 
SSL/TLS Présentation en Français.
SSL/TLS Présentation en Français.SSL/TLS Présentation en Français.
SSL/TLS Présentation en Français.
Philippe Lhardy
 

What's hot (20)

09 01 configuration du serveur samba
09 01 configuration du serveur samba09 01 configuration du serveur samba
09 01 configuration du serveur samba
 
Kali linux tutorial
Kali linux tutorialKali linux tutorial
Kali linux tutorial
 
Active directory
Active directoryActive directory
Active directory
 
C# as a System Language
C# as a System LanguageC# as a System Language
C# as a System Language
 
Using Netconf/Yang with OpenDalight
Using Netconf/Yang with OpenDalightUsing Netconf/Yang with OpenDalight
Using Netconf/Yang with OpenDalight
 
Snmp
SnmpSnmp
Snmp
 
Introduction to Resilience4j
Introduction to Resilience4jIntroduction to Resilience4j
Introduction to Resilience4j
 
Livre blanc cellenza_preparer_adoption_de_kubernetes_juin_2021_vf
Livre blanc cellenza_preparer_adoption_de_kubernetes_juin_2021_vfLivre blanc cellenza_preparer_adoption_de_kubernetes_juin_2021_vf
Livre blanc cellenza_preparer_adoption_de_kubernetes_juin_2021_vf
 
RunDeck
RunDeckRunDeck
RunDeck
 
Janus & docker: friends or foe
Janus & docker: friends or foe Janus & docker: friends or foe
Janus & docker: friends or foe
 
Welcome to the Jungle: Pentesting AWS
Welcome to the Jungle: Pentesting AWSWelcome to the Jungle: Pentesting AWS
Welcome to the Jungle: Pentesting AWS
 
40 - IDNOG03 - Bob Lau (Akamai) - BGP and Traffic Engineering
40 - IDNOG03  - Bob Lau (Akamai) - BGP and Traffic Engineering40 - IDNOG03  - Bob Lau (Akamai) - BGP and Traffic Engineering
40 - IDNOG03 - Bob Lau (Akamai) - BGP and Traffic Engineering
 
05 01 open-vpn
05 01 open-vpn05 01 open-vpn
05 01 open-vpn
 
Metasploit - Basic and Android Demo
Metasploit  - Basic and Android DemoMetasploit  - Basic and Android Demo
Metasploit - Basic and Android Demo
 
SSL/TLS Présentation en Français.
SSL/TLS Présentation en Français.SSL/TLS Présentation en Français.
SSL/TLS Présentation en Français.
 
Socket programming
Socket programmingSocket programming
Socket programming
 
Linux server administration syllabus
Linux server administration syllabusLinux server administration syllabus
Linux server administration syllabus
 
Virtualisation
VirtualisationVirtualisation
Virtualisation
 
Rapport tp openssl
Rapport  tp  opensslRapport  tp  openssl
Rapport tp openssl
 
Architecture microservices avec docker
Architecture microservices avec dockerArchitecture microservices avec docker
Architecture microservices avec docker
 

Viewers also liked

xUnitTestPattern/chapter17
xUnitTestPattern/chapter17xUnitTestPattern/chapter17
xUnitTestPattern/chapter17
Yoon Hee Hwang
 
그녀가언어를익히는방법
그녀가언어를익히는방법그녀가언어를익히는방법
그녀가언어를익히는방법
Yoon Hee Hwang
 
[아꿈사/110903] 도메인주도설계 4장
[아꿈사/110903] 도메인주도설계 4장[아꿈사/110903] 도메인주도설계 4장
[아꿈사/110903] 도메인주도설계 4장
sung ki choi
 
ApprenticeshipPatterns/Chapter3
ApprenticeshipPatterns/Chapter3ApprenticeshipPatterns/Chapter3
ApprenticeshipPatterns/Chapter3
Yoon Hee Hwang
 

Viewers also liked (12)

AnáLisis De Algoritmos1
AnáLisis De Algoritmos1AnáLisis De Algoritmos1
AnáLisis De Algoritmos1
 
xUnitTestPattern/chapter17
xUnitTestPattern/chapter17xUnitTestPattern/chapter17
xUnitTestPattern/chapter17
 
그녀가언어를익히는방법
그녀가언어를익히는방법그녀가언어를익히는방법
그녀가언어를익히는방법
 
Nodejs_chapter3
Nodejs_chapter3Nodejs_chapter3
Nodejs_chapter3
 
[아꿈사/110903] 도메인주도설계 4장
[아꿈사/110903] 도메인주도설계 4장[아꿈사/110903] 도메인주도설계 4장
[아꿈사/110903] 도메인주도설계 4장
 
제프리 리처의 Windows via C/C++ : 8장 유저 모드에서의 스레드 동기화
제프리 리처의 Windows via C/C++ : 8장 유저 모드에서의 스레드 동기화제프리 리처의 Windows via C/C++ : 8장 유저 모드에서의 스레드 동기화
제프리 리처의 Windows via C/C++ : 8장 유저 모드에서의 스레드 동기화
 
[111015/아꿈사] HTML5를 여행하는 비(非) 웹 개발자를 위한 안내서 - 1부 웹소켓.
[111015/아꿈사] HTML5를 여행하는 비(非) 웹 개발자를 위한 안내서 - 1부 웹소켓.[111015/아꿈사] HTML5를 여행하는 비(非) 웹 개발자를 위한 안내서 - 1부 웹소켓.
[111015/아꿈사] HTML5를 여행하는 비(非) 웹 개발자를 위한 안내서 - 1부 웹소켓.
 
[120316] node.js 프로그래밍 5장
[120316] node.js 프로그래밍 5장[120316] node.js 프로그래밍 5장
[120316] node.js 프로그래밍 5장
 
[아꿈사] 게임 기초 수학 물리 1,2장
[아꿈사] 게임 기초 수학 물리 1,2장[아꿈사] 게임 기초 수학 물리 1,2장
[아꿈사] 게임 기초 수학 물리 1,2장
 
트위터 봇 개발 후기
트위터 봇 개발 후기트위터 봇 개발 후기
트위터 봇 개발 후기
 
ApprenticeshipPatterns/Chapter3
ApprenticeshipPatterns/Chapter3ApprenticeshipPatterns/Chapter3
ApprenticeshipPatterns/Chapter3
 
Project Panama - Beyond the (JVM) Wall
Project Panama - Beyond the (JVM) WallProject Panama - Beyond the (JVM) Wall
Project Panama - Beyond the (JVM) Wall
 

Similar to Timing wheels

Lecture 13 14-time_domain_analysis_of_1st_order_systems
Lecture 13 14-time_domain_analysis_of_1st_order_systemsLecture 13 14-time_domain_analysis_of_1st_order_systems
Lecture 13 14-time_domain_analysis_of_1st_order_systems
Saifullah Memon
 
[INSIGHT OUT 2011] B24 effective indexing(tom kyte)
[INSIGHT OUT 2011] B24 effective indexing(tom kyte)[INSIGHT OUT 2011] B24 effective indexing(tom kyte)
[INSIGHT OUT 2011] B24 effective indexing(tom kyte)
Insight Technology, Inc.
 

Similar to Timing wheels (20)

时间轮
时间轮时间轮
时间轮
 
time_complexity_list_02_04_2024_22_pages.pdf
time_complexity_list_02_04_2024_22_pages.pdftime_complexity_list_02_04_2024_22_pages.pdf
time_complexity_list_02_04_2024_22_pages.pdf
 
Standard cells library design
Standard cells library designStandard cells library design
Standard cells library design
 
Dinamica rotacional
Dinamica rotacionalDinamica rotacional
Dinamica rotacional
 
TensorFlow 2: New Era of Developing Deep Learning Models
TensorFlow 2: New Era of Developing Deep Learning ModelsTensorFlow 2: New Era of Developing Deep Learning Models
TensorFlow 2: New Era of Developing Deep Learning Models
 
3. guia de_laboratorio_-_movimiento_perpetuo_navarrete_jonathan_
3. guia de_laboratorio_-_movimiento_perpetuo_navarrete_jonathan_3. guia de_laboratorio_-_movimiento_perpetuo_navarrete_jonathan_
3. guia de_laboratorio_-_movimiento_perpetuo_navarrete_jonathan_
 
8051 ch9-950217
8051 ch9-9502178051 ch9-950217
8051 ch9-950217
 
VIPER S650 report
VIPER S650 reportVIPER S650 report
VIPER S650 report
 
Class13_Quicksort_Algorithm.pdf
Class13_Quicksort_Algorithm.pdfClass13_Quicksort_Algorithm.pdf
Class13_Quicksort_Algorithm.pdf
 
ControlLogix Timers FA16
ControlLogix Timers FA16ControlLogix Timers FA16
ControlLogix Timers FA16
 
L15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 pL15 timers-counters-in-atmega328 p
L15 timers-counters-in-atmega328 p
 
Avr timers
Avr timersAvr timers
Avr timers
 
timer counter (1).pptx
timer counter (1).pptxtimer counter (1).pptx
timer counter (1).pptx
 
Avg q lenth
Avg q lenthAvg q lenth
Avg q lenth
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
 
Algorithim lec1.pptx
Algorithim lec1.pptxAlgorithim lec1.pptx
Algorithim lec1.pptx
 
Lecture 13 14-time_domain_analysis_of_1st_order_systems
Lecture 13 14-time_domain_analysis_of_1st_order_systemsLecture 13 14-time_domain_analysis_of_1st_order_systems
Lecture 13 14-time_domain_analysis_of_1st_order_systems
 
9.Sorting & Searching
9.Sorting & Searching9.Sorting & Searching
9.Sorting & Searching
 
Maqueta en componentes normal y tangencial
Maqueta en componentes normal y tangencialMaqueta en componentes normal y tangencial
Maqueta en componentes normal y tangencial
 
[INSIGHT OUT 2011] B24 effective indexing(tom kyte)
[INSIGHT OUT 2011] B24 effective indexing(tom kyte)[INSIGHT OUT 2011] B24 effective indexing(tom kyte)
[INSIGHT OUT 2011] B24 effective indexing(tom kyte)
 

Recently uploaded

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
Muhammad Subhan
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
“Iamnobody89757” Understanding the Mysterious of Digital Identity.pdf
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Vector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptxVector Search @ sw2con for slideshare.pptx
Vector Search @ sw2con for slideshare.pptx
 

Timing wheels

  • 1. Hashed and Hierarchical Timing Wheels A paper by George Varghese and Tony Lauck
  • 2.
  • 3.
  • 4. Currently Used Timer Schemes a b c d e Can maintain absolute expiry time or the timer interval START_TIMER = O(1) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(n) a b c d e f maintain absolute expiry time START_TIMER = O(n) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1)
  • 5. Tree based timers a b c d a b c d maintain absolute expiry time START_TIMER = O(log(n)) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1) Can degenerate to a linear list in case of equal Interval timers START_TIMER = O(n) STOP_TIMER = O(1) PER_TICK_BOOKKEEPING = O(1)
  • 6.
  • 7.
  • 8.
  • 9. Hierarchical Timing Wheel 1 2 3 4 5 6 7 0 3 5 7 5 2 1 1 Hours wheel 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 Minutes wheel Seconds wheel 1 3 3 5 3 7 1 5
  • 10.
  • 11. Comparison START_TIMER STOP_TIMER PER_TICK O(1) Straight Fwd O(1) O(n) Sequential List O(n) O(1) O(1) Tree Based O(log(n)) O(1) O(1) Simple Wheel O(1) O(1) O(1) High memory requirement Hashed Wheel (sorted) Hashed Wheel (unsorted) Hierarchical Wheels O(n) worst case O(1) avg O(1) O(m) O(1) O(1) O(1) O(1) O(n) worst case O(1) avg O(1)