Real-Time Systems Development (eBook)
320 Seiten
Elsevier Science (Verlag)
978-0-08-045640-9 (ISBN)
Real-Time Systems Development introduces computing students and professional programmers to the development of software for real-time applications. Based on the academic and commercial experience of the author, the book is an ideal companion to final year undergraduate options or MSc modules in the area of real-time systems design and implementation. Assuming a certain level of general systems design and programming experience, this text will extend students' knowledge and skills into an area of computing which has increasing relevance in a modern world of telecommunications and 'intelligent' equipment using embedded microcontrollers.
This book takes a broad, practical approach in discussing real-time systems. It covers topics such as basic input and output; cyclic executives for bare hardware; finite state machines; task communication and synchronization; input/output interfaces; structured design for real-time systems; designing for multitasking; UML for real-time systems; object oriented approach to real-time systems; selecting languages for RTS development; Linux device drivers; and hardware/software co-design. Programming examples using GNU/Linux are included, along with a supporting website containing slides; solutions to problems; and software examples.
This book will appeal to advanced undergraduate Computer Science students; MSc students; and, undergraduate software engineering and electronic engineering students.
* Concise treatment delivers material in manageable sections* Includes handy glossary, references and practical exercises based on familiar scenarios
* Supporting website contains slides, solutions to problems and software examples
Real-Time Systems Development introduces computing students and professional programmers to the development of software for real-time applications. Based on the academic and commercial experience of the author, the book is an ideal companion to final year undergraduate options or MSc modules in the area of real-time systems design and implementation. Assuming a certain level of general systems design and programming experience, this text will extend students' knowledge and skills into an area of computing which has increasing relevance in a modern world of telecommunications and 'intelligent' equipment using embedded microcontrollers. This book takes a broad, practical approach in discussing real-time systems. It covers topics such as basic input and output; cyclic executives for bare hardware; finite state machines; task communication and synchronization; input/output interfaces; structured design for real-time systems; designing for multitasking; UML for real-time systems; object oriented approach to real-time systems; selecting languages for RTS development; Linux device drivers; and hardware/software co-design. Programming examples using GNU/Linux are included, along with a supporting website containing slides; solutions to problems; and software examples. This book will appeal to advanced undergraduate Computer Science students; MSc students; and, undergraduate software engineering and electronic engineering students.* Concise treatment delivers material in manageable sections* Includes handy glossary, references and practical exercises based on familiar scenarios* Supporting website contains slides, solutions to problems and software examples
Cover 1
Real-Time Systems Development 4
Contents 6
Preface 8
Recommended lab sessions 10
Acknowledgements and thanks 12
1 Introduction to real-time systems 14
1.1 Chapter overview 14
1.2 Real-time systems development 14
1.3 System complexity 15
1.4 Microprocessors and real-time applications 16
1.5 Definition of a real-time system 17
1.6 Programming structures 23
1.7 Response latency 24
1.8 Relative speeds 24
1.8.1 Polling an input too fast 24
1.8.2 Polling an input too slowly 25
1.8.3 Light sensing 26
1.9 Software timing 27
1.10 High speed timing 28
1.11 Output timing overload 29
1.12 Debugging real-time systems 30
1.13 Access to hardware 31
1.14 Machine I/O 32
1.15 Programmed I/O 33
1.16 Hardware/software cost tradeoff 34
1.17 Hard, soft and firm 35
1.18 Software Quality Assurance (SQA) 36
1.19 Experience and history 37
1.20 Futures? 38
1.21 Chapter summary 38
1.22 Problems and issues for discussion 40
1.23 Suggestions for reading 40
2 Implementing simple real-time systems 42
2.1 Chapter overview 42
2.2 Multi-tasking 42
2.3 Task loops 43
2.4 Code timing problems 44
2.5 Interrupt-driven tasks 45
2.6 Task swapping: How? When? Which? 46
2.7 Task re-entry 46
2.8 Causes of task swapping 47
2.9 Resource sharing 48
2.10 Using the printer port for digital I/O 48
2.11 Electric motors 51
2.12 Operational details of stepper motors 51
2.13 Lifecycle of a professional programmer 55
2.14 Chapter summary 55
2.15 Problems and issues for discussion 57
2.16 Suggestions for reading 58
3 Basic input and output 59
3.1 Chapter overview 59
3.2 Memory-mapped ports 59
3.3 I/O mapped ports 61
3.4 Port registers – the programmers’ view 63
3.5 Port polling 66
3.6 I/O access permissions 68
3.7 To block or not to block 72
3.8 Exception and interrupt processing – service on demand 74
3.9 Multiple interrupt sources 75
3.10 Powerfail detection 78
3.11 Interrupt structure on the PC 81
3.12 Deferred interrupt processing 84
3.13 Use of exceptions and interrupts 85
3.14 Interrupt unpredictability 86
3.15 Critical data protection – how to communicate with interrupts 87
3.16 Bu.ered I/O – interrupt device drivers 90
3.17 Chapter summary 92
3.18 Problems and issues for discussion 92
3.19 Suggestions for reading 93
4 Cyclic executives for bare hardware 94
4.1 Chapter overview 94
4.2 The basic system 94
4.3 System tick 95
4.4 Extended tasks 96
4.5 Implementation of a cyclic executive 97
4.6 Cyclic executive execution pattern 98
4.7 Demonstation cyclic executive code 99
4.8 Keypad application 100
4.9 Chapter summary 105
4.10 Problems and issues for discussion 105
4.11 Suggestions for reading 106
5 Finite state machines – design tool 107
5.1 Chapter overview 107
5.2 Defining the perimeter 107
5.3 Channel bandwidths 108
5.4 Finite State Diagrams (FSD) 110
5.5 Auxiliary variables 112
5.6 Vehicle detection 113
5.7 Simplification techniques 114
5.8 Input data and trigger events 115
5.9 Teas-made 115
5.10 Hierarchical state charts 117
5.11 Concurrent FSMs 119
5.12 OO design patterns and state machines 120
5.13 Chapter summary 120
5.14 Problems and issues for discussion 121
5.15 Suggestions for reading 122
6 Finite state machines – implementation options 123
6.1 Chapter overview 123
6.2 Implementing an FSD 123
6.3 Implementation by direct sequential coding 124
6.4 THE SWITCH-CASE IMPLEMENTATION MODEL 127
6.5 The GOTO/LABEL implementation model 131
6.6 FST implementation model 134
6.7 An object-oriented approach to implementation 141
6.8 FSM scheduling issues 148
6.9 More FST 150
6.10 Run-time environment 158
6.11 Chapter summary 160
6.12 Problems and issues for discussion 160
6.13 Suggestions for reading 161
7 Why multi-task? 163
7.1 Chapter overview 163
7.2 Recognizing a real-time application 163
7.3 Multi-tasking and multi-threading 164
7.4 Run-time support environment 165
7.5 Run-time scheduling 167
7.6 Justifying the use of multi-tasking 168
7.7 Responsiveness 169
7.8 Intellectual simplicity of design 170
7.9 Rigour of implementation 171
7.10 Unit testing 171
7.11 System integrity 172
7.12 System integration testing 173
7.13 Exploitation of multi-processor hardware 173
7.14 Processor support for task swapping 175
7.15 Starting new tasks in Linux 178
7.16 Chapter summary 180
7.17 Problems and issues for discussion 180
7.18 Suggestions for reading 181
8 Task communication and synchronization 182
8.1 Chapter overview 182
8.2 Data sharing 182
8.3 Event flags 185
8.4 Semaphores 185
8.5 Lock files 186
8.6 Intercept signals 187
8.7 Shared data buffers 195
8.8 Pipes 196
8.9 Control queues 204
8.10 Sockets 204
8.11 Remote Procedure Calls (RPC) 209
8.12 ADA rendezvous 210
8.13 Java synchronization 211
8.14 Chapter summary 212
8.15 Problems and issues for discussion 212
8.16 Suggestions for reading 213
9 Real-time executives 214
9.1 Chapter overview 214
9.2 Real-time systems implementations 214
9.4 Porting application code for RTEs 216
9.5 Hardware support for an RTE 216
9.6 RTE facilities 218
9.7 Linux 219
9.8 POSIX facilities 221
9.9 Scheduling 227
9.10 Unix Filesystem Hierarchy Standard (FHS) 228
9.11 Configuring and building the Linux kernel 229
9.12 Linux for embedded applications 230
9.13 Booting embedded Linux 230
9.14 Language support 230
9.15 Licensing issues 232
9.16 Chapter summary 234
9.17 Problems and issues for discussion 234
9.18 Suggestions for reading 235
10 Using input/output interfaces 237
10.1 Chapter overview 237
10.2 Input and output operations 237
10.3 Categories 238
10.4 Operating system support 239
10.5 Raw I/O 241
10.6 I/O with Linux 242
10.7 Direct device driver 245
10.8 Device drivers under interrupt 246
10.9 Queuing theory 248
10.10 Chapter summary 252
10.11 Problems and issues for discussion 252
10.12 Suggestions for reading 253
11 Structured design for real-time systems 254
11.1 Chapter overview 254
11.2 Design methods 254
11.3 Incremental functional decomposition 256
11.4 Use of diagrams in design 257
11.5 Data Flow Diagrams (DFD) 258
11.6 Implementing a DFD 259
11.7 Reading structure charts 266
11.8 Yourdon structured analysis and design for real-time systems 268
11.9 Implementing an event-based DFD 269
11.10 Stored data modelling – EAR modelling 273
11.11 Transforming ERD to DFD 276
11.12 Normalizing stored data 277
11.13 Chapter summary 278
11.14 Problems and issues for discussion 278
11.15 Suggestions for reading 278
12 Designing for multi-tasking 280
12.1 Chapter overview 280
12.2 SA/SD for multi-tasking 280
12.3 Partitioning into tasks 281
12.4 Cohesion and coupling 283
12.5 Designing for intertask communication 284
12.6 Device interfacing 286
12.7 Task diagrams 287
12.8 The CODARTS method 291
12.9 Re-entrant code 292
12.10 Setting task priorities 293
12.11 Execution timing 294
12.12 Run-time support 295
12.13 Chapter summary 295
12.14 Problems and issues for discussion 296
12.15 Suggestions for reading 296
13 UML for real-time systems 298
13.1 Chapter overview 298
13.2 A Unified Modelling Language 298
13.3 Use-cases 299
13.4 Objects and classes 300
13.5 Object collaboration diagrams 301
13.6 Class diagrams 302
13.7 Interobject messaging 304
13.8 Interaction diagrams 305
13.9 Activity diagrams 307
13.10 Chapter summary 308
13.11 Problems and issues for discussion 308
13.12 Suggestions for reading 309
14 Object-oriented approach for real-time systems 310
14.1 Chapter overview 310
14.2 Real-time object-oriented design and development 310
14.3 Designing for real-time 311
14.4 Objects, objects 312
14.5 Finding the objects 313
14.6 Analysis class stereotypes 314
14.7 Tasking 315
14.8 Multi-threading with Java 316
14.9 Design patterns 318
14.10 Chapter summary 321
14.11 Problems and issues for discussion 322
14.12 Suggestions for reading 322
15 System integrity 324
15.1 Chapter overview 324
15.2 Software crisis 324
15.3 Fault tolerance 326
15.4 System requirements 327
15.5 Requirements analysis techniques 328
15.6 Verification and validation 329
15.7 Good design 329
15.8 Simulation studies 330
15.9 Petri nets 331
15.10 Design for security – source code checking: lint 334
15.11 Code reuse 334
15.12 Compile-time checking 335
15.13 Code testing 335
15.14 System integration testing 336
15.15 Run-time error trapping 337
15.16 Run-time checking: assert 338
15.17 Run-time checking: exceptions and hardware watchdog 339
15.18 Run-time checking: stack length checking 340
15.19 Visual assistance 340
15.20 A wet Monday morning 341
15.21 Concurrent version control system (CVS) 342
15.22 Setting up a CVS repository 344
15.23 Conducting design and code reviews 345
15.24 Extreme Programming 346
15.25 Software standards 347
15.26 MISRA 349
15.28 Chapter summary 351
15.29 Problems and issues for discussion 351
15.30 Suggestions for Reading 352
16 Languages for RTS development – C, Ada and Java 354
16.1 Chapter overview 354
16.2 The choice 354
16.3 General criteria for programming languages 355
16.4 Special criteria for real-time compilers 357
16.5 Compiler optimization 360
16.6 C for real-time 363
16.7 Ada 364
16.8 Java 365
16.9 Cross-compilers 369
16.10 Chapter summary 369
16.11 Problems and issues for discussion 369
16.12 Suggestions for reading 370
17 Cross-development techniques 371
17.1 Chapter overview 371
17.2 Host–target development 371
17.3 Cross-compilers and linkers 372
17.4 The gcc compilation process 373
17.5 Startup code 374
17.6 GNU linker, ld and linker script file 377
17.7 Entry point 380
17.8 Building a gcc cross-compiler 380
17.9 Tips! 385
17.10 Executable and Linking Format (ELF) 386
17.11 C++ global constructors and destructors in ELF 390
17.12 Debugging techniques 390
17.13 Program memory options 399
17.14 Flash memory 399
17.15 Installing target code 401
17.16 Chapter summary 403
17.17 Problems and issues for discussion 404
17.18 Suggestions for reading 404
18 Microcontroller embedded systems 406
18.1 Chapter overview 406
18.2 Microprocessors and microcontrollers 406
18.3 Intel 8051 8 bit family 407
18.4 Automatic vending technology 410
18.5 ARM 32 bit family 412
18.6 StrongARM processor 412
18.7 Puppeteer StrongARM microcomputer 415
18.8 Application 417
18.9 FPGA usage 419
18.10 Serial access memory 419
18.11 Chapter summary 420
18.12 Problems and issues for discussion 420
18.13 Suggestions for reading 421
19 Linux device drivers 423
19.1 Chapter overview 423
19.2 Embedded Linux 423
19.3 Porting Linux 424
19.4 The role of device drivers 428
19.5 Major and minor numbers 429
19.6 Index blocks, the Unix inode 431
19.7 Types of Linux device drivers 437
19.8 The new devfs 445
19.9 Chapter summary 445
19.10 Problems and issues for discussion 446
19.11 Suggestions for reading 446
20 Hardware/software co-design 448
20.1 Chapter overview 448
20.2 Systems-on-chip 448
20.3 Intellectual property 449
20.4 Reconfigurable hardware 450
20.5 Software support 452
20.6 Altera APEX/Excalibur device 453
20.7 Processor cores 456
20.8 Chapter summary 456
20.9 Problems and issues for discussion 456
20.10 Suggestions for reading 457
Appendix A: Using an oscilloscope for software debugging 458
A1.1 Overview 458
A1.2 Using an oscilloscope 458
A1.3 Turning on an analogue CRT scope 458
A1.4 Introduction to the oscilloscope 460
A1.5 Digital storage scopes 461
Index 464
A 464
B 464
C 464
D 465
E 465
F 465
G 465
H 465
I 465
J 466
K 466
L 466
M 466
N 466
O 466
P 466
Q 467
R 467
S 467
T 467
U 467
V 468
W 468
X 468
Y 468
Erscheint lt. Verlag | 28.10.2005 |
---|---|
Sprache | englisch |
Themenwelt | Sachbuch/Ratgeber |
Mathematik / Informatik ► Informatik ► Betriebssysteme / Server | |
Mathematik / Informatik ► Informatik ► Programmiersprachen / -werkzeuge | |
Mathematik / Informatik ► Informatik ► Software Entwicklung | |
Mathematik / Informatik ► Informatik ► Theorie / Studium | |
Mathematik / Informatik ► Mathematik | |
ISBN-10 | 0-08-045640-5 / 0080456405 |
ISBN-13 | 978-0-08-045640-9 / 9780080456409 |
Haben Sie eine Frage zum Produkt? |
![PDF](/img/icon_pdf_big.jpg)
Größe: 2,3 MB
Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine
Geräteliste und zusätzliche Hinweise
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich