## 2 System Model  
This section presents the architecture of the MEC system designed for the HSR environment. It describes the system components, their interactions, the network scenario, and the models for communication and computation resources. The proposed HSR MEC system integrates communication relays installed on HSTs to facilitate task communication with Base Stations (BSs) [21]. As illustrated in Figure 1, each HST is equipped with a device-detection sensor that identifies devices generating tasks. These tasks are transmitted to the BS via communication relays. The model assumes an environment characterized by the presence of multiple HSTs near a station. It further considers that the number of HSTs, the volume of tasks, and the locations of the HSTs dynamically evolve over time. Based on these assumptions, we propose a simplified and idealized environment to address the problem effectively, recognizing that this model serves as an initial framework and a basis for future, more detailed investigations. Unlike traditional vehicular MEC environments, the HSR-MEC system forms communication cells along railway tracks using BSs equipped with MECSs. As shown in Figure 2, the proposed system model largely consists of \(M\) MECSs (\(\mathcal{M}=\{1,\ldots,M\}\)) and \(N\) HSTs (\(\mathcal{N}=\{1,\ldots,N\}\)), and it processes tasks using wireless and wired networks. Each BS is co-located with an MECS and interconnected with other MECSs through a wired network. This architecture enables task handoffs and load balancing across MECSs, preventing overload on any single server. Tasks generated in HSTs are first transmitted to the nearest BS and subsequently offloaded to MECSs for processing. The interconnected MECSs ensure cooperative task handling and optimal resource utilization. In the proposed HSR system, where MECSs are employed, the task that occurs from each HST is conducted on the MECSs. Information regarding the state and task of each HST is transmitted to the nearest MECS. Due to the interconnected nature of the MECSs, seamless information sharing between MECSs is enabled, facilitating coordinated decision-making. The system selects a fixed number (\(K\)) of MECSs among a number of MECSs and then performs task partitioning considering only the \(K\) MECSs. The \(K\) servers selected in this way are defined as a set of serving MECSs (\(\mathcal{K}=\{1,\ldots,K\}\)). Since the MECSs are connected to each other, they exchange information. In this process, if multiple tasks occur by multiple passengers in an HST, the generated tasks are transmitted to the BS through the communication relay as one super-task. Then, it is decided at what ratio the tasks will be divided and sent to the serving MECSs. Figure 1: The HSR system structure with the MECS. Based on this system model, this paper proposes a technique to dynamically adjust the task partitioning ratio between MECSs to maximize the processing throughput of tasks and minimize the processing delay occurring in tasks in HSTs. This technique aims to effectively process a large number of tasks and improve real-time QoS by considering the HSR environment. In this study, HSTs generate tasks at each time slot \(t\), and the tasks generated are offloaded to the MECSs by determining the optimal task partitioning ratio. In this way, the task \(W_{n}(t)\) generated in each HST \(n\) at time \(t\) is composed of \(W_{n}(t)=(S(t),C(t),\ L_{max})\). \(S(t)\) represents the data size, and \(C(t)\) represents the number of cycles per bit, i.e., the workload of the task. \(L_{max}\) represents the delay constraint for guaranteeing QoS. The delay time required to process the task \(W_{n}(t)\) is calculated as follows:  
\[L_{n}(t)=L_{wait,n}(t)+L_{exec,n}(t)+L_{trun,n}(t), \tag{1}\]  
Here, \(L_{wait,n}(t)\) is the waiting delay to process \(W_{n}(t)\). In order to process a task on an MECS, tasks waiting in the MECS queue that were offloaded during the previous time slot \((t-1)\) must be processed before the task generated at the current time slot \((t)\) is processed.