{"id":66,"date":"2025-12-30T22:55:20","date_gmt":"2025-12-31T06:55:20","guid":{"rendered":"https:\/\/grumpyoldengineer.com\/?p=66"},"modified":"2026-09-24T11:49:01","modified_gmt":"2026-09-24T19:49:01","slug":"architectural-risk-segregation-doesnt-need-to-be-difficult-iec-62304","status":"publish","type":"post","link":"https:\/\/grumpyoldengineer.com\/?p=66","title":{"rendered":"Architectural risk segregation (IEC 62304)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Software segregation is one of those architectural concepts everyone claims to understand until you ask them to actually do it.  In theory it\u2019s simple, prevent a failure in one part of the system from dragging the rest of the system into the abyss.  In practice, many teams treat segregation like a decorative sticker they slap onto a PowerPoint right before an audit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This discussion focuses on medical software under IEC 62304, because nothing sharpens architectural thinking quite like the possibility of harming a patient or failing an audit so catastrophically it becomes a cautionary tale.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While there are numerous ways to go about segregating risk in an architectural fashion, I put forth a stripped-down method which should be straight forward enough and practical for the general audience.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And yes, you cannot perform risk segregation without a documented architecture. Trying to do software risk segregation without architecture is like trying to perform surgery with a spoon and fork.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Terminology<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s start with terminology, because IEC 62304 loves its taxonomy almost as much as organizations love misusing it<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"449\" height=\"216\" src=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-5.png\" alt=\"\" class=\"wp-image-69\" srcset=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-5.png 449w, https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-5-300x144.png 300w\" sizes=\"auto, (max-width: 449px) 100vw, 449px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Everything is a software item.  The top\u2011level item is the software system, and the leaf is the software unit.  This is an important concept to understand as IEC 62304 defines requirements based on these terms.  If a requirement says \u201csoftware item&#8221;, then the requirement applies to all elements.  Other domains use similar hierarchies (CSCI, CSC, CSU), but the point is the same, you need to know what you\u2019re classifying before you start classifying it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Method<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1) Identify all hazardous sequences per risk analysis<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This assumes you actually conducted a risk analysis and didn\u2019t just recycle last year\u2019s spreadsheet.  Each risk has severity, occurrence, and criticality, which map to safety classes.  The important part is the sequence of events, the chain that leads to harm.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2) Identify all design threads for each hazardous sequence<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This requires architecture and design to exist in more than tribal memory. Behavioral diagrams, structural diagrams, logical views, process views.  Whatever your methodology, you need something concrete as you&#8217;ll need to mark the interface as you trace each hazardous sequence through the design.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example here uses sequence diagram showing the behavioral relationship and a component diagram showing the interfaces provided by each SW Item.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"691\" height=\"265\" src=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/12\/image-6.png\" alt=\"\" class=\"wp-image-185\" srcset=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/12\/image-6.png 691w, https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/12\/image-6-300x115.png 300w\" sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Start by marking all interfaces with safety classification of Class A as shown below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"341\" height=\"109\" src=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-11.png\" alt=\"\" class=\"wp-image-89\" srcset=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-11.png 341w, https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-11-300x96.png 300w\" sizes=\"auto, (max-width: 341px) 100vw, 341px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">This is now your baseline before reality ruins your optimism.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3) Assess each design and apply the safety classification to interfaces<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Walk through each behavioral diagram and identify invocations that contribute to the hazardous sequence.  Mark the interface with the corresponding safety class (A, B, or C).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"583\" height=\"226\" src=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/12\/image-8.png\" alt=\"\" class=\"wp-image-187\" srcset=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/12\/image-8.png 583w, https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/12\/image-8-300x116.png 300w\" sizes=\"auto, (max-width: 583px) 100vw, 583px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">As we iterate through each risk item, overwrite the lower one with the higher safety class.  This is not a negotiation. By the end, every relevant interface should be marked.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once this activity is conducted for all hazard risks, we should end up with a safety class marking on all applicable interfaces as illustrated below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"337\" height=\"254\" src=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-13.png\" alt=\"\" class=\"wp-image-91\" srcset=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-13.png 337w, https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-13-300x226.png 300w\" sizes=\"auto, (max-width: 337px) 100vw, 337px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">I would like to point out that we&#8217;re assigning the safety class on the interface rather than the software item itself.  This is to provide the architectural flexibility in composing the system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The granularity classification can be on the interface or on the operation. This is for the team to decide based on how architecture\/design is conducted.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"721\" height=\"174\" src=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/12\/image-9.png\" alt=\"\" class=\"wp-image-188\" srcset=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/12\/image-9.png 721w, https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/12\/image-9-300x72.png 300w\" sizes=\"auto, (max-width: 721px) 100vw, 721px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">For example, if we want to split or combine a software item for risk segregation purposes, it&#8217;s a lot easier to have the safety class retained on the interface for composability purpose.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4) Apply the highest safety classification to the SW Item<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now propagate the highest interface safety classification to the software item providing that interface.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"816\" height=\"294\" src=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-14.png\" alt=\"\" class=\"wp-image-92\" srcset=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-14.png 816w, https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-14-300x108.png 300w, https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-14-768x277.png 768w\" sizes=\"auto, (max-width: 816px) 100vw, 816px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">We now have safety classifications on each software item and able to create a breakdown structure as illustrated below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"336\" height=\"155\" src=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-15.png\" alt=\"\" class=\"wp-image-93\" srcset=\"https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-15.png 336w, https:\/\/grumpyoldengineer.com\/wp-content\/uploads\/2025\/11\/image-15-300x138.png 300w\" sizes=\"auto, (max-width: 336px) 100vw, 336px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Steps 1-4 are recursive and can be applied to lower-level software item if the software system has multiple layers.  The same method can be used for FMEA when hazard contributing scenarios are identified and new risks are generated.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Closing thoughts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Software risk segregation is <em>not<\/em> an activity the software team can &#8220;just do&#8221; at the end of development. It relies on existing software architecture\/design that is built up over the course of project execution.  It is an iterative process as risks are identified and mitigated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Risk segregation is all about architectural justification. It&#8217;s not about writing one or two bullshit sentences to justify why it&#8217;s a certain safety class and &#8220;handwaving&#8221; in front of auditors.  Remember, risk segregation is ultimately to ensure patient safety.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Per IEC 62304, safety classification is tied to the required deliverables and activities (e.g., class A does not require design or unit verification deliverables). This is why some organizations desperately try to classify everything as Class A, fewer deliverables, less work, more denial. This behavior is dangerous, lazy and unprofessional. My advice is if you don&#8217;t know how to conduct risk segregation, then find somebody who can, and get out of their way.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Risk segregation requires a mature organization and people who actually understand architecture and design, it&#8217;s not a creative writing prompt.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If your organization has no idea what it\u2019s doing, the safest option might be to classify everything as <strong>Class C <\/strong>and verify the hell out of it. At least then you\u2019re being consistently cautious instead of inventing bullshit rationales to justify lowering safety classes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Half\u2011assing safety classification doesn\u2019t make your system safer.  It just makes your audit more interesting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Software segregation is one of those architectural concepts everyone claims to understand until you ask them to actually do it. In theory it\u2019s simple, prevent a failure in one part of the system from dragging the rest of the system into the abyss. In practice, many teams treat segregation like a decorative sticker they slap [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-66","post","type-post","status-publish","format-standard","hentry","category-architecture"],"_links":{"self":[{"href":"https:\/\/grumpyoldengineer.com\/index.php?rest_route=\/wp\/v2\/posts\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/grumpyoldengineer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/grumpyoldengineer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/grumpyoldengineer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grumpyoldengineer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=66"}],"version-history":[{"count":5,"href":"https:\/\/grumpyoldengineer.com\/index.php?rest_route=\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":265,"href":"https:\/\/grumpyoldengineer.com\/index.php?rest_route=\/wp\/v2\/posts\/66\/revisions\/265"}],"wp:attachment":[{"href":"https:\/\/grumpyoldengineer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grumpyoldengineer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grumpyoldengineer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}