Difference between revisions of "Nxt-python-threads"

From Earlham CS Department
Jump to navigation Jump to search
m (issues)
Line 9: Line 9:
 
* Workshop analogy
 
* Workshop analogy
 
* Concurrency and locking
 
* Concurrency and locking
+
* Issues and how they can be addressed
 +
** Race conditions
 +
** Deadlock
 
=== Basics of threads in Python ===
 
=== Basics of threads in Python ===

Revision as of 23:14, 24 February 2010

Back to Robotics Main Page


Thread Basics

  • Computing device - CPU, RAM, persistant store (two ARM CPUs, etc. in the NXT)
  • Stored program; Fetch, decode, execute
  • Execution context - instructions, data, program counter, stack
    • Processes have all 4 (instructions, data, program counter, stack)
    • Threads have PC and stack with shared ins and data
  • Workshop analogy
  • Concurrency and locking
  • Issues and how they can be addressed
    • Race conditions
    • Deadlock

Basics of threads in Python