Vakgroep Informatietechnologie – IBCN Software Architecture Prof.Dr.ir. F. Gielen Quality Attributes & Tactics (2) Performance.

Slides:



Advertisements
Similar presentations
Computer Systems & Architecture Lesson 2 4. Achieving Qualities.
Advertisements

CPU Scheduling.
Scheduling in Web Server Clusters CS 260 LECTURE 3 From: IBM Technical Report.
Scheduling Criteria CPU utilization – keep the CPU as busy as possible (from 0% to 100%) Throughput – # of processes that complete their execution per.
CPU Scheduling Tanenbaum Ch 2.4 Silberchatz and Galvin Ch 5.
Multiple Processor Systems
Chapter 5 CPU Scheduling. CPU Scheduling Topics: Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Chapter 6: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Chapter 6: CPU Scheduling Basic.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Chapter 11 Operating Systems
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
Vakgroep Informatietechnologie – IBCN Software Architecture Prof.Dr.ir. F. Gielen Quality Attributes & Tactics (4) Modifiability.
EMBEDDED SOFTWARE Team victorious Team Victorious.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Real-Time Software Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Operating System Concepts and Techniques Lecture 5 Scheduling-1 M. Naghibzadeh Reference M. Naghibzadeh, Operating System Concepts and Techniques, First.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 5: CPU Scheduling.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
Chapter 5: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria.
Middleware Services. Functions of Middleware Encapsulation Protection Concurrent processing Communication Scheduling.
1 11/29/2015 Chapter 6: CPU Scheduling l Basic Concepts l Scheduling Criteria l Scheduling Algorithms l Multiple-Processor Scheduling l Real-Time Scheduling.
Processes CSCI 4534 Chapter 4. Introduction Early computer systems allowed one program to be executed at a time –The program had complete control of the.
1 Real-Time Scheduling. 2Today Operating System task scheduling –Traditional (non-real-time) scheduling –Real-time scheduling.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 5 CPU Scheduling Slide 1 Chapter 5 CPU Scheduling.
6.1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Performance Performance is about time and the software system’s ability to meet timing requirements.
19.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 19: Real-Time Systems.
Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  What Operating Systems Do  Computer-System Organization  Computer-System Architecture  Operating-System Structure.
 Process Concept  Process Scheduling  Operations on Processes  Cooperating Processes  Interprocess Communication  Communication in Client-Server.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Basic Concepts Maximum CPU utilization obtained with multiprogramming
REAL-TIME OPERATING SYSTEMS
Client-Server Communication
Chapter 19: Real-Time Systems
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Applied Operating System Concepts -
Processes Overview: Process Concept Process Scheduling
Real-time Software Design
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Operating Systems CPU Scheduling.
CPU Scheduling G.Anuradha
Module 5: CPU Scheduling
3: CPU Scheduling Basic Concepts Scheduling Criteria
Chapter 2: The Linux System Part 3
Chapter5: CPU Scheduling
TDC 311 Process Scheduling.
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
CPU SCHEDULING.
Multiprocessor and Real-Time Scheduling
Chapter 6: CPU Scheduling
Chapter 5: CPU Scheduling
Chapter 19: Real-Time Systems
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Presentation transcript:

Vakgroep Informatietechnologie – IBCN Software Architecture Prof.Dr.ir. F. Gielen Quality Attributes & Tactics (2) Performance

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 2 Performance How long does it take the system to respond to an event ? Interrupts, messages, user requests The complexity is dictated by: number of events arrival patterns response patterns Arrival patterns: periodic or stochastic sporadic or bursty Performance is about timing.

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 3 Performance Generic Scenario

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 4 Performance scenario generation Source of stimulus: The stimuli arrive either from external (possibly multiple) or internal sources. In our example, the source of the stimulus is a collection of users. Stimulus: The stimuli are the event arrivals Periodic events; Sporadic events; Stochastic events Artifact: The artifact is always the system's services

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 5 Performance scenario generation (2/2) Environment: The system can be in various operational modes, Normal mode Overload mode Response. The system must process the arriving events. This may cause a change in the system environment.

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 6 Performance scenario generation (ctd.) Response measure: The response measures are the time it takes to process the arriving events Latency or a deadline by which the event must be processed Jitter: the variation in processing time Throughput the number of events that can be processed within a particular time interval Miss rate, data loss: a characterization of the events that cannot be processed

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 7 Performance Tactics Tactics to Control Performance Event Arrives Response generated within Time Constraints Response Time =  { Working, Waiting} Resource Contention Resource Availability Computational dependencies Resource Consumption Blocked Time CPU, storage, memory... Designed entities: buffers, critical sections. Processing sequence

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 8 Dispatch Latency

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 9 Resource Consumption: C-S Communication Remote Procedure Calls Remote procedure call (RPC) abstracts procedure calls between processes on networked systems. Stubs – client-side proxy for the actual procedure on the server. The client-side stub locates the server and marshalls the parameters. The server-side stub receives this message, unpacks the marshalled parameters, and peforms the procedure on the server.

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 10 Execution of RPC

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 11 Remote Method Invocation RMI Remote Method Invocation (RMI) is a Java mechanism similar to RPCs. RMI allows a Java program on one machine to invoke a method on a remote object.

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 12 Marshalling Parameters

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 13 Resource Consumption : Processing Sequence Processing sequence of an event: Message generated by one component Placed on network and arrives at another component The event is then placed in an input-buffer The event is transformed in some fashion  e.g. CORBA marshalling The transformed event is then processed by an algorithm The result is then placed in an output-buffer Finally results are sent Each phase contributes to the latency for the event

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 14 Blocked-Time A computation can be blocked because: A resource is unavailable (somebody else has it) The result of a computation is unavailable Contention for resources Single streams of events or multiple streams of events In general more streams  more contention  greater latency This depends on the arbitration mechanism for contention Availability of resources Resource unavailability (as in a crash and being swapped out) contributes to latency Dependency on other computation Dataflow – can’t perform operation till the data is there

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 15 Performance: (Non -) Architectural Aspects The performance of a systems depends on both architectural and non-architecture aspects. Architectural aspects of performance:  Communication between components  Partitioning of functionality  Allocation of resources Non-architectural aspects of performance:  Choice of algorithms  How these algorithms are coded

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 16 Prestaties sorteeralgorithmes:

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 17 Performance Tactics Resource Demand Time between events (demands) How much is consumed per request ? Resource Management Without control on the demand side, the available resources must be managed. Resource Arbitration Resource contention and conflict resolution Scheduling:  Priority based  Pre-emption

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 18 Resource Demand Increase Computational Efficiency  Algorithms  Time/Space trade-off. Reduce Computational Overhead  Eliminate Intermediaries  Modifiability/Performance trade-off. Reduce the number of events

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 19 Reduce events example: optical internet switch Service Layer Intelligent Optical Layer ADM Metro Network

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 20 Internet switch - optical

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 21 System Architecture - hardware TR SCM (primary) Ethernet XP XP SCM (primary) MCM (primary) Alarm Bus Master Controller Ethernet Hub LVDS HDLC & Transport for CORBA Ethernet XP SCM (primary) Ethernet CORBA and Socket Comms LVDS HDLC & Transport for CORBA LVDS CORBA and Raw HDLC Secondary Controller 18 Xcvrs Transceiver Group Primary HDLC Secondary HDLC Every board has at least 1 processor: PPC Everything fully redundant.

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 22 Architectural View: Process Deployment View FMS Manager HIS::Alarm Handler Master Controller FMS Agent UPI FMS Manager HIS::Alarm Handler FMS Agent HIS::Alarm Handler Transceiver Alarm Monitoring SecondaryController

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 23 Reducing Latency by Managing Resource Demand Reduce the number of events. Manage event rate  Over engineered systems – slow down event generation Control frequency of sampling – process events at the rate you can regardless of arrival rate  Possible loss of data (events) Bound Execution times  Place a limit (deadline) on how much computation will be done for an event  This could even be varied based on queue lengths etc. Bound queue sizes

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 24 Resource Management Concurrency  Multitasking and threading.  Load balancing. Maintain multiple copies of data and computations  More buffers, more processes  Client-server: typical TCP concurrent server replicates the server process to deal with requests “in parallel”  Replicas reduce contention: caching  …adds complexity: consistency and synchronisation Increase available resources  Add processors, memory, bandwidth.  Cost/performance trade-off  Google architecture

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 25 Resource Arbitration All resources need to be scheduled  Priority assignment  Dispatching and pre-emption  Applies to processor, network, buffers …. Scheduling policies :  FIFO - First Come/First Served (FCFS)  Fixed-priority: a fixed priority is assigned to each request then higher priority requests are processed first –Deadline monotonic –Rate monotonic (periodic)  Dynamic Priority scheduling –Round robin –Earliest deadline first.

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 26 Java Thread Scheduling JVM Uses a Preemptive, Priority-Based Scheduling Algorithm FIFO Queue is Used if There Are Multiple Threads With the Same Priority

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 27 Java Thread Scheduling (cont) JVM Schedules a Thread to Run When: 1. The Currently Running Thread Exits the Runnable State 2. A Higher Priority Thread Enters the Runnable State * Note – the JVM Does Not Specify Whether Threads are Time-Sliced or Not

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 28 Time-Slicing Since the JVM Doesn’t Ensure Time-Slicing, the yield() Method may Be Used: while (true) { // perform CPU-intensive task... Thread.yield(); } This Yields Control to Another Thread of Equal Priority

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 29 Real-Time Scheduling Hard real-time systems: required to complete a critical task within a guaranteed amount of time Soft real-time computing – requires that critical processes receive priority over less fortunate ones

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 30 Performance Tactics: summary Performance Resource Demand Resource Management Resource Arbitration Response generated within Time Constraints Event Arrives Increase computational efficiency Reduce computational overhead Manage Event Rate Control Frequency of Sampling Introduce concurrency Maintain multiple copies Increase available resources Scheduling policies