TABLE OF CONTENTS CHAPTER NO. TITLE PAGE NO. ABSTRACT LIST OF TABLES LIST OF FIGURES LIST OF SYMBOLS AND ABBREVIATIONS

Similar documents
Transcription:

viii TABLE OF CONTENTS ABSTRACT LIST OF TABLES LIST OF FIGURES LIST OF SYMBOLS AND ABBREVIATIONS v xviii xix xxii 1. INTRODUCTION 1 1.1 MOTIVATION OF THE RESEARCH 1 1.2 OVERVIEW OF PROPOSED WORK 3 1.3 RESEARCH OBJECTIVES 5 1.4 CONTRIBUTION OF THE THESIS 5 1.5 THESIS OUTLINE 6 2 LITERATURE SURVEY 7 2.1 INTRODUCTION TO MULTICORE ARCHITECTURE 7 2.1.1 Memory Design in Multicore System 10 2.1.2 The Need for Multicore 11 2.1.3 Multicore Challenges 12 2.1.3.1 Power and temperature 12 2.1.3.2 Cache coherence 13 2.1.3.3 Multithreading 13

ix 2.1.4 Open Issues in Multicore Chip 14 2.1.4.1 Improved memory system 14 2.1.4.2 System bus and interconnection networks 14 2.1.4.3 Starvation 15 2.1.4.4 Homogeneous vs. heterogeneous cores 16 2.1.5 Advantages and Disadvantages of the Design 18 2.2 INTRODUCTION TO AGENTS 19 2.2.1 Intelligent Agents 20 2.2.2 Other Classes of intelligent agents 23 2.2.3 Multiagent System 23 2.2.3.1 Simple multiagent system 24 2.2.3.2 Properties and characteristics of multiagent systems 25 2.2.3.3 Applications of multiagent systems 26 2.3 SCHEDULING ALGORITHMS 27 2.3.1 Operating System Schedulers 27 2.3.2 Types of Operating System Schedulers 28 2.3.2.1 Long term scheduler 28 2.3.2.2 Medium term scheduler 28 2.3.2.3 Short term scheduler 29 2.3.3 Dispatcher 30 2.3.4 Categories of Scheduling Algorithms 30 2.3.4.1 First in first out algorithm 31 2.3.4.2 Shortest remaining time 31

x 2.3.4.3 Fixed priority pre emptive scheduling 33 2.3.4.4 Fixed round robin scheduling 33 2.3.4.5 Multilevel queue scheduling 34 2.3.4.6 Manual scheduling 34 2.3.5 Process Scheduling in Various Operating Systems 35 2.3.5.1 Windows 35 2.3.5.2 Mac OS 36 2.3.5.3 AIX 37 2.3.5.4 Linux 38 2.3.5.5 Free Berkeley Software Distribution 39 2.3.5.6 Net Berkeley Software Distribution 40 2.3.5.7 Solaris 40 2.3.6 Performance Metrics of Scheduling 40 2.3.7 Selecting a Suitable Scheduling algorithm 42 2.4 LOAD BALANCING ALGORITHMS 43 2.4.1 Static Load Balancing 44 2.4.1.1 Round robin and randomized algorithms 44 2.4.1.2 Central manager algorithm 45 2.4.1.3 Threshold algorithm 45 2.4.2 Dynamic Load Balancing 46 2.4.2.1 Central queue algorithm 46 2.4.2.2 Local queue algorithm 47 2.4.3 Performance Evaluation Parameters for Load Balancing Algorithms 48

xi 2.5 DESIGN PRINCIPLES AND PERFORMANCE OF SCHEDULING AND LOAD BALANCING ON MULTICORE SYSTEM 50 2.5.1 Design Principles for OS Schedulers 53 2.5.2 Thread Migration on Cores 54 2.5.3 Analysis using Performance Counters 55 2.6 SCHEDULING ALGORITHMS FOR MULTIPROCESSORS 55 2.6.1 EDF Scheduling Algorithm 56 2.6.2 PF Scheduling Algorithm 56 2.6.3 LLREF Scheduling Algorithm 57 2.7 REAL TIME SCHEDULING ON MULTICORE PLATFORMS 57 2.7.1 Real Time all EDF Scheduling Algorithm 58 2.7.2 PFAIR Scheduling Algorithm 60 2.7.3 Online Scheduling Algorithm 61 2.8 PARALLEL TASK SCHEDULING ON MULTICORE PLATFORMS 61 2.8.1 Thread Grouping and Co-scheduling 62 2.8.2 Energy Efficiency on Multicore Processors 62 2.8.3 Multicore scheduling in automotive ECUs 63 2.8.4 Time and Space Partitioned System 64 2.8.5 Task scheduling algorithm 64 2.8.6 Partitioning based Multi Core Scheduling 65 2.9 SCHEDULING ON HETEROGENEOUS MULTICORE PROCESSORS 66 2.9.1 Signature based Scheduling 67

xii 2.9.2 A Comprehensive Scheduler 68 2.10 AGENT BASED SCHEDULING IN MULTIPROCESSOR SYSTEM 69 2.10.1 Advances in Asynchronous Agent based Scheduling 69 2.10.2 Multiagent Based Integration of Scheduling Algorithms 70 2.11 LOAD BALANCING IN MULTIPROCESSOR SYSTEM 70 2.11.1 Categories of Load Balancing 71 2.11.2 Workload Balancing Algorithm for Real Time Tasks 71 2.11.3 Adaptive Task Core Ratio Load Balancing 72 2.11.4 A Hierarchical Approach for Load Balancing 73 2.11.5 Load Balancing using Prioritized Flows 74 2.11.6 Load Balancing on Speed 74 2.11.7 The Power-of-d (SQ (d)) algorithm 76 2.11.8 Work stealing and work sharing 76 2.12 SUMMARY 77 3. AGENT BASED SCHEDULING FOR MULTICORE ARCHITECTURE 78 3.1 INTRODUCTION 78 3.2 SYSTEM MODEL FOR AGENT SCHEDULING 79 3.3 ORGANIZATION OF SCHEDULER, DISPATCHER AND MIDDLE AGENT 80 3.3.1 The Process Scheduler Organization 80

xiii 3.3.2 The Process Dispatcher Organization 81 3.3.3 Middle Agent System Organization 83 3.4 DATA STRUCTURE IMPLEMENTATION 83 3.4.1 Agent Processor Information Table (APIT) 83 3.4.2 Agent Request Table (ARQT) 84 3.5 RESULTS AND DISCUSSION 85 3.5.1 Linux Scheduler 86 3.5.1.1 Scheduler time complexity Evaluation 86 3.5.1.2 Importance of linux 2.6 scheduler 86 3.5.1.3 Major scheduling structures 86 3.5.1.4 Better support for SMP systems 89 3.5.1.5 Task preemption 89 3.5.1.6 Dynamic task prioritization 89 3.5.1.7 Better user responsiveness 90 3.5.1.8 SMP load balancing 90 3.5.1.9 Major Functions of the scheduler 91 3.5.1.10 Impact on multicore processor 92 3.5.2 Performance Evaluation of Agent Based Scheduler 92 3.5.2.1 Proposed Approach 92 3.5.3 Performance Analysis over Average Waiting Time 99 3.6 SUMMARY 103 4 A NOVEL HARD-SOFT PROCESSOR AFFINITY SCHEDULING USING MULTIAGENTS 104

xiv 4.1 OVERVIEW 104 4.2 SYSTEM DESIGN 105 4.2.1 Affinity Scheduling Model 106 4.2.2 Design of Hard Affinity Based Scheduling for Critical Tasks 108 4.2.3 Design of Soft Affinity Scheduling for Non Critical Tasks 110 4.3 SCHEDULER IMPLEMENTATION FOR AFFINITY SCHEDULING 111 4.3.1 Scheduler Model 112 4.3.2 The Kernel Scheduler API 112 4.3.3 Performance Evaluation 115 4.3.3.1 Performance improvement on CPU utilization 115 4.3.3.2 Comparison with other scheduling algorithms 116 4.4 SUMMARY 120 5 CORE PERFORMANCE BASED AGENT SCHEDULING AND THREAD ASSIGNMENT FOR HETEROGENEOUS MULTICORE SYSTEM 121 5.1 INTRODUCTION 121 5.2 SCHEDULING MODEL 123 5.2.1 Design of Agent Decoder and Scheduler 123 5.2.2 Initial Parameters 124

xv 5.3 STRUCTURE OF AGENT TASK ASSIGNMENT ALGORITHM 126 5.4 DESIGN AND IMPLEMENTATION OF AGENT TASK ASSIGNMENT ALGORITHM 127 5.5 EVALUATION AND RESULTS 129 5.5.1 Scheduling Criteria 130 5.5.2 Kernel API Design and Implementation 131 5.5.3 Workload Descriptions for SPEC2000 133 5.5.4 Workload Analysis 134 5.5.5 Improved CPU Utilization and Performance Analysis 137 5.5.6 Reduction in Average Waiting Time 143 5.6 SUMMARY 144 6. LOAD BALANCING BASED ON AGENT SCHEDULING FOR MULTICORE ARCHITECTURE 145 6.1 MOTIVATION 145 6.2 LOAD BALANCING BASED ON AGENT BASED BINARY SEARCH TREE 146 6.2.1 System Model and Algorithm Construction 147 6.2.2 Relationship with CPU Power Dissipation 150 6.2.3 Equalizing Power Consumption 151 6.2.4 Results and Discussion 152

xvi 6.2.4.1 Increased CPU utilization 154 6.2.4.2 Comparative analysis 155 6.2.4.3 Testing and measuring performance 160 6.2.4.4 Scheduling ratio 161 6.2.4.5 Performance over average waiting time 164 6.2.4.6 Performance over response time 165 6.2.4.7 Context switch overhead 166 6.3 AUTOMATIC LOAD BALANCING USING TIME BASED UNUSED SPACE COLLECTION 167 6.3.1 Introduction 168 6.3.2 Work on Unused Space Collection 169 6.3.3 System Model 170 6.3.4 Algorithm Design 171 6.3.4.1 Local unused space collection algorithm 172 6.3.4.2 Global unused space Collection Algorithm 175 6.3.5 Inductive Learning 176 6.3.5.1 Learning agent components 176 6.3.5.2 Decision trees as performance elements 177 6.3.5.3 Expressiveness of decision trees 179 6.3.6 Evaluation and Results 179 6.4 SUMMARY 180

xvii 7. CONCLUSION AND FUTURE ENHANCEMENTS 181 REFERENCES 184 LIST OF PUBLICATIONS 203

xviii LIST OF TABLES TABLE NO. TITLE PAGE NO. 3.1 Multicore in PEAS environment 80 3.2 APIT- Agent Processor Information Table 83 3.3 ARQT- Agent Request Table 84 3.4 Linux 2.6 scheduler functions 85 3.5 Average waiting time and number of cores 101 3.6 Average waiting time and number of cores For Agent and RR approach 102 5.1 Example benchmarks for workload analysis 133 5.2 Example benchmarks for workload analysis 134 6.1 Policies adopted in agent based load balancing 147 6.2 CPU Power Dissipation for various Processors 151 6.3 Performance factors for different load balancing algorithms 156 6.4 Parameters for different load balancing algorithms 159

xix LIST OF FIGURES FIGURE NO. TITLE PAGE NO. 1.1 Proposed Methodologies incorporated in thesis 4 1.2 Multicore Architecture Model 9 3.1 Multicore architecture with multiagent system 79 3.2 Shared memory with a ready queue 81 3.3 Middle Agent system communication 83 3.4 The Linux 2.6 scheduler run queue structure 88 3.5 Agent generation algorithm 93 3.6 Processor Agent Implementation- an overview 95 3.7 Multiagent based Scheduling Simulation Results 97 3.8 Process Agent Information 98 3.9 Processor/Core Agent Information 99 3.10 Number of cores vs. average waiting time 101 3.11 Execution time for various scheduling algorithms keeping the number of cores=100 102 3.12 AWT Vs. Number of cores for Agent and RR Approach 103 4.1 General Multicore System Architecture 104 4.2 Ready queue process with the tag field 106 4.3 Middle agent queue implementation 107 4.4 Process Scheduling by OS scheduler, middle agent and individual agents 108 4.5 Hard affinity assigned by the programmer / user 109 4.6 Soft affinity assigned by the scheduler 110 4.7 Agent Control Block (ACB) 111 4.8 Scheduler Components 114

xx FIGURE NO. TITLE PAGE NO. 4.9 CPU Usage History for Dual Core processor 116 4.10 Performance analysis of Affinity and RR algorithms 117 4.11 Performance analysis of Affinity and SJF algorithms 118 4.12 Performance analysis of Affinity and EDF algorithms 118 4.13 Summary of Performance analysis of all the algorithms 119 5.1 Traditional multiprocessor system 121 5.2 Heterogeneous Multicore System 122 5.3 Agent Decoder implemented in scheduler 124 5.4 Agent decoder functionality 125 5.5 Agent Thread Assignment using Agent Decoder 127 5.6 Agent Task Assignment Algorithm 129 5.7 An example system call part 132 5.8 Average energy per task for various scheduling algorithms 135 5.9 Different Make Spans and their Performance in terms of speed 136 5.10 Workload performance for Various Cores with respect to Average energy per task 136 5.11 Performance Analysis of ASTPI and the agent based algorithm 138 5.12 Performance Analysis of HASS and the agent based algorithm 139 5.13 Performance Analysis of AS and the agent based algorithm 140 5.14 Performance Analysis of VAS and the agent based algorithm 141 5.15 Performance Analysis of Affinity and the agent based algorithm 141

xxi FIGURE NO. TITLE PAGE NO. 5.16 Comparative performance analysis of ASTPI, HASS, AS, VAS, Affinity and the agent algorithm 142 5.17 Average waiting time for different scheduling algorithms 143 6.1 Equalizing power consumption of the processors using load balancing 152 6.2 CPU performance against the number of Cores and Process 154 6.3 Screen shot of scheduling ratio for different cores 162 6.4 Schedulable ratio for different cores 163 6.5 Abstract view of load balance initialization 164 6.6 Performance over average waiting time 165 6.7 Performance over average Response time 166 6.8 Context switch overhead under agent based scheduling algorithm 167 6.9 Multicore Architecture 168 6.10 Local unused space Collector model 171 6.11 Global unused space Collector Model 172 6.12 Local unused space Collection Agent Model 174 6.13 Global unused space Collection Agent Model 175 6.14 Decision Tree for the classification of unused space or non unused space files 178 6.15 Storage Compaction Algorithm Performance 180

xxii LIST OF SYMBOLS AND ABBREVIATIONS EDF - Earliest deadline first AIA - Abstract intelligent agents AMAS - Adaptive multiagent system AMD - Advanced micro devices ACB - Agent control block APIT - Agent processor information table ARQT - Agent request table API - Application programming interface ASTPI - Average stall time per instruction AWT - Average waiting time BST - Binary search tree BT - Burst time CPU - Central processing unit CFS - Completely fair scheduler CT - Critical task DLB - Dynamic load balancing DVS - Dynamic voltage scaling ET - Execution time FIFO - First in first out FCFS - First come first served FLAME - Flexible large scale agent modeling environment GGCA - Global unused space collection algorithm HA - Hard affinity HMC - Heterogeneous multi core ILP - Instruction level parallelism

xxiii IA - Intelligent agent LGCA - Local unused space collection algorithm MA - Middle agent NCT - Non critical task NUMA - Non uniform memory architecture OS - Operating system PEAS - Performance measure, environment, actuators, sensors PCB - Process control block PA - Processor agent RR - Round robin SJF - Shortest job first SMT - Simultaneous multithreading SMP - Simultaneous multiprocessor SA - Soft affinity SPEC - Standard performance evaluation corporation