Threads. They are peers in the same process. Motivation for threads. What is a thread? Fork is expensive.
|
|
- Nigel Stone
- 6 years ago
- Views:
Transcription
1 1 2 Threads They are peers i the same process. What is a thread? A thread is a executio stream withi a process with its ow stack, local variables, ad program couter. There may be more tha oe executio stream i a process. A multi-threaded process ca perform several tasks cocurretly. A thread shares resources with other threads executig i the same address space. All threads executig i the same process address space are called siblig threads. No paret/child relatioship betwee the creator thread ad the createe thread. A thread ca create as may threads as it pleases. But there is o relatioship amog them after creatio. Motivatio for threads Fork is expesive. IPC is required for data exchage betwee paret ad child. A thread is lightweight. Thread creatio is about times faster tha process creatio. Thread resources All threads withi a process share: Text segmet Data segmet Heap Ope files Sigal hadlers Curret workig directory UID ad GID 3 4 However, each thread has its ow (kow as thread-private) TID Set of registers, icludig program couter ad stack poiter Stack (for local variables ad retur addresses) erro variable Sigal mask Priority A thread also has its thread-specific data (TSD). Data structures depedig o applicatios. Thread implemetatios Threads may be implemeted as a kerel-level abstractio (kerel-supported threads), user-level abstractio, or a combiatio of the two. Kerel-supported threads require kerel data structures. The OS is aware of each thread. Kerel threads are required to support user-level threads. The kerel must cotai system-level code for each specified thread fuctio. This approach is good for supportig parallelism with multiple threads ruig o multiple processors. A user-level abstractio is represeted by data structures withi a process ow address space. Does ot require direct support from the OS. It rus o top of the OS ad is trasparet to it. The OS maitais a rutime system to maage thread activities. Has the potetial to execute oly whe associated with a kerel process. User-level threads are multiplexed oto a kerel process for executio.
2 I geeral, user-levels threads are desiged to share resources with other threads withi their ow process space ruig o a sigle processor. The combied model offer both multiplexed ad boud user-level threads. A user-level thread is boud (oe-to-oe mappig) to a kerel thread. A kerel thread is also kow as a lightweight process (LWP). 5 However, it does provide for both multiplexed ad boud threads. The relatios betwee user-level threads ad kerel LWPs may be: 1-to-1 M-to-1 (May-to-Oe) M-to-N (May-to-May) Both implemetatios ca support exactly the same APIs. 6 LWPs are also called virtual processors by some authors. Differet UNIX systems may have their ow implemetatio of threads. Or, multiple user-level threads are multiplexed oto a kerel LWP(s). The umber of kerel LWPs available for the multiplexed user threads may be either implemetatio-depedet, or tuable by the applicatio. The UNIX Threads Iterface does ot defie the implemetatio. POSIX threads are portable amog UNIX systems that are POSIX-compliat. It is kow as IEEE c AKA Pthreads Other major threads implemetatios (ot a complete list): Wi32 Threads 7 8 OS/2 Threads DCE Threads Solaris Threads Thread operatios Thread creatio A thread is created by aother thread. Oce a thread is created, it has its ow set of attributes. Either give by the iitiatig thread or system default. has its ow executio stack. iherits its sigal mask ad schedulig priority from the callig thread. does ot iherit ay pedig sigals. does ot iherit ay TSD data. it pthread_create() Thread executio Threads of a process execute i a sigle UNIX process eviromet. All resources available i this eviromet are shared by the siblig threads ad oe or more thread executio eviromets. A thread executio eviromet cotais the schedulig policy, priority, ad the dispositio of sigals for a thread. I terms of executio, a process has oe or more kerel LWPs that provide the executio vehicle for the threads. The threads of a process are either multiplexed oto a available kerel LWP, or are boud (mapped oe-to-oe) to a specific LWP for executio. I case a kerel call blocks, the correspodig user level thread(s) also blocks.
3 9 10 Thread termiatio A thread termiates whe either its executio reaches the last statemet i the thread, is sigaled to quit or it exits volutarily (a call to pthread_exit()). Whe a thread exits, ormally a siblig ca request the exit status of the termiated thread. However, all threads termiate if oe thread calls exit(), or executio falls off the bottom of mai(). Use pthread_exit() i mai() to avoid premature termiatio of the program. A UNIX process will termiate whe its last thread exits. void pthread_exit() it pthread_cacel() Thread maagemet A thread ca be either detached or odetached. A detached thread will clea up after itself upo termiatio. Resources to retur for reuse iclude its thread structure, TSD array, stack, ad heap. A odetached thread will clea up after itself oly after it has bee joied. Nodetached threads are the default. it pthread_joi() it pthread_detach() Thread sychroizatio Mutual exclusio locks A mutual exclusio (mutex) lock idicates that the use of a shared resource is mutually exclusive betwee competig threads. To use a resource, a thread must first lock the mutex guardig the resource. Whe the use is complete, the thread must ulock the mutex, thereby permittig other threads to use the resource. The sectio of code maipulatig the shared resource is ofte referred to as a critical sectio. The itegrity of the shared resource is esured oly if all threads usig the resource follow the lock-ulock covetio. Coditio variables A coveiet mechaism to otify iterested threads of a evet. How it works: 11 A thread obtais a mutex (a coditio variable always has a associated mutex) ad evaluates the coditio uder the mutex s protectio. If the coditio is true, the thread completes its task, releasig the mutex whe appropriate. If the coditio is false, the mutex is released by the system ad the thread goes to sleep o the coditio variable. Whe the value of the coditio variable is chaged by aother thread, it ca wake up the thread(s) sleepig o the variable. The awakeed thread will reevaluate the coditio variable agai. A typical example of usig a coditio variable would be for a thread to susped its executio util a message is received. it pthread_mutexattr_iit() it pthread_mutexattr_setpshared() 12
4 13 14 it pthread_mutex_iit() it pthread_mutex_lock() it pthread_mutex_ulock() it pthread_mutex_trylock() it pthread_mutex_destroy() Barriers A mechaism for a set of threads to syc up. A barrier is iitialized to the umber of threads to be usig it. Whe a thread reaches it, its executio is suspeded util all of the participatig threads arrive at the barrier. At this poit, all threads are permitted to resume executio. A barrier provides a redezvous poit for threads cooperatig i the barrier. Thread schedulig Commo schedulig policies: First-come-first-serve Shortest-job first Priority-based Roud-robi Global ad local schedulig If a thread is boud (oe-to-oe with a LWP), its schedulig is determied by the kerel schedulig algorithms. It is kow as global schedulig. Its schedulig class is said to have a System Cotetio Scope. If a thread is uboud, the thread library has full cotrol which thread will be scheduled o a LWP. It is kow as local schedulig. It is said to have a Process Cotetio Scope. Schedulig of threads ivolves three factors: Cotetio scope Schedulig policy Thread priority *Note: Most thread implemetatios today use a priority-based, preemptive (a thread ca be removed by a thread of higher priority), otime slicig algorithm to schedule thread activities. It is also recommeded that you, as a programmer, to sped little time thikig about issues of thread schedulig. void pthread_setschedparam() void pthread_getschedparam() TSD maipulatio TSD provides a mechaism of hadlig global data i a thread. TSD is globally accessible to all fuctios i a thread but still uique to the thread. A TSD value is refereced usig a thread specific poiter ad a associated key. 15 To make use of TSD, a thread must create ad bid (associate) the key with the TSD data. The TSD keys i a thread are global to all fuctios i the thread. Also, data storage for TSD eeds to be explicitly allocated i the thread. A destructor fuctio for cleaup ca be specified at the time of creatig a TSD key. However, the curret implemetatio still requires the destructor be ivoked explicitly. To esure data itegrity, mutual exclusio is desired for accessig TSD. Primitives: pthread_key_create() pthread_key_delete() pthread_getspecific() pthread_setspecific() 16
5 17 18 Thread erro hadlig I geeral, pthread fuctios do ot set the stadard UNIX erro variable. Whe a error occurs, the erro value is the retur value of the fuctio. O may eed to use a variable to save the retur value. Therefore, each thread has, i effect, its ow erro variable. Thread attributes Attributes defied ad their values: cotetioscope PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_SYSTEM detachstate PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_DETACHED stackaddr NULL (valid address) stacksize NULL (withi system limits) priority *Note: The data type for thread priorities is it sched_priority. It is defied i the sched_param structure foud i the header file <sched.h>. However, POSIX gives o advice o how to use the priority levels provided. policy SCHED_OTHER SCHED_FIFO SCHED_RR iheritsched PTHREAD_EXPLICIT_SCHED Gettig/Settig attributes it pthread_attr_iit() it pthread_attr_getscope() it pthread_attr_setscope() it pthread_attr_getdetachstate() it pthread_attr_setdetachstate() it pthread_attr_getstackaddr() it pthread_attr_setstackaddr() it pthread_attr_getstacksize() it pthread_attr_setstacksize() it pthread_attr_getschedparam() it pthread_attr_setschedparam() it pthread_attr_getschedpolicy() it pthread_attr_setschedpolicy() it pthread_attr_getiheritsched() it pthread_attr_setiheritsched() Sigal hadlig i threads Two types of sigals i threads Sychroous: Sigals delivered to the thread that geerated the exceptio. Ex: SIGFPE (divide by zero) Asychroous: Sigals delivered to a ospecific or o-offedig thread. Ex: SIGHUP (hag up) Differet uses of sigals Three applicatios Error reportig Situatio reportig Iterruptio Methods of hadlig sigals These 3 differet situatios are mixed together i sigle threaded processes, ad hadled idifferetly. I multithreaded programmig, the distictios become importat. They are hadled differetly. Oly oe set of sigal hadlers per process No thread-specific sigal hadlers. However, each thread ca have its ow sigal mask. I terms of sigal delivery
6 For error reportig, the thread library guaratees that a sigal will be delivered to the offedig thread. For situatio reportig, the thread library decides which thread should receive a specific sigal ad arrages for the executio of the associated sigal hadler. 21 For iterruptio, there is o geeral method of esurig that a sigal gets delivered to the iteded thread. A dirty fix, mask out the sigal o all but oe thread. Ratioale of havig oe set of sigal hadlers for all threads i a process Sigals are used for asychroous evets. However, multithreadig is itself asychroous eough. A multithreaded program ca simply spaw a ew thread to wait for a evet of iterest. Therefore, to hadle sigals effectively i threads, a programmer, Needs to be cocered of the most is probably the thread sigal mask. Employs a simple solutio by desigatig oe thread to take care of sigals i a process. Maskig out all asychroous sigals o all threads but oe, ad let this oe hadles the asychroous sigals of the process. Be aware that sigal hadlers are processwide. No thread-specific sigal hadlers. it pthread_kill() it pthread_sigmask() it sigwait() it sigtimedwait() it sigwaitifo() 22 Thigs you should kow about threads MT safe fuctios MT safe meas that a fuctio ca be called from multiple threads cocurretly. The fuctio ca be a C library fuctio, a system call, etc. To be MT safe, a fuctio must lock ay shared data it uses. call oly other MT safe fuctios. use the correct error umber (erro). Be aware that erro is process-wide. * Note: It is OK to use a MT usafe fuctio i a MT program, but just do t call it cocurretly. Forkig processes There are two sematics i defiig fork(): Oly the callig thread is replicated (fork1()). 23 POSIX uses this oe. All threads ad LWPs are replicated (forkall()). Be cautious about touchig ay locks that might be held by threads that do ot exist i the child process. Oe may arrive at a deadlock. Suggestio: Have the child process call exec() immediately after the fork1() call to avoid a potetial deadlock. Also, POSIX defies pthread_atfork() to help solve the deadlock-i-the-child problem. Threads are still evolvig. Do t be surprised to kow some thigs workig differetly i the ewer versios of UNIX later. Some relevat web sites
Chapter 4 Threads. Operating Systems: Internals and Design Principles. Ninth Edition By William Stallings
Operatig Systems: Iterals ad Desig Priciples Chapter 4 Threads Nith Editio By William Stalligs Processes ad Threads Resource Owership Process icludes a virtual address space to hold the process image The
More informationThreads and Concurrency in Java: Part 1
Cocurrecy Threads ad Cocurrecy i Java: Part 1 What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.
More informationThreads and Concurrency in Java: Part 1
Threads ad Cocurrecy i Java: Part 1 1 Cocurrecy What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.
More informationCMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 12: Virtual Memory Prof. Yajig Li Uiversity of Chicago A System with Physical Memory Oly Examples: most Cray machies early PCs Memory early all embedded systems
More informationCOSC 1P03. Ch 7 Recursion. Introduction to Data Structures 8.1
COSC 1P03 Ch 7 Recursio Itroductio to Data Structures 8.1 COSC 1P03 Recursio Recursio I Mathematics factorial Fiboacci umbers defie ifiite set with fiite defiitio I Computer Sciece sytax rules fiite defiitio,
More informationChapter 10. Defining Classes. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 10 Defiig Classes Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 10.1 Structures 10.2 Classes 10.3 Abstract Data Types 10.4 Itroductio to Iheritace Copyright 2015 Pearso Educatio,
More informationData diverse software fault tolerance techniques
Data diverse software fault tolerace techiques Complemets desig diversity by compesatig for desig diversity s s limitatios Ivolves obtaiig a related set of poits i the program data space, executig the
More informationPython Programming: An Introduction to Computer Science
Pytho Programmig: A Itroductio to Computer Sciece Chapter 6 Defiig Fuctios Pytho Programmig, 2/e 1 Objectives To uderstad why programmers divide programs up ito sets of cooperatig fuctios. To be able to
More information% Sun Logo for Frame. X3T10/95-229, Revision 2. September 28, 1995
Su Microsystems, Ic. 2550 Garcia Aveue Moutai View, CA 94045 415 960-1300 X3T10/95-229, Revisio 2 September 28, 1995 % Su Logo for Frame Joh Lohmeyer Chairperso, X3T10 Symbios Logic Ic. 1635 Aeroplaza
More informationChapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.
Chapter 11 Frieds, Overloaded Operators, ad Arrays i Classes Copyright 2014 Pearso Addiso-Wesley. All rights reserved. Overview 11.1 Fried Fuctios 11.2 Overloadig Operators 11.3 Arrays ad Classes 11.4
More information% Sun Logo for. X3T10/95-229, Revision 0. April 18, 1998
Su Microsystems, Ic. 2550 Garcia Aveue Moutai View, CA 94045 415 960-1300 X3T10/95-229, Revisio 0 April 18, 1998 % Su Logo for Joh Lohmeyer Chairperso, X3T10 Symbios Logic Ic. 1635 Aeroplaza Drive Colorado
More informationMorgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5.
Morga Kaufma Publishers 26 February, 208 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 5 Virtual Memory Review: The Memory Hierarchy Take advatage of the priciple
More informationChapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 9 Poiters ad Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 9.1 Poiters 9.2 Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Slide 9-3
More informationOne advantage that SONAR has over any other music-sequencing product I ve worked
*gajedra* D:/Thomso_Learig_Projects/Garrigus_163132/z_productio/z_3B2_3D_files/Garrigus_163132_ch17.3d, 14/11/08/16:26:39, 16:26, page: 647 17 CAL 101 Oe advatage that SONAR has over ay other music-sequecig
More informationOutline. CSCI 4730 Operating Systems. Questions. What is an Operating System? Computer System Layers. Computer System Layers
Outlie CSCI 4730 s! What is a s?!! System Compoet Architecture s Overview Questios What is a?! What are the major operatig system compoets?! What are basic computer system orgaizatios?! How do you commuicate
More informationGoals of the Lecture UML Implementation Diagrams
Goals of the Lecture UML Implemetatio Diagrams Object-Orieted Aalysis ad Desig - Fall 1998 Preset UML Diagrams useful for implemetatio Provide examples Next Lecture Ð A variety of topics o mappig from
More informationIntroduction to SWARM Software and Algorithms for Running on Multicore Processors
Itroductio to SWARM Software ad Algorithms for Ruig o Multicore Processors David A. Bader Georgia Istitute of Techology http://www.cc.gatech.edu/~bader Tutorial compiled by Rucheek H. Sagai M.S. Studet,
More informationProgramming with Shared Memory PART II. HPC Spring 2017 Prof. Robert van Engelen
Programmig with Shared Memory PART II HPC Sprig 2017 Prof. Robert va Egele Overview Sequetial cosistecy Parallel programmig costructs Depedece aalysis OpeMP Autoparallelizatio Further readig HPC Sprig
More informationMulti-Threading. Hyper-, Multi-, and Simultaneous Thread Execution
Multi-Threadig Hyper-, Multi-, ad Simultaeous Thread Executio 1 Performace To Date Icreasig processor performace Pipeliig. Brach predictio. Super-scalar executio. Out-of-order executio. Caches. Hyper-Threadig
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 26 Ehaced Data Models: Itroductio to Active, Temporal, Spatial, Multimedia, ad Deductive Databases Copyright 2016 Ramez Elmasri ad Shamkat B.
More informationCode Review Defects. Authors: Mika V. Mäntylä and Casper Lassenius Original version: 4 Sep, 2007 Made available online: 24 April, 2013
Code Review s Authors: Mika V. Mätylä ad Casper Lasseius Origial versio: 4 Sep, 2007 Made available olie: 24 April, 2013 This documet cotais further details of the code review defects preseted i [1]. of
More informationChapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 1 Itroductio to Computers ad C++ Programmig Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 1.1 Computer Systems 1.2 Programmig ad Problem Solvig 1.3 Itroductio to C++ 1.4 Testig
More informationn Explore virtualization concepts n Become familiar with cloud concepts
Chapter Objectives Explore virtualizatio cocepts Become familiar with cloud cocepts Chapter #15: Architecture ad Desig 2 Hypervisor Virtualizatio ad cloud services are becomig commo eterprise tools to
More informationChapter 2: Processes & Threads. Chapter 2
: Processes & Threads Processes ad threads Processes Threads Schedulig Iterprocess commuicatio Classical IPC problems (origialy modified by Etha 2 What is a process? Code, data, ad stack Usually (but ot
More informationΤεχνολογία Λογισμικού
ΕΘΝΙΚΟ ΜΕΤΣΟΒΙΟ ΠΟΛΥΤΕΧΝΕΙΟ Σχολή Ηλεκτρολόγων Μηχανικών και Μηχανικών Υπολογιστών Τεχνολογία Λογισμικού, 7ο/9ο εξάμηνο 2018-2019 Τεχνολογία Λογισμικού Ν.Παπασπύρου, Αν.Καθ. ΣΗΜΜΥ, ickie@softlab.tua,gr
More informationOverview. Chapter 18 Vectors and Arrays. Reminder. vector. Bjarne Stroustrup
Chapter 18 Vectors ad Arrays Bjare Stroustrup Vector revisited How are they implemeted? Poiters ad free store Destructors Iitializatio Copy ad move Arrays Array ad poiter problems Chagig size Templates
More information. Written in factored form it is easy to see that the roots are 2, 2, i,
CMPS A Itroductio to Programmig Programmig Assigmet 4 I this assigmet you will write a java program that determies the real roots of a polyomial that lie withi a specified rage. Recall that the roots (or
More informationAnalysis Metrics. Intro to Algorithm Analysis. Slides. 12. Alg Analysis. 12. Alg Analysis
Itro to Algorithm Aalysis Aalysis Metrics Slides. Table of Cotets. Aalysis Metrics 3. Exact Aalysis Rules 4. Simple Summatio 5. Summatio Formulas 6. Order of Magitude 7. Big-O otatio 8. Big-O Theorems
More informationLecture 2: Kernels and Processes
Lecture 2: Kerels ad Processes CS170 Sprig 2018. UCSB Yag Some of slides are from Chapter 2 of the AD textbook. OSC book. J. Kubiatowicz CS162@UCB What to lear Process Cocept Cotext Switch &Process Schedulig
More informationIMP: Superposer Integrated Morphometrics Package Superposition Tool
IMP: Superposer Itegrated Morphometrics Package Superpositio Tool Programmig by: David Lieber ( 03) Caisius College 200 Mai St. Buffalo, NY 4208 Cocept by: H. David Sheets, Dept. of Physics, Caisius College
More informationTHE PROCESS IS ONE OF THE FUNDAMENTAL abstractions in Unix operating systems 1.A
3 Process Maagemet THE PROCESS IS ONE OF THE FUNDAMENTAL abstractios i Uix operatig systems 1.A process is a program (object code stored o some media) i executio. Processes are, however, more tha just
More informationBasic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000.
5-23 The course that gives CM its Zip Memory Maagemet II: Dyamic Storage Allocatio Mar 6, 2000 Topics Segregated lists Buddy system Garbage collectio Mark ad Sweep Copyig eferece coutig Basic allocator
More informationΤεχνολογία Λογισμικού
ΕΘΝΙΚΟ ΜΕΤΣΟΒΙΟ ΠΟΛΥΤΕΧΝΕΙΟ Σχολή Ηλεκτρολόγων Μηχανικών και Μηχανικών Υπολογιστών Τεχνολογία Λογισμικού, 7ο/9ο εξάμηνο 2018-2019 Τεχνολογία Λογισμικού Ν.Παπασπύρου, Αν.Καθ. ΣΗΜΜΥ, ickie@softlab.tua,gr
More informationCS 11 C track: lecture 1
CS 11 C track: lecture 1 Prelimiaries Need a CMS cluster accout http://acctreq.cms.caltech.edu/cgi-bi/request.cgi Need to kow UNIX IMSS tutorial liked from track home page Track home page: http://courses.cms.caltech.edu/courses/cs11/material
More informationn Learn how resiliency strategies reduce risk n Discover automation strategies to reduce risk
Chapter Objectives Lear how resiliecy strategies reduce risk Discover automatio strategies to reduce risk Chapter #16: Architecture ad Desig Resiliecy ad Automatio Strategies 2 Automatio/Scriptig Resiliet
More informationBaan Tools User Management
Baa Tools User Maagemet Module Procedure UP008A US Documetiformatio Documet Documet code : UP008A US Documet group : User Documetatio Documet title : User Maagemet Applicatio/Package : Baa Tools Editio
More informationThe Magma Database file formats
The Magma Database file formats Adrew Gaylard, Bret Pikey, ad Mart-Mari Breedt Johaesburg, South Africa 15th May 2006 1 Summary Magma is a ope-source object database created by Chris Muller, of Kasas City,
More informationChapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 5 Fuctios for All Subtasks Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 5.1 void Fuctios 5.2 Call-By-Referece Parameters 5.3 Usig Procedural Abstractio 5.4 Testig ad Debuggig
More informationChapter 4. Procedural Abstraction and Functions That Return a Value. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 4 Procedural Abstractio ad Fuctios That Retur a Value Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 4.1 Top-Dow Desig 4.2 Predefied Fuctios 4.3 Programmer-Defied Fuctios 4.4
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor Advanced Issues
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 4 The Processor Advaced Issues Review: Pipelie Hazards Structural hazards Desig pipelie to elimiate structural hazards.
More informationStructuring Redundancy for Fault Tolerance. CSE 598D: Fault Tolerant Software
Structurig Redudacy for Fault Tolerace CSE 598D: Fault Tolerat Software What do we wat to achieve? Versios Damage Assessmet Versio 1 Error Detectio Iputs Versio 2 Voter Outputs State Restoratio Cotiued
More informationOnes Assignment Method for Solving Traveling Salesman Problem
Joural of mathematics ad computer sciece 0 (0), 58-65 Oes Assigmet Method for Solvig Travelig Salesma Problem Hadi Basirzadeh Departmet of Mathematics, Shahid Chamra Uiversity, Ahvaz, Ira Article history:
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 22 Database Recovery Techiques Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Recovery algorithms Recovery cocepts Write-ahead
More informationAvid Interplay Bundle
Avid Iterplay Budle Versio 2.5 Cofigurator ReadMe Overview This documet provides a overview of Iterplay Budle v2.5 ad describes how to ru the Iterplay Budle cofiguratio tool. Iterplay Budle v2.5 refers
More informationCMSC Computer Architecture Lecture 15: Multi-Core. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 15: Multi-Core Prof. Yajig Li Uiversity of Chicago Course Evaluatio Very importat Please fill out! 2 Lab3 Brach Predictio Competitio 8 teams etered the competitio,
More informationTask scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation
6-0-0 Kowledge Trasformatio from Task Scearios to View-based Desig Diagrams Nima Dezhkam Kamra Sartipi {dezhka, sartipi}@mcmaster.ca Departmet of Computig ad Software McMaster Uiversity CANADA SEKE 08
More informationWYSE Academic Challenge Sectional Computer Science 2005 SOLUTION SET
WYSE Academic Challege Sectioal Computer Sciece 2005 SOLUTION SET 1. Correct aswer: a. Hz = cycle / secod. CPI = 2, therefore, CPI*I = 2 * 28 X 10 8 istructios = 56 X 10 8 cycles. The clock rate is 56
More informationElementary Educational Computer
Chapter 5 Elemetary Educatioal Computer. Geeral structure of the Elemetary Educatioal Computer (EEC) The EEC coforms to the 5 uits structure defied by vo Neuma's model (.) All uits are preseted i a simplified
More informationBEA Tuxedo. Creating CORBA Server Applications
BEA Tuxedo Creatig CORBA Server Applicatios BEA Tuxedo Release 8.0 Documet Editio 8.0 Jue 2001 Copyright Copyright 2001 BEA Systems, Ic. All Rights Reserved. Restricted Rights Leged This software ad documetatio
More informationAppendix D. Controller Implementation
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Appedix D Cotroller Implemetatio Cotroller Implemetatios Combiatioal logic (sigle-cycle); Fiite state machie (multi-cycle, pipelied);
More informationCPSC 313: Intro to Computer Systems. POSIX Threads. Latency Hiding / Multiprogramming (covered earlier) Ease of Programming (covered now)
Why Threads? Latency Hiding / Multiprogramming (covered earlier) Ease of Programming (covered now) (R&R, Chapter 12) Thread Management Thread Safety Thread Attributes Why Threads? Latency Hiding / Multiprogramming
More informationSCI Reflective Memory
Embedded SCI Solutios SCI Reflective Memory (Experimetal) Atle Vesterkjær Dolphi Itercoect Solutios AS Olaf Helsets vei 6, N-0621 Oslo, Norway Phoe: (47) 23 16 71 42 Fax: (47) 23 16 71 80 Mail: atleve@dolphiics.o
More informationDefinitions. Error. A wrong decision made during software development
Debuggig Defiitios Error A wrog decisio made durig software developmet Defiitios 2 Error A wrog decisio made durig software developmet Defect bug sometimes meas this The term Fault is also used Property
More informationSoftware development of components for complex signal analysis on the example of adaptive recursive estimation methods.
Software developmet of compoets for complex sigal aalysis o the example of adaptive recursive estimatio methods. SIMON BOYMANN, RALPH MASCHOTTA, SILKE LEHMANN, DUNJA STEUER Istitute of Biomedical Egieerig
More informationBaan Finance Financial Statements
Baa Fiace Fiacial Statemets Module Procedure UP041A US Documetiformatio Documet Documet code : UP041A US Documet group : User Documetatio Documet title : Fiacial Statemets Applicatio/Package : Baa Fiace
More informationComputers and Scientific Thinking
Computers ad Scietific Thikig David Reed, Creighto Uiversity Chapter 15 JavaScript Strigs 1 Strigs as Objects so far, your iteractive Web pages have maipulated strigs i simple ways use text box to iput
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Part A Datapath Design
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter The Processor Part A path Desig Itroductio CPU performace factors Istructio cout Determied by ISA ad compiler. CPI ad
More informationGraphs. Minimum Spanning Trees. Slides by Rose Hoberman (CMU)
Graphs Miimum Spaig Trees Slides by Rose Hoberma (CMU) Problem: Layig Telephoe Wire Cetral office 2 Wirig: Naïve Approach Cetral office Expesive! 3 Wirig: Better Approach Cetral office Miimize the total
More informationLecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming
Lecture Notes 6 Itroductio to algorithm aalysis CSS 501 Data Structures ad Object-Orieted Programmig Readig for this lecture: Carrao, Chapter 10 To be covered i this lecture: Itroductio to algorithm aalysis
More informationCMSC Computer Architecture Lecture 3: ISA and Introduction to Microarchitecture. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 3: ISA ad Itroductio to Microarchitecture Prof. Yajig Li Uiversity of Chicago Lecture Outlie ISA uarch (hardware implemetatio of a ISA) Logic desig basics Sigle-cycle
More informationPython Programming: An Introduction to Computer Science
Pytho Programmig: A Itroductio to Computer Sciece Chapter 1 Computers ad Programs 1 Objectives To uderstad the respective roles of hardware ad software i a computig system. To lear what computer scietists
More informationHow do we evaluate algorithms?
F2 Readig referece: chapter 2 + slides Algorithm complexity Big O ad big Ω To calculate ruig time Aalysis of recursive Algorithms Next time: Litterature: slides mostly The first Algorithm desig methods:
More informationRecursion. Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Review: Method Frames
Uit 4, Part 3 Recursio Computer Sciece S-111 Harvard Uiversity David G. Sulliva, Ph.D. Review: Method Frames Whe you make a method call, the Java rutime sets aside a block of memory kow as the frame of
More informationDATA STRUCTURES. amortized analysis binomial heaps Fibonacci heaps union-find. Data structures. Appetizer. Appetizer
Data structures DATA STRUCTURES Static problems. Give a iput, produce a output. Ex. Sortig, FFT, edit distace, shortest paths, MST, max-flow,... amortized aalysis biomial heaps Fiboacci heaps uio-fid Dyamic
More informationMorgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5
Morga Kaufma Publishers 26 February, 28 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 5 Set-Associative Cache Architecture Performace Summary Whe CPU performace icreases:
More informationGuaranteeing Hard Real Time End-to-End Communications Deadlines
Guarateeig Hard Real Time Ed-to-Ed Commuicatios Deadlies K. W. Tidell A. Burs A. J. Welligs Real Time Systems Research Group Departmet of Computer Sciece Uiversity of York e-mail: ke@mister.york.ac.uk
More informationGreedy Algorithms. Interval Scheduling. Greedy Algorithms. Interval scheduling. Greedy Algorithms. Interval Scheduling
Greedy Algorithms Greedy Algorithms Witer Paul Beame Hard to defie exactly but ca give geeral properties Solutio is built i small steps Decisios o how to build the solutio are made to maximize some criterio
More informationBEA WebLogic Process Integrator
BEA WebLogic Process Itegrator A Compoet of BEA WebLogic Itegratio BEA WebLogic Process Itegrator Studio Olie Help BEA WebLogic Process Itegrator Release 2.0 Documet Editio 2.0 July 2001 Copyright Copyright
More informationThe Idea. Leader Election. Outline. Why Rings? Network. We study leader election in rings. Specification of Leader Election YAIR. Historical reasons
The Idea Leader Electio Network We study leader electio i rigs Why Rigs? Outlie Specificatio of Leader Electio Historical reasos origial motivatio: regeerate lost toke i toke rig etworks Illustrates techiques
More informationTraditional queuing behaviour in routers. Scheduling and queue management. Questions. Scheduling mechanisms. Scheduling [1] Scheduling [2]
Traditioal queuig behaviour i routers Schedulig ad queue maagemet Data trasfer: datagrams: idividual packets o recogitio of flows coectioless: o sigallig Forwardig: based o per-datagram, forwardig table
More informationPseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance
Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Pseudocode ( 1.1) High-level descriptio of a algorithm More structured
More informationSymbolic Execution with Abstraction
Software Tools for Techology Trasfer mauscript No. (will be iserted by the editor) Symbolic Executio with Abstractio Saswat Aad 1, Coria S. Păsăreau 2, Willem Visser 3 1 College of Computig, Georgia Istitute
More informationAbstract. Chapter 4 Computation. Overview 8/13/18. Bjarne Stroustrup Note:
Chapter 4 Computatio Bjare Stroustrup www.stroustrup.com/programmig Abstract Today, I ll preset the basics of computatio. I particular, we ll discuss expressios, how to iterate over a series of values
More informationSchema for the DCE Security Registry Server
Schema for the Security egistry Server Versio Date: 0/20/00 For questios or commets cocerig this documet, sed a email ote to dce-ldap@opegroup.org or call Doa Skibbie at 52 838-3896. . Itroductio...3 2.
More informationCSE 417: Algorithms and Computational Complexity
Time CSE 47: Algorithms ad Computatioal Readig assigmet Read Chapter of The ALGORITHM Desig Maual Aalysis & Sortig Autum 00 Paul Beame aalysis Problem size Worst-case complexity: max # steps algorithm
More informationCSC 220: Computer Organization Unit 11 Basic Computer Organization and Design
College of Computer ad Iformatio Scieces Departmet of Computer Sciece CSC 220: Computer Orgaizatio Uit 11 Basic Computer Orgaizatio ad Desig 1 For the rest of the semester, we ll focus o computer architecture:
More information1 Enterprise Modeler
1 Eterprise Modeler Itroductio I BaaERP, a Busiess Cotrol Model ad a Eterprise Structure Model for multi-site cofiguratios are itroduced. Eterprise Structure Model Busiess Cotrol Models Busiess Fuctio
More informationRecall: What is an operating system? Very Brief History of OS. Very Brief History of OS. CS162 Operating Systems and Systems Programming Lecture 2
Recall: What is a operatig system? CS6 Operatig Systems ad Systems Programmig Lecture Itroductio to esses Special layer of software that provides applicatio software access to hardware resources Coveiet
More informationCMPT 125 Assignment 2 Solutions
CMPT 25 Assigmet 2 Solutios Questio (20 marks total) a) Let s cosider a iteger array of size 0. (0 marks, each part is 2 marks) it a[0]; I. How would you assig a poiter, called pa, to store the address
More informationMOTIF XF Extension Owner s Manual
MOTIF XF Extesio Ower s Maual Table of Cotets About MOTIF XF Extesio...2 What Extesio ca do...2 Auto settig of Audio Driver... 2 Auto settigs of Remote Device... 2 Project templates with Iput/ Output Bus
More informationCIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19
CIS Data Structures ad Algorithms with Java Sprig 09 Stacks, Queues, ad Heaps Moday, February 8 / Tuesday, February 9 Stacks ad Queues Recall the stack ad queue ADTs (abstract data types from lecture.
More informationCOP4020 Programming Languages. Subroutines and Parameter Passing Prof. Robert van Engelen
COP4020 Programmig Laguages Subrouties ad Parameter Passig Prof. Robert va Egele Overview Parameter passig modes Subroutie closures as parameters Special-purpose parameters Fuctio returs COP4020 Fall 2016
More informationLecturers: Sanjam Garg and Prasad Raghavendra Feb 21, Midterm 1 Solutions
U.C. Berkeley CS170 : Algorithms Midterm 1 Solutios Lecturers: Sajam Garg ad Prasad Raghavedra Feb 1, 017 Midterm 1 Solutios 1. (4 poits) For the directed graph below, fid all the strogly coected compoets
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 19 Query Optimizatio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Query optimizatio Coducted by a query optimizer i a DBMS Goal:
More informationICS Regent. Communications Modules. Module Operation. RS-232, RS-422 and RS-485 (T3150A) PD-6002
ICS Reget Commuicatios Modules RS-232, RS-422 ad RS-485 (T3150A) Issue 1, March, 06 Commuicatios modules provide a serial commuicatios iterface betwee the cotroller ad exteral equipmet. Commuicatios modules
More information6.854J / J Advanced Algorithms Fall 2008
MIT OpeCourseWare http://ocw.mit.edu 6.854J / 18.415J Advaced Algorithms Fall 2008 For iformatio about citig these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.415/6.854 Advaced Algorithms
More informationSolution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring, Instructions:
CS 604 Data Structures Midterm Sprig, 00 VIRG INIA POLYTECHNIC INSTITUTE AND STATE U T PROSI M UNI VERSI TY Istructios: Prit your ame i the space provided below. This examiatio is closed book ad closed
More informationOutline n Introduction n Background o Distributed DBMS Architecture
Outlie Itroductio Backgroud o Distributed DBMS Architecture Datalogical Architecture Implemetatio Alteratives Compoet Architecture o Distributed DBMS Architecture o Distributed Desig o Sematic Data Cotrol
More informationChapter 3 Classification of FFT Processor Algorithms
Chapter Classificatio of FFT Processor Algorithms The computatioal complexity of the Discrete Fourier trasform (DFT) is very high. It requires () 2 complex multiplicatios ad () complex additios [5]. As
More informationUsing the Keyboard. Using the Wireless Keyboard. > Using the Keyboard
1 A wireless keyboard is supplied with your computer. The wireless keyboard uses a stadard key arragemet with additioal keys that perform specific fuctios. Usig the Wireless Keyboard Two AA alkalie batteries
More informationChapter 4 The Datapath
The Ageda Chapter 4 The Datapath Based o slides McGraw-Hill Additioal material 24/25/26 Lewis/Marti Additioal material 28 Roth Additioal material 2 Taylor Additioal material 2 Farmer Tae the elemets that
More informationAPPLICATION NOTE PACE1750AE BUILT-IN FUNCTIONS
APPLICATION NOTE PACE175AE BUILT-IN UNCTIONS About This Note This applicatio brief is iteded to explai ad demostrate the use of the special fuctios that are built ito the PACE175AE processor. These powerful
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 20 Itroductio to Trasactio Processig Cocepts ad Theory Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Trasactio Describes local
More informationPage 1. Why Care About the Memory Hierarchy? Memory. DRAMs over Time. Virtual Memory!
Why Care About the Memory Hierarchy? Memory Virtual Memory -DRAM Memory Gap (latecy) Reasos: Multi process systems (abstractio & memory protectio) Solutio: Tables (holdig per process traslatios) Fast traslatio
More informationCIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13
CIS Data Structures ad Algorithms with Java Sprig 08 Stacks ad Queues Moday, February / Tuesday, February Learig Goals Durig this lab, you will: Review stacks ad queues. Lear amortized ruig time aalysis
More informationWeb OS Switch Software
Web OS Switch Software BBI Quick Guide Nortel Networks Part Number: 213164, Revisio A, July 2000 50 Great Oaks Boulevard Sa Jose, Califoria 95119 408-360-5500 Mai 408-360-5501 Fax www.orteletworks.com
More informationBEA Tuxedo. Creating CORBA Client Applications
BEA Tuxedo Creatig CORBA Cliet Applicatios BEA Tuxedo 8.0 Documet Editio 8.0 Jue 2001 Copyright Copyright 2001 BEA Systems, Ic. All Rights Reserved. Restricted Rights Leged This software ad documetatio
More informationC++, Visual C++, and Managed C++: What s the Difference?
02 6000 ch01 11/18/03 8:52 AM Page 7 C++, Visual C++, ad Maaged C++: What s the Differece? Differeces Betwee Visual C++ ad C++ C++ is a laguage, ad Visual C++ is a product. The laguage itself was developed
More information4. Concurrency via Threads
CSC400 - Operating Systems 4. Concurrency via Threads J. Sumey Overview Multithreading Concept Background Implementations Thread States & Thread Switching Thread Operations Case Study: pthreads CSC400
More informationCustodial Integrator Automation Guide
Custodial Itegrator Automatio Guide Compay Cofidetial Custodial Itegrator Product Versio: V3.8 Documet Versio: 14 Documet Issue Date: April 21, 2017 Techical Support: (866) 856-4951 Telephoe: (781) 376-0801
More information