Skip to content

Commit

Permalink
SRTG-Scheduler V 1.1.0 (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiritigowda authored Oct 31, 2020
1 parent 449e617 commit 4aa3d66
Show file tree
Hide file tree
Showing 97 changed files with 378 additions and 376 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ branches:
before_script:
- mkdir build
- cd build
- cmake -DCMAKE_C_FLAGS="-Wall -fprofile-arcs -ftest-coverage -std=c99" ../RTG-scheduler
- cmake -DCMAKE_C_FLAGS="-Wall -fprofile-arcs -ftest-coverage -std=c99" ../SRTG-Scheduler

script:
- make

after_success:
- ./../RTG-scheduler/testScripts/runCodeCoverage.sh
- ./../SRTG-Scheduler/testScripts/runCodeCoverage.sh
- lcov --directory . --capture --output-file coverage.info
- lcov --remove coverage.info '/usr/*' --output-file coverage.info
- lcov --list coverage.info
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

A schedule management framework for aperiodic soft-real-time jobs that may be used by a CPU - GPU system designer/integrator to select, configure and deploy a suitable architectural platform and to perform concurrent scheduling of these jobs

[Soft-Real-Time GP-GPU Scheduler](RTG-scheduler) (SRTG-Scheduler) is a dynamic scheduler for aperiodic soft-real-time jobs on GPU based architectures, with a simple, easy-to-use command-line interface (CLI). The SRTG-Scheduler is provided under the [MIT license](https://opensource.org/licenses/MIT). It is currently supported on Windows, Linux, and macOS platforms.
[Soft-Real-Time GP-GPU Scheduler](SRTG-Scheduler) (SRTG-Scheduler) is a dynamic scheduler for aperiodic soft-real-time jobs on GPU based architectures, with a simple, easy-to-use command-line interface (CLI). The SRTG-Scheduler is provided under the [MIT license](https://opensource.org/licenses/MIT). It is currently supported on Windows, Linux, and macOS platforms.

### Latest SRTG-Scheduler
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/kiritigowda/SRTG-Schedule?style=for-the-badge)](https://github.com/kiritigowda/SRTG-Schedule/releases)
Expand Down Expand Up @@ -84,7 +84,7 @@ A dynamic schedule management framework that is responsible for
* Determining which kernel(s) to dispatch to the GPU at a given time
* Determining how many GCUs to assign for a given kernel.

<p align="left"><a href="RTG-scheduler#real-time-gpu-scheduler"><img width="30%" src="documents/images/readme_images/header/summary.png" /></a></p>
<p align="left"><a href="SRTG-Scheduler#real-time-gpu-scheduler"><img width="30%" src="documents/images/readme_images/header/summary.png" /></a></p>

#### Advantages

Expand All @@ -94,8 +94,8 @@ A dynamic schedule management framework that is responsible for

#### Results

* Dynamic schedule management [framework](RTG-scheduler#real-time-gpu-scheduler) for soft-real-time jobs
* Support for [a-periodic](RTG-scheduler#real-time-gpu-scheduler) and recurring (periodic) soft-real-time tasks.
* Dynamic schedule management [framework](SRTG-Scheduler#real-time-gpu-scheduler) for soft-real-time jobs
* Support for [a-periodic](SRTG-Scheduler#real-time-gpu-scheduler) and recurring (periodic) soft-real-time tasks.
* Smart GPU Memory Management

**note:**
Expand Down
186 changes: 0 additions & 186 deletions RTG-scheduler/testScripts/runCodeCoverage.sh

This file was deleted.

56 changes: 0 additions & 56 deletions RTG-scheduler/testScripts/runTest-10-proc.sh

This file was deleted.

12 changes: 0 additions & 12 deletions RTG-scheduler/testScripts/runTest-10.sh

This file was deleted.

79 changes: 0 additions & 79 deletions RTG-scheduler/testScripts/runTest-delay-32.sh

This file was deleted.

16 changes: 9 additions & 7 deletions RTG-scheduler/CMakeLists.txt → SRTG-Scheduler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
cmake_minimum_required(VERSION 3.0)

# project definition
project(RTG-scheduler)
set(VERSION "1.0.1")
project(SRTG-Scheduler)
set(VERSION "1.1.0")

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

set(SRTG_PATH /opt/srtg CACHE PATH "RTG-scheduler default installation path")
set(SRTG_PATH /opt/srtg CACHE PATH "SRTG-Scheduler default installation path")
# need to do this to avoid setting the default path to /usr/local
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${SRTG_PATH}/RTG-scheduler CACHE PATH "RTG-scheduler default installation path" FORCE)
set(CMAKE_INSTALL_PREFIX ${SRTG_PATH}/SRTG-Scheduler CACHE PATH "SRTG-Scheduler default installation path" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin CACHE PATH "Directory where RTG-scheduler executable is generated" FORCE)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin CACHE PATH "Directory where SRTG-Scheduler executable is generated" FORCE)

if(NOT WIN32)
string(ASCII 27 Esc)
Expand Down Expand Up @@ -56,7 +56,7 @@ set(SOURCES
)

# executable target and the source files
add_executable(RTG-scheduler ${SOURCES})
add_executable(SRTG-Scheduler ${SOURCES})

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
Expand All @@ -65,7 +65,9 @@ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -std=c++11")
endif()

install(TARGETS RTG-scheduler DESTINATION bin)
install(TARGETS SRTG-Scheduler DESTINATION bin)
install(DIRECTORY SRTG-JobCreator DESTINATION .)
install(DIRECTORY SRTG-ResultAnalysis DESTINATION .)

# Bring in default test data
FILE(GLOB RTG_TEST_DATA_TXT "testData/*.txt")
Expand Down
38 changes: 19 additions & 19 deletions RTG-scheduler/README.md → SRTG-Scheduler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

# Dynamic Schedule Management Framework For GPUs

## Real-Time GPU Scheduler
## Soft-Real-Time GPU Scheduler

RTG-Scheduler is a dynamic scheduler for aperiodic soft-real-time jobs on GPU based architectures, with a simple, easy-to-use command-line interface (CLI). The project is provided under the [MIT license](https://opensource.org/licenses/MIT). It is currently supported on Windows, Linux, and macOS platforms.
SRTG-Scheduler is a dynamic scheduler for aperiodic soft-real-time jobs on GPU based architectures, with a simple, easy-to-use command-line interface (CLI). The project is provided under the [MIT license](https://opensource.org/licenses/MIT). It is currently supported on Windows, Linux, and macOS platforms.

The RTG-scheduler itself resides on the CPU. When a GPU compatible job is released, it is sent to the SRTG-scheduler, which checks if this job can be executed on the GPU before its deadline. If yes, the job is offloaded to the GPU and any data that it needs is transferred to GPU memory. Otherwise, the job is rejected and sent back to the CPU scheduler immediately.
The SRTG-Scheduler itself resides on the CPU. When a GPU compatible job is released, it is sent to the SRTG-scheduler, which checks if this job can be executed on the GPU before its deadline. If yes, the job is offloaded to the GPU and any data that it needs is transferred to GPU memory. Otherwise, the job is rejected and sent back to the CPU scheduler immediately.

<p align="center"><img width="100%" src="../documents/images/RTG_Scheduler_block_diagram.png" /></p>

Expand Down Expand Up @@ -71,27 +71,27 @@ Once the jobs are scheduled and the schedule data is obtained from SRTG-Schedule

<p align="center"><img width="80%" src="SRTG-ResultAnalysis/srtg-results-images/srtg-result-4.png" /></p>

## RTG-Scheduler Usage
## SRTG-Scheduler Usage

### Windows
```
RTG-scheduler [options] --j <jobs_file.csv>
--r <Release_Time_file.csv>
--m <option>
--p <option>
--d <option>
--simulation <1/0>
--gpu <AMD/NVIDIA>
SRTG-Scheduler [options] --j <jobs_file.csv>
--r <Release_Time_file.csv>
--m <option>
--p <option>
--d <option>
--simulation <1/0>
--gpu <AMD/NVIDIA>
```
### Linux / MAC OS X
### Linux / macOS
```
./RTG-scheduler [options] --j <jobs_file.csv>
--r <Release_Time_file.csv>
--m <option>
--p <option>
--d <option>
--simulation <1/0>
--gpu <AMD/NVIDIA>
./SRTG-Scheduler [options] --j <jobs_file.csv>
--r <Release_Time_file.csv>
--m <option>
--p <option>
--d <option>
--simulation <1/0>
--gpu <AMD/NVIDIA>
```

### Scheduler Options Supported
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <stdio.h>

// version
#define RTGS_VERSION "1.0.1"
#define RTGS_VERSION "1.1.0"

// global variables
int GLOBAL_RTGS_MODE;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
parser.add_argument('--num_jobset', type=int, default=-1,
help='Number of job [type:INT range:1 to N] - optional (default:1)')
parser.add_argument('--scheduler_directory', type=str, default='',
help='Scheduler Directory - directory with RTG-scheduler')
help='Scheduler Directory - directory with SRTG-Scheduler')
parser.add_argument('--output_directory', type=str, default='',
help='Output Directory - directory to save scheduler summary')
args = parser.parse_args()
Expand All @@ -63,12 +63,12 @@
print("ERROR - No Job Directory")
exit()
if not os.path.exists(exe_dir):
print("ERROR - No RTG Scheduler Directory")
print("ERROR - No SRTG Scheduler Directory")
exit()
if not os.path.exists(output_dir):
os.makedirs(output_dir)

# num job sets required to be created
for s in range(numJobSet):
os.system('./'+exe_dir+'RTG-scheduler --j '+jobs_dir+'/'+jobSetName+'-'+str(s)+'-syntheticJobs.csv --r '+jobs_dir +'/'+
os.system('./'+exe_dir+'SRTG-Scheduler --j '+jobs_dir+'/'+jobSetName+'-'+str(s)+'-syntheticJobs.csv --r '+jobs_dir +'/'+
jobSetName+'-'+str(s)+'-syntheticJobReleaseTimes.csv --m 99 >> '+output_dir+'/outputSummary-'+str(s)+'.txt')
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ usage information
static void show_usage()
{
printf("\n**************************************************************************************************\n");
printf("\n Real Time GPU Scheduler -- RTGS - %s\n", RTGS_VERSION);
printf("\n Soft-Real-Time GPU Scheduler -- SRTG-Scheduler - %s\n", RTGS_VERSION);
printf("\n**************************************************************************************************\n");
printf("\n");
printf("Usage:\n\n");
printf("\tWindows:\n");
printf("\t\tRTG-scheduler.exe [options]\t--j <jobs_file.csv>\n");
printf("\t\tSRTG-Scheduler.exe [options]\t--j <jobs_file.csv>\n");
printf("\t\t\t\t\t\t--r <Release_Time_file.csv>\n");
printf("\t\t\t\t\t\t--m <option>\n");
printf("\t\t\t\t\t\t--p <option>\n");
printf("\t\t\t\t\t\t--d <option>\n");
printf("\t\t\t\t\t\t--simulation <option> \n");
printf("\t\t\t\t\t\t--gpu <AMD/NVIDIA> \n");
printf("\tLinux:\n");
printf("\t\t./RTG-scheduler [options]\t--j <jobs_file.csv>\n");
printf("\t\t./SRTG-Scheduler [options]\t--j <jobs_file.csv>\n");
printf("\t\t\t\t\t\t--r <Release_Time_file.csv>\n");
printf("\t\t\t\t\t\t--m <option>\n");
printf("\t\t\t\t\t\t--p <option>\n");
Expand Down Expand Up @@ -303,8 +303,8 @@ int main(int argc, char *argv[])
int64_t freq = RTGS_GetClockFrequency();
float factor = 1000.0f / (float)freq; // to convert clock counter to ms
float Scheduler_time = (float)((end_t - start_t) * factor);
printf("RTG-Scheduler Sucessful\n");
printf("Total Time Taken by RTG Scheduler - %0.2f ms\n", Scheduler_time);
printf("SRTG-Scheduler Sucessful\n");
printf("Total Time Taken by SRTG Scheduler - %0.2f ms\n", Scheduler_time);
}

return status;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 4aa3d66

Please sign in to comment.