├── 1.LocalOnlyContoller ├── default.txt ├── how2build.txt ├── controller.cpp └── target.cpp ├── 3.LocalServerDynamicContoller ├── local │ ├── default.txt │ ├── server_default.txt │ ├── how2build.txt │ ├── target.cpp │ └── main_controller.cpp └── server │ ├── default.txt │ ├── how2build.txt │ ├── target.cpp │ └── controller.cpp ├── 2.OverheadEstimation ├── how2build.txt ├── default.txt ├── graph │ ├── duration_ms.png │ ├── duration_ns.png │ ├── graph.py │ ├── controllerSendTime.txt │ └── targetReceiveTime.txt ├── controller.cpp └── target.cpp └── README.md /1.LocalOnlyContoller/default.txt: -------------------------------------------------------------------------------- 1 | Target1 1 2 | Target2 0 3 | Target3 1 4 | -------------------------------------------------------------------------------- /3.LocalServerDynamicContoller/local/default.txt: -------------------------------------------------------------------------------- 1 | Target1 1 2 | Target2 1 3 | -------------------------------------------------------------------------------- /3.LocalServerDynamicContoller/server/default.txt: -------------------------------------------------------------------------------- 1 | Target1 0 2 | Target2 0 3 | -------------------------------------------------------------------------------- /3.LocalServerDynamicContoller/local/server_default.txt: -------------------------------------------------------------------------------- 1 | Target1 0 2 | Target2 0 3 | -------------------------------------------------------------------------------- /1.LocalOnlyContoller/how2build.txt: -------------------------------------------------------------------------------- 1 | g++ -o target target.cpp -lpthread 2 | 3 | g++ -o controller controller.cpp -lpthread -std=c++17 4 | 5 | -------------------------------------------------------------------------------- /2.OverheadEstimation/how2build.txt: -------------------------------------------------------------------------------- 1 | g++ -o target target.cpp -lpthread 2 | 3 | g++ -o controller controller.cpp -lpthread -std=c++17 4 | 5 | -------------------------------------------------------------------------------- /3.LocalServerDynamicContoller/server/how2build.txt: -------------------------------------------------------------------------------- 1 | g++ -o target target.cpp -lpthread 2 | 3 | g++ -o controller controller.cpp -lpthread -std=c++17 4 | 5 | -------------------------------------------------------------------------------- /3.LocalServerDynamicContoller/local/how2build.txt: -------------------------------------------------------------------------------- 1 | g++ -o target target.cpp -lpthread 2 | 3 | g++ -o main_controller main_controller.cpp -lpthread -std=c++17 4 | 5 | -------------------------------------------------------------------------------- /2.OverheadEstimation/default.txt: -------------------------------------------------------------------------------- 1 | Target1 1 2 | Target2 1 3 | Target3 1 4 | Target4 1 5 | Target5 1 6 | Target6 1 7 | Target7 1 8 | Target8 1 9 | Target9 1 10 | Target10 1 11 | -------------------------------------------------------------------------------- /2.OverheadEstimation/graph/duration_ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IITP-Load-Balancing/SDV_Dynamic_Computation_Offloading_Controller/HEAD/2.OverheadEstimation/graph/duration_ms.png -------------------------------------------------------------------------------- /2.OverheadEstimation/graph/duration_ns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IITP-Load-Balancing/SDV_Dynamic_Computation_Offloading_Controller/HEAD/2.OverheadEstimation/graph/duration_ns.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Our Open-Source Software Related to Papers Published in 2024 2 | 3 | ## Joint Task Offloading and Resource Allocation for Integrated V2V and V2I Communication 4 | [https://github.com/IITP-Load-Balancing/V2V-and-V2I-task-offloading](https://github.com/IITP-Load-Balancing/V2V-and-V2I-task-offloading) 5 | 6 | ## Workload Analysis for Load-Balancing 7 | https://github.com/IITP-Load-Balancing/Workload-Analysis-for-Load-Balancing 8 | 9 | ## CAN-Ethernet Gateway Sim 10 | https://github.com/Hanyoung-Park/CAN-Ethernet_Gateway_Sim/tree/main 11 | 12 | # SDV Dynamic Computation Offloading Controller 13 | 14 | ## About 15 | Implementation of Dynamic Computation Offloading Control Logic in a Software-Defined Vehicle (SDV) System 16 | 17 | ## How to Adapt to Your System 18 | In the examples' Target.cpp code, ensure to utilize the following functions: 19 | 1. readDefaultStatus 20 | 2. updatePid 21 | 3. signalHandler 22 | 23 | 24 | Additionally, replace "Target" with "YourApp". In default.txt, the user can decide whether to execute these functions at the initial start. 25 | 26 | ## LocalOnlyController 27 | ![그림1](https://github.com/user-attachments/assets/13f64857-9560-4e74-b9c8-2b03eafbaca1) 28 | 29 | ### Feature: Low Latency using Signal Processing 30 | ![그림2](https://github.com/user-attachments/assets/fb7c5a9e-02ec-4cbf-9643-d5dcb9e4cb6d) 31 | 32 | ## LocalServerDynamicController 33 | ![그림3](https://github.com/user-attachments/assets/91c70259-7614-4cb9-b1dc-603502cf4ed4) 34 | -------------------------------------------------------------------------------- /1.LocalOnlyContoller/controller.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | using namespace std; 12 | 13 | // 구성 정보를 읽어오는 함수 14 | map> readConfig() { 15 | ifstream def("default.txt"); 16 | map> config; 17 | string name; 18 | int status; 19 | 20 | // 기본 상태를 읽기 21 | while (def >> name >> status) { 22 | config[name].first = status; 23 | } 24 | 25 | ifstream pids("pid.txt"); 26 | pid_t pid; 27 | // PID 읽기 28 | while (pids >> name >> pid) { 29 | if (config.find(name) != config.end()) { 30 | config[name].second = pid; 31 | } 32 | } 33 | 34 | return config; 35 | } 36 | 37 | // 각 target에 대한 시그널 보내기 38 | void sendSignal(const string& targetName, pid_t pid, int signal) { 39 | if (pid > 0) { 40 | cout << "Sending " << (signal == SIGUSR1 ? "SIGUSR1" : "SIGUSR2") << " to " << targetName << " (PID: " << pid << ")" << endl; 41 | kill(pid, signal); 42 | } 43 | } 44 | 45 | int main() { 46 | srand(time(NULL)); 47 | auto config = readConfig(); 48 | while (true) { 49 | 50 | for (const auto& [name, props] : config) { 51 | if (name == "Target1") { 52 | // Target1에는 SIGUSR1만 보내 계속 실행하게 함 53 | sendSignal(name, props.second, SIGUSR1); 54 | } else if (name == "Target2") { 55 | // Target2에는 SIGUSR1과 SIGUSR2를 랜덤하게 보냄 56 | int randSignal = rand() % 2 == 0 ? SIGUSR1 : SIGUSR2; 57 | sendSignal(name, props.second, randSignal); 58 | } else if (name == "Target3") { 59 | // Target3에는 SIGUSR2만 보내 계속 멈추게 함 60 | sendSignal(name, props.second, SIGUSR2); 61 | } 62 | } 63 | 64 | this_thread::sleep_for(chrono::seconds(1)); 65 | } 66 | 67 | return 0; 68 | } 69 | -------------------------------------------------------------------------------- /2.OverheadEstimation/controller.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | using namespace std; 13 | 14 | // 구성 정보를 읽어오는 함수 15 | map> readConfig() { 16 | ifstream def("default.txt"); 17 | map> config; 18 | string name; 19 | int status; 20 | 21 | // 기본 상태를 읽기 22 | while (def >> name >> status) { 23 | config[name].first = status; 24 | } 25 | 26 | ifstream pids("pid.txt"); 27 | pid_t pid; 28 | // PID 읽기 29 | while (pids >> name >> pid) { 30 | if (config.find(name) != config.end()) { 31 | config[name].second = pid; 32 | } 33 | } 34 | 35 | return config; 36 | } 37 | 38 | // 각 target에 대한 시그널 보내기 39 | void sendSignal(const string& targetName, pid_t pid, int signal, int count, int cnt) { 40 | if (pid > 0) { 41 | cout << "Sending " << (signal == SIGUSR1 ? "SIGUSR1" : "SIGUSR2") << " to " << targetName << " (PID: " << pid << ")" << endl; 42 | kill(pid, signal); 43 | 44 | // 첫 번째 target에 대한 신호만 시간 기록 45 | if (cnt % 10 == 1) { 46 | auto now = chrono::steady_clock::now(); 47 | auto now_ns = chrono::duration_cast(now.time_since_epoch()).count(); 48 | 49 | ofstream out("controllerSendTime.txt", ios::app); 50 | out << count << " " << now_ns << endl; 51 | out.close(); 52 | } 53 | } 54 | } 55 | 56 | int main() { 57 | srand(time(NULL)); 58 | auto config = readConfig(); 59 | 60 | int count = 0; // 시그널을 보낸 횟수를 세기 위한 카운터 61 | int cnt = 0; 62 | 63 | while (true) { 64 | count++; // 시그널 카운트 증가 65 | for (const auto& [name, props] : config) { 66 | cnt++; 67 | int randSignal = rand() % 2 == 0 ? SIGUSR1 : SIGUSR2; 68 | sendSignal(name, props.second, randSignal, count, cnt); 69 | } 70 | 71 | this_thread::sleep_for(chrono::seconds(1)); 72 | } 73 | 74 | return 0; 75 | } 76 | -------------------------------------------------------------------------------- /1.LocalOnlyContoller/target.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace std; 10 | 11 | atomic run(true); 12 | atomic continueRunning(false); 13 | 14 | void updatePid(const string& nodeName) { 15 | ofstream out("pid.txt", ios::app); 16 | out << nodeName << " " << getpid() << endl; 17 | out.close(); 18 | } 19 | 20 | void readDefaultStatus(const string& nodeName) { 21 | ifstream in("default.txt"); 22 | string line; 23 | while (getline(in, line)) { 24 | if (line.find(nodeName) == 0) { 25 | continueRunning.store(line.back() == '1'); 26 | break; 27 | } 28 | } 29 | in.close(); 30 | } 31 | 32 | void* signalHandler(void* arg) { 33 | sigset_t set; 34 | int sig, s; 35 | sigemptyset(&set); 36 | sigaddset(&set, SIGUSR1); 37 | sigaddset(&set, SIGUSR2); 38 | pthread_sigmask(SIG_BLOCK, &set, NULL); 39 | 40 | while (run.load()) { 41 | s = sigwait(&set, &sig); 42 | if (s == 0) { 43 | if (sig == SIGUSR1) { 44 | cout << "SIGUSR1 received. Continue running." << endl; 45 | continueRunning.store(true); 46 | } else if (sig == SIGUSR2) { 47 | cout << "SIGUSR2 received. Pause running." << endl; 48 | continueRunning.store(false); 49 | } 50 | } 51 | } 52 | 53 | return NULL; 54 | } 55 | 56 | int main(int argc, char* argv[]) { 57 | if (argc != 2) { 58 | cerr << "Usage: " << argv[0] << " nodeName" << endl; 59 | return 1; 60 | } 61 | string nodeName = argv[1]; 62 | 63 | sigset_t set; 64 | sigemptyset(&set); 65 | sigaddset(&set, SIGUSR1); 66 | sigaddset(&set, SIGUSR2); 67 | pthread_sigmask(SIG_BLOCK, &set, NULL); 68 | 69 | pthread_t tid; 70 | pthread_create(&tid, NULL, signalHandler, NULL); 71 | 72 | readDefaultStatus(nodeName); 73 | updatePid(nodeName); 74 | int cnt = 0; 75 | while (run.load()) { 76 | if (continueRunning) { 77 | cnt++; 78 | cout << nodeName << " is running...[" << cnt << "]" << endl; 79 | } else { 80 | cout << nodeName << " is paused.[" << cnt << "]" << endl; 81 | } 82 | sleep(1); 83 | } 84 | 85 | pthread_join(tid, NULL); 86 | return 0; 87 | } 88 | -------------------------------------------------------------------------------- /2.OverheadEstimation/graph/graph.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import numpy as np 3 | 4 | # 파일에서 시간 데이터를 읽는 함수 5 | def read_time_data(file_path): 6 | with open(file_path, 'r') as file: 7 | times = [int(line.split()[1]) for line in file.readlines()] 8 | return times 9 | 10 | # 파일 경로 설정 11 | controller_send_time_file = 'controllerSendTime.txt' 12 | target_receive_time_file = 'targetReceiveTime.txt' 13 | 14 | # 파일에서 시간 데이터 읽기 15 | controller_send_times = read_time_data(controller_send_time_file) 16 | target_receive_times = read_time_data(target_receive_time_file) 17 | 18 | # 걸린 시간 계산 (nanoseconds) 19 | durations_ns = [tr - cs for cs, tr in zip(controller_send_times, target_receive_times)] 20 | 21 | # 걸린 시간을 milliseconds로 변환 22 | durations_ms = [duration / 1e6 for duration in durations_ns] 23 | 24 | # 최대 100개의 데이터 포인트로 제한 25 | max_points = 100 26 | durations_ns = durations_ns[:max_points] 27 | durations_ms = durations_ms[:max_points] 28 | 29 | # 걸린 시간을 nanoseconds로 그래프 그리기 30 | plt.figure(figsize=(10, 4)) 31 | plt.plot(range(1, len(durations_ns) + 1), durations_ns, marker='o', linestyle='-', color='b') 32 | plt.title('Signal Transmission Duration (nanoseconds)') 33 | plt.xlabel('Signal Count') 34 | plt.ylabel('Duration (ns)') 35 | plt.xticks(range(1, len(durations_ns) + 1,10)) # X 축 눈금 설정 36 | plt.grid(True) 37 | plt.savefig("duration_ns.png") 38 | 39 | # 걸린 시간을 milliseconds로 그래프 그리기 40 | plt.figure(figsize=(10, 4)) 41 | plt.plot(range(1, len(durations_ms) + 1), durations_ms, marker='o', linestyle='-', color='r') 42 | plt.title('Signal Transmission Duration (milliseconds)') 43 | plt.xlabel('Signal Count') 44 | plt.ylabel('Duration (ms)') 45 | plt.xticks(range(1, len(durations_ms) + 1,10)) # X 축 눈금 설정 46 | plt.grid(True) 47 | plt.savefig("duration_ms.png") 48 | 49 | # Calculate minimum, maximum, and average 50 | min_duration_ns = np.min(durations_ns) 51 | max_duration_ns = np.max(durations_ns) 52 | avg_duration_ns = np.mean(durations_ns) 53 | 54 | min_duration_ms = np.min(durations_ms) 55 | max_duration_ms = np.max(durations_ms) 56 | avg_duration_ms = np.mean(durations_ms) 57 | 58 | # Print the table 59 | print(f"{'Metric':<10}{'Nanoseconds':<20}{'Milliseconds':<20}") 60 | print(f"{'-'*10}{'-'*20}{'-'*20}") 61 | print(f"{'Minimum':<10}{min_duration_ns:<20}{min_duration_ms:<20.2f}") 62 | print(f"{'Maximum':<10}{max_duration_ns:<20}{max_duration_ms:<20.2f}") 63 | print(f"{'Average':<10}{avg_duration_ns:<20.2f}{avg_duration_ms:<20.2f}") 64 | 65 | 66 | -------------------------------------------------------------------------------- /3.LocalServerDynamicContoller/local/target.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace std; 10 | 11 | atomic run(true); 12 | atomic continueRunning(false); 13 | 14 | void updatePid(const string& nodeName) { 15 | ofstream out("pid.txt", ios::app); 16 | out << nodeName << " " << getpid() << endl; 17 | out.close(); 18 | } 19 | 20 | void readDefaultStatus(const string& nodeName) { 21 | ifstream in("default.txt"); 22 | string line; 23 | while (getline(in, line)) { 24 | if (line.find(nodeName) == 0) { 25 | continueRunning.store(line.back() == '1'); 26 | break; 27 | } 28 | } 29 | in.close(); 30 | } 31 | 32 | void* signalHandler(void* arg) { 33 | sigset_t set; 34 | int sig, s; 35 | sigemptyset(&set); 36 | sigaddset(&set, SIGUSR1); 37 | sigaddset(&set, SIGUSR2); 38 | pthread_sigmask(SIG_BLOCK, &set, NULL); 39 | 40 | while (run.load()) { 41 | s = sigwait(&set, &sig); 42 | if (s == 0) { 43 | if (sig == SIGUSR1) { 44 | cout << "SIGUSR1 received. Continue running." << endl; 45 | continueRunning.store(true); 46 | } else if (sig == SIGUSR2) { 47 | cout << "SIGUSR2 received. Pause running." << endl; 48 | continueRunning.store(false); 49 | } 50 | } 51 | } 52 | 53 | return NULL; 54 | } 55 | 56 | int main(int argc, char* argv[]) { 57 | if (argc != 2) { 58 | cerr << "Usage: " << argv[0] << " nodeName" << endl; 59 | return 1; 60 | } 61 | string nodeName = argv[1]; 62 | 63 | sigset_t set; 64 | sigemptyset(&set); 65 | sigaddset(&set, SIGUSR1); 66 | sigaddset(&set, SIGUSR2); 67 | pthread_sigmask(SIG_BLOCK, &set, NULL); 68 | 69 | pthread_t tid; 70 | pthread_create(&tid, NULL, signalHandler, NULL); 71 | 72 | readDefaultStatus(nodeName); 73 | updatePid(nodeName); 74 | int cnt = 0; 75 | while (run.load()) { 76 | if (continueRunning) { 77 | cnt++; 78 | cout << nodeName << " is running...[" << cnt << "]" << endl; 79 | } else { 80 | cout << nodeName << " is paused.[" << cnt << "]" << endl; 81 | } 82 | sleep(1); 83 | } 84 | 85 | pthread_join(tid, NULL); 86 | return 0; 87 | } 88 | -------------------------------------------------------------------------------- /3.LocalServerDynamicContoller/server/target.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace std; 10 | 11 | atomic run(true); 12 | atomic continueRunning(false); 13 | 14 | void updatePid(const string& nodeName) { 15 | ofstream out("pid.txt", ios::app); 16 | out << nodeName << " " << getpid() << endl; 17 | out.close(); 18 | } 19 | 20 | void readDefaultStatus(const string& nodeName) { 21 | ifstream in("default.txt"); 22 | string line; 23 | while (getline(in, line)) { 24 | if (line.find(nodeName) == 0) { 25 | continueRunning.store(line.back() == '1'); 26 | break; 27 | } 28 | } 29 | in.close(); 30 | } 31 | 32 | void* signalHandler(void* arg) { 33 | sigset_t set; 34 | int sig, s; 35 | sigemptyset(&set); 36 | sigaddset(&set, SIGUSR1); 37 | sigaddset(&set, SIGUSR2); 38 | pthread_sigmask(SIG_BLOCK, &set, NULL); 39 | 40 | while (run.load()) { 41 | s = sigwait(&set, &sig); 42 | if (s == 0) { 43 | if (sig == SIGUSR1) { 44 | cout << "SIGUSR1 received. Continue running." << endl; 45 | continueRunning.store(true); 46 | } else if (sig == SIGUSR2) { 47 | cout << "SIGUSR2 received. Pause running." << endl; 48 | continueRunning.store(false); 49 | } 50 | } 51 | } 52 | 53 | return NULL; 54 | } 55 | 56 | int main(int argc, char* argv[]) { 57 | if (argc != 2) { 58 | cerr << "Usage: " << argv[0] << " nodeName" << endl; 59 | return 1; 60 | } 61 | string nodeName = argv[1]; 62 | 63 | sigset_t set; 64 | sigemptyset(&set); 65 | sigaddset(&set, SIGUSR1); 66 | sigaddset(&set, SIGUSR2); 67 | pthread_sigmask(SIG_BLOCK, &set, NULL); 68 | 69 | pthread_t tid; 70 | pthread_create(&tid, NULL, signalHandler, NULL); 71 | 72 | readDefaultStatus(nodeName); 73 | updatePid(nodeName); 74 | int cnt = 0; 75 | while (run.load()) { 76 | if (continueRunning) { 77 | cnt++; 78 | cout << nodeName << " is running...[" << cnt << "]" << endl; 79 | } else { 80 | cout << nodeName << " is paused.[" << cnt << "]" << endl; 81 | } 82 | sleep(1); 83 | } 84 | 85 | pthread_join(tid, NULL); 86 | return 0; 87 | } 88 | -------------------------------------------------------------------------------- /3.LocalServerDynamicContoller/server/controller.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | using namespace std; 13 | 14 | // Read PID mappings from a file 15 | map readPidConfig() { 16 | ifstream pids("pid.txt"); 17 | map pidConfig; 18 | string name; 19 | pid_t pid; 20 | while (pids >> name >> pid) { 21 | pidConfig[name] = pid; 22 | } 23 | return pidConfig; 24 | } 25 | 26 | // Send a signal to a specific target 27 | void sendSignal(pid_t pid, int sig) { 28 | if (kill(pid, sig) == -1) { 29 | cerr << "Failed to send signal " << sig << " to PID " << pid << endl; 30 | } else { 31 | cout << "Successfully sent signal " << sig << " to PID " << pid << endl; 32 | } 33 | } 34 | 35 | int main() { 36 | int server_fd, new_socket; 37 | struct sockaddr_in address; 38 | int opt = 1; 39 | int addrlen = sizeof(address); 40 | char buffer[1024] = {0}; 41 | string command; 42 | 43 | // Creating socket file descriptor 44 | if ((server_fd = socket(AF_INET, SOCK_STREAM, 0)) == 0) { 45 | perror("socket failed"); 46 | exit(EXIT_FAILURE); 47 | } 48 | 49 | // Forcefully attaching socket to the port 8080 50 | if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, &opt, sizeof(opt))) { 51 | perror("setsockopt"); 52 | exit(EXIT_FAILURE); 53 | } 54 | 55 | address.sin_family = AF_INET; 56 | address.sin_addr.s_addr = INADDR_ANY; 57 | address.sin_port = htons(8080); 58 | 59 | // Forcefully attaching socket to the port 8080 60 | if (bind(server_fd, (struct sockaddr *)&address, sizeof(address))<0) { 61 | perror("bind failed"); 62 | exit(EXIT_FAILURE); 63 | } 64 | if (listen(server_fd, 3) < 0) { 65 | perror("listen"); 66 | exit(EXIT_FAILURE); 67 | } 68 | if ((new_socket = accept(server_fd, (struct sockaddr *)&address, (socklen_t*)&addrlen))<0) { 69 | perror("accept"); 70 | exit(EXIT_FAILURE); 71 | } 72 | 73 | auto pidConfig = readPidConfig(); 74 | 75 | while(true) { 76 | memset(buffer, 0, sizeof(buffer)); 77 | read(new_socket, buffer, 1024); 78 | command = string(buffer); 79 | cout << "Received command: " << command << endl; 80 | 81 | for (const auto& entry : pidConfig) { 82 | if (command.find(entry.first) != string::npos) { 83 | if (command.find("SIGUSR1") != string::npos) { 84 | sendSignal(entry.second, SIGUSR1); 85 | } else if (command.find("SIGUSR2") != string::npos) { 86 | sendSignal(entry.second, SIGUSR2); 87 | } 88 | break; 89 | } 90 | } 91 | } 92 | 93 | return 0; 94 | } 95 | -------------------------------------------------------------------------------- /2.OverheadEstimation/target.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | using namespace std; 11 | 12 | atomic run(true); 13 | atomic continueRunning(false); 14 | 15 | void writeTimeToFile(const string& nodeName, int cnt) { 16 | // nodeName이 Target10일 때만 파일에 시간 기록 17 | if (nodeName == "Target9") { 18 | auto now = chrono::steady_clock::now(); 19 | auto now_ns = chrono::duration_cast(now.time_since_epoch()).count(); 20 | 21 | ofstream out("Target10ReceiveTime.txt", ios::app); 22 | out << cnt << " " << now_ns << endl; 23 | out.close(); 24 | } 25 | } 26 | 27 | void updatePid(const string& nodeName) { 28 | ofstream out("pid.txt", ios::app); 29 | out << nodeName << " " << getpid() << endl; 30 | out.close(); 31 | } 32 | 33 | void readDefaultStatus(const string& nodeName) { 34 | ifstream in("default.txt"); 35 | string line; 36 | while (getline(in, line)) { 37 | if (line.find(nodeName) == 0) { 38 | continueRunning.store(line.back() == '1'); 39 | break; 40 | } 41 | } 42 | in.close(); 43 | } 44 | 45 | void* signalHandler(void* arg) { 46 | sigset_t set; 47 | int sig, s; 48 | sigemptyset(&set); 49 | sigaddset(&set, SIGUSR1); 50 | sigaddset(&set, SIGUSR2); 51 | pthread_sigmask(SIG_BLOCK, &set, NULL); 52 | 53 | int count = 0; // 시그널을 받은 횟수를 세기 위한 카운터 54 | 55 | while (run.load()) { 56 | s = sigwait(&set, &sig); 57 | if (s == 0) { 58 | count++; // 시그널 카운트 증가 59 | if (sig == SIGUSR1) { 60 | cout << "SIGUSR1 received. Continue running." << endl; 61 | continueRunning.store(true); 62 | } else if (sig == SIGUSR2) { 63 | cout << "SIGUSR2 received. Pause running." << endl; 64 | continueRunning.store(false); 65 | } 66 | // 시간 기록 67 | writeTimeToFile(static_cast(arg)->data(), count); 68 | } 69 | } 70 | 71 | return NULL; 72 | } 73 | 74 | int main(int argc, char* argv[]) { 75 | if (argc != 2) { 76 | cerr << "Usage: " << argv[0] << " nodeName" << endl; 77 | return 1; 78 | } 79 | string nodeName = argv[1]; 80 | 81 | sigset_t set; 82 | sigemptyset(&set); 83 | sigaddset(&set, SIGUSR1); 84 | sigaddset(&set, SIGUSR2); 85 | pthread_sigmask(SIG_BLOCK, &set, NULL); 86 | 87 | pthread_t tid; 88 | pthread_create(&tid, NULL, signalHandler, new string(nodeName)); // nodeName을 스레드에 전달 89 | 90 | readDefaultStatus(nodeName); 91 | updatePid(nodeName); 92 | int cnt = 0; 93 | while (run.load()) { 94 | if (continueRunning) { 95 | cnt++; 96 | cout << nodeName << " is running...[" << cnt << "]" << endl; 97 | } else { 98 | cout << nodeName << " is paused.[" << cnt << "]" << endl; 99 | } 100 | sleep(1); 101 | } 102 | 103 | pthread_join(tid, NULL); 104 | return 0; 105 | } 106 | -------------------------------------------------------------------------------- /3.LocalServerDynamicContoller/local/main_controller.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include // For memset() 13 | 14 | 15 | using namespace std; 16 | 17 | // 구성 정보를 읽어오는 함수 18 | map> readConfig() { 19 | ifstream def("default.txt"); 20 | map> config; 21 | string name; 22 | int status; 23 | 24 | // 기본 상태를 읽기 25 | while (def >> name >> status) { 26 | config[name].first = status; 27 | } 28 | 29 | ifstream pids("pid.txt"); 30 | pid_t pid; 31 | // PID 읽기 32 | while (pids >> name >> pid) { 33 | if (config.find(name) != config.end()) { 34 | config[name].second = pid; 35 | } 36 | } 37 | 38 | return config; 39 | } 40 | 41 | map readServerConfig() { 42 | ifstream def("server_default.txt"); 43 | map config; 44 | string name; 45 | int status; 46 | 47 | // 기본 상태를 읽기 48 | while (def >> name >> status) { 49 | config[name] = status; 50 | } 51 | 52 | return config; 53 | } 54 | 55 | // 각 target에 대한 시그널 보내기 56 | void sendSignal(const string& targetName, pid_t pid, int signal) { 57 | if (pid > 0) { 58 | cout << "Sending " << (signal == SIGUSR1 ? "SIGUSR1" : "SIGUSR2") << " to " << targetName << " (PID: " << pid << ")" << endl; 59 | kill(pid, signal); 60 | } 61 | } 62 | 63 | int main() { 64 | srand(time(NULL)); 65 | auto config = readConfig(); 66 | auto server_config = readServerConfig(); // just for future 67 | 68 | // Sub Controller에 연결합니다. 69 | int sock = socket(AF_INET, SOCK_STREAM, 0); 70 | struct sockaddr_in serv_addr; 71 | memset(&serv_addr, '0', sizeof(serv_addr)); 72 | 73 | serv_addr.sin_family = AF_INET; 74 | serv_addr.sin_port = htons(8080); 75 | 76 | if (inet_pton(AF_INET, "10.150.5.212", &serv_addr.sin_addr) <= 0) { //TODO: change to your IP! 77 | cout << "Invalid address / Address not supported" << endl; 78 | return -1; 79 | } 80 | 81 | if (connect(sock, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) { 82 | cout << "Connection Failed" << endl; 83 | return -1; 84 | } 85 | 86 | while (true) { 87 | 88 | 89 | for (const auto& [name, props] : config) { 90 | if (name == "Target1") { 91 | // Target1에는 SIGUSR1과 SIGUSR2를 랜덤하게 보냄 92 | int randSignal = rand() % 2 == 0 ? SIGUSR1 : SIGUSR2; 93 | sendSignal(name, props.second, randSignal); 94 | // Target1(Server)에게 반대 신호 95 | string command; 96 | if (randSignal == SIGUSR2) command = "SIGUSR1_Target1"; 97 | else command = "SIGUSR2_Target1"; 98 | send(sock, command.c_str(), command.size(), 0); 99 | cout << "Command sent to Sub Controller: " << command << endl; 100 | 101 | } else if (name == "Target2") { 102 | // Target2에는 SIGUSR1과 SIGUSR2를 랜덤하게 보냄 103 | int randSignal = rand() % 2 == 0 ? SIGUSR1 : SIGUSR2; 104 | sendSignal(name, props.second, randSignal); 105 | // Target2(Server)에게 반대 신호 106 | string command; 107 | if (randSignal == SIGUSR2) command = "SIGUSR1_Target2"; 108 | else command = "SIGUSR2_Target2"; 109 | send(sock, command.c_str(), command.size(), 0); 110 | cout << "Command sent to Sub Controller: " << command << endl; 111 | } 112 | } 113 | 114 | this_thread::sleep_for(chrono::seconds(1)); 115 | } 116 | 117 | close(sock); 118 | return 0; 119 | } 120 | -------------------------------------------------------------------------------- /2.OverheadEstimation/graph/controllerSendTime.txt: -------------------------------------------------------------------------------- 1 | 1 3717169949725598 2 | 2 3717170950303536 3 | 3 3717171950798717 4 | 4 3717172951293233 5 | 5 3717173951781183 6 | 6 3717174952273413 7 | 7 3717175952744793 8 | 8 3717176953234168 9 | 9 3717177953734809 10 | 10 3717178954181956 11 | 11 3717179954652232 12 | 12 3717180955153972 13 | 13 3717181955676504 14 | 14 3717182956186530 15 | 15 3717183956687193 16 | 16 3717184957167267 17 | 17 3717185957740523 18 | 18 3717186958226110 19 | 19 3717187958707815 20 | 20 3717188959161724 21 | 21 3717189959686027 22 | 22 3717190960253466 23 | 23 3717191960788401 24 | 24 3717192961314254 25 | 25 3717193961807341 26 | 26 3717194962326508 27 | 27 3717195962825026 28 | 28 3717196963335014 29 | 29 3717197963800802 30 | 30 3717198964255098 31 | 31 3717199964728268 32 | 32 3717200965247025 33 | 33 3717201965790676 34 | 34 3717202966349897 35 | 35 3717203966832786 36 | 36 3717204967326463 37 | 37 3717205967810180 38 | 38 3717206968279632 39 | 39 3717207968760978 40 | 40 3717208969232168 41 | 41 3717209969744699 42 | 42 3717210970234679 43 | 43 3717211970686081 44 | 44 3717212971252160 45 | 45 3717213971741588 46 | 46 3717214972217554 47 | 47 3717215972724725 48 | 48 3717216973228457 49 | 49 3717217973719127 50 | 50 3717218974138306 51 | 51 3717219974585640 52 | 52 3717220975051291 53 | 53 3717221975545465 54 | 54 3717222975998997 55 | 55 3717223976564603 56 | 56 3717224977039049 57 | 57 3717225977577635 58 | 58 3717226978067690 59 | 59 3717227978596157 60 | 60 3717228979080001 61 | 61 3717229979560363 62 | 62 3717230980080828 63 | 63 3717231980543964 64 | 64 3717232981060776 65 | 65 3717233981556488 66 | 66 3717234982117936 67 | 67 3717235982598619 68 | 68 3717236983064397 69 | 69 3717237983543064 70 | 70 3717238984060871 71 | 71 3717239984529301 72 | 72 3717240985025596 73 | 73 3717241985559314 74 | 74 3717242986035608 75 | 75 3717243986558654 76 | 76 3717244987004263 77 | 77 3717245987392912 78 | 78 3717246988020124 79 | 79 3717247988614886 80 | 80 3717248989106140 81 | 81 3717249989572609 82 | 82 3717250990074281 83 | 83 3717251990594796 84 | 84 3717252991052640 85 | 85 3717253991591106 86 | 86 3717254992088817 87 | 87 3717255992676083 88 | 88 3717256993135330 89 | 89 3717257993661220 90 | 90 3717258994170070 91 | 91 3717259994648145 92 | 92 3717260995138929 93 | 93 3717261995674771 94 | 94 3717262996151128 95 | 95 3717263996710635 96 | 96 3717264997236957 97 | 97 3717265997740482 98 | 98 3717266998248461 99 | 99 3717267998719848 100 | 100 3717268999194578 101 | 101 3717269999679660 102 | 102 3717271000143003 103 | 103 3717272000606774 104 | 104 3717273001113332 105 | 105 3717274002032128 106 | 106 3717275002542239 107 | 107 3717276003024080 108 | 108 3717277003573270 109 | 109 3717278004050942 110 | 110 3717279004368576 111 | 111 3717280004830657 112 | 112 3717281005318548 113 | 113 3717282005816800 114 | 114 3717283006270583 115 | 115 3717284006760116 116 | 116 3717285007282227 117 | 117 3717286007762233 118 | 118 3717287008237718 119 | 119 3717288008713214 120 | 120 3717289009239354 121 | 121 3717290009814035 122 | 122 3717291010276934 123 | 123 3717292010774111 124 | 124 3717293011233662 125 | 125 3717294011802214 126 | 126 3717295012221459 127 | 127 3717296012671269 128 | 128 3717297013271776 129 | 129 3717298013763860 130 | 130 3717299014263173 131 | 131 3717300014735666 132 | 132 3717301015234458 133 | 133 3717302015703859 134 | 134 3717303016167369 135 | 135 3717304017556196 136 | 136 3717305018004728 137 | 137 3717306018441052 138 | 138 3717307018928728 139 | 139 3717308019397484 140 | 140 3717309020213514 141 | 141 3717310020695190 142 | 142 3717311021239647 143 | 143 3717312021709636 144 | 144 3717313022194477 145 | 145 3717314022733098 146 | 146 3717315023231602 147 | 147 3717316023722530 148 | 148 3717317024235317 149 | 149 3717318024711303 150 | 150 3717319025159061 151 | 151 3717320025605074 152 | 152 3717321026209734 153 | 153 3717322026734336 154 | 154 3717323027225354 155 | 155 3717324027706584 156 | 156 3717325028171541 157 | 157 3717326028664556 158 | 158 3717327029159164 159 | 159 3717328029622493 160 | 160 3717329030072873 161 | 161 3717330030621917 162 | 162 3717331031117254 163 | 163 3717332031614668 164 | 164 3717333032106556 165 | 165 3717334032590429 166 | 166 3717335033072602 167 | 167 3717336033645270 168 | 168 3717337034162305 169 | 169 3717338034691870 170 | 170 3717339035197448 171 | 171 3717340035687973 172 | 172 3717341036173023 173 | 173 3717342036655100 174 | 174 3717343037156886 175 | 175 3717344037668441 176 | 176 3717345038150423 177 | 177 3717346038634733 178 | 178 3717347039126084 179 | 179 3717348039627691 180 | 180 3717349040120620 181 | 181 3717350040608700 182 | 182 3717351041153874 183 | 183 3717352041660654 184 | 184 3717353042171702 185 | 185 3717354042729083 186 | 186 3717355043227752 187 | 187 3717356043852497 188 | 188 3717357044360212 189 | 189 3717358044900365 190 | 190 3717359045332876 191 | 191 3717360045774447 192 | 192 3717361046255971 193 | 193 3717362046817364 194 | 194 3717363047316363 195 | 195 3717364047827772 196 | 196 3717365048316238 197 | 197 3717366048799416 198 | 198 3717367049323261 199 | 199 3717368049800316 200 | 200 3717369050293525 201 | 201 3717370050814872 202 | 202 3717371051307156 203 | 203 3717372051788074 204 | 204 3717373052300151 205 | 205 3717374052813674 206 | 206 3717375053279013 207 | 207 3717376053772273 208 | 208 3717377054275474 209 | 209 3717378054795604 210 | 210 3717379055285027 211 | 211 3717380055806785 212 | 212 3717381056284914 213 | 213 3717382056776999 214 | 214 3717383057747018 215 | 215 3717384058244102 216 | 216 3717385058739261 217 | 217 3717386059255936 218 | 218 3717387059746209 219 | 219 3717388060234157 220 | 220 3717389060744775 221 | 221 3717390061224450 222 | 222 3717391061679708 223 | 223 3717392062158842 224 | 224 3717393062665531 225 | 225 3717394063157486 226 | 226 3717395063644177 227 | 227 3717396064132422 228 | 228 3717397064629941 229 | 229 3717398065139423 230 | 230 3717399065617411 231 | 231 3717400066086796 232 | 232 3717401066635021 233 | 233 3717402067142663 234 | 234 3717403067624606 235 | 235 3717404068094493 236 | 236 3717405068563895 237 | 237 3717406069157165 238 | 238 3717407069641621 239 | 239 3717408070107365 240 | 240 3717409070658325 241 | 241 3717410071153240 242 | 242 3717411071658229 243 | 243 3717412072170797 244 | 244 3717413072748609 245 | 245 3717414073273168 246 | 246 3717415073738206 247 | 247 3717416074232577 248 | 248 3717417074709882 249 | 249 3717418075181443 250 | 250 3717419075696705 251 | 251 3717420076202843 252 | 252 3717421076672746 253 | 253 3717422077189875 254 | 254 3717423077718995 255 | 255 3717424078214197 256 | 256 3717425078698276 257 | 257 3717426079318472 258 | 258 3717427079858315 259 | 259 3717428080338394 260 | 260 3717429080809635 261 | 261 3717430081307808 262 | 262 3717431081794494 263 | 263 3717432082294879 264 | 264 3717433082796551 265 | 265 3717434083281452 266 | 266 3717435083761179 267 | 267 3717436084277247 268 | 268 3717437084808466 269 | 269 3717438085330116 270 | 270 3717439085848611 271 | 271 3717440086378325 272 | 272 3717441086944157 273 | 273 3717442087427051 274 | 274 3717443087921672 275 | 275 3717444088399502 276 | 276 3717445088887653 277 | 277 3717446089340824 278 | 278 3717447089833286 279 | 279 3717448090335851 280 | 280 3717449090827167 281 | 281 3717450091320316 282 | 282 3717451091807182 283 | 283 3717452092303654 284 | 284 3717453092785795 285 | 285 3717454093323264 286 | 286 3717455093838354 287 | 287 3717456094357724 288 | 288 3717457094863338 289 | 289 3717458095328224 290 | 290 3717459095819790 291 | 291 3717460096316394 292 | 292 3717461096806151 293 | 293 3717462097351716 294 | 294 3717463097869509 295 | 295 3717464098346376 296 | 296 3717465098821445 297 | 297 3717466099315953 298 | 298 3717467099815310 299 | 299 3717468100292572 300 | 300 3717469100767330 301 | 301 3717470101292465 302 | 302 3717471101787540 303 | 303 3717472102308914 304 | 304 3717473102793787 305 | 305 3717474103253076 306 | 306 3717475103745886 307 | 307 3717476104317492 308 | 308 3717477104811489 309 | 309 3717478105292617 310 | 310 3717479105776335 311 | 311 3717480106276255 312 | 312 3717481106798641 313 | 313 3717482107312107 314 | 314 3717483107866017 315 | 315 3717484108339952 316 | 316 3717485108834197 317 | 317 3717486109335185 318 | 318 3717487109827712 319 | 319 3717488110294547 320 | 320 3717489110763361 321 | 321 3717490111264567 322 | 322 3717491111738342 323 | 323 3717492112257337 324 | 324 3717493112767948 325 | 325 3717494113235033 326 | 326 3717495113711293 327 | 327 3717496114231936 328 | 328 3717497114821963 329 | 329 3717498115069591 330 | 330 3717499115534069 331 | 331 3717500116012531 332 | 332 3717501116510628 333 | -------------------------------------------------------------------------------- /2.OverheadEstimation/graph/targetReceiveTime.txt: -------------------------------------------------------------------------------- 1 | 1 3717169950246512 2 | 2 3717170950675630 3 | 3 3717171951230848 4 | 4 3717172951715313 5 | 5 3717173952158012 6 | 6 3717174952625597 7 | 7 3717175953161353 8 | 8 3717176953638363 9 | 9 3717177954078976 10 | 10 3717178954570139 11 | 11 3717179955072990 12 | 12 3717180955552063 13 | 13 3717181956053615 14 | 14 3717182956565138 15 | 15 3717183957066623 16 | 16 3717184957613387 17 | 17 3717185958133565 18 | 18 3717186958580856 19 | 19 3717187959042775 20 | 20 3717188959560610 21 | 21 3717189960150061 22 | 22 3717190960668639 23 | 23 3717191961238991 24 | 24 3717192961689424 25 | 25 3717193962261164 26 | 26 3717194962731470 27 | 27 3717195963217664 28 | 28 3717196963694321 29 | 29 3717197964138492 30 | 30 3717198964634625 31 | 31 3717199965111628 32 | 32 3717200965677272 33 | 33 3717201966226988 34 | 34 3717202966712936 35 | 35 3717203967237003 36 | 36 3717204967745047 37 | 37 3717205968164291 38 | 38 3717206968668602 39 | 39 3717207969136287 40 | 40 3717208969658755 41 | 41 3717209970149480 42 | 42 3717210970577063 43 | 43 3717211971132926 44 | 44 3717212971615861 45 | 45 3717213972097519 46 | 46 3717214972652340 47 | 47 3717215973106255 48 | 48 3717216973600075 49 | 49 3717217974057201 50 | 50 3717218974569856 51 | 51 3717219974974542 52 | 52 3717220975424100 53 | 53 3717221975877009 54 | 54 3717222976473111 55 | 55 3717223976911842 56 | 56 3717224977448885 57 | 57 3717225977938500 58 | 58 3717226978478117 59 | 59 3717227978968037 60 | 60 3717228979486652 61 | 61 3717229979955127 62 | 62 3717230980432364 63 | 63 3717231980944141 64 | 64 3717232981458168 65 | 65 3717233982022107 66 | 66 3717234982509461 67 | 67 3717235982977235 68 | 68 3717236983422210 69 | 69 3717237983937351 70 | 70 3717238984453492 71 | 71 3717239984923131 72 | 72 3717240985476877 73 | 73 3717241985912575 74 | 74 3717242986429992 75 | 75 3717243986903707 76 | 76 3717244987289905 77 | 77 3717245987899790 78 | 78 3717246988492888 79 | 79 3717247988977713 80 | 80 3717248989476395 81 | 81 3717249989955029 82 | 82 3717250990477568 83 | 83 3717251990944130 84 | 84 3717252991500736 85 | 85 3717253991984081 86 | 86 3717254992530238 87 | 87 3717255993024391 88 | 88 3717256993530661 89 | 89 3717257994063558 90 | 90 3717258994545370 91 | 91 3717259994997246 92 | 92 3717260995556901 93 | 93 3717261996017818 94 | 94 3717262996592457 95 | 95 3717263997151713 96 | 96 3717264997605331 97 | 97 3717265998229200 98 | 98 3717266998595805 99 | 99 3717267999109011 100 | 100 3717268999599020 101 | 101 3717270000062288 102 | 102 3717271000489677 103 | 103 3717272001011312 104 | 104 3717273001903018 105 | 105 3717274002420630 106 | 106 3717275002909314 107 | 107 3717276003486687 108 | 108 3717277004007095 109 | 109 3717278004277262 110 | 110 3717279004715818 111 | 111 3717280005275044 112 | 112 3717281005693402 113 | 113 3717282006189242 114 | 114 3717283006676776 115 | 115 3717284007154428 116 | 116 3717285007652568 117 | 117 3717286008136040 118 | 118 3717287008614033 119 | 119 3717288009168792 120 | 120 3717289009726157 121 | 121 3717290010237060 122 | 122 3717291010656496 123 | 123 3717292011132031 124 | 124 3717293011907618 125 | 125 3717294012133887 126 | 126 3717295012588198 127 | 127 3717296013136986 128 | 128 3717297013639768 129 | 129 3717298014147607 130 | 130 3717299014676074 131 | 131 3717300015120706 132 | 132 3717301015592260 133 | 133 3717302016077128 134 | 134 3717303017780547 135 | 135 3717304017936969 136 | 136 3717305018331490 137 | 137 3717306018915391 138 | 138 3717307019319053 139 | 139 3717308020404519 140 | 140 3717309020559084 141 | 141 3717310021118753 142 | 142 3717311021599585 143 | 143 3717312022068795 144 | 144 3717313022603679 145 | 145 3717314023103537 146 | 146 3717315023628673 147 | 147 3717316024119393 148 | 148 3717317024632353 149 | 149 3717318025077696 150 | 150 3717319025545611 151 | 151 3717320026252099 152 | 152 3717321026606036 153 | 153 3717322027094923 154 | 154 3717323027585504 155 | 155 3717324028048710 156 | 156 3717325028584676 157 | 157 3717326029015079 158 | 158 3717327029546212 159 | 159 3717328029945196 160 | 160 3717329030533747 161 | 161 3717330031044668 162 | 162 3717331031516027 163 | 163 3717332032033985 164 | 164 3717333032462639 165 | 165 3717334032944552 166 | 166 3717335033534900 167 | 167 3717336034043422 168 | 168 3717337034572479 169 | 169 3717338035068122 170 | 170 3717339035694779 171 | 171 3717340036055749 172 | 172 3717341036571787 173 | 173 3717342037035313 174 | 174 3717343037546615 175 | 175 3717344038021514 176 | 176 3717345038509125 177 | 177 3717346039034239 178 | 178 3717347039508032 179 | 179 3717348039988720 180 | 180 3717349040485919 181 | 181 3717350041050138 182 | 182 3717351041525347 183 | 183 3717352042175724 184 | 184 3717353042605763 185 | 185 3717354043104352 186 | 186 3717355043754602 187 | 187 3717356044310200 188 | 188 3717357044906323 189 | 189 3717358045258660 190 | 190 3717359045696129 191 | 191 3717360046125826 192 | 192 3717361046728636 193 | 193 3717362047201420 194 | 194 3717363047716163 195 | 195 3717364048229936 196 | 196 3717365048668010 197 | 197 3717366049257065 198 | 198 3717367049727188 199 | 199 3717368050183247 200 | 200 3717369050734263 201 | 201 3717370051189861 202 | 202 3717371051695737 203 | 203 3717372052195475 204 | 204 3717373052688857 205 | 205 3717374053192000 206 | 206 3717375053656761 207 | 207 3717376054140128 208 | 208 3717377054675500 209 | 209 3717378055206047 210 | 210 3717379055736081 211 | 211 3717380056171408 212 | 212 3717381056701147 213 | 213 3717382057617658 214 | 214 3717383058128462 215 | 215 3717384058616395 216 | 216 3717385059165161 217 | 217 3717386059618598 218 | 218 3717387060101771 219 | 219 3717388060634078 220 | 220 3717389061114208 221 | 221 3717390061563618 222 | 222 3717391062078792 223 | 223 3717392062537920 224 | 224 3717393063030054 225 | 225 3717394063516710 226 | 226 3717395064010129 227 | 227 3717396064513390 228 | 228 3717397065002017 229 | 229 3717398065501324 230 | 230 3717399066029866 231 | 231 3717400066506285 232 | 232 3717401067003500 233 | 233 3717402067564679 234 | 234 3717403067971538 235 | 235 3717404068488436 236 | 236 3717405069026306 237 | 237 3717406069529408 238 | 238 3717407070001344 239 | 239 3717408070542003 240 | 240 3717409071074849 241 | 241 3717410071537262 242 | 242 3717411072065380 243 | 243 3717412072665996 244 | 244 3717413073199116 245 | 245 3717414073685105 246 | 246 3717415074113137 247 | 247 3717416074592831 248 | 248 3717417075054329 249 | 249 3717418075576083 250 | 250 3717419076119795 251 | 251 3717420076553567 252 | 252 3717421077056402 253 | 253 3717422077645274 254 | 254 3717423078140194 255 | 255 3717424078573107 256 | 256 3717425079455962 257 | 257 3717426079749918 258 | 258 3717427080288911 259 | 259 3717428080733131 260 | 260 3717429081211430 261 | 261 3717430081671529 262 | 262 3717431082183694 263 | 263 3717432082664578 264 | 264 3717433083157370 265 | 265 3717434083657495 266 | 266 3717435084166541 267 | 267 3717436084685921 268 | 268 3717437085203711 269 | 269 3717438085769456 270 | 270 3717439086273815 271 | 271 3717440086871997 272 | 272 3717441087351226 273 | 273 3717442087809997 274 | 274 3717443088277872 275 | 275 3717444088841646 276 | 276 3717445089267494 277 | 277 3717446089787829 278 | 278 3717447090275712 279 | 279 3717448090704305 280 | 280 3717449091197886 281 | 281 3717450091689767 282 | 282 3717451092164212 283 | 283 3717452092707460 284 | 284 3717453093259968 285 | 285 3717454093730166 286 | 286 3717455094278374 287 | 287 3717456094742699 288 | 288 3717457095244865 289 | 289 3717458095703859 290 | 290 3717459096199526 291 | 291 3717460096685238 292 | 292 3717461097235259 293 | 293 3717462097808623 294 | 294 3717463098298446 295 | 295 3717464098767564 296 | 296 3717465099239784 297 | 297 3717466099684544 298 | 298 3717467100214599 299 | 299 3717468100650203 300 | 300 3717469101168169 301 | 301 3717470101662403 302 | 302 3717471102177096 303 | 303 3717472102677990 304 | 304 3717473103173784 305 | 305 3717474103631500 306 | 306 3717475104210681 307 | 307 3717476104705110 308 | 308 3717477105166152 309 | 309 3717478105649794 310 | 310 3717479106153003 311 | 311 3717480106665340 312 | 312 3717481107194459 313 | 313 3717482107792368 314 | 314 3717483108246997 315 | 315 3717484108720833 316 | 316 3717485109219947 317 | 317 3717486109704944 318 | 318 3717487110163931 319 | 319 3717488110736151 320 | 320 3717489111152894 321 | 321 3717490111626283 322 | 322 3717491112141777 323 | 323 3717492112639381 324 | 324 3717493113128130 325 | 325 3717494113623930 326 | 326 3717495114101207 327 | 327 3717496114706513 328 | 328 3717497115021720 329 | 329 3717498115404197 330 | 330 3717499115931050 331 | 331 3717500116428869 332 | 332 3717501116990050 333 | --------------------------------------------------------------------------------