critical system

42
1 لبرمجيات هندسة اCritical Systems اسةنظمة الحس ال) الحرجة( الجرلمهندس عمار الدكتور ا

Upload: hamzaeng

Post on 01-Jul-2015

3.836 views

Category:

Education


6 download

DESCRIPTION

SOFTWARE ENGINEERING

TRANSCRIPT

Page 1: Critical system

1

هندسة البرمجيات

Critical Systemsالحرجة(النظمة الحساسة (

الدكتور المهندس عمار الجر

Page 2: Critical system

2

What is a Critical System?

. ضرر كبيرأالخطأ : النظام الحساس أو الحرج ••Safety-critical systems الحساس للسلمة:

. أذى جسدي أو خسائر في الرواح أوضرر بيئيأالخطأ –جهاز ضبط السكر.جهاز الكلية.نظام تحكم في منشأة كيماوية أو نووية: مثال –

•Mission-critical systems الحساس بسبب المهمة:. فشل في تحقيق أحد أهداف النظام الستراتيجيةأالخطأ –.نظام التحكم بملحة صاروخ فضائي: مثال –

•Business-critical systems الحساس تجاريًا:. خسائر مادية كبيرةأالخطأ –.نظام الحساب البنكي: مثال –

Page 3: Critical system

3

System dependability

أهم صفة في النظمة الحساسة هي أنه يعتمد عليها بشكل•وتدل على أن) dependabilityالعتمادية؟ (كبير

.المستخدم يثق بالنظام و• Dependability=

availability+reliability+safety+securetyغالبًا ما نكون مستعدين لدراسة النظام بدرجة تتناسب مع•

أو بالشكل المتناسب مع خطورة الخطأ الناتج(اعتمادنا عليه )عنه

Page 4: Critical system

4

Development methods for critical systems

غالبًا ما يتم تطوير النظم الحساسة بواسطة طرق التطوير•.التقليدية بسبب الثقة والخبرة المتراكمة بهذه الطرق

.غالبًا ما تكون طرق البناء مكلفة•.غالبًا ما تكون فترة الفحص طويلة•:أمثلة •

مثل Formal methodsالتطوير باستخدام الطرق الرسمية –B method

.التحليلت الحصائية–.فحوص الجودة–

Page 5: Critical system

5

Socio-technical critical systems

Hardwareسبب الخطأ في هذه النظمة قد يكون عتاديًا•بسبب العامل) على الغالب(أو Softwareأو برمجيًا

.أو مزيجًا من الخطاء السابقة Operatorالبشريللنظام holisticعلى مصمم النظم أن يكون عنده فهم كلي •

.بدًل من التركيز على نواح محددةيجب عند تصميم كل نظام فرعي أن يراعي النظمة•

الفرعية الخرى كي ل تحدث مشاكل في الملئمة

Page 6: Critical system

6

مثال عن نظام حساس للسلمةجهاز تنظيم النسولين

عند مريض السكري ل تفرز البنكرياس هرمون النسولين•.بما يكفي ولذا يتم تزويده بجرعات خارجية

الموتصنقص السكر لفترة قصيرة –عطب الكلية والقلب+ العمى ةزيادة السكر على المدى الطويل –

ضخ النسولين اللزم+ قياس السكر = جهاز تنظيم السكر •• Dependability = Availability + Trustworthy

:العتمادية هنا تركز على.أن يكون النظام جاهزًا لحقن النسولين بأية لحظة–.أن يكون الحقن بالكمية اللزمة بالضبط–

Page 7: Critical system

7

Insulin pump organisation

Needleassembly

Sensor

Display1 Display2

Alarm

Pump Clock

Controller

Power supply

Insulin reservoir

Page 8: Critical system

8

Insulin pump data-flow

Insulinrequirementcomputation

Blood sugaranalysis

Blood sugarsensor

Insulindeliverycontroller

Insulinpump

Blood

Bloodparameters

Blood sugarlevel

Insulin

Pump controlcommands Insulin

requirement

Page 9: Critical system

9

Dependability requirements

• The system shall be available to deliver insulin when required to do so.

• The system shall perform reliability and deliver the correct amount of insulin to counteract the current level of blood sugar.

• The essential safety requirement is that excessive doses of insulin should never be delivered as this is potentially life threatening.

Page 10: Critical system

10

Dependability

تتعلق خاصة العتمادية بمقدار ثقتنا بالنظام ووفائه•:بالحتياجات التي وضع من أجلها المطلوبة من

هناك مجموعة من الصفات الساسية المترابطة التي تبني•مفهوم العتمادية

–Availability) الستجابة عند الطلب) : الجاهزية–Reliability) أن تكون الستجابة صحيحة) : الوثوقية–Safety) أن ل يسبب أذى بشريًا أو بيئيًا) : السلمة.–Security) القدرة على مقاومة محاولت الختراق) : الحماية

.العرضي أو المقصود

Page 11: Critical system

11

Dimensions of dependability

Dependability

Availability Reliability Security

The ability of the systemto deliver services when

requested

The ability of the systemto deliver services as

specified

The ability of the systemto operate withoutcatastrophic failure

The ability of the systemto protect itelf againstaccidental or deliberate

intrusion

Safety

Page 12: Critical system

12

Dependability

• Security= Integrity كتلة المعلومات صحيحة فيما بينها+Confidentiality لن تصل معلومات بدون توفر

الحق اللزم للوصول

• Reliability = Corectness الخدمة المقدمة هي المطلوبة

+ Timeliness و بالتوقيت الذي طلبت فيه + Precision وبالدقة اللزمة

Page 13: Critical system

13

Other dependability properties

:هناك مواصفات أخرى أقل أهمية تتعلق بالعتمادية••Repairability) امكانية التصليح:(

.إمكانية إصلح النظام في حالة وقوع مشكلة ما–

•Maintainability) الستمرارية:(.امكانية تأقلم النظام مع المتطلبات المستجدة+ سهولة الصلح –

•Survivability) صمود التخديم: (.امكانية تقديمه لخدمات حتى في حالة الهجوم عليه–تعويض أضراره. كشفه عند وقوعه. تتم زيادتها من خلل ممانعة الهجوم–

•Error tolerance) السماحية()كشفها وتجاوزها(امكانية التسامح مع أخطاء الدخال للمستخدم –

Page 14: Critical system

14

Maintainability

• A system attribute that is concerned with the ease of repairing the system after a failure has been discovered or changing the system to include new features

• Very important for critical systems as faults are often introduced into a system because of maintenance problems

• Maintainability is distinct from other dimensions of dependability because it is a static and not a dynamic system attribute. I do not cover it in this course.

Page 15: Critical system

15

Survivability

• The ability of a system to continue to deliver its services to users in the face of deliberate or accidental attack

• This is an increasingly important attribute for distributed systems whose security can be compromised

تزداد أهميتها في النظمة الموزعة التي يمكن التشكيك فيها•• Survivability subsumes the notion of resilience -

the ability of a system to continue in operation in spite of component failures

Page 16: Critical system

16

Dependability vs performance

بالرغم من أن تصميم وبناء النظام الحساس مكلف إل أن الضرار•.التي يمكن تجنبها تجعل تلك الكلفة مقبولة

)ديوان الجامعة(قد يستغني المستخدم عن النظام غير المعتمد كليًا –.تكلفة الخطأ يمكن أن تكون مرتفعة–من الصعب تعديل النظام ليصبح معتمدًا إذا لم يبن كذلك–النظمة غير الموثوقة قد تسبب ضياع الكثير من المعلومات–

:الكلفة الساسية تكون في•.بناء البرمجية بطرق مكلفة–.فحص البرمجية للتأكد من أنها ستحظى بالثقة المطلوبة من المستخدم–

Page 17: Critical system

17

Costs of increasing dependability

Low Medium High Veryhigh

Ultra-high

Dependability

موثوق%100

الطريقة

B

Page 18: Critical system

18

أسئلة

ادرس العتمادية المطلوبة في •نظام الهاتف–نظام الكلية الصناعية–نظام الدفاع المدني–نظام جامعي–نظام مروري–نظام الكلية الصناعية–نظام مؤسسة المياه–نظام نقل مؤتمرات الفيديو–

من ناحية العتمادية Windows, Linuxقارن بين نظامي •

Page 19: Critical system

19

Page 20: Critical system

20

Availability and reliability

• Reliability– The probability of failure-free system

operation over a specified time in a given environment for a given purpose

• Availability– The probability that a system, at a point in

time, will be operational and able to deliver the requested services

• Both of these attributes can be expressed quantitatively

Page 21: Critical system

21

Reliabilityو Availability مقارنة بين

بالتأكيد هناك علقة بين كون النظام متاحًا وكونه موثوقًا•لن النظام غير المتاح ل يمكن أن يعطي خدمات وقد تدرج

صفة التاحة في إطار الموثوقية ولكن ذلك ل يمنع من.التمييز بينهما

: يوضح الفرقزمن الصلحإدخال •لنقارن بين نظام أول يتعطل خمس مرات في السنة والثاني–

.عشر مرات الول موثوق أكثرإذا كان زمن إصلح الول أسبوع والثاني دقيقتان فإن الثاني–

سيكون متاحًا أكثر

Page 22: Critical system

22

Reliability terminology

Term Description

System failure An event that occurs at some point in time whenthe system does not deliver a service as expectedby its users

System error An erroneous system state that can lead to systembehaviour that is unexpected by system users.

System fault A characteristic of a software system that canlead to a system error. For example, failure toinitialise a variable could lead to that variablehaving the wrong value when it is used.

Human error ormistake

Human behaviour that results in the introductionof faults into a system.

Page 23: Critical system

23

Reliability terminology

• Failure يتعلق بقصور النظام عن تقديم المتوقع منه في لحظة ما

• Error هي حالة عطب للنظام تجعل سلوكه شاذًا • Fault غلطة في البرمجية تؤدي لحالة خاطئة في النظام• Human mistake الخطأ البشري الذي يؤدي لغلطة

Failure ⇐ Error ⇐ Fault ⇐ Human mistake

Page 24: Critical system

24

Faults and failures

:قد ل تؤدي الغلطات بالضرورة إلى عطب في النظام •فقد يتم تدارك الغلطة الموجودة في النظام وتصحيحها قبل أن تتحول إلى–

) Debugging (: مثال. حالة عطب

:حالة العطب قد ل تؤدي إلى عجز في النظام •يمكن أن يتم التغلب على حالة العطب من خلل آلية مدمجة مع النظام من–

Redundant Modulesمثال .أجل كشف حالت العطب وتغطيتها)صاروخ أريان(

من) مثًل حماية الموارد(يمكن أن تكون هناك آلية داخلية للحماية –)مثًل الفيوز في النظمة الكهربائية(القصور

Page 25: Critical system

25

Perceptions of reliability

.على العموم المستخدم ل يعبر عن احتياجاته بشكل جيد•:بالمستخدمقد تتأثر الوثوقية •

سيكون النظام غير. ربما تكون هناك حالة عطب في أحد أجزاء النظام–موثوق بالنسبة للشخص الذي يستخدم الجزء بينما قد يكون النظام موثوقًا

.من قبل مستخدم لجزء آخر مستقل عن مكان العطب.قد يكون مستخدم ما أكثر حساسية لقصور ما من مستخدم آخر–

:بالبيئةقد تتأثر الوثوقية •عندما يكون نظام مساحة السيارة ضعيفًا فربما تكون السيارة موثوقة عند–

.استعمالها في البيئات الجافة بعكس البيئات الماطرة

Page 26: Critical system

26

Reliability achievementتحسين الوثوقية

• Fault avoidance– Development technique are used that either

minimise the possibility of mistakes or trap mistakes before they result in the introduction of system faults

• Fault detection and removal– Verification and validation techniques that increase

the probability of detecting and correcting errors before the system goes into service are used

• Fault tolerance– Run-time techniques are used to ensure that

system faults do not result in system errors and/or that system errors do not lead to system failures

Page 27: Critical system

27

Input/output mapping

IeInput set

OeOutput set

Program

Inputs causingerroneous outputs

Erroneousoutputs

Page 28: Critical system

28

Reliability perception

Possibleinputs

User1

User3

User2

Erroneousinputs

Page 29: Critical system

29

Safety

• Safety is a property of a system that reflects the system’s ability to operate, normally or abnormally, without danger of causing human injury or death and without damage to the system’s environment.

• It is increasingly important to consider software safety as more and more devices incorporate software-based control systems

• Safety requirements are exclusive requirements i.e. they exclude undesirable situations rather than specify required system services

Page 30: Critical system

30

• Primary safety-critical systems– Embedded software systems whose failure can cause

the associated hardware to fail and directly threaten people.

.مثل برنامج يتحكم بمخرطة أو منشأة كيماوية–• Secondary safety-critical systems

– Systems whose failure results in faults in other systems which can threaten people

مثل الخطأ في برنامج تصميم–• Discussion here focuses on primary safety-critical systems

– Secondary safety-critical systems can only be considered on a one-off basis

Safety criticality

Page 31: Critical system

31

قد تكون الوثوقية والتاحة. الوثوقية والسلمة مترابطتان•.خاصتين ضروريتين ولكن غير كافيتين للسلمة

ليس النظام الموثوق آمنًا بالضرورة•تنفيذ أمر ضم العجلت قبل القلع في الطائرة سيسبب تدمير(–

)الطائرة...ألعاب الطفال - السيارات –أحيانًا يكون النظام مصممًا بحسب المتطلبات–

Specifications ولكن المستخدم أغفل شروط السلمة.إلى إدخال قيمة خاطئة (HW)قد يؤدي عطب حساس ما –

.للنظام وبالتالي التأثير على نظام السلمة

Safety and Reliability

Page 32: Critical system

32

Safety terminologyTerm Definition

Accident (ormishap)

An unplanned event or sequence of events which results in human death or injury,damage to property or to the environment. A computer-controlled machine injuring itsoperator is an example of an accident.

Hazard A condition with the potential for causing or contributing to an accident. A failure ofthe sensor that detects an obstacle in front of a machine is an example of a hazard.

Damage A measure of the loss resulting from a mishap. Damage can range from many peoplekilled as a result of an accident to minor injury or property damage.

Hazardseverity

An assessment of the worst possible damage that could result from a particularhazard. Hazard severity can range from catastrophic where many people are killed tominor where only minor damage results.

Hazardprobability

The probability of the events occurring which create a hazard. Probability values tendto be arbitrary but range from probable (say 1/100 chance of a hazard occurring) toimplausible (no conceivable situations are likely where the hazard could occur).

Risk This is a measure of the probability that the system will cause an accident. The risk isassessed by considering the hazard probability, the hazard severity and the probabilitythat a hazard will result in an accident.

Page 33: Critical system

33

•Mishap|Accident حدث أوسلسلة أحداث غير مخطط لها تسببمثل اللة التي يتحكم) ضرر بشري أو مادي أو بيئي-موت(مصيبة

.بها برنامج وتسبب ضررًا•Hazard الخلل هو حالةCondition تجعل احتمال الحادث مرتفعًا

).حساس إضاءة الكلية(مثل عطب حساس ما •Damage مقياس للضرر الناتج عن حادث ما.• Hazard Severity تقدير ما ينتج عن الخلل في أسوأ الحالت.• Hazard probabilityاحتمال حدوث ما يؤدي للخلل.•Risk احتمال أن يسبب النظام مصيبة ويتعلق باحتمالت ماسبق.

Page 34: Critical system

34

Safety achievementتحسين السلمة

• Hazard avoidance– The system is designed so that some classes of hazard

simply cannot arise. . تخفيف احتمال قطع اليدةالمنشرة تتطلب ضغط مفتاحين –

• Hazard detection and removal– The system is designed so that hazards are detected

and removed before they result in an accident.يتم تنفيس زيادة الضغط في منشأة كيماوية من خلل صمام–طنجرة الضغط–

• Damage limitation– The system includes protection features that minimise

the damage that may result from an accident

Page 35: Critical system

35

Safety achievementتحسين السلمة

• Damage limitation– The system includes protection features that

minimise the damage that may result from an accident

في حال تحسس الحريق يعمل نظام الطفاء آليًا–.محرك السيارة فولفو يسقط عند حدوث اصطدام–

Page 36: Critical system

36

Normal accidents

تصمم النظمة بحيث تأخذ في الحسبان احتمال حدوث مشكلة دون•حدوث ضرر أو عجز

لكن أكثر المصائب تحدث نتيجة تراكب المشاكل•من المستحيل دراسة إمكانية تراكب الخطاء وبالتالي فمن المستحيل•

الوصول إلى درجة السلمة المطلقة

Page 37: Critical system

37

Security

• The security of a system is a system property that reflects the system’s ability to protect itself from accidental or deliberate external attack

• Security is becoming increasingly important as systems are networked so that external access to the system through the Internet is possible

• Security is an essential pre-requisite for availability, reliability and safety

Page 38: Critical system

38

Fundamental security

• If a system is a networked system and is insecure then statements about its reliability and its safety are unreliable

• These statements depend on the executing system and the developed system being the same. However, intrusion can change the executing system and/or its data

• Therefore, the reliability and safety assurance is no longer valid

Page 39: Critical system

39

Security terminology

Term Definition

Exposure Possible loss or harm in a computing system. This can be loss ordamage to data or can be a loss of time and effort if recovery isnecessary after a security breach.

Vulnerability A weakness in a computer-based system that may be exploited tocause loss or harm.

Attack An exploitation of a system vulnerability. Generally, this is fromoutside the system and is a deliberate attempt to cause some damage.

Threats Circumstances that have potential to cause loss or harm. You canthink of these as a system vulnerability that is subjected to an attack.

Control A protective measure that reduces a system vulnerability. Encryptionwould be an example of a control that reduced a vulnerability of aweak access control system.

Page 40: Critical system

40

Security terminology

• Exposure أذى أو ضياع في النظام المعلوماتي للوقت والمعطياتوالجهد اللزم للصلح

• Vulnerability الهشاشة الموجودة في نظام معتمد على الحاسوبوالتي قد تستغل لحداث أذى

• Attack استغلل الهشاشة عبر محاولة مقصودة لحداث ضرر عادةمن خارج النظام

• Threats ظروف تجعل الضياع أو الذى محتمًل ويمكن أن تعتبرنقاط الضعف التي تتم مهاجمتها

• Control مثًل التشفير يخفف. اجراء وقائي لتخفيض هشاشة النظامالهشاشة المتمثلة في امكانية الوصول للمعلومة

Page 41: Critical system

41

Damage from insecurity

• Denial of service– The system is forced into a state where normal

services are unavailable or where service provision is significantly degraded

• Corruption of programs or data– The programs or data in the system may be

modified in an unauthorised way

• Disclosure of confidential information– Information that is managed by the system may be

exposed to people who are not authorised to read or use that information

Page 42: Critical system

42

Security assurance

• Vulnerability avoidance– The system is designed so that vulnerabilities do

not occur. For example, if there is no external network connection then external attack is impossible

• Attack detection and elimination– The system is designed so that attacks on

vulnerabilities are detected and neutralised before they result in an exposure. For example, virus checkers find and remove viruses before they infect a system

• Exposure limitation– The system is designed so that the adverse

consequences of a successful attack are minimised. For example, a backup policy allows damaged information to be restored