1_Intro_to_System_Software_Engineering

deliberate design and construction of software that runs or controls systems. Methods for components of system can communicate Inter-Process Communication Methods for coordination of actions Inter-thread/Inter-process Synchronization Tools and methodologies for designing, communicating those designs, and testing Unified Modelling Language, Testing Frameworks
展开查看详情

1.CPEN 333: System Software Engineering Instructor: C. Antonio Sánchez Room: FSC 1221 © Paul Davies, C. Antonio Sanchez. Not to be copied, used, or revised without explicit written permission from the copyright owner.

2.Intro to System Software Engineering System: 2 whole compounded of several parts or members parts are distinct “enough” to be considered separate a common purpose or unified task

3.Intro to System Software Engineering Software: 3 computer instructions non-executable data the programs and other operating information used by a computer.

4.Intro to System Software Engineering System Software: 4 software that runs or controls systems System Software Application Software Software System Software: system-centered runs in background, controls things “fairly” autonomously interaction is not main use-case Application Software: user-centered runs in foreground initiated by user performs specific task directly for user

5.Intro to System Software Engineering Engineering: 5 the use of knowledge in order to purposefully design , develop and build a product CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=29211 By Wa17gs - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=37122129 http://www.salford.ac.uk/news/articles/2017/software-spin-out-in-global-growth-deal

6.Intro to System Software Engineering Engineering: 6 the use of knowledge in order to purposefully design , develop and build a product http://www.salford.ac.uk/news/articles/2017/software-spin-out-in-global-growth-deal requires planning specific tools and methodologies important for large and real-world systems critical systems need to be proven on paper

7.Intro to System Software Engineering System Software Engineering: 7 deliberate design and construction of software that runs or controls systems. Methods for components of system can communicate Inter-Process Communication Methods for coordination of actions Inter-thread/Inter-process Synchronization Tools and methodologies for designing, communicating those designs, and testing Unified Modelling Language, Testing Frameworks

8.Intro to System Software Engineering 8 CPEN 333: System Software Engineering Website(s): https://piazza.com https://cpen333.github.io Textbooks: A. Tanenbaum Silberchatz, Galvin, Gagne Roger Pressman Anthony Williams (optional)

9.Intro to System Software Engineering 9 Labs: There is a 2 hour lab session every week (starting next week), with a TA present to give assistance and/or advice 6 labs will include lab activities , which will be graded lab activities are due by the end of the following lab session (i.e. in one week) labs are graded during the lab session, so be sure to show the TA and be prepared to answer questions labs are to be completed individually You will need an ECE account ( https://help.ece.ubc.ca/How_To_Get_An_Account ) You need an electronic FOB to gain access to the labs (i.e. your student card)

10.Intro to System Software Engineering 10 Project: Will involve: system design document, and working implementation of a small-ish simulated system software tool. will be due during the last week of class can be completed individually or in pairs option between provided system or a custom one of your choosing more details to come around week 4 or 5

11.Intro to System Software Engineering 11 Midterm: Will be mainly hands-on programming (either in lab or at-home), and will cover most of the technical content. open-book, internet allowed will be purposefully tough will occur around week 8 or 9

12.Intro to System Software Engineering 12 Final: Will be traditional, during regular exam period, and will cover both technical content, and `soft’ content. closed-book, no internet allowed will be purposefully straight-forward short essay-type questions most questions will come directly from in-class discussions or learning objectives

13.Intro to System Software Engineering 13 Course Library and Examples: GitHub: https://github.com/cpen333/library Warning: the library is a work-in-progress, should be okay for most lab and project purposes. Should be sufficiently cross-platform to run on Mac/Linux/Windows. Could use a lot more testing. Compilation and usage instructions in README.md

14.Intro to System Software Engineering 14 Lecture 1: Introduction to System Software Engineering Learning Goals Define a  system ,  system software , and  system software engineering Distinguish between  hard  and  soft  time constraints Distinguish between  event-driven  and  time-driven  systems, and give examples Describe the difference between  interrupts  and  polling  for detecting and handling events List advantages and disadvantages of both interrupts and polling Discuss why testing real-time systems can be challenging

15.Intro to System Software Engineering What is a real-time system? By Raysonho @ Open Grid Scheduler / Grid Engine - Own work, CC0, https://commons.wikimedia.org/w/index.php?curid=39098282 http://ethw.org/Tracking_the_Ice_Hockey_Puck_-_FoxTrax_(Glow_Puck) https://www.tesla.com/en_CA/autopilot www.theweathernetwork.com 15

16.Intro to System Software Engineering 16 What is a real-time system? There is no widely accepted single definition  A real-time system is generally a controlling system , often embedded into equipment so that its existence is not obvious. It takes in information from its environment, processes it and generates a response . A real-time system reacts , responds , and alters its actions to affect the environment in which it is placed.

17.Intro to System Software Engineering 17 What is a real-time system? A real-time system implies that there is something significant and important about its response time . A real-time system has a guaranteed , deterministic worst-case response time to an event under its control. A real-time system is one where the correct answer at the wrong time is the wrong answer.

18.Intro to System Software Engineering 18 What is a real-time system? credit: the Times UK Real-Time limit: 15 ms

19.Intro to System Software Engineering 19 What is a real-time system? Real-Time limit: 200 ms https://www.macrumors.com/2017/07/31/apple-denied-dismissal-facetime-ios-6-lawsuit/

20.Intro to System Software Engineering 20 What is a real-time system? Conclusion: depends on application context . By C2RMF: Galerie de tableaux en très haute définition: image page - Cropped and relevelled from File:Mona Lisa, by Leonardo da Vinci, from C2RMF.jpg. Originally C2RMF: Galerie de tableaux en très haute définition: image page, Public Domain, https://commons.wikimedia.org/w/index.php?curid=15442524 Real-Time limit: ?

21.Intro to System Software Engineering 21 Real-time classification : Hard vs Soft Hard Real Time Systems Have “hard” deadlines (i.e. are time-critical ) Failure to satisfy worst-case response time leads to system failure Specs will mention maximum response time , and effects of failure Examples: Pace-makers, ABS brakes, auto-pilot, games

22.Intro to System Software Engineering 22 Real-time classification : Hard vs Soft Soft Real Time Systems Have “soft” deadlines (i.e. are not time-critical) Failure to satisfy deadlines leads to system degredation Specs will mention average response time , and measures of degredation Examples: Elevators, cruise control, ATMs, thermostats

23.Intro to System Software Engineering 23 Real-time classification : Hard vs Soft

24.Intro to System Software Engineering 23 Real-time classification : Hard vs Soft

25.Intro to System Software Engineering 25 Real-time classification : Event vs Time Event-Driven Systems Events can generally be detected in one of two ways: a switch or button that generates an interrupt signal a sensor that responds to status enquiries , which can be polled by a controlling process

26.Intro to System Software Engineering 26 Event-Driven Systems: Interrupts An interrupt signal tells the CPU there is an important event The CPU… suspends its current thread of execution saves the current state calls an interrupt handler or interrupt service routine loads previous state and resumes original thread

27.Intro to System Software Engineering 27 Event-Driven Systems: Interrupts Advantages of interrupts: system is notified immediately of event, so can be handled immediately deterministic response times interrupts can be prioritized response time is independent of number of sensors Disadvantages of interrupts: complex hardware is needed (sensors, system-level handlers for ISRs, etc) difficult to test and debug interrupts are unpredictable, ISR and main code run asynchronously

28.Intro to System Software Engineering 28 http://davidorlo.com/articles/arduino/arduino-%E2%80%93-interrupt-tutorial-with-led-switch Event-Driven Systems: Interrupts

29.Intro to System Software Engineering 29 Event-Driven Systems: Polling The main program continuously probes the sensors to check their status More choice in handling: can handle in main thread , or to launch a separate asynchronous thread Is button0 pressed? Is button1 pressed? Is button2 pressed? Handle button0 event Handle button1 event Handle button2 event yes no …