NASA Software Safety Guidebook
Total Page:16
File Type:pdf, Size:1020Kb
NOT MEASUREMENT SENSITIVE National Aeronautics and NASA-GB-8719.13 Space Administration March 31, 2004 NASA Software Safety Guidebook NASA TECHNICAL STANDARD PREFACE Effective Date: 31 March 2004 This document has been issued to make available to software safety practitioners a guidebook for assessing software systems for software’s contribution to safety and techniques for analyzing and applying appropriate safety techniques and methods to software. Software developers and software safety engineers are the primary focus; however, software assurance (SA) engineers, project managers, system engineers, and system safety engineers will also find this guidebook useful. The document: Provides an overview of general software safety and good software engineering practices which contribute to software system safety. Provides the means to scope and tailor the software safety and software engineering activities to obtain the most cost effective, best quality, and safest products. Provides analyses, methods and guidance which can be applied during each phase of the software life cycle. Multiple checklists and examples are provided as well as specific instructions for applying FMEA/CIL and FTA to software. Includes development approaches, safety analyses, and testing methodologies that lead to improved safety in the software product. Procuring NASA Enterprise Programs or Centers shall review this document for applicability to NASA contracts as well as for applicability to its internal activities. Questions concerning the application of this publication to specific procurements or requests should be referred to the NASA Enterprise Program or Center. This guidebook cancels NASA-GB-1740.13-96, NASA Guidebook for Safety Critical Software Analysis and Development. /s/ Bryan O’Connor Associate Administrator for Safety and Mission Assurance NASA-GB-8719.13 1 Foreword This guidebook was created to provide specific information and guidance on the process of creating and assuring safe software. In our modern world, software controls much of the hardware (equipment, electronics, and instruments) around us. Sometimes hardware failure can lead to a loss of human life. When software controls, operates, or interacts with such hardware, software safety becomes a vital concern The audience for this guidebook is diverse. Software developers and software safety engineers are the primary focus. Software assurance (QA) engineers, project managers, system engineers, and system safety engineers will also find this guidebook useful. Section 1.5 of the Introduction provides guidance on sections of particular interest to the various disciplines. This guidebook is meant to be more than just a collection of development techniques and analyses. The goal is to open the reader to new ways of thinking about software from a safety perspective. This guidebook points out things to look for (and look out for) in the development of safety-critical software. The guidebook includes development approaches, safety analyses, and testing methodologies that lead to improved safety in the software product. While the focus of this guidebook is on the development of software for safety-critical systems, much of the information and guidance is also appropriate to the creation of mission- critical software. NASA-GB-8719.13 2 Table of Contents Preface……………………………………………………………………. 1 Forward …………………………………………………………………. 2 Chapter 1 Introduction................................................................ 12 1.1 Scope ......................................................................................................................................12 1.2 Purpose ...................................................................................................................................12 1.3 Acknowledgments ...................................................................................................................13 1.4 Associated Documents............................................................................................................13 1.5 Roadmap of this Guidebook....................................................................................................14 1.5.1 Disciplines and Symbols.......................................................................................................14 1.5.2 Chapter Description .........................................................................................................15 Chapter 2 Software and System Safety..................................... 17 2.1 Hazardous and Safety-critical Software ..................................................................................17 2.1.1 What is a Hazard?............................................................................................................17 2.1.2 How Can Software be Hazardous?..................................................................................18 2.1.3 What is Safety-Critical Software?.....................................................................................18 2.1.4 How Does Software Control Hazards? ............................................................................19 2.1.5 Relationship Between Software and Hardware Controls.................................................20 2.1.6 Caveats with Software Hazard Controls ..........................................................................20 2.1.7 What is Fault or Failure Tolerance?.................................................................................21 2.2 The System Safety Program ...................................................................................................22 2.2.1 System Safety Process ....................................................................................................22 2.2.2 System Safety and Software Development .....................................................................23 2.3 Safety Requirements and Analyses ........................................................................................25 2.3.1 Preliminary Hazard Analysis (PHA) .................................................................................26 2.3.2 Risk Levels.......................................................................................................................26 2.3.3 NASA Policy for Hazard Elimination and Control.............................................................28 2.3.4 Software Subsystem Hazard Analysis .............................................................................29 Chapter 3 Software Safety Planning.......................................... 32 3.1 Scoping the Software for the Safety Effort .............................................................................34 3.1.1 Identify Safety-Critical Software.......................................................................................34 3.1.2 Determine Software Safety- Criticality .............................................................................36 3.1.2.1 Software Control Categories.....................................................................................37 3.1.2.2 Software Risk Matrix .................................................................................................38 3.1.3 Determine the Safety Effort and Oversight Required ......................................................40 3.1.3.1 Determine Extent of Safety Effort .............................................................................40 3.1.3.2 Oversight Required ...................................................................................................41 3.2 Tailoring the Software Safety Effort.........................................................................................42 3.2.1 “Full” Software Safety Effort.............................................................................................44 3.2.2 “Moderate” Software Safety Effort ...................................................................................44 3.2.3 “Minimum” Software Safety Effort ....................................................................................45 3.2.4 Projects with Mixed Levels of Effort .................................................................................45 Chapter 4 Safety-Critical Software Development ..................... 46 4.1 Crafting Safer Software ...........................................................................................................46 4.1.1 Communication ................................................................................................................47 4.1.2 Good Software Engineering Practices and Procedures ..................................................48 4.1.3 Perform Safety and Development Analyses ....................................................................48 4.1.4 Incorporate Appropriate Methodologies, Techniques, and Design Features ..................48 4.1.5 Caveat Emptor .................................................................................................................49 4.2 The Software Development Process............................................................................................49 NASA-GB-8719.13 3 4.2.1 Software Lifecycles ..........................................................................................................52 4.2.1.1 Waterfall Model ...............................................................................................................53 4.2.1.2 Rapid Prototyping .....................................................................................................54