May 2007Task SchedulingSlide 1 Task Scheduling A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.

Slides:



Advertisements
Similar presentations
REAL TIME SYSTEM Scheduling.
Advertisements

Apr. 2007SatisfiabilitySlide 1 Satisfiability A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Nov. 2005Math in ComputersSlide 1 Math in Computers A Lesson in the “Math + Fun!” Series.
May 2005Special NumbersSlide 1 Special Numbers A Lesson in the “Math + Fun!” Series.
RUN: Optimal Multiprocessor Real-Time Scheduling via Reduction to Uniprocessor Paul Regnier † George Lima † Ernesto Massa † Greg Levin ‡ Scott Brandt ‡
Apr. 2007Mathematical IllusionsSlide 1 Mathematical Illusions A Lesson in the “Math + Fun!” Series.
May 2015Binary SearchSlide 1 Binary Search A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Bilkent University Department of Computer Engineering
CPSC 322, Lecture 11Slide 1 Constraint Satisfaction Problems (CSPs) Introduction Computer Science cpsc322, Lecture 11 (Textbook Chpt 4.0 – 4.2) January,
Apr. 2015SatisfiabilitySlide 1 Satisfiability A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
June 2007Malfunction DiagnosisSlide 1 Malfunction Diagnosis A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
HandoutLecture 7Task Scheduling Mini-Sudoku Puzzle Complete entries in this chart so that letters A-F appear without repetition in each row, each column.
Apr. 2007Placement and RoutingSlide 1 Placement and Routing A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Mar. 2015Easy, Hard, Impossible!Slide 1 Easy, Hard, Impossible! A Lecture in CE Freshman Seminar Series: Puzzling Problems in Computer Engineering.
Nov. 2004Math and ElectionsSlide 1 Math and Elections A Lesson in the “Math + Fun!” Series.
Prof. Bodik CS 164 Lecture 171 Register Allocation Lecture 19.
Feb. 2005Counting ProblemsSlide 1 Counting Problems A Lesson in the “Math + Fun!” Series.
Dec. 2004Math CrosswordsSlide 1 Math Crosswords A Lesson in the “Math + Fun!” Series.
Register Allocation (via graph coloring)
Apr. 2007Easy, Hard, Impossible!Slide 1 Easy, Hard, Impossible! A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
May 2007Binary SearchSlide 1 Binary Search A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
May 2012Malfunction DiagnosisSlide 1 Malfunction Diagnosis A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
May 2012Task SchedulingSlide 1 Task Scheduling A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment Presented by Pete Perlegos C.L. Liu and James W. Layland.
Apr. 2015Placement and RoutingSlide 1 Placement and Routing A Lecture in CE Freshman Seminar Series: Puzzling Problems in Computer Engineering.
4/29/09Prof. Hilfinger CS164 Lecture 381 Register Allocation Lecture 28 (from notes by G. Necula and R. Bodik)
May 2007String MatchingSlide 1 String Matching A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
HandoutApr. 2007Satisfiability A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Solving Sudoku Mark PTTLS Micro teach. Solving Sudoku What is a Sudoku? A Sudoku is a number puzzle based on a 9x9 grid made up from smaller 3x3 blocks.
More Computational Curiosities of Sudoku ( 数独 ) Bryson R. Payne, Ph.D. North Georgia College & State University.
Mathematical Methods In Solving Sudoku Puzzles By: Cory Trenkamp Wright State University May 24, 2006.
CS194 Project: Sudoku Difficulty Kha Chu Advisor: Professor Sahai.
More Scheduling cs550 Operating Systems David Monismith.
Slide 1 Constraint Satisfaction Problems (CSPs) Introduction Jim Little UBC CS 322 – CSP 1 September 27, 2014 Textbook §
Section 2.2 Echelon Forms Goal: Develop systematic methods for the method of elimination that uses matrices for the solution of linear systems. The methods.
Ahmad Al-Ghoul. Learning Objectives Explain what a Microsoft Project environment and Project Server. Describe how to use the Ribbon, Quick Access Toolbar.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
Scheduling policies for real- time embedded systems.
Real-Time Systems Mark Stanovich. Introduction System with timing constraints (e.g., deadlines) What makes a real-time system different? – Meeting timing.
Math 15 Introduction to Scientific Data Analysis Lecture 3 Working With Charts and Graphics.
Whiteboardmaths.com © 2008 All rights reserved
HandoutMay 2007Task Scheduling A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
1 Project Management Example Solving Sudoku 2 What is Sudoku?  Sudoku is a game with 9 columns and 9 rows and 9 “boxes” composed of a 3 x 3 Grid  Numbers.
Memory management.
May 2015Sorting NetworksSlide 1 Sorting Networks A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
How Do I Solve This Thing?. You are familiar with Sudoku puzzles. For this variation, place the integers 1 – 9 into each row or column such that the.
For a good summary, visit:
CompSci Problem Solving: Sudoku  Rules of the Game Sudoku is played with a 9 by 9 "board" consisting of nine 3 by 3 sub-boards. The symbols 1 -
Uniprocessor Process Management & Process Scheduling Department of Computer Science Southern Illinois University Edwardsville Spring, 2016 Dr. Hiroshi.
Planning and Scheduling.  A job can be made up of a number of smaller tasks that can be completed by a number of different “processors.”  The processors.
May 2007Sorting NetworksSlide 1 Sorting Networks A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Constraint Satisfaction Problems (CSPs) Introduction
Teacher Notes Supplies Needed: Class set of sudoku puzzles.
Statistical Analysis with Excel
Project Management Skills.
Teaching slides Chapter 1.
3D Models from 2D Images A Lecture in the Freshman Seminar Series:
Satisfiability A Lecture in CE Freshman Seminar Series:
CS Fall 2016 (Shavlik©), Lecture 8, Week 5
Sudoku (数独 sūdoku?), also known as Number Place or Nanpure, is a logic-based placement puzzle. The objective is to fill the grid so that every column,
Planning and Scheduling
Placement and Routing A Lecture in CE Freshman Seminar Series:
Sorting Networks A Lecture in CE Freshman Seminar Series:
Planning and Scheduling
3D Models from 2D Images A Lecture in the Freshman Seminar Series:
Easy, Hard, Impossible! A Lecture in CE Freshman Seminar Series:
Malfunction Diagnosis
Binary Search A Lecture in CE Freshman Seminar Series:
Task Scheduling A Lecture in CE Freshman Seminar Series:
IE 469 Industrial Applications of Operations Research
Presentation transcript:

May 2007Task SchedulingSlide 1 Task Scheduling A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering

May 2007Task SchedulingSlide 2 About This Presentation EditionReleasedRevised FirstMay 2007 This presentation belongs to the lecture series entitled “Ten Puzzling Problems in Computer Engineering,” devised for a ten-week, one-unit, freshman seminar course by Behrooz Parhami, Professor of Computer Engineering at University of California, Santa Barbara. The material can be used freely in teaching and other educational settings. Unauthorized uses, including any use for financial gain, are prohibited. © Behrooz Parhami

May 2007Task SchedulingSlide 3 Mini-Sudoku Puzzle Complete entries in this chart so that numbers 1-6 appear without repetition in each row, each column and each 2  3 block USA Today carries a daily mini-Sudoku at its site: Standard Sudoku consists of a 9  9 chart, but this mini version is good for a quick fix Sudoku isn’t a math puzzle: Can substitute letters A-F or any other six symbols for numbers 1-6

May 2007Task SchedulingSlide 4 Mini-Sudoku Puzzle: Solution Method Complete entries in this chart so that letters A-F appear without repetition in each row, each column and each 2  3 block To continue from here, write down all possible choices in the remaining blank boxes and see whether the resulting info leads to more progress C 2 4 C 1 6 B D A D6 4C6A 3D D B DA FC E A CF DF C SuDoKu: abbr. in Japanese for “numbers must be single.” Euler may have invented it; Howard Garns ( US ) & Wayne Gould ( HK ) popularized it in modern times

May 2007Task SchedulingSlide 5 Sudoku Puzzle: Easy Example Complete entries in this chart so that numbers 1-9 appear without repetition in each row, each column and each 3  3 block Sudoku puzzles of varying difficulties (easy, medium, hard, evil) are available at and several other Web sites, such as USA Today’s site Many newspapers carry these puzzles; there are also many collections in book form

May 2007Task SchedulingSlide 6 Sudoku Puzzle Solution Method Strategy 1: Identify a missing number from a row, column, or block; if you can exclude all but one cell for that number, then write it down 6 7 Strategy 2: When you can’t make progress by Strategy 1, write down all candidate numbers in the cells and try to eliminate a number of options via reasoning. For example if xy, xy, xyz are candidates in three cells of a block, then the cell marked xyz must hold z , 2, 3, 4 missing from this row 7, 8, 9 missing from this column

May 2007Task SchedulingSlide 7 Sudoku Puzzle: Hard Example Complete entries in this chart so that numbers 1-9 appear without repetition in each row, each column and each 3  3 block Hard puzzles typically have fewer entries supplied, with each row, column, or block containing only a few entries Hard puzzles may have handles or starting points (5 in the top left block or 9 in center and lower right blocks)

May 2007Task SchedulingSlide 8 Variations on Sudoku Other sizes (e.g., 6  6, with 2  3 blocks; or 16  16, with 4  4 blocks) Combining this 2000s phenomenon with Rubik’s cube of the 1980s... or with the age-old sliding 15 puzzle

May 2007Task SchedulingSlide 9 Task Scheduling Problem We have a set of of tasksNumbers in Sudoku puzzle There are some “processors” that can execute tasks Cells in Sudoku puzzle can hold numbers Assign tasks to processors so as to meet certain constraints Place numbers in cells while honoring some constraints A task may fit only some processors Tasks may have prerequisites tasks Preemption may (not) be allowed Tasks may have deadlines Shortest schedule may be required Use only numbers 1-9 Some numbers already placed Different numbers in each row Different numbers in each column Different numbers in each block Virtually all instances of the task scheduling problem are difficult (NP-complete), just like Sudoku

May 2007Task SchedulingSlide 10 Resource Allocation Problem We have a set of of resourcesNumbers in Sudoku puzzle There are “locations” where resources may be placed Cells in Sudoku puzzle can hold numbers Assign resources to locations to meet certain constraints Place numbers in cells while honoring some constraints A resource may fit only some locations Resources must be “easily” accessible Resource mobility may (not) be allowed Resource cost may differ by location Lowest-cost assignment may be required Use only numbers 1-9 Some numbers already placed Different numbers in each row Different numbers in each column Different numbers in each block Virtually all instances of the resource allocation problem are difficult (NP-complete), just like Sudoku

May 2007Task SchedulingSlide 11 Scheduling Required CE Courses Constraints Prerequisite: Solid downward arrow Corequisite: Dashed sideways arrow Units per quarter:  18 ECE 1 CS 130A ECE 15A ECE 15B CS 170 Math 3A Math 3B Math 3C Math 5A CS 10 CS 20 CS 40CS 60 Phys 1 Phys 2 Phys 3 Phys 4 Phys 3L Phys 4L Chem 1A Chem 1B Chem 1AL Chem 1BL ECE 2A ECE 2B ECE 2C ECE 152A ECE 152BECE Units Engr 101 Upper - division standing ECE 139 Or CS 30 Or PSTAT 120A Or CS units 20 units

May 2007Task SchedulingSlide 12 Scheduling Required CE Courses Constraints Prerequisite: Solid downward arrow Corequisite: Dashed sideways arrow Units per quarter:  18 ECE 1 CS 130A ECE 15A ECE 15B CS 170 Math 3A Math 3B Math 3C Math 5A CS 10 CS 20 CS 40CS 60 Phys 1 Phys 2 Phys 3 Phys 4 Phys 3L Phys 4L Chem 1A Chem 1B Chem 1AL Chem 1BL ECE 2A ECE 2B ECE 2C ECE 152A ECE 152BECE Units Engr 101 Upper - division standing ECE 139 Or CS 30 Or PSTAT 120A Or CS 30 Almost done! 12 units 20 units 16

May 2007Task SchedulingSlide 13 Job-Shop Scheduling Time StaffStaff 8 Tb1Tc1 Ta1 Ta2 Tb2 Td2 Tb3 Td1 Job Task Machine Time Staff Ja Ta1 M1 2 3 Ja Ta2 M3 6 2 Jb Tb1 M2 5 2 Jb Tb2 M1 3 3 Jb Tb3 M2 3 2 Jc Tc1 M3 4 2 Jd Td1 M1 5 4 Jd Td2 M2 2 1 M1 M2 M3 Time StaffStaff 8 Tb1 Tc1 Ta1 Ta2 Tb2 Td2 Tb3 Td1 Switch?

May 2007Task SchedulingSlide 14 Truck Scheduling Boise Portland Seattle Dallas NYC Chicago Orlando LA SF Required trip 00%Truck load 40% 35% 50% 75% 20% Truck location

May 2007Task SchedulingSlide 15 Multiprocessor Scheduling T  = 8 (execution time goal) Latest start times: see the layered diagram Priorities: shown on the diagram in red Task graph with unit-time tasks Here’s a heuristic known as list scheduling: 1.Find the depth T  of the task graph 2.Take T  as a goal for the running time T p 3.Determine the latest possible start times 4.Assign priorities in order of latest times When two tasks have the same “latest start time,” a secondary tie-breaking rule is used

May 2007Task SchedulingSlide 16 Assignment to Processors Even in this simple case of unit-time tasks, multiprocessor scheduling remains difficult with as few as 3 processors P1P P1P1 P2P P1P1 P2P2 P3P3 Tasks listed in priority order 1* Time Step