SlideShare une entreprise Scribd logo
1  sur  17
Earl Grey Concepts & Architecture for Dummies
What is it? Online game server framework  Open source project with MIT license http://code.google.com/p/earlgrey/ Still under development
Keywords Intel x86/x64 (Itanium) Multi processor machine  Plenty of main memory Windows Vista/2003 and newer (Official) Windows XP/2000 (Non-official) Standalone (Without third-party libraries) Lock-free algorithm (Threading) IO Completion Port (Network)
Vision   Provides basic functionalities and extensible architecture needed to build high performing, still solid online game servers
Threading – Task analysis Two different kinds of tasks CPU-bound takes  a lot of CPU usages takes  computer  resources just for a short time Examples:  HP calculation  IO-bound takes relatively less CPU usages takes computer resources for a long time Examples: database operations
Threading – Thread groups CPU-bound  IOCP thread group  Client requests IO-bound  Not yet implemented Database operations Logging operations (Separation from IO-bound thread group is being considered) Main thread Starts and ends the application
Threading - Performance Race condition One resource / Multiple threads Best solution is not to share it! Cache invalidation One task / Multiple processors Best solution is to attach a thread to a specific processor  A task should be fully processed in a thread Can’t depend on OS’ optimization
Threading - Performance CPU-bound thread group No waiting! Waiting means a thread unavailable Posts IO-bound tasks to the IOCP thread group. Message posting mechanism  is required. Request should be processed in a short time A processor takes only one thread.
Threading - Performance IO-bound thread group Waiting is inevitable for some kinds of operations. Assign multiple threads to a processor Best receipt should be decided by a hand or a some mechanism which is not yet developed.
Threading - Performance Each thread holds copies of read-only or no-need-to-be-shared resources. Ex) Internal buffers of FromUnicode function. Race condition is resolved by lock-free containers. Traditional locking mechanism is still being used for one-time initialization of singleton instances. Message posting mechanism Each thread/thread group has its own roles. Copying data usually results in better performance than just waiting for shared resources.
Memory – GreedyAllocator Global heap allocator. Greedy? Never return memory space to OS. Structure is relatively simple  High performance.  Designed on the assumption that each application has a dedicated machine. Not yet optimized Cache line size Large page size (if a processor supports)
Memory – ThreadLocalAllocator Minimize race conditions and waiting time. Each thread has its own memory pool. If a thread has shortage of memory space, send a request to a global heap allocator. If thread A has plenty of memory space and thread B has shortage, a memory manager send a memory chunk from A to B. Faster about 10 times than Windows’ low-fragmentation heap.
Memory – StackAllocator Allocates memory on the stack (_malloca). Free allocated memory space automatically. Allocation is super-fast. Simple real-time check is implemented.
Memory – Third-parties TBBAllocator Intel Threading Block Library LFHAllocator Low-fragmentation Heap Allocator
Memory – STL support x-containers/x-streams Using a global heap allocator (GreedyAllocator) Fast xwstring, xwstringstream, xvector, and so on auto-containers/auto-streams Using a stack allocator (StackAllocator) Super-fast Life cycle of instances should be carefully considered auto_wstring, auto_wstringstream, and so on
Future tasks Complete feature set of asynchronous networking. Rich set of diagnostics Rolling log file/DebugOutput loggings and so on  Integration with third-party libraries like log4cxx Performance tuning (Ex. detecting a heavy request) IO-bound thread group Administration tool  Telnet-based tool for Win32 services
Credit Cover photohttp://www.flickr.com/photos/kankan/41403840

Contenu connexe

Tendances

Locality of (p)reference
Locality of (p)referenceLocality of (p)reference
Locality of (p)referenceFromDual GmbH
 
Cache memory.12
Cache memory.12Cache memory.12
Cache memory.12myrajendra
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryVirtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryAshik Iqbal
 
Cache performance considerations
Cache performance considerationsCache performance considerations
Cache performance considerationsSlideshare
 
Csc1401 lecture05 - cache memory
Csc1401   lecture05 - cache memoryCsc1401   lecture05 - cache memory
Csc1401 lecture05 - cache memoryIIUM
 
Cache memoy designed by Mohd Tariq
Cache memoy designed by Mohd TariqCache memoy designed by Mohd Tariq
Cache memoy designed by Mohd TariqMohd Tariq
 
memory Interleaving and low order interleaving and high interleaving
memory Interleaving and low order interleaving and high interleavingmemory Interleaving and low order interleaving and high interleaving
memory Interleaving and low order interleaving and high interleavingJawwad Rafiq
 
Lec10. Memory and storage
Lec10.      Memory    and      storageLec10.      Memory    and      storage
Lec10. Memory and storageAnzaDar3
 
Cache memory principles
Cache memory principlesCache memory principles
Cache memory principlesbit allahabad
 
Single and Multi core processor
Single and Multi core processorSingle and Multi core processor
Single and Multi core processorMunaam Munawar
 
Unit 1 four part pocessor and memory
Unit 1 four part pocessor and memoryUnit 1 four part pocessor and memory
Unit 1 four part pocessor and memoryNeha Kurale
 
Hierarchical Memory System
Hierarchical Memory SystemHierarchical Memory System
Hierarchical Memory SystemJenny Galino
 

Tendances (20)

Locality of (p)reference
Locality of (p)referenceLocality of (p)reference
Locality of (p)reference
 
Cache
CacheCache
Cache
 
Cache memory.12
Cache memory.12Cache memory.12
Cache memory.12
 
Cache memory ...
Cache memory ...Cache memory ...
Cache memory ...
 
04 cache memory...
04 cache memory...04 cache memory...
04 cache memory...
 
Virtual Memory vs Cache Memory
Virtual Memory vs Cache MemoryVirtual Memory vs Cache Memory
Virtual Memory vs Cache Memory
 
Cache performance considerations
Cache performance considerationsCache performance considerations
Cache performance considerations
 
Csc1401 lecture05 - cache memory
Csc1401   lecture05 - cache memoryCsc1401   lecture05 - cache memory
Csc1401 lecture05 - cache memory
 
Cache memory
Cache memory Cache memory
Cache memory
 
Cache memoy designed by Mohd Tariq
Cache memoy designed by Mohd TariqCache memoy designed by Mohd Tariq
Cache memoy designed by Mohd Tariq
 
memory Interleaving and low order interleaving and high interleaving
memory Interleaving and low order interleaving and high interleavingmemory Interleaving and low order interleaving and high interleaving
memory Interleaving and low order interleaving and high interleaving
 
Lec10. Memory and storage
Lec10.      Memory    and      storageLec10.      Memory    and      storage
Lec10. Memory and storage
 
Cache memory
Cache memoryCache memory
Cache memory
 
Cache memory
Cache memoryCache memory
Cache memory
 
Cache memory principles
Cache memory principlesCache memory principles
Cache memory principles
 
Single and Multi core processor
Single and Multi core processorSingle and Multi core processor
Single and Multi core processor
 
Unit 1 four part pocessor and memory
Unit 1 four part pocessor and memoryUnit 1 four part pocessor and memory
Unit 1 four part pocessor and memory
 
Cachememory
CachememoryCachememory
Cachememory
 
Cache memory
Cache memoryCache memory
Cache memory
 
Hierarchical Memory System
Hierarchical Memory SystemHierarchical Memory System
Hierarchical Memory System
 

Similaire à Project Earl Grey

Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probertyang
 
Multi-core architectures
Multi-core architecturesMulti-core architectures
Multi-core architecturesnextlib
 
5.6 Basic computer structure microprocessors
5.6 Basic computer structure   microprocessors5.6 Basic computer structure   microprocessors
5.6 Basic computer structure microprocessorslpapadop
 
ECECS 472572 Final Exam ProjectRemember to check the errat.docx
ECECS 472572 Final Exam ProjectRemember to check the errat.docxECECS 472572 Final Exam ProjectRemember to check the errat.docx
ECECS 472572 Final Exam ProjectRemember to check the errat.docxtidwellveronique
 
ECECS 472572 Final Exam ProjectRemember to check the err.docx
ECECS 472572 Final Exam ProjectRemember to check the err.docxECECS 472572 Final Exam ProjectRemember to check the err.docx
ECECS 472572 Final Exam ProjectRemember to check the err.docxtidwellveronique
 
Slot02 concurrency1
Slot02 concurrency1Slot02 concurrency1
Slot02 concurrency1Viên Mai
 
Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2mona_hakmy
 
Operating System 4
Operating System 4Operating System 4
Operating System 4tech2click
 
Windows
WindowsWindows
WindowsEzzah
 
Please do ECE572 requirementECECS 472572 Final Exam Project (W.docx
Please do ECE572 requirementECECS 472572 Final Exam Project (W.docxPlease do ECE572 requirementECECS 472572 Final Exam Project (W.docx
Please do ECE572 requirementECECS 472572 Final Exam Project (W.docxARIV4
 
ECECS 472572 Final Exam ProjectRemember to check the errata
ECECS 472572 Final Exam ProjectRemember to check the errata ECECS 472572 Final Exam ProjectRemember to check the errata
ECECS 472572 Final Exam ProjectRemember to check the errata EvonCanales257
 
Icg hpc-user
Icg hpc-userIcg hpc-user
Icg hpc-usergdburton
 

Similaire à Project Earl Grey (20)

2337610
23376102337610
2337610
 
Oct2009
Oct2009Oct2009
Oct2009
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probert
 
Windows xp
Windows xpWindows xp
Windows xp
 
Multi-core architectures
Multi-core architecturesMulti-core architectures
Multi-core architectures
 
4.Process.ppt
4.Process.ppt4.Process.ppt
4.Process.ppt
 
5.6 Basic computer structure microprocessors
5.6 Basic computer structure   microprocessors5.6 Basic computer structure   microprocessors
5.6 Basic computer structure microprocessors
 
How swift is your Swift - SD.pptx
How swift is your Swift - SD.pptxHow swift is your Swift - SD.pptx
How swift is your Swift - SD.pptx
 
ECECS 472572 Final Exam ProjectRemember to check the errat.docx
ECECS 472572 Final Exam ProjectRemember to check the errat.docxECECS 472572 Final Exam ProjectRemember to check the errat.docx
ECECS 472572 Final Exam ProjectRemember to check the errat.docx
 
ECECS 472572 Final Exam ProjectRemember to check the err.docx
ECECS 472572 Final Exam ProjectRemember to check the err.docxECECS 472572 Final Exam ProjectRemember to check the err.docx
ECECS 472572 Final Exam ProjectRemember to check the err.docx
 
Slot02 concurrency1
Slot02 concurrency1Slot02 concurrency1
Slot02 concurrency1
 
Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2
 
Operating System 4
Operating System 4Operating System 4
Operating System 4
 
Lec04 gpu architecture
Lec04 gpu architectureLec04 gpu architecture
Lec04 gpu architecture
 
Windows
WindowsWindows
Windows
 
Please do ECE572 requirementECECS 472572 Final Exam Project (W.docx
Please do ECE572 requirementECECS 472572 Final Exam Project (W.docxPlease do ECE572 requirementECECS 472572 Final Exam Project (W.docx
Please do ECE572 requirementECECS 472572 Final Exam Project (W.docx
 
Concept of thread
Concept of threadConcept of thread
Concept of thread
 
ECECS 472572 Final Exam ProjectRemember to check the errata
ECECS 472572 Final Exam ProjectRemember to check the errata ECECS 472572 Final Exam ProjectRemember to check the errata
ECECS 472572 Final Exam ProjectRemember to check the errata
 
Icg hpc-user
Icg hpc-userIcg hpc-user
Icg hpc-user
 
notes2 memory_cpu
notes2 memory_cpunotes2 memory_cpu
notes2 memory_cpu
 

Dernier

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Dernier (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

Project Earl Grey

  • 1. Earl Grey Concepts & Architecture for Dummies
  • 2. What is it? Online game server framework Open source project with MIT license http://code.google.com/p/earlgrey/ Still under development
  • 3. Keywords Intel x86/x64 (Itanium) Multi processor machine Plenty of main memory Windows Vista/2003 and newer (Official) Windows XP/2000 (Non-official) Standalone (Without third-party libraries) Lock-free algorithm (Threading) IO Completion Port (Network)
  • 4. Vision Provides basic functionalities and extensible architecture needed to build high performing, still solid online game servers
  • 5. Threading – Task analysis Two different kinds of tasks CPU-bound takes a lot of CPU usages takes computer resources just for a short time Examples: HP calculation IO-bound takes relatively less CPU usages takes computer resources for a long time Examples: database operations
  • 6. Threading – Thread groups CPU-bound  IOCP thread group Client requests IO-bound Not yet implemented Database operations Logging operations (Separation from IO-bound thread group is being considered) Main thread Starts and ends the application
  • 7. Threading - Performance Race condition One resource / Multiple threads Best solution is not to share it! Cache invalidation One task / Multiple processors Best solution is to attach a thread to a specific processor A task should be fully processed in a thread Can’t depend on OS’ optimization
  • 8. Threading - Performance CPU-bound thread group No waiting! Waiting means a thread unavailable Posts IO-bound tasks to the IOCP thread group. Message posting mechanism is required. Request should be processed in a short time A processor takes only one thread.
  • 9. Threading - Performance IO-bound thread group Waiting is inevitable for some kinds of operations. Assign multiple threads to a processor Best receipt should be decided by a hand or a some mechanism which is not yet developed.
  • 10. Threading - Performance Each thread holds copies of read-only or no-need-to-be-shared resources. Ex) Internal buffers of FromUnicode function. Race condition is resolved by lock-free containers. Traditional locking mechanism is still being used for one-time initialization of singleton instances. Message posting mechanism Each thread/thread group has its own roles. Copying data usually results in better performance than just waiting for shared resources.
  • 11. Memory – GreedyAllocator Global heap allocator. Greedy? Never return memory space to OS. Structure is relatively simple  High performance. Designed on the assumption that each application has a dedicated machine. Not yet optimized Cache line size Large page size (if a processor supports)
  • 12. Memory – ThreadLocalAllocator Minimize race conditions and waiting time. Each thread has its own memory pool. If a thread has shortage of memory space, send a request to a global heap allocator. If thread A has plenty of memory space and thread B has shortage, a memory manager send a memory chunk from A to B. Faster about 10 times than Windows’ low-fragmentation heap.
  • 13. Memory – StackAllocator Allocates memory on the stack (_malloca). Free allocated memory space automatically. Allocation is super-fast. Simple real-time check is implemented.
  • 14. Memory – Third-parties TBBAllocator Intel Threading Block Library LFHAllocator Low-fragmentation Heap Allocator
  • 15. Memory – STL support x-containers/x-streams Using a global heap allocator (GreedyAllocator) Fast xwstring, xwstringstream, xvector, and so on auto-containers/auto-streams Using a stack allocator (StackAllocator) Super-fast Life cycle of instances should be carefully considered auto_wstring, auto_wstringstream, and so on
  • 16. Future tasks Complete feature set of asynchronous networking. Rich set of diagnostics Rolling log file/DebugOutput loggings and so on Integration with third-party libraries like log4cxx Performance tuning (Ex. detecting a heavy request) IO-bound thread group Administration tool Telnet-based tool for Win32 services