SlideShare a Scribd company logo
1 of 26
Presented by: Ahmed Ibrahim Fayed
Presented to: Dr.Ahmed Morgan
 Introduction
 Motivation
 Parallelism-Aware Batch Scheduling
 Experimental Results
 In modern processors, which are multi-core
(or multithreaded),the concurrently executing
threads share the DRAM system, and different
threads running on different cores can delay
each other through resource contention.
 As the number of on-chip cores
increases, the pressure on the DRAM system
increases, as does the interference among
threads sharing the system
 Uncontrolled inter-thread interference in
DRAM scheduling results in major problems:
◦ DRAM controller can unfairly prioritize some
threads while starving more important threads
for long time periods, as they wait to access
memory.
◦ Low system performance.
 we propose a new approach to providing fair
and high-performance DRAM scheduling. Our
scheduling algorithm, called parallelism-
aware batch scheduling (PAR-BS), is based on
two new key ideas: request batching and
parallelism-aware DRAM scheduling.
 DRAM requests are very long latency
operations that greatly impact the
performance of modern processors.
 When a load instruction misses in the last-
level on-chip cache and needs to access
DRAM, the processor cannot commit that
(and any subsequent) instruction because
instructions are committed in program order
to support precise exceptions.
 The processor stalls until the miss is serviced
by DRAM. Current processors try to reduce
the performance loss due to a DRAM acces by
servicing other DRAM accesses in parallel
with it.
 Techniques strive to overlap the latency of
future DRAM accesses with the current access
so that the processor does not need to stall
(long) for future DRAM accesses. Instead, at
an abstract level, the processor stalls once for
all overlapped accesses rather than stalling
once for each access in a serialized fashion.
 In a single-threaded, single-core system, a
thread has exclusive access to the DRAM
banks, so its concurrent DRAM accesses are
serviced in parallel as long as they aren’t to
the same bank.
 Request1’s (Req1) latency is hidden by the
latency of Request0 (Req0), effectively
exposing only a single bank access latency to
the thread’s processing core. Once Req0 is
serviced, the core can commit Load 0 and
thus enable the decode/execution of future
instructions. When Load 1 becomes the
oldest instruction in the window, its miss has
already been serviced and therefore the
processor can continue computation without
stalling.
 If multiple threads are generating memory
requests concurrently (e.g. in a CMP
system), modern DRAM controllers schedule the
outstanding requests in a way that completely
ignores the inherent memory-level parallelism of
threads. Instead, current DRAM controllers
exclusively seek to maximize the DRAM data
throughput, i.e., the number of DRAM requests
serviced per second . As we show in this
paper, blindly maximizing the DRAM data
throughput does not minimize a thread’s stall-
time (which directly correlates with system
throughput).
 The example in Figure 2 illustrates how
parallelism-unawareness can result in
suboptimal CMP system throughput and
increased stalltimes. We assume two
cores, each running a single thread, Thread 0
(T0) and Thread 1 (T1). Each thread has two
concurrent DRAM requests caused by
consecutive independent load misses (Load 0
andLoad 1), and the requests go to two
different DRAM banks.
 With a conventional parallelism-unaware
DRAM scheduler the requests can be serviced
in their arrival order shown in Figure 2.
 First, T0’s request to Bank 0 is serviced in
parallel with T1’s request to Bank 1. Later,
T1’s request to Bank 0 is serviced in parallel
with T0’s request to Bank 1. This service
order serializes each thread’s concurrent
requests and therefore exposes two bank
access latencies to each core.
 As shown in the execution timeline, instead
of stalling once (i.e. for one bank access
latency) for the two requests, both cores stall
twice. Core 0 first stalls for Load 0, and
shortly thereafter also for Load 1. Core 1
stalls for its Load 0 for two bank access
latencies.
 In contrast, a parallelism-aware scheduler
services each thread’s concurrent requests in
parallel, resulting in the service order and
execution timeline shown in Figure 2. The
scheduler preserves bank-parallelism by first
scheduling both of T0’s requests in parallel, and
then T1’s requests. This enables Core 0 to
execute faster (shown as “Saved cycles” in the
figure) as it stalls for only one bank access
latency. Core 1’s stall time remains unchanged:
although its second request (T1-Req1) is
serviced later than with a conventional
scheduler, T1-Req0 still hides T1-Req1’s latency.
 Based on the observation that inter-thread
interference destroys the bank-level
parallelism of the threads running
concurrently on a CMP and therefore
degrades system throughput, we incorporate
parallelism-awareness into the design of our
fair and high-performance memory access
scheduler.
 Our PAR-BS controller is based on two key
principles. The first principle is parallelism-
awareness. To preserve a thread’s bank-level
parallelism, a DRAM controller must service a
thread’s requests (to different banks) back to
back (that is, one right after another, without
any interfering requests from other threads).
This way, each thread’s request service
latencies overlap.
 The second principle is request batching. If
performed greedily, servicing requests from a
thread back to back could cause unfairness
and even request starvation. To prevent this,
PAR-BS groups a fixed number of oldest
requests from each thread into a batch, and
services the requests from the currentbatch
before all other requests.
Questions! 

More Related Content

What's hot

Superscalar Architecture_AIUB
Superscalar Architecture_AIUBSuperscalar Architecture_AIUB
Superscalar Architecture_AIUBNusrat Mary
 
Cache memory.12
Cache memory.12Cache memory.12
Cache memory.12myrajendra
 
Multiprocessor
MultiprocessorMultiprocessor
MultiprocessorA B Shinde
 
Double data rate (ddr)
Double data rate (ddr)Double data rate (ddr)
Double data rate (ddr)Anderson Huang
 
Unit I Memory technology and optimization
Unit I Memory technology and optimizationUnit I Memory technology and optimization
Unit I Memory technology and optimizationK Gowsic Gowsic
 
Snooping protocols 3
Snooping protocols 3Snooping protocols 3
Snooping protocols 3Yasir Khan
 
Cache memory principles
Cache memory principlesCache memory principles
Cache memory principlesbit allahabad
 
Coherence and consistency models in multiprocessor architecture
Coherence and consistency models in multiprocessor architectureCoherence and consistency models in multiprocessor architecture
Coherence and consistency models in multiprocessor architectureUniversity of Pisa
 
Lecture 6.1
Lecture  6.1Lecture  6.1
Lecture 6.1Mr SMAK
 
Fundamentals Of Transaction Systems - Part 3: Relativity shatters the Classic...
Fundamentals Of Transaction Systems - Part 3: Relativity shatters the Classic...Fundamentals Of Transaction Systems - Part 3: Relativity shatters the Classic...
Fundamentals Of Transaction Systems - Part 3: Relativity shatters the Classic...Valverde Computing
 

What's hot (20)

Cache memory
Cache memoryCache memory
Cache memory
 
Superscalar Architecture_AIUB
Superscalar Architecture_AIUBSuperscalar Architecture_AIUB
Superscalar Architecture_AIUB
 
Cache memory.12
Cache memory.12Cache memory.12
Cache memory.12
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
 
Double data rate (ddr)
Double data rate (ddr)Double data rate (ddr)
Double data rate (ddr)
 
Adaptive bank management[1]
Adaptive bank management[1]Adaptive bank management[1]
Adaptive bank management[1]
 
Unit I Memory technology and optimization
Unit I Memory technology and optimizationUnit I Memory technology and optimization
Unit I Memory technology and optimization
 
Snooping protocols 3
Snooping protocols 3Snooping protocols 3
Snooping protocols 3
 
Scope of parallelism
Scope of parallelismScope of parallelism
Scope of parallelism
 
04 Cache Memory
04  Cache  Memory04  Cache  Memory
04 Cache Memory
 
Array Processor
Array ProcessorArray Processor
Array Processor
 
Cache memory principles
Cache memory principlesCache memory principles
Cache memory principles
 
Coherence and consistency models in multiprocessor architecture
Coherence and consistency models in multiprocessor architectureCoherence and consistency models in multiprocessor architecture
Coherence and consistency models in multiprocessor architecture
 
Es notes unit 2
Es notes unit 2Es notes unit 2
Es notes unit 2
 
Cache memory
Cache memoryCache memory
Cache memory
 
Direct memory access
Direct memory accessDirect memory access
Direct memory access
 
Lecture 6.1
Lecture  6.1Lecture  6.1
Lecture 6.1
 
Fundamentals Of Transaction Systems - Part 3: Relativity shatters the Classic...
Fundamentals Of Transaction Systems - Part 3: Relativity shatters the Classic...Fundamentals Of Transaction Systems - Part 3: Relativity shatters the Classic...
Fundamentals Of Transaction Systems - Part 3: Relativity shatters the Classic...
 
Snooping 2
Snooping 2Snooping 2
Snooping 2
 
Cache memory
Cache memory Cache memory
Cache memory
 

Similar to Parallelism aware batch scheduling

Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline MechanismAshik Iqbal
 
Linux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emptionLinux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emptionHemanth Venkatesh
 
weblogic perfomence tuning
weblogic perfomence tuningweblogic perfomence tuning
weblogic perfomence tuningprathap kumar
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Computer architecture for HNDIT
Computer architecture for HNDITComputer architecture for HNDIT
Computer architecture for HNDITtjunicornfx
 
TCP INCAST AVOIDANCE BASED ON CONNECTION SERIALIZATION IN DATA CENTER NETWORKS
TCP INCAST AVOIDANCE BASED ON CONNECTION SERIALIZATION IN DATA CENTER NETWORKSTCP INCAST AVOIDANCE BASED ON CONNECTION SERIALIZATION IN DATA CENTER NETWORKS
TCP INCAST AVOIDANCE BASED ON CONNECTION SERIALIZATION IN DATA CENTER NETWORKSIJCNCJournal
 
Memory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer ArchitechtureMemory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer ArchitechtureShweta Ghate
 
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...ITIIIndustries
 
RPC communication,thread and processes
RPC communication,thread and processesRPC communication,thread and processes
RPC communication,thread and processesshraddha mane
 
TCP Fairness for Uplink and Downlink Flows in WLANs
TCP Fairness for Uplink and Downlink Flows in WLANsTCP Fairness for Uplink and Downlink Flows in WLANs
TCP Fairness for Uplink and Downlink Flows in WLANsambitlick
 
week_2Lec02_CS422.pptx
week_2Lec02_CS422.pptxweek_2Lec02_CS422.pptx
week_2Lec02_CS422.pptxmivomi1
 
Remote core locking-Andrea Lombardo
Remote core locking-Andrea LombardoRemote core locking-Andrea Lombardo
Remote core locking-Andrea LombardoAndrea Lombardo
 

Similar to Parallelism aware batch scheduling (20)

Memory Access Scheduling
Memory Access SchedulingMemory Access Scheduling
Memory Access Scheduling
 
Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline Mechanism
 
Linux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emptionLinux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emption
 
weblogic perfomence tuning
weblogic perfomence tuningweblogic perfomence tuning
weblogic perfomence tuning
 
Chap2 slides
Chap2 slidesChap2 slides
Chap2 slides
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
Computer architecture for HNDIT
Computer architecture for HNDITComputer architecture for HNDIT
Computer architecture for HNDIT
 
Online Architecture Assignment Help
Online Architecture Assignment HelpOnline Architecture Assignment Help
Online Architecture Assignment Help
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Oversimplified CA
Oversimplified CAOversimplified CA
Oversimplified CA
 
TCP INCAST AVOIDANCE BASED ON CONNECTION SERIALIZATION IN DATA CENTER NETWORKS
TCP INCAST AVOIDANCE BASED ON CONNECTION SERIALIZATION IN DATA CENTER NETWORKSTCP INCAST AVOIDANCE BASED ON CONNECTION SERIALIZATION IN DATA CENTER NETWORKS
TCP INCAST AVOIDANCE BASED ON CONNECTION SERIALIZATION IN DATA CENTER NETWORKS
 
Rtos
RtosRtos
Rtos
 
Memory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer ArchitechtureMemory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer Architechture
 
Dosass2
Dosass2Dosass2
Dosass2
 
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
Optimization of Remote Core Locking Synchronization in Multithreaded Programs...
 
RPC communication,thread and processes
RPC communication,thread and processesRPC communication,thread and processes
RPC communication,thread and processes
 
Memory management
Memory managementMemory management
Memory management
 
TCP Fairness for Uplink and Downlink Flows in WLANs
TCP Fairness for Uplink and Downlink Flows in WLANsTCP Fairness for Uplink and Downlink Flows in WLANs
TCP Fairness for Uplink and Downlink Flows in WLANs
 
week_2Lec02_CS422.pptx
week_2Lec02_CS422.pptxweek_2Lec02_CS422.pptx
week_2Lec02_CS422.pptx
 
Remote core locking-Andrea Lombardo
Remote core locking-Andrea LombardoRemote core locking-Andrea Lombardo
Remote core locking-Andrea Lombardo
 

Recently uploaded

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
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
#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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
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
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

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
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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...
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
#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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
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
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Parallelism aware batch scheduling

  • 1. Presented by: Ahmed Ibrahim Fayed Presented to: Dr.Ahmed Morgan
  • 2.  Introduction  Motivation  Parallelism-Aware Batch Scheduling  Experimental Results
  • 3.  In modern processors, which are multi-core (or multithreaded),the concurrently executing threads share the DRAM system, and different threads running on different cores can delay each other through resource contention.  As the number of on-chip cores increases, the pressure on the DRAM system increases, as does the interference among threads sharing the system
  • 4.  Uncontrolled inter-thread interference in DRAM scheduling results in major problems: ◦ DRAM controller can unfairly prioritize some threads while starving more important threads for long time periods, as they wait to access memory. ◦ Low system performance.
  • 5.  we propose a new approach to providing fair and high-performance DRAM scheduling. Our scheduling algorithm, called parallelism- aware batch scheduling (PAR-BS), is based on two new key ideas: request batching and parallelism-aware DRAM scheduling.
  • 6.  DRAM requests are very long latency operations that greatly impact the performance of modern processors.  When a load instruction misses in the last- level on-chip cache and needs to access DRAM, the processor cannot commit that (and any subsequent) instruction because instructions are committed in program order to support precise exceptions.
  • 7.  The processor stalls until the miss is serviced by DRAM. Current processors try to reduce the performance loss due to a DRAM acces by servicing other DRAM accesses in parallel with it.
  • 8.  Techniques strive to overlap the latency of future DRAM accesses with the current access so that the processor does not need to stall (long) for future DRAM accesses. Instead, at an abstract level, the processor stalls once for all overlapped accesses rather than stalling once for each access in a serialized fashion.
  • 9.  In a single-threaded, single-core system, a thread has exclusive access to the DRAM banks, so its concurrent DRAM accesses are serviced in parallel as long as they aren’t to the same bank.
  • 10.  Request1’s (Req1) latency is hidden by the latency of Request0 (Req0), effectively exposing only a single bank access latency to the thread’s processing core. Once Req0 is serviced, the core can commit Load 0 and thus enable the decode/execution of future instructions. When Load 1 becomes the oldest instruction in the window, its miss has already been serviced and therefore the processor can continue computation without stalling.
  • 11.  If multiple threads are generating memory requests concurrently (e.g. in a CMP system), modern DRAM controllers schedule the outstanding requests in a way that completely ignores the inherent memory-level parallelism of threads. Instead, current DRAM controllers exclusively seek to maximize the DRAM data throughput, i.e., the number of DRAM requests serviced per second . As we show in this paper, blindly maximizing the DRAM data throughput does not minimize a thread’s stall- time (which directly correlates with system throughput).
  • 12.  The example in Figure 2 illustrates how parallelism-unawareness can result in suboptimal CMP system throughput and increased stalltimes. We assume two cores, each running a single thread, Thread 0 (T0) and Thread 1 (T1). Each thread has two concurrent DRAM requests caused by consecutive independent load misses (Load 0 andLoad 1), and the requests go to two different DRAM banks.
  • 13.
  • 14.  With a conventional parallelism-unaware DRAM scheduler the requests can be serviced in their arrival order shown in Figure 2.  First, T0’s request to Bank 0 is serviced in parallel with T1’s request to Bank 1. Later, T1’s request to Bank 0 is serviced in parallel with T0’s request to Bank 1. This service order serializes each thread’s concurrent requests and therefore exposes two bank access latencies to each core.
  • 15.  As shown in the execution timeline, instead of stalling once (i.e. for one bank access latency) for the two requests, both cores stall twice. Core 0 first stalls for Load 0, and shortly thereafter also for Load 1. Core 1 stalls for its Load 0 for two bank access latencies.
  • 16.  In contrast, a parallelism-aware scheduler services each thread’s concurrent requests in parallel, resulting in the service order and execution timeline shown in Figure 2. The scheduler preserves bank-parallelism by first scheduling both of T0’s requests in parallel, and then T1’s requests. This enables Core 0 to execute faster (shown as “Saved cycles” in the figure) as it stalls for only one bank access latency. Core 1’s stall time remains unchanged: although its second request (T1-Req1) is serviced later than with a conventional scheduler, T1-Req0 still hides T1-Req1’s latency.
  • 17.
  • 18.  Based on the observation that inter-thread interference destroys the bank-level parallelism of the threads running concurrently on a CMP and therefore degrades system throughput, we incorporate parallelism-awareness into the design of our fair and high-performance memory access scheduler.
  • 19.  Our PAR-BS controller is based on two key principles. The first principle is parallelism- awareness. To preserve a thread’s bank-level parallelism, a DRAM controller must service a thread’s requests (to different banks) back to back (that is, one right after another, without any interfering requests from other threads). This way, each thread’s request service latencies overlap.
  • 20.  The second principle is request batching. If performed greedily, servicing requests from a thread back to back could cause unfairness and even request starvation. To prevent this, PAR-BS groups a fixed number of oldest requests from each thread into a batch, and services the requests from the currentbatch before all other requests.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.