Macroprogramming Using an Embedded DSL Approach ADRIAN MIZZI

Total Page:16

File Type:pdf, Size:1020Kb

Macroprogramming Using an Embedded DSL Approach ADRIAN MIZZI Macroprogramming using an Embedded DSL approach ADRIAN MIZZI Supervised by Dr Joshua Ellul and Prof. Gordon Pace Department of Computer Science Faculty of ICT University of Malta September, 2019 A dissertation submitted in partial fulfilment of the requirements for the degree of Ph.D. Computer Sci- ence. iii Statement of Originality I, the undersigned, declare that this is my own work unless where otherwise acknowledged and referenced. Candidate Adrian Mizzi Signed Date April 26, 2020 The research work disclosed in this publication is partially funded by the Endeavour Scholarship Scheme (Malta). Scholarships are part-financed by the European Union - European Social Fund (ESF) - Operational Programme II – Cohesion Policy 2014-2020 “Investing in human capital to create more opportunities and promote the well-being of society”. European Union – European Structural and Investment Funds Operational Programme II – Cohesion Policy 2014-2020 “Investing in human capital to create more opportunities and promote the well-being of society” Scholarships are part-financed by the European Union - European Social Funds (ESF) Co-financing rate: 80% EU Funds;20% National Funds vi Acknowledgements I would sincerely like to thank my supervisors, Dr Joshua Ellul and Prof. Gordon Pace for their patience, commitment and support throughout the duration of my studies. Apart from the part they played in introducing me to the area of Internet of Things, functional program- ming and blockchain technology, they were also available to provide guidance and steer me in the right direction when things became un- clear. They pushed me beyond my limits, and in doing so I feel I have grown in my capabilities as a researcher and as a computer scientist. I also thank my close friend Dr Jean Paul Ebejer, who was not only an inspiration for starting this journey, but also the person whom I turned to many times for guidance and support. I am indebted to him for being there during the difficult times that come with such pro- grammes, but also for taking personal time and interest to discuss, re- view and suggest ideas around my research work. I must also thank my immediate family for the unwavering sup- port they have provided through the duration of my work. This work would not have been possible without the support from my wife Ruth, who not only returned back to employment to support the family but also spent many hours with our daughter Michaela, so I could focus on my studies. I also thank my parents and in-laws for the long hours they dedicated to our daughter so I could complete my research. vii Abstract Software applications were traditionally developed using a mono- lithic approach and developed as a single instance. As distributed sys- tems emerged, these traditional methods were no longer suitable. In the domain of wireless sensor networks, an application is developed to run across multiple nodes, and devices must communicate and collab- orate together. The general trend is for a software developer to write a single program which is loaded on all the devices. In the case of het- erogeneous networks where the systems making up the network vary in architecture, capabilities and characteristics a different approach is used — different programs are written and loaded on each different system. Such an approach requires expertise programming different systems, and the interactions between disparate systems need to be explicitly handled by the programmer. In this thesis, we propose a model for programming heterogeneous systems using a single macroprogram, thereby achieving a higher level of abstraction and enabling applications to be described at the macro- level. We combine techniques from macroprogramming and multi- target compilation, using an embedded DSL approach to generate target- specific code for different domains on different ends of the spectrum. On one end of the spectrum, we apply the model to wireless sensor networks where challenges exist around optimising code for execution on heavily resource constrained devices. At the other end of the spec- trum, we propose a framework for writing smart contracts spanning multiple diverse blockchain systems. Each domain brings its’ own challenges, however the model is shown to be applicable to different domains. Contents 1 Introduction 1 1.1 Aims and Achievements . 3 1.2 Overview of Subsequent Chapters . 7 I Background 9 2 Macroprogramming 11 2.1 Introduction . 11 2.1.1 Hardware/Software Codesign . 13 2.1.2 Wireless Sensor Networks . 16 2.2 Discussion and Challenges . 25 2.2.1 Code Slicing . 25 2.2.2 Interoperability . 26 2.2.3 Heterogeneity . 27 2.3 Conclusions . 28 3 Embedded Domain Specific Languages 29 3.1 Shallow versus Deep Embedding . 30 3.2 Challenges of DSELs in Functional Languages . 34 3.2.1 Sharing and Feedback . 34 3.2.2 Type Safety . 36 viii CONTENTS ix 3.3 Conclusions . 38 II Macroprogramming for Wireless Sensor Networks 39 4 Background: Wireless Sensor Networks 41 4.1 Introduction . 41 4.1.1 Structure of a Wireless Sensor Node . 41 4.2 Challenges of WSN . 42 4.2.1 Hardware Constraints . 42 4.2.2 Programming Challenges . 47 4.2.3 Economic Challenges . 49 4.3 Programming Approaches . 50 4.3.1 Node-Level Programming . 51 4.3.2 Network-Level Programming . 53 4.4 Conclusions . 54 5 D’Artagnan 57 5.1 Introduction . 57 5.2 A Framework for Macroprogramming of WSNs . 60 5.3 Interpretations . 62 5.4 D’ARTAGNAN as a language . 64 5.4.1 Stream Operators . 64 5.4.2 Memory Capabilities . 66 5.4.3 Compiler Hints . 68 5.4.4 Stream Tuples . 71 5.4.5 Simulator . 71 5.4.6 Intermediate Code / Device Code . 72 5.4.7 Device level code: Contiki . 72 5.4.8 Implementation Details . 74 5.4.9 Discussion . 75 5.5 Use-case: Smart Rent Management . 76 5.6 Use-case: Intelligent Cooling and Lighting Systems . 79 x CONTENTS 5.6.1 Stream Handling Components . 80 5.6.2 Room Layout Representation . 82 5.6.3 Application Implementation . 84 5.7 Performance Evaluation . 86 5.8 Related approaches . 88 5.9 Conclusions . 91 IIIMacroprogramming for Blockchain Systems 93 6 Background: Blockchain and Smart Contracts 95 6.1 Introduction . 95 6.1.1 Overview . 96 6.2 Blockchain Technology . 97 6.2.1 Blockchain Architecture . 97 6.2.2 Smart Contracts . 99 6.3 Blockchain Systems . 100 6.3.1 Bitcoin . 100 6.3.2 Ethereum . 100 6.3.3 Hyperledger Fabric . 101 6.3.4 Others . 101 6.4 Smart Contract Programming Languages . 102 6.4.1 Bitcoin Script . 103 6.4.2 Solidity . 104 6.4.3 Marlowe . 106 6.4.4 Others . 107 6.4.5 Discussion . 112 6.5 Chain Interoperability . 112 6.6 Conclusions . 114 7 Macroprogramming the Blockchain of Things 115 7.1 Introduction . 116 7.1.1 D’ARTAGNAN for Blockchain of Things . 117 CONTENTS xi 7.2 Proposed Framework . 118 7.3 D’ARTAGNAN: A Macroprogramming Framework . 120 7.3.1 D’ARTAGNAN for IoT . 122 7.3.2 Extending D’ARTAGNAN . 122 7.4 Use Case: Smart Rent Management . 127 7.5 Evaluation . 130 7.6 Discussion and Conclusions . 132 8 Porthos 135 8.1 Introduction . 135 8.2 Porthos Framework . 138 8.2.1 Multi-chain Support . 139 8.2.2 Code Cuts . 141 8.2.3 Coordination Model . 142 8.3 PORTHOS as a smart contract language . 142 8.3.1 Implementation Details . 148 8.4 Use Cases . 149 8.4.1 Property Sale . 149 8.4.2 Single-shot DAO . 152 8.5 Evaluation . 155 8.5.1 Expressiveness of Abstraction . 156 8.5.2 Security Analysis . 157 8.5.3 Extensibility . 158 8.6 Conclusions . 159 IVConclusions 161 9 Conclusions and Future Work 163 9.1 Future Work . 164 9.2 Concluding Thoughts . 166 A Publications 167 xii CONTENTS References 169 1 Introduction The first computers were programmed using low-level machine code, but it did not take long for scientists to realise that this approach was very error- prone and requiring expert programming skills. To address this and make programming more accessible to programmers, a higher level of abstraction was needed — a number of higher-level languages soon emerged making it easier for programmers to write software applications. As software applications grew in complexity and spanned across multi- ple systems, software programs were split in smaller parts, where each part gets executed on a different system. A typical scenario is that of a client- server application, where the code of the client is written separately from that of the server, and both parts need to tackle the communication between them (see Figure 1.1(a)). Writing applications in this fashion is not straight- forward, and the programmer needs to be fully aware of the implications of distributed systems — such as synchronisation of processes, communica- tion between systems and handling of partial failures. Such an approach is still commonly used today in many domains, primarily because alternative approaches are lacking. A possible solution lies in achieving an even higher level of abstraction such that the complexity of distributed applications is hidden away from the programmer. A technique that has emerged from the domain of wireless sensor net- works is macroprogramming — a single program is written to define the be- 1 2 CHAPTER 1. INTRODUCTION haviour of tens, hundreds or even thousands of small, heavily resource- constrained devices. In this domain, several approaches have been pro- posed. In one approach (see Figure 1.1(b)), a software program is written from the perspective of the device and this is then uploaded to all the de- vices in the wireless sensor network. The applications that can be imple- mented in this manner are somewhat restricted to those where all devices in the system behave in, more or less, the same way — for example, appli- cations where sensors detect environmental data (such as devices capable of sensing seismic activity around a volcano) and forward the information to a central server.
Recommended publications
  • Low Power Or High Performance? a Tradeoff Whose Time
    Low Power or High Performance? ATradeoffWhoseTimeHasCome(andNearlyGone) JeongGil Ko1,KevinKlues2,ChristianRichter3,WanjaHofer4, Branislav Kusy3,MichaelBruenig3,ThomasSchmid5,QiangWang6, Prabal Dutta7,andAndreasTerzis1 1 Department of Computer Science, Johns Hopkins University 2 Computer Science Division, University of California, Berkeley 3 Australian Commonwealth Scientific and Research Organization (CSIRO) 4 Department of Computer Science, Friedrich–Alexander University Erlangen–Nuremberg 5 Department Computer Science, University of Utah 6 Department of Control Science and Engineering, Harbin Institute of Technology 7 Division of Computer Science and Engineering, University of Michigan, Ann Arbor Abstract. Some have argued that the dichotomy between high-performance op- eration and low resource utilization is false – an artifact that will soon succumb to Moore’s Law and careful engineering. If such claims prove to be true, then the traditional 8/16- vs. 32-bit power-performance tradeoffs become irrelevant, at least for some low-power embedded systems. We explore the veracity of this the- sis using the 32-bit ARM Cortex-M3 microprocessor and find quite substantial progress but not deliverance. The Cortex-M3, compared to 8/16-bit microcon- trollers, reduces latency and energy consumption for computationally intensive tasks as well as achieves near parity on code density. However, it still incurs a 2 overhead in power draw for “traditional” sense-store-send-sleep applica- tions.∼ × These results suggest that while 32-bit processors are not yet ready for applications with very tight power requirements, they are poised for adoption ev- erywhere else. Moore’s Law may yet prevail. 1Introduction The desire to operate unattended for long periods of time has been a driving force in de- signing wireless sensor networks (WSNs) over the past decade.
    [Show full text]
  • Building Intelligent Middleware for Large Scale CPS Systems
    Building Intelligent Middleware for Large Scale CPS Systems Niels Reijers, Yu-Chung Wang, Chi-Sheng Shih, Jane Y. Kwei-Jay Lin Hsu Department of Electrical Eng. and Comp. Sci. Intel-NTU Connected Context Computing Center University of California, Irvine National Taiwan University Irvine, CA, USA Taipei, Taiwan Abstract—This paper presents a study on building intelligent application to express globally what it really wants from the middleware on wireless sensor network (WSN) for large-scale sensor network. Furthermore, since most WSN applications are cyber-physical systems (LCPS). A large portion of WSN projects specifically designed to particular scenarios and unique target has focused on low-level algorithms such as routing, MAC layers, environments, most behavior is hardcoded, resulting in rigid and data aggregation. At a higher level, various WSN networks that are typically not very flexible at adjusting their applications with specific target environments have been behavior to faults or changing external conditions. A more high developed and deployed. Most applications are built directly on level vision on how large-scale cyber-physical systems (LCPS) top of a small OS, which is notoriously hard to work with, and or networks of sensors should be programmed, deployed, and results in applications that are fragile and cannot be ported to configured is still missing. other platforms. The gap between the low level algorithms and the application development process has received significantly Indeed, we are far from conducting Rapid Application less attention. Our interest is to fill that gap by developing Development (RAD) for LCPS. This project aims to fill the gap, intelligent middleware for building LCPS applications.
    [Show full text]
  • Arxiv:1712.05590V2 [Cs.PL] 18 Dec 2017 Ffaue,Btsffrfo Lwono N Otoodr Fm and of Throughput Orders Reducing Two to Consumption
    Abstract Many virtual machines exist for sensor nodes with only a few KB RAM and tens to a few hundred KB flash memory. They pack an impressive set of features, but suffer from a slowdown of one to two orders of magnitude compared to optimised native code, reducing throughput and increasing power consumption. Compiling bytecode to native code to improve performance has been studied extensively for larger devices, but the restricted resources on sen- sor nodes mean most modern techniques cannot be applied. Simply replac- ing bytecode instructions with predefined sequences of native instructions is known to improve performance, but produces code several times larger than the optimised C equivalent, limiting the size of programmes that can fit onto a device. This paper identifies the major sources of overhead resulting from this basic approach, and presents optimisations to remove most of the remain- ing performance overhead, and over half the size overhead, reducing them to 69% and 91% respectively. While this increases the size of the VM, the break-even point at which this fixed cost is compensated for is well within the range of memory available on a sensor device, allowing us to both improve performance and load more code on a device. arXiv:1712.05590v2 [cs.PL] 18 Dec 2017 1 Improved Ahead-of-Time Compilation of Stack-Based JVM Bytecode on Resource-Constrained Devices Niels Reijers, Chi-Sheng Shih NTU-IoX Research Center Department of Computer Science and Information Engineering National Taiwan University 1 Introduction Internet-of-Things devices come in a wide range, with vastly different perfor- mance characteristics, cost, and power requirements.
    [Show full text]
  • By Syed Ishtiaq Hussain Supervised by Dr. Humma Javed
    RESOURCE AWARE PROCESS MIGRATION IN WIRELESS SENSOR NETWORKS By Syed Ishtiaq Hussain Supervised By Dr. Humma Javed DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF PESHAWAR SESSION 2009-2010 RESOURCE AWARE PROCESS MIGRATION IN WIRELESS SENSOR NETWORKS By Syed Ishtiaq Hussain Dissertation Submitted to the University of Peshawar in partial fulfillment of the requirement for the degree of DOCTOR OF PHILOSOPHY Supervised By Dr. Humma Javed DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF PESHAWAR SESSION 2009-2010 DEDICATION Dedicated to my beloved parents, and my kids… iv STATEMENT OF SOURCES DECLARATION I, the undersigned, author of this thesis, declare that this thesis is my own work and has not been submitted in any form for another degree at any university or institution. Information derived from published or unpublished work of others has been acknowledged in the text and a list of references is given. __________________ ______________ Syed Ishtiaq Hussain 28th September 2018 v RIGHTS OF THESIS All parts of this dissertation are reserved by the author, any part of this research shall not be produced or transmitted in any form or by any means, without formal permission from the author. Syed Ishtiaq Hussain vi ABSTRACT This thesis presents a novel architecture for native process migration (PM) in wireless sensors networks (WSN) without the use of virtual execution environment. Resources in WSN are scarce, therefore creating a virtual execution environment for processes so that they can be migrated, put an extra burden on already constrained resources. The proposed architecture for process migration allows live native processes to be migrated during execution. The process migration architecture takes migration decisions by continuously monitoring resources including remaining battery life and free memory space on a node.
    [Show full text]
  • Velox VM: a Safe Execution Environment for Resource-Constrained Iot Applications
    Velox VM: A Safe Execution Environment for Resource-Constrained IoT Applications Nicolas Tsiftesa,∗, Thiemo Voigta,b aRISE SICS, Box 1263, SE-164 29, Kista, Sweden bDepartment of Information Technology, Uppsala University, Box 337, SE-751 05, Uppsala, Sweden Abstract We present Velox, a virtual machine architecture that provides a safe execu- tion environment for applications in resource-constrained IoT devices. Our goal with this architecture is to support developers in writing and deploying safe IoT applications, in a manner similar to smartphones with application stores. To this end, we provide a resource and security policy framework that enables fine-grained control of the execution environments of IoT applications. This framework allows device owners to configure, e.g., the amount of bandwidth, energy, and memory that each IoT application can use. Velox's features also include support for high-level programming languages, a compact bytecode for- mat, and preemptive multi-threading. In the context of IoT devices, there are typically severe energy, memory, and processing constraints that make the design and implementation of a virtual ma- chine with such features challenging. We elaborate on how Velox is implemented in a resource-efficient manner, and describe our port of Velox to the Contiki OS. Our experimental evaluation shows that we can control the resource usage of applications with a low overhead. We further show that, for typical I/O-driven IoT applications, the CPU and energy overhead of executing Velox bytecode is as low as 1-5% compared to corresponding applications compiled to machine code. Lastly, we demonstrate how we can use application policies to effectively mitigate the possibility of vulnerable applications to be exploited.
    [Show full text]
  • Experimental Comparison of Radio Duty Cycling Protocols for Wireless Sensor
    Experimental Comparison of Radio Duty Cycling Protocols for Wireless Sensor Networks Dissertation submitted in fulfillment of the requirements for the award of the degree of Doctor in Engineering Sciences and Technology by Marie-Paule Uwase Promotors : Prof. dr. ir. Jean-Michel Dricot (ULB) Prof. dr. ir. Kris Steenhaut (VUB) Prof. dr. ir. Jacques Tiberghien (VUB) October 2018 Jury Members President Prof. dr. ir. Van Biesen Leo ELEC department , Vrije Universiteit Brussel [email protected] Vice president Prof. dr. ir. Pintelon, Rik ELEC department, Vrije Universiteit Brussel [email protected] Secretary Prof. dr. ir. Goossens Marnix ETRO department, Vrije Universiteit Brussel [email protected] External Members Prof. dr. ir Reali Gianluca Networks and Services lab, University of Perugia [email protected] Prof. Aimé Lay-Ekuakille Department of Innovation Engineering, University of Salento [email protected] Internal members Prof. Antoine Nonclercq Beams, Université Libre de Bruxelles [email protected] Promoters Prof. dr. ir. Steenhaut, Kris ETRO department, Vrije Universiteit Brussel [email protected] Prof. dr. ir. Dricot Jean-Michel Opera Department, Université Libre de Bruxelles [email protected] Prof. dr. ir. Tiberghien Jacques ETRO department, Vrije Universiteit Brussel [email protected] To Dana and Benoît To my late mother Abstract Wireless sensor networks are often battery powered and therefore their power consumption is of critical importance. Power requirements can be reduced by switching off radios when they are not needed and by using multi-hop communications to reduce the length of the radio links. Multi-hop communications however require message routing through the network. The Routing Protocol for lossy networks (RPL) has been designed by the Internet Engineering Task Force (IETF) for seamless integration of wireless sensor networks in the Internet.
    [Show full text]
  • Girts Strazdins Wireless Sensor Network Software Design Rules
    UNIVERSITY OF LATVIA FACULTY OF COMPUTING Girts Strazdins Wireless Sensor Network Software Design Rules DOCTORAL THESIS FOR THE ACADEMIC DEGREE OF DR.SC.COMP FIELD: COMPUTER SCIENCE SUB-FIELD: SYSTEMS OF DATA PROCESSING AND COMPUTER NETWORKS ADVISOR: DR.SC.COMP. LEO SELAVO RIGA, 2014 This work has been supported by the European Social Fund within the project "Support for Doctoral Studies at University of Latvia". Abstract In the last decade wireless sensor networks (WSNs) have evolved as a promis- ing approach for smart investigation of our planet, providing solutions for environment and wild animal monitoring, security system development, hu- man health telemonitoring and control, industrial manufacturing and other domains. Lack of unified standards and methodologies leads to limited sensor network solution interoperability and portability. Significant number of WSN oper- ating systems, virtual machines, query languages and other software tools already do exist. Also a significant number of communication protocols have been invented. However, sensor network designers and programmers still face serious problems related to new platform and application development. The goal of this work is to propose wireless sensor network software develop- ment design rules that serve as a unified methodology for operating system and application development. The design rules are based on 40 existing WSN deployment extensive analysis and common trend inference. The proposed rules are evaluated in different aspects. Improvements for existing WSN de- ployments and operating systems are identified, design and implementation of an object-oriented WSN operating system according to proposed rules is described. In addition, a WSN application use-case is evaluated and improve- ments are suggested according to design rules.
    [Show full text]
  • A Virtual Machine for the Insense Language
    A Virtual Machine for the Insense Language Callum Cameron, Paul Harvey, and Joseph Sventek [email protected], [email protected], [email protected] School of Computing Science, University of Glasgow, Scotland Abstract—The Insense VM is a specialised Java virtual ma- core. Programmers using these systems must have extensive chine for running Insense programs on wireless sensor nodes. The knowledge of low-level and embedded programming. Domain VM runs on top of InceOS, a purpose-built operating system. experts wishing to use wireless sensor networks in their own A split VM architecture is used, in which Insense programs fields – often described as the intended users of these systems are compiled to Java classes, then linked and compacted on a – are unlikely to have this knowledge. more powerful machine into a form suitable for execution by the VM. Measurements demonstrate that the virtual machine The Insense language is designed to overcome this prob- achieves good performance and memory usage for realistic lem [3], [10], [15]. Insense is a component-based language. A Insense programs. program consists of several components. A component is es- sentially a thread which executes a behaviour function repeat- I. INTRODUCTION edly, and has private state. Components can only communicate The Insense language [3] has been developed to ease the by passing messages over strongly-typed channels, which use programming of wireless sensor networks. Insense uses a a blocking ‘rendezvous’ model. Senders and receivers block component-based model of concurrency, where components on a channel until both are present, at which point the mes- are strictly encapsulated and communicate through message sage is passed and both components are unblocked.
    [Show full text]
  • A Body Sensor Networks Targeted Operating System and Toolset
    SENSORCOMM 2011 : The Fifth International Conference on Sensor Technologies and Applications The BSNOS Platform: A Body Sensor Networks Targeted Operating System and Toolset Joshua Ellul Benny Lo Guang-Zhong Yang Department of Computing Deparment of Computing Deparment of Computing Imperial College London Imperial College London Imperial College London London, UK London, UK London, UK Email: [email protected] Email: [email protected] Email: [email protected] Abstract—Body sensor networks face different challenges enabling novice programmers to develop applications with than those faced in traditional wireless sensor networks. ease. Also, in that it is an operating system, we believe that Challenges faced include fewer, more accurate sensor nodes it should be usable without requiring any low level devel- and an increased requirement of context awareness, however, body sensor networks are relieved from high scalability. Pro- opment. Thus, we have included in the operating system a gramming sensor networks, in general, can be a daunting task default application which allows domain experts to monitor due to the limited computation, memory and energy resources environments and configure the sampling and transmission available. Operating systems for wireless sensor networks have rates of collected data. been proposed which focus on the challenges they face. We The primary contribution of this paper is that we have believe that an operating system and toolset which focuses primarily on the challenges and properties of body sensor designed the first operating system targetted especially for networks could help ease the burden of programming body body sensor networks, which utilizes run-time compilation sensor network applications.
    [Show full text]
  • Use of Forth to Enable Distributed Processing on Wireless Sensor Networks
    Use of Forth to Enable Distributed Processing on Wireless Sensor Networks Salvatore Gaglio, Giuseppe Lo Re, Gloria Martorella and Daniele Peri DICGIM, University of Palermo - Viale delle Scienze, Ed. 6 - 90128 Palermo, Italy fsalvatore.gaglio, giuseppe.lore, gloria.martorella, [email protected] Abstract—Wireless Sensor Networks (WSNs) are composed Such practice strongly limits the development of more of tiny sensor nodes able to monitor environmental conditions. advanced applications than the static acquisition and trans- Existing applications for WSNs usually adopt a centralized mission of sensory data that is then to be processed by a base approach that exploit sensor nodes just for sensing, while data processing takes place on more powerful base stations. This can station [5]. be considered a consequence of the common WSN programming Sophisticated applications, such as those concerning Ambi- practice that proves too rigid to support development based on ent Intelligence (AmI) scenarios, could instead be developed distributed processing. In fact, local processing of complex data, if the nodes were able to process cooperatively more complex such as symbolic information and rules, is an under explored data –e.g. symbolic data and rules– than the numerical values aspect. The adoption of high level interpreters above general purpose operating systems is often unpractical since it implies in rigid representations resulting from sensing. Such applica- the saturation of the available resources. In this paper, we detail tions may in fact implement intelligent, autonomic, and self- the implementation of an alternative Forth-based approach that organizing behaviors by distributed processing of symbolic implements a minimal but extensible operating system featuring and qualitative description of the observed phenomena.
    [Show full text]
  • Introducing Threads Into the Takatuka Java Virtual Machine
    University of Freiburg Department of Computer Science Bachelor Thesis Introducing Threads into the TakaTuka Java Virtual Machine Author: Supervisors: Gidon Marian Ernst Prof. Christian Schindelhauer Faisal Aslam September 29, 2008 Erklärung Hiermit erkläre ich, dass ich die vorliegende Arbeit selbständig verfasst habe, keine anderen als die angegebenen Quellen und Hilfsmittel verwendet habe und alle Stellen, die wörtlich oder sinngemäß aus veröffentlichten Schriften entnommen wurden, als solche kenntlich gemacht habe. Darüber hinaus erkläre ich, dass diese Arbeit nicht, auch nicht auszugsweise, bereits für eine andere Prüfung angefertigt wurde. Ort, Datum Unterschrift Acknowledgement I wish to thank all the people who supported me during my work on this bachelor thesis. First of all, I would like to thank Prof. Christian Schindelhauer for his support for the whole TakaTuka project and his valuable feedback. Faisal Aslam, who was my supervisor, always had an open ear and took the time to discuss outstanding issues, which was very productive. I also wish to thank everybody who has provided me feedback on this thesis itself, especially Jan Meyer and Benedikt Waldvogel for their suggestions on the text. 3 Abstract Goal of this bachelor thesis is to introduce multithreading support into the TakaTuka Java virtual machine. The TakaTuka project is an effort to provide a Java environment and devel- opment platform for sensor motes. As these motes offer only a limited amount of resources, special care has to be taken in order to minimize the requirements of the virtual machine in terms of memory and computation. The work is focused on basic threads functionality instead of implementing novel algorithms related to scheduling or locking.
    [Show full text]
  • UNIVERSITY of CALIFORNIA, IRVINE Supporting Fault Tolerance in the Internet of Things DISSERTATION Submitted in Partial Satisfac
    UNIVERSITY OF CALIFORNIA, IRVINE Supporting Fault Tolerance in the Internet of Things DISSERTATION submitted in partial satisfaction of the requirements for the degree of DOCTOR OF PHILOSOPHY in Electrical Engineering and Computer Science by Sen Zhou Dissertation Committee: Professor Kwei-Jay Lin, Chair Professor Pai Chou Professor Mohammad A. Al Faruque 2015 c 2015 Sen Zhou DEDICATION To my parents, Lihui Lian and Mulin Zhou ii TABLE OF CONTENTS LIST OF FIGURES v LIST OF ALGORITHMS vii LIST OF TABLES viii ACKNOWLEDGMENTS ix CURRICULUM VITAE x ABSTRACT OF THE DISSERTATION xii 1 Introduction 1 1.1 Service-Oriented Internet of Things . .1 1.2 Fault Tolerance in Service-Oriented IoT . .4 1.3 Contributions . .8 1.4 Dissertation Organization . .9 2 Related Work 10 2.1 Modeling IoT Systems . 10 2.2 Fault Tolerant Resource Management in IoT . 11 2.3 Data Fusion in IoT Systems . 13 2.4 Fault-Tolerant Clustering in IoT Systems . 14 2.5 Overview of the Wukong Middleware . 15 3 Improving the Availability of Services in IoT 20 3.1 Concept of Virtual Services . 21 3.2 Vitual Service Generation . 22 3.2.1 Linear Models . 23 3.2.2 Non-Linear Models . 25 3.2.3 Practical Issues . 27 3.3 Experimental Study . 27 3.3.1 Experiment Setup . 28 3.3.2 Generating Light Sensing Virtual Services . 29 3.3.3 Composing Presence Sensing Virtual Services . 32 iii 4 Mapping in IoT 35 4.1 Using Communication Cost for Inter-Device Cost . 35 4.2 Using Location Policy for Device Cost . 39 4.2.1 Geographical Modeling .
    [Show full text]