A testbed for embedded systems

Testing and Debugging are often the most difficult phase of software development. This is especially true of embedded systems which are usually concurrent, have real-time performance and correctness constraints and which execute in the field in an environment which may not permit internal scrutiny of the software behaviour. Although good software engineering practices help, they will never eliminate the need for testing and debugging. This is because failings in the specification and design are often only discovered through testing and understanding these failings and how to correct them comes from debugging. These observations suggest that embedded software should be designed in a way which makes testing and debugging easier and that tools which support these activities are required. Due to the often hostile environment in which the finished embedded system will function, it is necessary to have a platform which allows the software to be developed and tested “in vitro”. The Testbed system achieves these goals by providing dynamic modification and process migration facilities for use during development as well as powerful monitoring and background debugging support These facilities are built on a basic run-time harness supporting an event-driven programming model with a global communication mechanism. This programming model is well suited to the reactive nature of embedded systems. The main research contributions of this work are in the areas of finding deadlock-free, path-optimal routings for networks and of dynamic modification with automated conversion of data which may include pointers. (i) I, Peter Burgess, hereby certify that this thesis, which is approximately 60,000 words in length, has been written by me, that it is the record of work carried out by me and that it has not been submitted in any previous application for a higher degree. date signature of candidate (ii) I was admitted as a research student under Ordinance No. 12 in November, 1990 and as a candidate for the degree of PhD in November, 1990; the higher study for which this is a record was carried out in the University of St Andrews between 1990 and 1994. date ^ / 9 / ^ signature of candidate (iii) I hereby certify that the candidate has fulfilled the conditions of the Reso­ lution and Regulations appropriate for the degree of PhD in the University of St Andrews and that the candidate is qualified to submit this thesis in application for that degree. date signature of supervisor In submitting this thesis to the University of St Andrews 1 understand that I am giving permission for it to be made available for use in accordance with the regulations of the University Library for the time being in force, subject to any copyright vested in the work not being affected thereby. I also understand that the title and abstract wiU be published, and that a copy of the work may be made and supplied to any bona fide library or research worker, date 5 / ^ signature of candidate Acknowledgements I would like to thank, primarily my supervisor Mike Livesey for suggesting I come to St Andrews to do a PhD in the first place, for his initial motivation and numerous suggestions and guidance along the way and for sharing the invaluable insights he gained from his work with the original ROV project. I would also like to give special mention to the following people: Colin Allison, who often provided practical comments during the many Testbed design sessions based on his experience in the systems field and who read the first draft of this thesis at extremely short notice and gave many helpful suggestions for improvement. Gerald Ostheimer, who has had to share an office with me for three years and whose revolutionary work on abstract architectures for parallel processing provided much inspiration for the Testbed programming model. I am also indebted to him for sharing his hypertext bibliographic database system, for reading and providing very useful criticism of an early version of the dynamic modification chapter and for broadening my knowledge of Computer Science considerably through numerous discussions. Duncan Matthew, for providing me with source code and very thorough doc­ umentation of his hexapod walking robot, enabling me to implement it using the Testbed and so gain confidence in the programming model. Tony Reynolds, for supervising a short term research fellowship at BT which provided early insight into the use of real-time clocks in distributed testing. Finally, I would like to thank my brother, Richard, for getting me into com­ puting in the first place.