GNU Radio Advanced Scheduler Dude: Josh Blum - New scheduler - - PowerPoint PPT Presentation

gnu radio advanced scheduler
SMART_READER_LITE
LIVE PREVIEW

GNU Radio Advanced Scheduler Dude: Josh Blum - New scheduler - - PowerPoint PPT Presentation

GNU Radio Advanced Scheduler Dude: Josh Blum - New scheduler features and stuff GRAS - Project Goals Inherent thread safety actor model New buffer model Zero copy support In place buffers Custom allocators Hooks for


slide-1
SLIDE 1

GNU Radio Advanced Scheduler

Dude: Josh Blum - New scheduler features and stuff

slide-2
SLIDE 2

GRAS - Project Goals

  • Inherent thread safety – actor model
  • New buffer model
  • Zero copy support

– In place buffers – Custom allocators

  • Hooks for CPU/Node affinity
  • Things that got fixed for free!
slide-3
SLIDE 3

GRAS- Thread safety and the actor model

  • Thread pool services ac-

tors

  • Each actor is synchronous
  • Messages in/replies to

sender

  • Messages to arbitrary ac-

tors

https://en.wikipedia.org/wiki/Actor_model

slide-4
SLIDE 4

GRAS - Theron library

  • C++ implementation of the actor model
  • Fast, lots of benchmarks
  • Hooks for affinity
  • Multiple thread pools
  • Result: I don't have to think about thread

synchronization mechanisms

http://www.theron-library.com/

slide-5
SLIDE 5

GRAS – Current buffer model

Doubly mapped/circular buffer Reader 0 Reader 1 Writer

  • Pros – very strait forward implementation

– Simple back-pressure model – Edge cases are very simple

  • Cons – cant do “smarter” things w/ memory

– Buffer is glued to an output port – Cant in-place or choose arbitrary memory

slide-6
SLIDE 6

GRAS – Message based buffer model

  • New model means new possibilities
  • Blocks pass reference counted buffers
  • Pros – arbitrary buffer

– Custom allocation – zero copy – Output buffer can be input - inplace

  • Cons – complicates history and input reqs

– Small memcpys

Source Port Sink Port 0 Sink Port 1 B B

slide-7
SLIDE 7

GRAS – Dealing w/ history

  • Memcpy to meet history requirements – sux
  • History reqs << buffer size (memcpys are small)
  • Needs benchmarking

Buffer 0 Buffer 1 Z + Buff0 Buffer 0 Buff0 + Buff1 Buffer 1

slide-8
SLIDE 8

GRAS – Affinity Hooks

CPU CPU CPU CPU DDR Memory Node 0 CPU CPU CPU CPU DDR Memory Node 1 Hyper transport

  • Memory bandwidth penalties for jumping nodes
  • Flow graph topology based node association
  • Or multiple flow graphs, 1 per node... etc
slide-9
SLIDE 9

GRAS – Things that got fixed

  • Dynamic reconfiguration of flowgraph

– Just change the topology and commit

  • Hierarchical block fixes

– connect to self to self - By bye kludge copy – Don't need gnuradio::get_initial_sptr for hiers!

slide-10
SLIDE 10

GRAS – Whats Done

  • GNU Radio basically working – QA tests
  • In-place buffers
  • Custom input and output allocators
  • Dynamic reconfiguration
slide-11
SLIDE 11

GRAS - TODO

  • All QA tests passing
  • GR hooks for setting thread pool

– Creating thread pool w/ set affinities

  • GR Extras features

– PMT message passing – do native, many to one – Python blocks support

  • Follow and support Theron development
  • Benchmark, benchmark, benchmark!