Chapter 2: Processes & Threads. Chapter 2
|
|
- Natalie Skinner
- 5 years ago
- Views:
Transcription
1 : Processes & Threads
2 Processes ad threads Processes Threads Schedulig Iterprocess commuicatio Classical IPC problems (origialy modified by Etha 2
3 What is a process? Code, data, ad stack Usually (but ot always) has its ow address space Program state CPU registers Program couter (curret locatio i the code) Stack poiter Oly oe process ca be ruig i the CPU at ay give time! (origialy modified by Etha 3
4 The process model Sigle PC (CPU s poit of view) A B C B D A Multiple PCs (process poit of view) B C D Multiprogrammig of four programs Coceptual model 4 idepedet processes Processes ru sequetially Oly oe program active at ay istat! That istat ca be very short D C B A Time (origialy modified by Etha 4
5 Whe is a process created? Processes ca be created i two ways System iitializatio: oe or more processes created whe the OS starts up Executio of a process creatio system call: somethig explicitly asks for a ew process System calls ca come from User request to create a ew process (system call executed from user shell) Already ruig processes User programs System daemos (origialy modified by Etha 5
6 Process Creatio 6 Paret process creates childre processes, which, i tur create other processes, formig a tree of processes Geerally, process idetified ad maaged via a process idetifier (pid) Resource sharig optios Paret ad childre share all resources Childre share subset of paret s resources Paret ad child share o resources Executio optios Paret ad childre execute cocurretly Paret waits util childre termiate Sprig 2018 CS/ CO E Ope rati g Syst ems She rif Kha ttab
7 Process Creatio (Cot.) Address space Child duplicate of paret Child has a program loaded ito it UNIX examples fork() system call creates ew process exec() system call used after a fork() to replace the process memory space with a ew program 7 Sprig 2018 CS/ CO E Ope rati g Syst ems She rif Kha ttab
8 Whe do processes ed? Coditios that termiate processes ca be Volutary Ivolutary Volutary Normal exit Error exit Ivolutary Fatal error (oly sort of ivolutary) Killed by aother process (origialy modified by Etha 8
9 Process Termiatio 9 Process executes last statemet ad the asks the operatig system to delete it usig the exit() system call. Returs status data from child to paret (via wait()) Process resources are deallocated by operatig system Paret may termiate the executio of childre processes usig the abort() system call. Some reasos for doig so: Child has exceeded allocated resources Task assiged to child is o loger required Syst The paret is exitig ad the operatig systems does ot ems allow a child to cotiue if its paret termiates Sprig 2018 CS/ CO E Ope rati g She rif Kha ttab
10 Process Termiatio 10 Some operatig systems do ot allow a child to exist if its paret has termiated. If a process termiates, the all its childre must also be termiated. cascadig termiatio. All childre, gradchildre, etc. are termiated. The termiatio is iitiated by the operatig system. The paret process may wait for termiatio of a child process by usig the wait()system call. The call returs status iformatio ad the pid of the termiated process pid = wait(&status); E If o paret waitig (did ot ivoke wait()) process is a zombie Ope rati g If paret termiated without ivokig wait, process is Syst a orpha Sprig 2018 CS/ CO ems She rif Kha ttab
11 Process hierarchies Paret creates a child process Child processes ca create their ow childre Forms a hierarchy UNIX calls this a process group If a process exits, its childre are iherited by the exitig process s paret Widows has o cocept of process hierarchy All processes are created equal (origialy modified by Etha 11
12 Process states 5 Blocked (waitig) 7 Created 1 Ready Exit 2 Ruig 6 Process i oe of 5 states Created Ready Ruig Blocked Exit Trasitios betwee states 1 - Process eters ready queue 2 - Scheduler picks this process 3 - Scheduler picks a differet process 4 - Process waits for evet (such as I/O) 5 - Evet occurs 6 - Process exits 7 - Process eded by aother process (origialy modified by Etha 12
13 Processes i the OS Two layers for processes Lowest layer of process-structured OS hadles iterrupts, schedulig Above that layer are sequetial processes Processes tracked i the process table Each process has a process table etry Processes 0 1 N-2 N-1 Scheduler (origialy modified by Etha 13
14 What s i a process table etry? May be stored o stack Process maagemet Registers Program couter CPU status word Stack poiter Process state Priority / schedulig parameters Process ID Paret process ID Sigals Process start time Total CPU usage File maagemet Root directory Workig (curret) directory File descriptors User ID Group ID Memory maagemet Poiters to text, data, stack or Poiter to page table (origialy modified by Etha 14
15 What happes o a trap/iterrupt? 1. Hardware saves program couter (o stack or i a special register) 2. Hardware loads ew PC, idetifies iterrupt 3. Assembly laguage routie saves registers 4. Assembly laguage routie sets up stack 5. Assembly laguage calls C to ru service routie 6. Service routie calls scheduler 7. Scheduler selects a process to ru ext (might be the oe iterrupted ) 8. Assembly laguage routie loads PC & registers for the selected process (origialy modified by Etha 15
16 Threads: processes sharig memory Process == address space Thread == program couter / stream of istructios Two examples Three processes, each with oe thread Oe process with three threads Process 1 Process 2 Process 3 Process 1 User space System space Threads Kerel Threads Kerel (origialy modified by Etha 16
17 Process & thread iformatio Per process items Address space Ope files Child processes Sigals & hadlers Accoutig ifo Global variables Per thread items Program couter Registers Stack & stack poiter State Per thread items Program couter Registers Stack & stack poiter State Per thread items Program couter Registers Stack & stack poiter State (origialy modified by Etha 17
18 Threads & Stacks Thread 1 Thread 2 Thread 3 User space Thread 1 s stack Process Thread 3 s stack Thread 2 s stack Kerel => Each thread has its ow stack! (origialy modified by Etha 18
19 Why use threads? Allow a sigle applicatio to do may thigs at oce Simpler programmig model Less waitig Threads are faster to create or destroy No separate address space Overlap computatio ad I/O Could be doe without threads, but it s harder Example: word processor Thread to read from keyboard Thread to format documet Thread to write to disk Whe i the Course of huma evets, it becomes ecessary for oe people to dissolve the political bads which have coected them with aother, ad to assume amog the powers of the earth, the separate ad equal statio to which the Laws of Nature ad of Nature's God etitle them, a decet respect to the opiios of makid requires that they should declare the causes which impel them to the separatio. We hold these truths to be self-evidet, that all me are created equal, that they are edowed by their Creator with certai ualieable Rights, that amog these are Life, Liberty ad the pursuit of Happiess.--That to secure these rights, Govermets are istituted amog Me, derivig their just powers from the coset of the govered, --That wheever ay Form of Govermet becomes Kerel destructive of these eds, it is the Right of the People to alter or to abolish it, ad to istitute ew Govermet, layig its foudatio o such priciples ad orgaizig its powers i such form, as to them shall seem most likely to effect their Safety ad Happiess. Prudece, ideed, will dictate that Govermets log established should ot be chaged for light ad trasiet causes; ad accordigly all (origialy modified by Etha 19
20 Multithreaded Web server Dispatcher thread Worker thread while(true) { getnextrequest(&buf); hadoffwork(&buf); } Network coectio Kerel Web page cache while(true) { waitforwork(&buf); lookforpageicache(&buf,&page); if(pagenoticache(&page)) { readpagefromdisk(&buf,&page); } returpage(&page); } (origialy modified by Etha 20
21 Three ways to build a server Thread model Parallelism Blockig system calls Sigle-threaded process: slow, but easier to do No parallelism Blockig system calls Fiite-state machie Each activity has its ow state States chage whe system calls complete or iterrupts occur Parallelism Noblockig system calls Iterrupts (origialy modified by Etha 21
22 Implemetig threads Process Thread Kerel Kerel Ru-time system Thread table Process table Process table Thread table User-level threads + No eed for kerel support - May be slower tha kerel threads - Harder to do o-blockig I/O Kerel-level threads + More flexible schedulig + No-blockig I/O - Not portable (origialy modified by Etha 22
23 Iterprocess Commuicatio 23 Processes withi a system may be idepedet or cooperatig Cooperatig process ca affect or be affected by other processes, icludig sharig data Reasos for cooperatig processes: Iformatio sharig Computatio speedup Modularity Coveiece Cooperatig processes eed iterprocess commuicatio (IPC) Two models of IPC Shared memory Message passig Sprig 2018 CS/ CO E Ope rati g Syst ems She rif Kha ttab
24 Producer-Cosumer Problem Paradigm for cooperatig processes, producer process produces iformatio that is cosumed by a cosumer process 24 Sprig 2018 CS/ CO E Ope rati g Syst ems She rif Kha ttab
25 Bouded-Buffer Shared-Memory Solutio Shared data #defie BUFFER_SIZE 10 typedef struct {... } item; 25 item buffer[buffer_size]; it i = 0; it out = 0; Syst Solutio is correct, but ca oly use BUFFER_SIZE- ems 1 elemets Sprig 2018 CS/ CO E Ope rati g She rif Kha ttab
26 Bouded-Buffer Producer item ext_produced; while (true) { /* produce a item i ext produced */ while (((i + 1) % BUFFER_SIZE) == out) ; /* do othig */ buffer[i] = ext_produced; i = (i + 1) % BUFFER_SIZE; } 26 Sprig 2018 CS/ CO E Ope rati g Syst ems She rif Kha ttab
27 Bouded Buffer Cosumer item ext_cosumed; while (true) { while (i == out) ; /* do othig */ ext_cosumed = buffer[out]; out = (out + 1) % BUFFER_SIZE; /* cosume the item i ext ems cosumed */ 27 Sprig 2018 CS/ CO E Ope rati g Syst She rif Kha ttab
28 Schedulig What is schedulig? Goals Mechaisms Schedulig o batch systems Schedulig o iteractive systems Other kids of schedulig Real-time schedulig (origialy modified by Etha 28
29 Why schedule processes? Bursts of CPU usage alterate with periods of I/O wait Some processes are CPU-boud: they do t make may I/O requests Other processes are I/O-boud ad make may kerel requests CPU boud Total CPU usage CPU bursts I/O waits I/O boud Time (origialy modified by Etha Total CPU usage 29
30 Whe are processes scheduled? At the time they eter the system Commo i batch systems Two types of batch schedulig Submissio of a ew job causes the scheduler to ru Schedulig oly doe whe a job volutarily gives up the CPU (i.e., while waitig for a I/O request) At relatively fixed itervals (clock iterrupts) Necessary for iteractive systems May also be used for batch systems Schedulig algorithms at each iterrupt, ad picks the ext process from the pool of ready processes (origialy modified by Etha 30
31 Schedulig goals All systems Fairess: give each process a fair share of the CPU Eforcemet: esure that the stated policy is carried out Balace: keep all parts of the system busy Batch systems Throughput: maximize jobs per uit time (hour) Turaroud time: miimize time users wait for jobs CPU utilizatio: keep the CPU as busy as possible Iteractive systems Respose time: respod quickly to users requests Proportioality: meet users expectatios Real-time systems Meet deadlies: missig deadlies is a system failure! Predictability: same type of behavior for each time slice (origialy modified by Etha 31
32 Measurig schedulig performace Throughput Amout of work completed per secod (miute, hour) Higher throughput usually meas better utilized system Respose time Respose time is time from whe a commad is submitted util results are retured Ca measure average, variace, miimum, maximum, May be more useful to measure time spet waitig Turaroud time Like respose time, but for batch jobs (respose is the completio of the process) Usually ot possible to optimize for all metrics with the same schedulig algorithm (origialy modified by Etha 32
33 First Come, First Served (FCFS) Curret job queue A B C D FCFS scheduler Executio order A B C D Goal: do jobs i the order they arrive Fair i the same way a bak teller lie is fair Simple algorithm! Problem: log jobs delay every job after them May processes may wait for a sigle log job (origialy modified by Etha 33
34 Shortest Job First (SJF) A B C D SJF scheduler B Curret job queue Executio order D A C Goal: do the shortest job first Short jobs complete first Log jobs delay every job after them Jobs sorted i icreasig order of executio time Orderig of ties does t matter Shortest Remaiig Time First (SRTF): preemptive form of SJF Problem: how does the scheduler kow how log a job will take? (origialy modified by Etha 34
35 Three-level schedulig CPU CPU scheduler Arrivig jobs Iput queue Admissio scheduler Mai memory Memory scheduler Jobs held i iput queue util moved ito memory Pick complemetary jobs : small & large, CPU- & I/O-itesive Jobs move ito memory whe admitted CPU scheduler picks ext job to ru Memory scheduler picks some jobs from mai memory ad moves them to disk if isufficiet memory space (origialy modified by Etha 35
36 Roud Robi (RR) schedulig Roud Robi schedulig Give each process a fixed time slot (quatum) Rotate through ready processes Each process makes some progress What s a good quatum? Too short: may process switches hurt efficiecy Too log: poor respose to iteractive requests Typical legth: ms E D C B A A B C D E Time (origialy modified by Etha 36
37 Priority schedulig Assig a priority to each process Ready process with highest priority allowed to ru Ruig process may be iterrupted after its quatum expires Priorities may be assiged dyamically Reduced whe a process uses CPU time Icreased whe a process waits for I/O Ofte, processes grouped ito multiple queues based o priority, ad ru roud-robi per queue High Ready processes Priority 4 Priority 3 Priority 2 Priority 1 Low (origialy modified by Etha 37
38 Shortest process ext Ru the process that will fiish the sooest I iteractive systems, job completio time is ukow! Guess at completio time based o previous rus Update estimate each time the job is ru Estimate is a combiatio of previous estimate ad most recet ru time Not ofte used because roud robi with priority works so well! (origialy modified by Etha 38
39 Lottery schedulig Give processes tickets for CPU time More tickets => higher share of CPU Each quatum, pick a ticket at radom If there are tickets, pick a umber from 1 to Process holdig the ticket gets to ru for a quatum Over the log ru, each process gets the CPU m/ of the time if the process has m of the existig tickets Tickets ca be trasferred Cooperatig processes ca exchage tickets Cliets ca trasfer tickets to server so it ca have a higher priority (origialy modified by Etha 39
40 Policy versus mechaism Separate what may be doe from how it is doe Mechaism allows Priorities to be assiged to processes CPU to select processes with high priorities Policy set by what priorities are assiged to processes Schedulig algorithm parameterized Mechaism i the kerel Priorities assiged i the kerel or by users Parameters may be set by user processes Do t allow a user process to take over the system! Allow a user process to volutarily lower its ow priority Allow a user process to assig priority to its threads (origialy modified by Etha 40
41 Schedulig user-level threads Process A Ru-time system Thread table Kerel Process B Process table Kerel picks a process to ru ext Ru-time system (at user level) schedules threads Ru each thread for less tha process quatum Example: processes get 40ms each, threads get 10ms each Example schedule: A1,A2,A3,A1,B1,B3,B2,B3 Not possible: A1,A2,B1,B2,A3,B3,A2,B1 (origialy modified by Etha 41
42 Schedulig kerel-level threads Process A Kerel Process table Process B Thread table Kerel schedules each thread No restrictios o orderig May be more difficult for each process to specify priorities Example schedule: A1,A2,A3,A1,B1,B3,B2,B3 Also possible: A1,A2,B1,B2,A3,B3,A2,B1 (origialy modified by Etha 42
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 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 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 informationAnnouncements. Reading. Project #4 is on the web. Homework #1. Midterm #2. Chapter 4 ( ) Note policy about project #3 missing components
Aoucemets Readig Chapter 4 (4.1-4.2) Project #4 is o the web ote policy about project #3 missig compoets Homework #1 Due 11/6/01 Chapter 6: 4, 12, 24, 37 Midterm #2 11/8/01 i class 1 Project #4 otes IPv6Iit,
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 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 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 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 informationOptimization of Priority based CPU Scheduling Algorithms to Minimize Starvation of Processes using an Efficiency Factor
Iteratioal Joural of Computer Applicatios (97 8887) Volume 132 No.11, December21 Optimizatio of based CPU Schedulig Algorithms to Miimize Starvatio of Processes usig a Efficiecy Factor Muhammad A. Mustapha
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 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 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 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 informationOperating System Concepts. Operating System Concepts
Chapter 4: Mass-Storage Systems Logical Disk Structure Logical Disk Structure Disk Schedulig Disk Maagemet RAID Structure Disk drives are addressed as large -dimesioal arrays of logical blocks, where the
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 informationCMSC Computer Architecture Lecture 11: More Caches. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 11: More Caches Prof. Yajig Li Uiversity of Chicago Lecture Outlie Caches 2 Review Memory hierarchy Cache basics Locality priciples Spatial ad temporal How to access
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 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 informationSwitching Hardware. Spring 2018 CS 438 Staff, University of Illinois 1
Switchig Hardware Sprig 208 CS 438 Staff, Uiversity of Illiois Where are we? Uderstad Differet ways to move through a etwork (forwardig) Read sigs at each switch (datagram) Follow a kow path (virtual circuit)
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 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 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 informationGuide to Applying Online
Guide to Applyig Olie Itroductio Respodig to requests for additioal iformatio Reportig: submittig your moitorig or ed of grat Pledges: submittig your Itroductio This guide is to help charities submit their
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 informationCluster Computing Spring 2004 Paul A. Farrell
Cluster Computig Sprig 004 3/18/004 Parallel Programmig Overview Task Parallelism OS support for task parallelism Parameter Studies Domai Decompositio Sequece Matchig Work Assigmet Static schedulig Divide
More informationThreads and Concurrency in Java: Part 2
Threads ad Cocurrecy i Java: Part 2 1 Waitig Sychroized methods itroduce oe kid of coordiatio betwee threads. Sometimes we eed a thread to wait util a specific coditio has arise. 2003--09 T. S. Norvell
More informationArchitectural styles for software systems The client-server style
Architectural styles for software systems The cliet-server style Prof. Paolo Ciacarii Software Architecture CdL M Iformatica Uiversità di Bologa Ageda Cliet server style CS two tiers CS three tiers CS
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 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 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 informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Single-Cycle Disadvantages & Advantages
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 4 The Processor Pipeliig Sigle-Cycle Disadvatages & Advatages Clk Uses the clock cycle iefficietly the clock cycle must
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 informationWeston Anniversary Fund
Westo Olie Applicatio Guide 2018 1 This guide is desiged to help charities applyig to the Westo to use our olie applicatio form. The Westo is ope to applicatios from 5th Jauary 2018 ad closes o 30th Jue
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 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 informationComputational Geometry
Computatioal Geometry Chapter 4 Liear programmig Duality Smallest eclosig disk O the Ageda Liear Programmig Slides courtesy of Craig Gotsma 4. 4. Liear Programmig - Example Defie: (amout amout cosumed
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 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 informationOperating Systems. Lecture Process Scheduling. Golestan University. Hossein Momeni
Operating Systems Lecture 2.2 - Process Scheduling Golestan University Hossein Momeni momeni@iust.ac.ir Scheduling What is scheduling? Goals Mechanisms Scheduling on batch systems Scheduling on interactive
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 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 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 informationLecture 2 Process Management
Lecture 2 Process Management Process Concept An operating system executes a variety of programs: Batch system jobs Time-shared systems user programs or tasks The terms job and process may be interchangeable
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 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 informationThreads. They are peers in the same process. Motivation for threads. What is a thread? Fork is expensive.
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
More informationMultiprocessors. HPC Prof. Robert van Engelen
Multiprocessors Prof. Robert va Egele Overview The PMS model Shared memory multiprocessors Basic shared memory systems SMP, Multicore, ad COMA Distributed memory multicomputers MPP systems Network topologies
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 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 informationOPERATING SYSTEMS. UNIT II Sections A, B & D. An operating system executes a variety of programs:
OPERATING SYSTEMS UNIT II Sections A, B & D PREPARED BY ANIL KUMAR PRATHIPATI, ASST. PROF., DEPARTMENT OF CSE. PROCESS CONCEPT An operating system executes a variety of programs: Batch system jobs Time-shared
More informationReliable Transmission. Spring 2018 CS 438 Staff - University of Illinois 1
Reliable Trasmissio Sprig 2018 CS 438 Staff - Uiversity of Illiois 1 Reliable Trasmissio Hello! My computer s ame is Alice. Alice Bob Hello! Alice. Sprig 2018 CS 438 Staff - Uiversity of Illiois 2 Reliable
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 informationPriority Queues. Binary Heaps
Priority Queues Biary Heaps Priority Queues Priority: some property of a object that allows it to be prioritized with respect to other objects of the same type Mi Priority Queue: homogeeous collectio of
More informationLecture 28: Data Link Layer
Automatic Repeat Request (ARQ) 2. Go ack N ARQ Although the Stop ad Wait ARQ is very simple, you ca easily show that it has very the low efficiecy. The low efficiecy comes from the fact that the trasmittig
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 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 informationUNIVERSITY OF MORATUWA
UNIVERSITY OF MORATUWA FACULTY OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING B.Sc. Egieerig 2014 Itake Semester 2 Examiatio CS2052 COMPUTER ARCHITECTURE Time allowed: 2 Hours Jauary 2016
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 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 informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 18 Strategies for Query Processig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio DBMS techiques to process a query Scaer idetifies
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 informationExamples and Applications of Binary Search
Toy Gog ITEE Uiersity of Queeslad I the secod lecture last week we studied the biary search algorithm that soles the problem of determiig if a particular alue appears i a sorted list of iteger or ot. We
More informationΤεχνολογία Λογισμικού
ΕΘΝΙΚΟ ΜΕΤΣΟΒΙΟ ΠΟΛΥΤΕΧΝΕΙΟ Σχολή Ηλεκτρολόγων Μηχανικών και Μηχανικών Υπολογιστών Τεχνολογία Λογισμικού, 7ο/9ο εξάμηνο 2018-2019 Τεχνολογία Λογισμικού Ν.Παπασπύρου, Αν.Καθ. ΣΗΜΜΥ, ickie@softlab.tua,gr
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 information1&1 Next Level Hosting
1&1 Next Level Hostig Performace Level: Performace that grows with your requiremets Copyright 1&1 Iteret SE 2017 1ad1.com 2 1&1 NEXT LEVEL HOSTING 3 Fast page loadig ad short respose times play importat
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 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 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 informationCourse Site: Copyright 2012, Elsevier Inc. All rights reserved.
Course Site: http://cc.sjtu.edu.c/g2s/site/aca.html 1 Computer Architecture A Quatitative Approach, Fifth Editio Chapter 2 Memory Hierarchy Desig 2 Outlie Memory Hierarchy Cache Desig Basic Cache Optimizatios
More informationCMSC Computer Architecture Lecture 10: Caches. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 10: Caches Prof. Yajig Li Uiversity of Chicago Midterm Recap Overview ad fudametal cocepts ISA Uarch Datapath, cotrol Sigle cycle, multi cycle Pipeliig Basic idea,
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 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 informationExceptions. Your computer takes exception. The Exception Class. Causes of Exceptions
Your computer takes exceptio s s are errors i the logic of a program (ru-time errors). Examples: i thread mai java.io.filenotfoud: studet.txt (The system caot fid the file specified.) i thread mai java.lag.nullpoiter:
More informationMaster Informatics Eng. 2017/18. A.J.Proença. Memory Hierarchy. (most slides are borrowed) AJProença, Advanced Architectures, MiEI, UMinho, 2017/18 1
Advaced Architectures Master Iformatics Eg. 2017/18 A.J.Proeça Memory Hierarchy (most slides are borrowed) AJProeça, Advaced Architectures, MiEI, UMiho, 2017/18 1 Itroductio Programmers wat ulimited amouts
More informationA SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON
A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON Roberto Lopez ad Eugeio Oñate Iteratioal Ceter for Numerical Methods i Egieerig (CIMNE) Edificio C1, Gra Capitá s/, 08034 Barceloa, Spai ABSTRACT I this work
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 informationCS : Programming for Non-Majors, Summer 2007 Programming Project #3: Two Little Calculations Due by 12:00pm (noon) Wednesday June
CS 1313 010: Programmig for No-Majors, Summer 2007 Programmig Project #3: Two Little Calculatios Due by 12:00pm (oo) Wedesday Jue 27 2007 This third assigmet will give you experiece writig programs that
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 information15-859E: Advanced Algorithms CMU, Spring 2015 Lecture #2: Randomized MST and MST Verification January 14, 2015
15-859E: Advaced Algorithms CMU, Sprig 2015 Lecture #2: Radomized MST ad MST Verificatio Jauary 14, 2015 Lecturer: Aupam Gupta Scribe: Yu Zhao 1 Prelimiaries I this lecture we are talkig about two cotets:
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 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 informationCS 111: Program Design I Lecture 15: Objects, Pandas, Modules. Robert H. Sloan & Richard Warner University of Illinois at Chicago October 13, 2016
CS 111: Program Desig I Lecture 15: Objects, Padas, Modules Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago October 13, 2016 OBJECTS AND DOT NOTATION Objects (Implicit i Chapter 2, Variables,
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 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 informationcondition w i B i S maximum u i
ecture 10 Dyamic Programmig 10.1 Kapsack Problem November 1, 2004 ecturer: Kamal Jai Notes: Tobias Holgers We are give a set of items U = {a 1, a 2,..., a }. Each item has a weight w i Z + ad a utility
More informationEnd Semester Examination CSE, III Yr. (I Sem), 30002: Computer Organization
Ed Semester Examiatio 2013-14 CSE, III Yr. (I Sem), 30002: Computer Orgaizatio Istructios: GROUP -A 1. Write the questio paper group (A, B, C, D), o frot page top of aswer book, as per what is metioed
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 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 informationK-NET bus. When several turrets are connected to the K-Bus, the structure of the system is as showns
K-NET bus The K-Net bus is based o the SPI bus but it allows to addressig may differet turrets like the I 2 C bus. The K-Net is 6 a wires bus (4 for SPI wires ad 2 additioal wires for request ad ackowledge
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 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 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 informationLecture 6. Lecturer: Ronitt Rubinfeld Scribes: Chen Ziv, Eliav Buchnik, Ophir Arie, Jonathan Gradstein
068.670 Subliear Time Algorithms November, 0 Lecture 6 Lecturer: Roitt Rubifeld Scribes: Che Ziv, Eliav Buchik, Ophir Arie, Joatha Gradstei Lesso overview. Usig the oracle reductio framework for approximatig
More informationMathematical Stat I: solutions of homework 1
Mathematical Stat I: solutios of homework Name: Studet Id N:. Suppose we tur over cards simultaeously from two well shuffled decks of ordiary playig cards. We say we obtai a exact match o a particular
More informationReal-time Operating Systems
TDDI04 Cocurret Programmig, Operatig Systems, ad Real-time Operatig Systems Where are OSs foud? Geeral purpose systems Embedded systems Real-time Operatig Systems Microprocessor market shares i 999 99%
More informationAdministrative UNSUPERVISED LEARNING. Unsupervised learning. Supervised learning 11/25/13. Final project. No office hours today
Admiistrative Fial project No office hours today UNSUPERVISED LEARNING David Kauchak CS 451 Fall 2013 Supervised learig Usupervised learig label label 1 label 3 model/ predictor label 4 label 5 Supervised
More informationCS 111 Green: Program Design I Lecture 27: Speed (cont.); parting thoughts
CS 111 Gree: Program Desig I Lecture 27: Speed (cot.); partig thoughts By Nascarkig - Ow work, CC BY-SA 4.0, https://commos.wikimedia.org/w/idex.php?curid=38671041 Robert H. Sloa (CS) & Rachel Poretsky
More informationSecurity of Bluetooth: An overview of Bluetooth Security
Versio 2 Security of Bluetooth: A overview of Bluetooth Security Marjaaa Träskbäck Departmet of Electrical ad Commuicatios Egieerig mtraskba@cc.hut.fi 52655H ABSTRACT The purpose of this paper is to give
More informationCHAPTER 2: PROCESS MANAGEMENT
1 CHAPTER 2: PROCESS MANAGEMENT Slides by: Ms. Shree Jaswal TOPICS TO BE COVERED Process description: Process, Process States, Process Control Block (PCB), Threads, Thread management. Process Scheduling:
More information