Lectures Software Engineering - Chapter 17: Dependable Systems Specification

ppt 40 trang hoanguyen 4420
Bạn đang xem 20 trang mẫu của tài liệu "Lectures Software Engineering - Chapter 17: Dependable Systems Specification", để tải tài liệu gốc về máy bạn click vào nút DOWNLOAD ở trên

Tài liệu đính kèm:

  • pptlectures_software_engineering_chapter_17_dependable_systems.ppt

Nội dung text: Lectures Software Engineering - Chapter 17: Dependable Systems Specification

  1. Dependable Systems Specification l Processes and techniques for developing a specification for system availability, reliability, safety and security ©Ian Sommerville 2000 Dependable systems specification Slide 1
  2. Functional and non-functional requirements l System functional requirements may be generated to define error checking and recovery facilities and features that provide protection against system failures. l Non-functional requirements may be generated to specify the required reliability and availability of the system. ©Ian Sommerville 2000 Dependable systems specification Slide 2
  3. System reliability specification l Hardware reliability • What is the probability of a hardware component failing and how long does it take to repair that component? l Software reliability • How likely is it that a software component will produce an incorrect output. Software failures are different from hardware failures in that software does not wear out. It can continue in operation even after an incorrect result has been produced. l Operator reliability • How likely is it that the operator of a system will make an error? ©Ian Sommerville 2000 Dependable systems specification Slide 3
  4. System reliability engineering l Sub-discipline of systems engineering that is concerned with making judgements on system reliability l It takes into account the probabilities of failure of different components in the system and their combinations • Consider a system with 2 components A and B where the probability of failure of A is P (A) and the probability of failure of B is P (B). ©Ian Sommerville 2000 Dependable systems specification Slide 4
  5. Failure probabilities l If there are 2 components and the operation of the system depends on both of them then the probability of system failure is • P (S) = P (A) + P (B) l Therefore, as the number of components increase then the probability of system failure increases l If components are replicated then the probability of failure is • P (S) = P (A) n (all components must fail) ©Ian Sommerville 2000 Dependable systems specification Slide 5
  6. Functional reliability requirements l A predefined range for all values that are input by the operator shall be defined and the system shall check that all operator inputs fall within this predefined range. l The system shall check all disks for bad blocks when it is initialised. l The system must use N-version programming to implement the braking control system. l The system must be implemented in a safe subset of Ada and checked using static analysis ©Ian Sommerville 2000 Dependable systems specification Slide 6
  7. Non-functional reliability specification l The required level of system reliability required should be expressed in quantitatively l Reliability is a dynamic system attribute- reliability specifications related to the source code are meaningless. • No more than N faults/1000 lines. • This is only useful for a post-delivery process analysis where you are trying to assess how good your development techniques are. l An appropriate reliability metric should be chosen to specify the overall system reliability ©Ian Sommerville 2000 Dependable systems specification Slide 7
  8. Reliability metrics l Reliability metrics are units of measurement of system reliability l System reliability is measured by counting the number of operational failures and, where appropriate, relating these to the demands made on the system and the time that the system has been operational l A long-term measurement programme is required to assess the reliability of critical systems ©Ian Sommerville 2000 Dependable systems specification Slide 8
  9. Reliability metrics ©Ian Sommerville 2000 Dependable systems specification Slide 9
  10. Availability l Measure of the fraction of the time that the system is available for use l Takes repair and restart time into account l Availability of 0.998 means software is available for 998 out of 1000 time units l Relevant for non-stop, continuously running systems • telephone switching systems, railway signalling systems ©Ian Sommerville 2000 Dependable systems specification Slide 10
  11. Probability of failure on demand l This is the probability that the system will fail when a service request is made. Useful when demands for service are intermittent and relatively infrequent l Appropriate for protection systems where services are demanded occasionally and where there are serious consequence if the service is not delivered l Relevant for many safety-critical systems with exception management components • Emergency shutdown system in a chemical plant ©Ian Sommerville 2000 Dependable systems specification Slide 11
  12. Rate of fault occurrence (ROCOF) l Reflects the rate of occurrence of failure in the system l ROCOF of 0.002 means 2 failures are likely in each 1000 operational time units e.g. 2 failures per 1000 hours of operation l Relevant for operating systems, transaction processing systems where the system has to process a large number of similar requests that are relatively frequesnt • Credit card processing system, airline booking system ©Ian Sommerville 2000 Dependable systems specification Slide 12
  13. Mean time to failure l Measure of the time between observed failures of the system. Is the reciprocal of ROCOF for stable systems l MTTF of 500 means that the mean time between failures is 500 time units l Relevant for systems with long transactions i.e. where system processing takes a long time. MTTF should be longer than transaction length • Computer-aided design systems where a designer will work on a design for several hours, word processor systems ©Ian Sommerville 2000 Dependable systems specification Slide 13
  14. Failure consequences l Reliability measurements do NOT take the consequences of failure into account l Transient faults may have no real consequences but other faults may cause data loss or corruption and loss of system service l May be necessary to identify different failure classes and use different metrics for each of these. The reliability specification must be structured. ©Ian Sommerville 2000 Dependable systems specification Slide 14
  15. Failure consequences l When specifying reliability, it is not just the number of system failures that matter but the consequences of these failures l Failures that have serious consequences are clearly more damaging than those where repair and recovery is straightforward l In some cases, therefore, different reliability specifications for different types of failure may be defined ©Ian Sommerville 2000 Dependable systems specification Slide 15
  16. Failure classification ©Ian Sommerville 2000 Dependable systems specification Slide 16
  17. Steps to a reliability specification l For each sub-system, analyse the consequences of possible system failures. l From the system failure analysis, partition failures into appropriate classes. l For each failure class identified, set out the reliability using an appropriate metric. Different metrics may be used for different reliability requirements l Identify functional reliability requirements to reduce the chances of critical failures ©Ian Sommerville 2000 Dependable systems specification Slide 17
  18. Bank auto-teller system l Each machine in a network is used 300 times a day l Bank has 1000 machines l Lifetime of software release is 2 years l Each machine handles about 200, 000 transactions l About 300, 000 database transactions in total per day ©Ian Sommerville 2000 Dependable systems specification Slide 18
  19. Examples of a reliability spec. ©Ian Sommerville 2000 Dependable systems specification Slide 19
  20. Specification validation l It is impossible to empirically validate very high reliability specifications l No database corruptions means POFOD of less than 1 in 200 million l If a transaction takes 1 second, then simulating one day’s transactions takes 3.5 days l It would take longer than the system’s lifetime to test it for reliability ©Ian Sommerville 2000 Dependable systems specification Slide 20
  21. Key points l There are both functional and non-functional dependability requirements l Non-functional availability and reliability requirements should be specified quantitatively l Metrics that may be used are AVAIL, POFOD, ROCOF and MTTF l When deriving a reliability specification, the consequences of different types of fault should be taken into account ©Ian Sommerville 2000 Dependable systems specification Slide 21
  22. Safety specification l The safety requirements of a system should be separately specified l These requirements should be based on an analysis of the possible hazards and risks l Safety requirements usually apply to the system as a whole rather than to individual sub-systems. In systems engineering terms, the safety of a system is an emergent property ©Ian Sommerville 2000 Dependable systems specification Slide 22
  23. The safety life- cycle ©Ian Sommerville 2000 Dependable systems specification Slide 23
  24. Safety processes l Hazard and risk analysis • Assess the hazards and the risks of damage associated with the system l Safety requirements specification • Specify a set of safety requirements which apply to the system l Designation of safety-critical systems • Identify the sub-systems whose incorrect operation may compromise system safety. Ideally, these should be as small a part as possible of the whole system. l Safety validation • Check the overall system safety ©Ian Sommerville 2000 Dependable systems specification Slide 24
  25. Hazard and risk analysis ©Ian Sommerville 2000 Dependable systems specification Slide 25
  26. Hazard and risk analysis l Identification of hazards which can arise which compromise the safety of the system and assessing the risks associated with these hazards l Structured into various classes of hazard analysis and carried out throughout software process from specification to implementation l A risk analysis should be carried out and documented for each identified hazard and actions taken to ensure the most serious/likely hazards do not result in accidents ©Ian Sommerville 2000 Dependable systems specification Slide 26
  27. Hazard analysis stages l Hazard identification • Identify potential hazards which may arise l Risk analysis and hazard classification • Assess the risk associated with each hazard l Hazard decomposition • Decompose hazards to discover their potential root causes l Risk reduction assessment • Define how each hazard must be taken into account when the system is designed ©Ian Sommerville 2000 Dependable systems specification Slide 27
  28. Fault-tree analysis l Method of hazard analysis which starts with an identified fault and works backward to the causes of the fault. l Can be used at all stages of hazard analysis from preliminary analysis through to detailed software checking l Top-down hazard analysis method. May be combined with bottom-up methods which start with system failures and lead to hazards ©Ian Sommerville 2000 Dependable systems specification Slide 28
  29. Fault- tree analysis l Identify hazard l Identify potential causes of the hazard. Usually there will be a number of alternative causes. Link these on the fault-tree with ‘or’ or ‘and’ symbols l Continue process until root causes are identified l Consider the following example which considers how data might be lost in some system where a backup process is running ©Ian Sommerville 2000 Dependable systems specification Slide 29
  30. Fault tree Data deleted or or or or External attack H/W failure S/W failure Operator failure or or Backup system failure Operating system failure or or or Incorrect operator input Incorrect configuration Execution failure or or or or or or UI design fault Training fault Human error Timing fault Algorithm fault Data fault ©Ian Sommerville 2000 Dependable systems specification Slide 30
  31. Risk assessment l Assesses hazard severity, hazard probability and accident probability l Outcome of risk assessment is a statement of acceptability • Intolerable. Must never arise or result in an accident • As low as reasonably practical(ALARP) Must minimise possibility of hazard given cost and schedule constraints • Acceptable. Consequences of hazard are acceptable and no extra costs should be incurred to reduce hazard probability ©Ian Sommerville 2000 Dependable systems specification Slide 31
  32. Levels of risk ©Ian Sommerville 2000 Dependable systems specification Slide 32
  33. Risk acceptability l The acceptability of a risk is determined by human, social and political considerations l In most societies, the boundaries between the regions are pushed upwards with time i.e. society is less willing to accept risk • For example, the costs of cleaning up pollution may be less than the costs of preventing it but this may not be socially acceptable l Risk assessment is subjective • Risks are identified as probable, unlikely, etc. This depends on who is making the assessment ©Ian Sommerville 2000 Dependable systems specification Slide 33
  34. Risk reduction l System should be specified so that hazards do not arise or result in an accident l Hazard avoidance • The system should be designed so that the hazard can never arise during correct system operation l Hazard detection and removal • The system should be designed so that hazards are detected and neutralised before they result in an accident l Damage limitation • The system is designed in such a way that the consequences of an accident are minimised ©Ian Sommerville 2000 Dependable systems specification Slide 34
  35. Specifying forbidden behaviour l The system shall not allow users to modify access permissions on any files that they have not created (security) l The system shall not allow reverse thrust mode to be selected when the aircraft is in flight (safety) l The system shall not allow the simultaneous activation of more than three alarm signals (safety) ©Ian Sommerville 2000 Dependable systems specification Slide 35
  36. Security specification l Has some similarities to safety specification • Not possible to specify security requirements quantitatively • The requirements are often ‘shall not’ rather than ‘shall’ requirements l Differences • No well-defined notion of a security life cycle for security management • Generic threats rather than system specific hazards • Mature security technology (encryption, etc.). However, there are problems in transferring this into general use ©Ian Sommerville 2000 Dependable systems specification Slide 36
  37. The security specification process ©Ian Sommerville 2000 Dependable systems specification Slide 37
  38. Stages in security specification l Asset identification and evaluation • The assets (data and programs) and their required degree of protection are identified. The degree of required protection depends on the asset value so that a password file (say) is more valuable than a set of public web pages. l Threat analysis and risk assessment • Possible security threats are identified and the risks associated with each of these threats is estimated. l Threat assignment • Identified threats are related to the assets so that, for each identified asset, there is a list of associated threats. ©Ian Sommerville 2000 Dependable systems specification Slide 38
  39. Stages in security specification l Technology analysis • Available security technologies and their applicability against the identified threats are assessed. l Security requirements specification • The security requirements are specified. Where appropriate, these will explicitly identified the security technologies that may be used to protect against different threats to the system. ©Ian Sommerville 2000 Dependable systems specification Slide 39
  40. Key points l Hazard analysis is a key activity in the safety specification process. l Fault-tree analysis is a technique which can be used in the hazard analysis process. l Risk analysis is the process of assessing the likelihood that a hazard will result in an accident. Risk analysis identifies critical hazards and classifies risks according to their seriousness. l To specify security requirements, you should identify the assets that are to be protected and define how security techniques should be used to protect them. ©Ian Sommerville 2000 Dependable systems specification Slide 40