This paper describes a concept that I have been hearing a lot lately at work as we are thinking about porting a sequential firmware we have to a new multicore platform that is been developed by our hardware group. A program is reentrant if distinct executions of the program on distinct inputs cannot affect each other,whether run sequentially or concurrently. This has the great advantage that reentrant programs can be ported to multicore machine without the need of concurrency control or the need of running each program instance on a separate virtual machine.
The authors argue that manually converting legacy single threaded programs to reentrant programs is a perilous and labor-intensive task because these programs use global states in a non reentrant way. So to help the programmer transform the code to a reentrant program, the authors proposed and developped a java automated refactoring tool that replaces global mutable state with thread-local state. This allows the execution thread to get a separate copy of each global variable. When the tool introduces the thread-local state, the programmer only needs to manually modify the code to use a new thread for each execution instance of the program to make the program reentrant.
Clearly this is a great tool for java and for those who use eclipse, but I think a generic tool performing this task will be great. We do not use java and eclipse for our firmware development, but I can see how helpful it will be to have such a tool.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment