“Safety is a system issue”(Nancy Levenson). Any system is made of subsystems, components etc. Each subsystem, component contributes to system safety. Hence the system has to be analyzed as a whole with safety in mind. There are techniques like – Fault Tree Analysis( FTA), Software FTA, Failure Mode Effects Analysis( FMEA) etc available for carrying out the analysis.
Note that software is also one of the important components of any system. The software safety needs can be derived from the system safety needs. Some of the typical needs are – software should prevent the system from entering an unsafe state by detecting error conditions, handle wrong user inputs etc.
Generally safety issues are considered as part of the non-functional aspect of the system. Some of safety related needs can be identified from a systems safety analysis System safety analysis usually involves – identifying hazards , their consequences and their causes. The hazards are then analyzed to see if they can be avoided altogether. Many times it is not possible to avoid them. They are then analyzed to see if they can be controlled or eliminated if they do happen. Control mechanisms should also be identified for controlling, eliminating them. Some of the techniques are listed below:
- Safety interlocks
- Hardware lockouts to protect against software errors
- Watchdog timers
- Hardware monitor circuits
- Continuous Built In Tests
- Software check points for recovery
From the system safety needs and safety analyzes, software safety needs to be derived. The software needs thus developed needs further safety analysis. The purpose of this analysis is to identify:
- To verify that the software safety needs are correct
- Software correctly implements the safety related features
With all these, it is still difficult to achieve the required system safety. So, the software can include the following features to make it more safer
- Built in tests
- Heart-beat monitors
- Using pre conditions, post conditions for filtering wrong inputs
- Checking for buffer overflows
- Continuous built in tests
- Checking for wrong or invalid commands
- Checking for out of order data / commands
- Entering a wrong state due to multiple events etc
The question still remains how to identify the system failures and hazards. Some of the guidelines for identifying these are:
- Explore historical records
- Look at energy sources
- Develop “what-if” scenarios
There are many known sources of software safety problems that can be addressed explicitly by adding them as requirements. Some of them are listed here for reference.
- Use of wrong engineering units
- Assumptions about the environment
- Assumptions about users
- Assuming that inputs are always correct
- Not following relevant standards
This entry relies on the following sources. These can provide you more information on the subject: http://satc.gsfc.nasa.gov/assure/nss8719_13.html
A Software Fault Tree Approach to RequirementsAnalysis of an Intrusion Detection System
Guy Helmer et al