CS 552 Spring 2006 Architecture1 Architecture part 1 CS 552 Spring ‘06.

Slides:



Advertisements
Similar presentations
Advanced Operating Systems
Advertisements

Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
System Integration and Performance
CS3771 Today: deadlock detection and election algorithms  Previous class Event ordering in distributed systems Various approaches for Mutual Exclusion.
Concurrency: Deadlock and Starvation Chapter 6. Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate.
Lecture 6 :Deadlocks. Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate with each other Involves.
Concurrency: Deadlock and Starvation Chapter 6. Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate.
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
Concurrency: Deadlock and Starvation Chapter 6. Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate.
Deadlocks Today Resources & deadlocks Dealing with deadlocks Other issues Next Time Memory management.
Deadlocks, Message Passing Brief refresh from last week Tore Larsen Oct
Chapter 6 Concurrency: Deadlock and Starvation
Ceng Operating Systems Chapter 2.4 : Deadlocks Process concept  Process scheduling  Interprocess communication  Deadlocks Threads.
Chapter 3 Deadlocks TOPICS Resource Deadlocks The ostrich algorithm
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance.
Chapter 3 Deadlocks - Αδιέξοδα 3.1. Resource
With slides from C. Griwodz, K. Li, A. Tanenbaum and M. van Steen
Avishai Wool lecture Introduction to Systems Programming Lecture 5 Deadlocks.
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
Deadlock CSCI 444/544 Operating Systems Fall 2008.
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
Inter Process Communication:  It is an essential aspect of process management. By allowing processes to communicate with each other: 1.We can synchronize.
1 Concurrency: Deadlock and Starvation Chapter 6.
PRASHANTHI NARAYAN NETTEM.
Deadlocks in Distributed Systems Deadlocks in distributed systems are similar to deadlocks in single processor systems, only worse. –They are harder to.
Distributed Deadlocks and Transaction Recovery.
1 Concurrency: Deadlock and Starvation Chapter 6.
1 Processes, Threads, Race Conditions & Deadlocks Operating Systems Review.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
1 Announcements The fixing the bug part of Lab 4’s assignment 2 is now considered extra credit. Comments for the code should be on the parts you wrote.
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance.
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance 3.6. Deadlock prevention.
1 Deadlocks 2 Resources Examples of computer resources –printers –tape drives –tables Processes need access to resources in reasonable order Suppose.
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance.
1 Deadlocks Chapter 3. 2 Resources Examples of computer resources –printers –tape drives –tables Processes need access to resources in reasonable order.
Operating Systems 软件学院 高海昌 Operating Systems Gao Haichang, Software School, Xidian University 22 Contents  1. Introduction** 
1 Deadlocks Chapter Resource 3.2. Introduction to deadlocks 3.3. The ostrich algorithm 3.4. Deadlock detection and recovery 3.5. Deadlock avoidance.
2001 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 4.
1 MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 6 Deadlocks Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc.
Deadlock Detection and Recovery
CCR Deadlock By: Laura Weiland April 30, Project Description Implement a module to the Train Operating System (TOS) that manages the deadlock problem.
CIS Operating Systems Deadlock Professor Qiang Zeng Fall 2015.
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
- Manvitha Potluri. Client-Server Communication It can be performed in two ways 1. Client-server communication using TCP 2. Client-server communication.
Deadlock Operating Systems: Internals and Design Principles.
CS333 Intro to Operating Systems Jonathan Walpole.
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings.
Operating Systems COMP 4850/CISG 5550 Deadlocks Dr. James Money.
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
COP 4600 Operating Systems Fall 2010 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:30-4:30 PM.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
Mutual Exclusion -- Addendum. Mutual Exclusion in Critical Sections.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Sistem Operasi IKH311 Deadlock. 2 Resources Examples of computer resources printers tape drives tables Processes need access to resources in reasonable.
Process Management Deadlocks.
Topics Covered What is Real Time Operating System (RTOS)
Chapter 2: System Structures
ITEC 202 Operating Systems
Chapter 7 Deadlock.
Outline Announcements Fault Tolerance.
Distributed Systems Major Design Issues
COT 5611 Operating Systems Design Principles Spring 2014
Threading And Parallel Programming Constructs
Review: Readers-Writers Problem
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
Introduction to Deadlocks
Chapter 3 Deadlocks 3.1. Resource 3.2. Introduction to deadlocks
Chapter 6 – Distributed Processing and File Systems
Presentation transcript:

CS 552 Spring 2006 Architecture1 Architecture part 1 CS 552 Spring ‘06

CS 552 Spring 2006 Architecture2 Software Architecture Conceptually

CS 552 Spring 2006 Architecture3 Perspective 1960’s: Safeguard’s “On-Interrupt” Code 1970’s: Store and Forward Recovery Subsystem 1980’s: Congestion Management 1990’s: Distributed Computing 2000’s: Web Based Applications State-of-the-Practice: Scenario Testing State-of-the-Art: Software Fault Tolerance

CS 552 Spring 2006 Architecture4 REQUIREMENTS SPECIFICATIONS ALGORITHMS TRAFFIC PROJECTIONS FEATURE ENGINEERING ARCHITECTURE ENGINEERING TRAFFIC ENGINEERING PERFORMANCE ENGINNERING REPORTS SUPPORT AND OPERATIONS - COMPUTER CENTER - DEVELOPMENT MACHINE - TEST MACHINE SOFTWARE DEVELOPMENT HUMAN FACTORS DEVELOPMENT SOFTWARE MANUFACTURING INTEGRATION TO SITES

CS 552 Spring 2006 Architecture5

6 Kruchten’s “4 + 1”Model for Developing Software Architecture + 1 Use Cases + 1 Business Scenario + View 1 Logical -- End Users View 2 Process -- System Integrators View 3 Physical -- Engineers View 4 Development -- Programmers This is an innovative and comprehensive integration of the abstractions needed for software system design

CS 552 Spring 2006 Architecture7 Software Engineering Tailored OO Application Software Reusable Software Vendor Software User Programs Client Personal Computer Client Workstation Application Server Large Data Server

CS 552 Spring 2006 Architecture8 Mars Rovers: Spirit and Opportunity

CS 552 Spring 2006 Architecture9 Search for traces of water on Mars. Two identical rovers: Spirit & Opportunity Sent to opposite sides of the planet Spirit was launched on June 10, 2003 and landed on January 3, 2004 Opportunity launched July 7, 2003, and landed on January 24, 2004

CS 552 Spring 2006 Architecture10 The Problem Timeline June 10, ’03 – Spirit launched January 3, ‘04 – Spirit rover lands January 21, ‘04 –Spirit acknowledges communications, but sends no data. First sign of problems January 23, ’04 – Spirit stops responding to requests.

CS 552 Spring 2006 Architecture11 More Timeline January 23, ’04 – Spirit sends 73Mb of ‘debug’ information January 29, ’04 – Engineers find way to communicate with Spirit Febuary 1, ’04 – Spirit restored

CS 552 Spring 2006 Architecture12 What Went Wrong? Thousands of extra files present in the rover’s memory Files left over from the 7-month flight Onboard software was having trouble managing the files Rover began to reset itself every hour

CS 552 Spring 2006 Architecture13 The Cause Files flooded the onboard flash memory System was not programmed to handle the thousands of files generated during the 7-month flight Case of ‘ thousands of files’ unspecified and untested.

CS 552 Spring 2006 Architecture14 The Cure Remove the thousands of extra files Reformat the flash memory and start from a clean slate

CS 552 Spring 2006 Architecture15 Loss Mission lost almost 10 days of data collection When Spirit was fixed, the same fix was applied to Opportunity before it became a problem.

CS 552 Spring 2006 Architecture16 Software Engineering Lessons Check past assumed boundaries –If the system is only supposed to handle a few hundred files, test it an order of magnitude larger. Allow for remote debugging Watchdog timers are good Beware of Deadlocks

CS 552 Spring 2006 Architecture17 Sensors Computer Antenna Shared Bus Physical View

CS 552 Spring 2006 Architecture18 Development View Source Code Modules Add Debug Traces Complier Loader Executables

CS 552 Spring 2006 Architecture19 Task 1 Reboot Task 2 Gather data -Camera Control -Filter and Compress… Task 3 Send images - Transmitter/Receiver Control - ARQ for Image Files Logical View

CS 552 Spring 2006 Architecture20 Task CPU Bus Time Conflict Deadlock Process View

CS 552 Spring 2006 Architecture21 Deadlocks occur when Processes are granted exclusive access to devices Processes may have multiple copies

CS 552 Spring 2006 Architecture22 Priorities Should Be Task 1 Reboot Task 3 Send images Task 2 Gather data

CS 552 Spring 2006 Architecture23 There was a mismatch between priorities set in: The extended machine The software application The software that controls the bus

CS 552 Spring 2006 Architecture24 Design Steps Object Oriented Modules CRC Design: –C: Class Name –R: Responsibility –C: Collaboration Refactor & Minimize Classes –Inheritance less than 3 Honor Component Constraints

CS 552 Spring 2006 Architecture25 Parnas Modules hide their design decisions form all other modules. Interface technology reveals ‘nothing’ about the inner workings of the module. Components: –Reliable Modules –Single Entry and Exit points. –Normalized data at interfaces.

CS 552 Spring 2006 Architecture26 Interfaces N A Contractor Mgt Heath Check

CS 552 Spring 2006 Architecture27 N A Contractor Mgt Heath Check Security Check

CS 552 Spring 2006 Architecture28 N A Contractor Mgt Heath Check Security Check S

CS 552 Spring 2006 Architecture29 Name = N Age = A, integer Contractor Mgt Heath Check Security Check Sex = M/F Tag = Value Interface Encapsulation Class

CS 552 Spring 2006 Architecture30 Atomicity:Two-Phase Commit Middleware lock records for update Phase One –process tries to lock all records it needs, one at a time –if needed record found locked, start over –(no real work done in phase one) If phase one succeeds, it starts second phase, –performing updates –releasing locks

CS 552 Spring 2006 Architecture31 Case Study: Buffer Failure Analysis Latent Fault in Buffer Flow Control. Software does not return ‘buffer full’ signal. Messages written to full buffers. Messages accepted and partially dropped. Application waits for complete message.

CS 552 Spring 2006 Architecture32 Case Study: Solution Fix the bug by returning appropriate indicator, or Re-launch message handler and avoid the problem: When buffers are half full. Periodically (rejuvenation) When a hang is detected.

CS 552 Spring 2006 Architecture33 Resources Get Resource requires 1.request the resource 2.use the resource 3.release the resource Must wait if request is denied –requesting process may be blocked –may fail with error code

CS 552 Spring 2006 Architecture34 Definition of Deadlock P rocesses are deadlocked when every process waits for an event that only another process in the set can cause One thread, no interrupts None of the processes can … –run –release resources –be awakened

CS 552 Spring 2006 Architecture35 Four Conditions for Deadlock 1. Mutual exclusion condition each resource assigned to 1 process or is available 2. Hold and wait condition process holding resources can request additional 3. No preemption condition previously granted resources cannot forcibly taken away 4. Circular wait condition must be a circular chain of 2 or more processes each is waiting for resource held by next member of the chain