WO2006059543A1 - スケジューリング方法、スケジューリング装置およびマルチプロセッサシステム - Google Patents

スケジューリング方法、スケジューリング装置およびマルチプロセッサシステム Download PDF

Info

Publication number
WO2006059543A1
WO2006059543A1 PCT/JP2005/021663 JP2005021663W WO2006059543A1 WO 2006059543 A1 WO2006059543 A1 WO 2006059543A1 JP 2005021663 W JP2005021663 W JP 2005021663W WO 2006059543 A1 WO2006059543 A1 WO 2006059543A1
Authority
WO
WIPO (PCT)
Prior art keywords
execution
thread
group
processor
scheduling
Prior art date
Application number
PCT/JP2005/021663
Other languages
English (en)
French (fr)
Inventor
Naohiro Nishikawa
Original Assignee
Sony Computer Entertainment Inc.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Computer Entertainment Inc. filed Critical Sony Computer Entertainment Inc.
Priority to EP05809655.3A priority Critical patent/EP1837762B1/en
Priority to CN2005800412782A priority patent/CN101069161B/zh
Publication of WO2006059543A1 publication Critical patent/WO2006059543A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs

Definitions

  • the present invention relates to a scheduling method and scheduling apparatus for execution units of parallel processing in a multiprocessor system, and a multiprocessor system.
  • Recent operating systems that support multitasking realize a multiprocess environment in which multiple processes can be executed simultaneously, and these processes generate multiple threads within the process and perform parallel processing. Equipped with multi-threading technology that can do this. Processes are assigned unique resources and address space at runtime, and cannot access areas of other processes. On the other hand, a thread is a unit of execution created inside a process, and each thread can freely access areas in the process. A thread is the basic unit by which the operating system allocates CPU execution time.
  • a simple round-robin method that selects and executes threads that enter the queue in order at regular intervals, and a priority that executes in order of thread priority.
  • threads in the queue are allocated to the CPU and executed at regular intervals.
  • threads of each priority are queued in a queue provided for each priority, and in order of priority, threads are selected in order from the queue and assigned to the CPU for execution.
  • processing can be executed in parallel to increase the overall speed of processing.
  • threads are assigned to one of the processors.
  • the performance of the process execution speed and memory consumption varies depending on the execution order of the threads.
  • thread scheduling in a multiprocessor system it is necessary to consider the efficiency of the use of processor resources, the exchange of data between threads and the efficiency of communication, etc., and thread scheduling in a single processor system. Different ideas are required.
  • the present invention has been made in view of these problems, and an object of the present invention is to control the order in which execution units of parallel processing in a multiprocessor system are allocated to processors, thereby increasing processing efficiency and improving processor utilization efficiency. It is to provide a scheduling technology that can improve the performance.
  • a scheduling method is a method for scheduling an order in which execution units to be scheduled to be processed in parallel are allocated to a plurality of processors in a multiprocessor system. Wherein one or more execution units to be scheduled are grouped and each execution unit refers to each other so that resources in the processor occupied by each of the execution units belonging to the same group can be referred to each other. If the resources are mapped to the address space and all execution units belonging to the same group are simultaneously assigned to any processor, the assignment of the group to the processor is controlled under the restriction.
  • Another aspect of the present invention is also a scheduling method.
  • This method is a method of scheduling an order in which execution units to be scheduled that are processed in parallel are allocated to a plurality of processor in a multiprocessor system, and the execution unit is one or more of the execution units to be scheduled.
  • the allocation to the processor is managed in units of groups, and the priority of the group is determined in the order of priority set for each group and within the same priority, the order in which the group arrives in the queue.
  • a group that is in the waiting state and in the execution state is assigned to the processor according to the priority order.
  • all execution units belonging to the same group according to the priority order can be assigned to processors simultaneously. Since the priority is determined in the order of arrival in the queue within the same priority, the arrival order can be maintained between groups having the same priority. In addition to waiting for execution, including groups that are already in execution, priorities are determined and assigned to processors, so it is possible to easily assign the group to be assigned to the processor in a batch.
  • Yet another embodiment of the present invention is also a scheduling method.
  • This method is a method for scheduling the order in which execution units to be scheduled to be processed in parallel are assigned to a plurality of processors in a multiprocessor system, and includes a group including one or more execution units to be scheduled.
  • the groups that are in the waiting state and in the executing state are taken out in the order of priority set for each group and, in the same priority, in the order of arrival in the waiting queue stored in the order of arrival, the groups are taken out. All execution units belonging to the group are assigned to the processor only if all execution units belonging to the issued group can be assigned to any processor at the same time. Priority is given to the allocation of groups from which waiting queue power is also extracted.
  • the execution unit belonging to the group to be sequentially taken out is already assigned to any processor and executing, the execution unit being executed is assigned to another processor. May be allocated to the processor so that the execution unit being executed is not relocated. As a result, for each execution unit belonging to the group that is already assigned to the processor and is being executed, the assignment to the already assigned processor can be maintained, and the cost involved in the assignment process can be reduced.
  • Yet another aspect of the present invention is a scheduling apparatus.
  • This device allows multiple execution units to be scheduled to be processed in parallel in a multiprocessor system.
  • a device that schedules the order of allocation to processors so that one or more execution units to be scheduled can be grouped so that resources in the processors occupied by each of the execution units belonging to the same group can be referred to each other.
  • the memory control unit that maps and manages the resource to the address space referred to by each execution unit, the execution queue that stores the group that is waiting and executing, and the leading power of the execution queue Includes an assigner that takes a group and assigns all execution units belonging to the loop to multiple processors only if all execution units belonging to the fetched group can be assigned to any processor at the same time. .
  • Yet another embodiment of the present invention is also a scheduling apparatus.
  • This device is a device that schedules the order in which execution units to be scheduled to be processed in parallel are assigned to a plurality of processors in a multiprocessor system, and includes a group including one or more execution units to be scheduled Among them, the waiting queue that stores the waiting and executing groups in the order of priority set for each group and in the order of arrival within the same priority, and the order of the leading power of the waiting queue.
  • the allocation list generator that adds a group to the allocation list and the allocation list generator only if the group is extracted and all execution units belonging to the extracted group can be allocated to any processor at the same time. A group belonging to the group stored in the generated allocation list. And an allocation unit that allocates all execution units to multiple processors.
  • Yet another embodiment of the present invention is a multiprocessor system.
  • This system is a multiprocessor system in which execution units to be scheduled to be processed in parallel are assigned to a plurality of processors and executed in parallel, and one processor uses the execution units to be scheduled as other processors.
  • Contains a scheduler to assign to The scheduler is configured to group one or more execution units to be scheduled so that resources in the processor occupied by each of the execution units belonging to the same group can be referred to each other.
  • a memory control unit that maps and manages the resource in an address space that is referenced by and a group that is in a waiting state and in an executing state are stored.
  • the waiting queue and the leading force of the waiting queue are also taken out in order, and only if all execution units belonging to the removed group can be assigned to any processor at the same time.
  • an allocator that assigns all execution units to multiple processors.
  • Yet another embodiment of the present invention is also a multiprocessor system.
  • This system is a multiprocessor system in which execution units to be scheduled to be processed in parallel are assigned to a plurality of processors and executed in parallel, and one processor uses the execution units to be scheduled as other processors.
  • the scheduler includes, in a priority order set for each group and within the same priority, a group that is in a state of waiting for execution and executing in a loop including one or more execution units to be scheduled.
  • An execution queue stored in the order of arrival and a group are extracted in the order of the leading power of the execution queue, and only when all execution units belonging to the extracted group can be assigned to any processor at the same time
  • Yet another embodiment of the present invention is also a scheduling method.
  • This method is a method of scheduling the order in which execution units to be scheduled to be processed in parallel are allocated to a plurality of processors in a multiprocessor system, and at least one processor among the plurality of processors is parallelized.
  • the resources in the processor that are exclusively occupied by non-scheduled execution units that run on non-allocated processors are excluded from the scheduling target execution unit to be processed.
  • the resource is mapped to the address space referred to by each execution unit so that the execution unit can be referred to, and then the allocation of the execution unit to the processor to be allocated is controlled.
  • Yet another embodiment of the present invention is also a scheduling apparatus.
  • this apparatus is a device that schedules the order in which execution units to be scheduled to be processed in parallel are assigned to a plurality of processors. At least one processor is excluded from the allocation target of the execution unit scheduled for parallel processing, and is exclusively occupied by the non-scheduled execution unit operating on the non-allocation target processor.
  • a memory control unit that maps and manages the resources in the address space referred to by each execution target for scheduling so that the resources in the processor can also refer to the execution unit power for the scheduling target, and a state of waiting for execution and executing
  • an assigning unit that takes out the execution units to be scheduled and allocates them to any one of the processors in the order of the leading power of the execution queue.
  • FIG. 1 is a configuration diagram of a multiprocessor system according to a first embodiment.
  • FIG. 2 is a diagram for explaining an address space seen from a thread assigned to the processor of FIG. 1.
  • FIG. 3 is a diagram for explaining a thread operating on the processor of FIG. 1 and a thread group to which the thread belongs.
  • FIG. 4 is a diagram for explaining how threads are allocated to processors in units of thread groups shown in FIG.
  • FIG. 5 is a diagram illustrating thread state transitions
  • FIG. 6 is a configuration diagram of a scheduling device according to the first embodiment.
  • FIG. 7 is a diagram for explaining the thread state table in FIG. 6.
  • FIG. 8 is a diagram for explaining the execution waiting queue of FIG. 6.
  • FIG. 9 is a diagram for explaining the scheduling arrangement of FIG. 6.
  • FIG. 10 illustrates a scheduling procedure by the scheduling device according to the first embodiment. It is a flowchart.
  • FIG. 11 is a diagram illustrating a procedure for assigning threads at a certain time.
  • FIG. 12 is a diagram illustrating a procedure for assigning threads at different times.
  • FIG. 13 is a diagram showing a time change of a thread assignment state by the thread scheduling of FIGS. 11 and 12.
  • FIG. 14 is a diagram for explaining another example of the thread state table of FIG. 6.
  • FIG. 15 is a diagram illustrating a procedure for assigning threads at a certain time.
  • FIG. 16 is a diagram showing the time change of the thread assignment state by the thread scheduling of FIG.
  • FIG. 17 is a diagram for explaining yet another example of the thread state table in FIG. 6.
  • FIG. 18 is a diagram illustrating a procedure for assigning threads at a certain time.
  • FIG. 19 is a diagram illustrating a procedure for assigning threads at another time.
  • FIG. 20 is a diagram illustrating a procedure for assigning threads at yet another time.
  • FIG. 21 is a diagram illustrating a procedure for assigning threads at yet another time.
  • FIG. 22 is a diagram showing a time change of a thread allocation state by the thread scheduling of FIGS. 18 to 21.
  • FIG. 23 is a diagram for explaining an address space viewed from a thread assigned to a processor of the multiprocessor system according to the second embodiment.
  • FIG. 24 is a diagram for explaining an address space as seen from a thread assigned to a processor of a multiprocessor system according to a third embodiment.
  • FIG. 25 is a diagram showing a time change of a thread allocation state by thread scheduling in the multiprocessor system according to the third embodiment.
  • FIG. 1 is a configuration diagram of a multiprocessor system according to the first embodiment.
  • the multiprocessor system includes a plurality of processing elements (PE) 100 and a main memory 120, which are connected to the main bus 110.
  • Each processing element 100 includes a processor 130, a local memory 140, and a memory control unit 150.
  • the processor 130 can read and write data to the oral memory 140.
  • the memory control unit 150 provides an interface for referring to data in the local memory 140 from the processors 130 of the other processing elements 100, and provides a function of memory synchronization and exclusive control.
  • One of the processing elements 100 is an execution unit of parallel processing, and has a function of scheduling an execution entity (hereinafter referred to as a thread) to be scheduled.
  • This scheduling function operates at the privilege level. At the privilege level, it has the right to access all resources of the multiprocessor system.
  • programs that operate on other processing elements 100 that do not have a scheduling function operate at the user level. At the user level, the resources that can be accessed are limited compared to the privilege level.
  • thread scheduling With thread scheduling, one thread is assigned to each processor 130 at a certain time, and a plurality of threads are executed in parallel in the entire multiprocessor system.
  • the thread allocated to each processor 130 can occupy and use all resources such as the low-power memory 140 in the processing element 100 and the registers in the memory control unit 150.
  • the thread context is saved in the main memory 120.
  • the context of a thread is the state of all resources that the thread occupies in the processing element 100 to which it is assigned (hereinafter referred to as the assigned PE).
  • a thread group including one or more threads as elements is defined, scheduling is performed in units of thread groups, and all threads belonging to the thread group are simultaneously selected by any processor 130. Assigned to. Some threads in the thread group are assigned to the processor 130, and the remaining threads do not remain in the main memory 120. Therefore, all threads in the same thread group share a transition state such as waiting for execution or executing. Threads belonging to the same thread loop can directly reference each other's address space without using the kernel system call.
  • FIG. 2 is a diagram for explaining the address space 170 as seen from the thread assigned to the processor 130.
  • the address space 170 includes a main memory area 172 to which main memory including shared data is mapped, and a thread map area 174 to which occupied resources of each thread in the same group are mapped.
  • thread maps # 1 to #n are arranged corresponding to the threads in the same group. If the number of processors is n, a maximum of n threads can be provided in the same group, so n areas are reserved in the thread map.
  • Each thread map #l to #n is a memory map of a part of resources that each corresponding thread occupies in the assigned PE.
  • the local memory and the memory control unit 150 are allocated. Forces including a group of registers for controlling external force The memory group for controlling the memory controller 150 from the outside is not all accessible, but only the communication registers described later are accessible. This register cannot be accessed.
  • the size of the thread map related to the types of accessible registers can be made constant.
  • the offset value for the top address of the map becomes a fixed value, which makes management difficult for programmers.
  • a part of the resources occupied in the assigned PE by each thread is mapped to the address space.
  • each thread in the same group can access and operate a part of resources occupied by other threads without using a system call.
  • registers for controlling the memory control unit 150 from the outside it is possible to place certain restrictions on external operations by mapping to the address space only the registers that permit the operation.
  • the start address of the second thread map # 2 is the address obtained by adding the offset value corresponding to the size of the thread map to the thread base address.
  • the scheduling device 200 described later stores, in the memory, which thread map is used by each thread in the same group as thread map setting information, and controls the memory of the PE to which the thread is allocated at the time of thread allocation.
  • the memory control unit 150 of each processing element 100 can grasp to which thread map the resource of each thread in the same group is mapped by the thread map setting information. Based on the thread map of the address space 170, access requests for resources of other threads can be processed by the DMA.
  • the thread state management unit 32 of the scheduling apparatus 200 described later manages thread group thread map setting information, and stores the thread map setting information in the thread state table 34 as an example. Hold.
  • the thread allocation unit 14 of the scheduling apparatus 200 performs a process of allocating the thread to the processor, and performs a process of setting the thread group thread map setting information in the memory control unit 150.
  • the thread assigned to the processor is started after the thread group thread map setting information is set in the memory control unit 150.
  • the first thread A1 is assigned to the first area EA1 of the address space of group A.
  • the resource memory is mapped and the resource capacity S memory map of the second thread A2 is mapped to the second area EA2 of the address space.
  • thread Al, A2 in group A is scheduled, thread A1 is assigned to the first processor, and thread A2 is assigned to the second processor.
  • the resource of the second processor is referred to as the resource of the second thread A2.
  • the allocation and execution of the first thread Al and the second thread A2 to the processor are performed after the resources are prepared, so the first thread A1 to the second area EA2 that is the thread map of the second thread A2 This access is guaranteed to be an access to the resource of the second thread A2, regardless of which processor the second thread A2 is assigned to.
  • the second thread A2 accesses the first area EA1, which is the thread map of the first thread A1.
  • a thread allocated to any processor 130 accesses a thread map address set in the address space 170, so that resources occupied by other threads in the same group can be obtained. Can be accessed directly by DMA.
  • the other threads in the same group are assigned to any of the processors 130. Which processor 130 is assigned to is different for each scheduling. However, the thread map is set to the same address in address space 170 that is related to which processor the thread is assigned to. Therefore, each thread in the same group is guaranteed to have consistent access to the resources of other threads by accessing a thread map in address space 170 that is independent of the thread's assignment to the processor.
  • a communication register that can be used for synchronous communication between threads is provided.
  • the value of the communication register can be read by a special instruction from the processor 130 of the processing element 100. If the value has not yet been written to the communication register, the processor 130 stores the value in the communication register. Wait until is written.
  • this communication register controls the memory of the processing element 100 other than itself. Can be written from part 150.
  • the communication register in the memory control unit 150 is memory-mapped as a thread map in the address space 170 as an occupied resource of the thread. Therefore, a thread can access a communication register of the memory control unit 150 of another processing element 100 by referring to a thread map in its address space 170, and can write a value. .
  • the memory control unit 150 has a mechanism in which the processor stalls like a heart until another thread writes a value in the communication register of its own thread. It can be realized, and synchronous communication between threads becomes possible.
  • FIGS. 3A to 3D are diagrams for explaining thread groups.
  • FIG. 3 (a) shows the first thread group including three threads t hla, thlb and thlc.
  • FIG. 3 (b) shows the second thread group including one thread th2a. If there is only one such thread, it is treated as a thread group.
  • FIG. 3 (c) shows a third thread group including two threads th3a and th3b.
  • FIG. 3 (d) shows the fourth thread group including one thread th4a.
  • one thread is designated as the primary thread and represents the thread group.
  • all threads belonging to that thread group can be operated together by operating the primary thread.
  • FIG. 4 illustrates how threads are allocated to the processor 130 in units of thread groups.
  • FIG. This figure shows an assignment state of threads belonging to the four thread groups shown in FIG. 3 to the processors 130 in a multiprocessor system having a total of four processors.
  • the three threads thla, thlb, and thlc belonging to the first thread group are assigned to the first processor, the second processor, and the third processor, respectively, and one thread th2a belonging to the second thread group is Assigned to the 4th processor.
  • the other two threads th3a and th3b belonging to the third thread group and the one thread th4a belonging to the fourth thread group are saved in the main memory 120.
  • Thread scheduling is performed on condition that all threads belonging to the same thread group are allocated to any processor 130 at the same time.
  • the first thread loop is assigned to the processor 130 only when the three threads thla, thlb, and thlc belonging to the first thread group can be assigned to any one of the processors 130 at the same time. If one or two of the three threads thla, thlb, thlc are assigned to processor 1 30 and the rest are evacuated to main memory 120, no situation is created!
  • FIG. 5 is a diagram illustrating thread state transition.
  • the thread is created by the create command and enters the not configured state 42.
  • a configuration command is executed for a thread in the unconfigured state 42
  • the state transitions to the configured state 44.
  • the thread can belong to the same thread group as the primary thread.
  • a delete command is executed for a thread in the construction state 44, the thread is deleted and the memory area used for the thread is released.
  • the unconstructed state 42 and the built state 44 are combined into a dormant state 40.
  • the start command is executed for the primary thread in the construction state 4 4, all threads belonging to the thread group including the primary thread transition to the ready state 52. Thereafter, all the threads belonging to the thread group make a state transition together in the operation (operationa 1) state 50.
  • operationa 1 the operation (operationa 1) state 50.
  • the command for the thread group is the primary thread. Execute on all threads that belong to the thread group.
  • the thread in the execution waiting state 52 transitions to the synchronization waiting (waiting) state 56 by a wait command, and the thread in the synchronization waiting state 56 receives the signal and returns to the execution waiting state 52.
  • a thread that is in the execution wait state 52 transitions to a running state 54 by a dispatch command, and a thread that is in the execution state 54 waits for execution by a yield command 52. Return to SYNC state 56 by the wait command, and enter suspend state 60 by the suspend command.
  • the thread in the synchronization wait state 56 is changed to the waiting and suspended state 58 by the suspend command, and the thread in the synchronization wait suspension state 58 is synchronized by the resume command. Return to wait state 56.
  • a thread in the synchronization wait suspended state 58 transitions to the suspended state 60 in response to a signal.
  • a thread in the suspended state 60 transitions to the execution waiting state 52 by the resume command, and a thread in the execution waiting state 52 transitions to the suspended state 60 by the suspend command.
  • a thread in the running state 54 transitions to a stopped state 62 when exception handling occurs, and a thread in the stopped state 62 transitions to the running state 54 or the waiting for execution state 52 by a restart command. To do.
  • threads in the running state 54 are assigned to the processor 130, and threads in other states are retreated to the main memory 120.
  • FIG. 6 is a configuration diagram of scheduling apparatus 200 according to Embodiment 1. This figure is a block diagram focusing on the functions, and these functional blocks can be realized in various forms by hardware only, software only, or their combination. .
  • the scheduling device 200 is provided in any one of the processing elements 100 in FIG. 1 and is realized using the processor 130, the local memory 140, and the memory control unit 150. Further, the main memory 120 may be used. In the following description of the configuration of FIG. 6, FIGS. 7 to 9 will be referred to as appropriate.
  • the thread state management unit 32 manages thread generation and deletion, thread group setting, thread group priority, and thread group unit state transition using the thread state table 34.
  • FIG. 7 is a diagram for explaining the thread state table 34.
  • the thread state table 34 stores a thread group ID 70, the number of threads 72 belonging to the thread group, a thread group transition state 74, a thread 76 belonging to the thread group, and a thread group priority 78 in association with each other.
  • the thread state management unit 32 updates the thread state table 34 when there is a thread creation and deletion, a thread group setting and state change, a priority setting, or the like.
  • the first thread group with group ID 1 has three threads, includes three threads thla, thlb, thlc, and the priority is set to 1.
  • the current transition state Is running.
  • the second thread group with group ID 2 has one thread, includes one thread th2a, has a priority set to 2, and the current transition state is being executed.
  • the third thread group of group ID3 has two threads, includes two threads th3a and th3b, has a priority set to 2, and the current transition state is waiting for execution.
  • the fourth thread group of group ID4 has one thread, includes one thread th4a, has a priority set to 4, and is currently waiting for execution. It is assumed that the lower the priority, the higher the priority.
  • the priority is 16 levels, but there is a degree of design freedom such as 256 levels.
  • the thread state management unit 32 queues the thread group in the execution waiting state or the executing state in the execution waiting queue 30 among the thread dulls managed in the thread state table 34.
  • the execution queue 30 is a FIFO (First FIFO) in which thread groups that are in the execution waiting state or in the executing state are fetched first in the order of priority set for each thread group and within the same priority. In First Out) This is a queue that is queued with a priority.
  • FIG. 8 is a diagram for explaining the execution waiting queue 30. For each entry in the list of priorities 1-16, the primary thread of the thread group with that priority is queued in FIFO order.
  • the primary thread pt hi of the first thread group is queued to the priority 1 entry, and the primary thread pth2 and the second thread group of the second thread group are queued to the priority 2 entry.
  • the primary thread pth3 of the 3 thread group is queued in this order, and the primary thread pth4 of the 4th thread group is queued in the priority 4 entry. Since the second thread group is queued before the third thread group, the primary thread pth2 of the second thread group is queued before the primary thread pth3 of the third thread group.
  • the primary thread pth2 queued at the head of the priority 2 entry is linked from the priority 1 primary thread pthl at the head position of the waiting queue 30. Further, a link is made from the first primary thread pth2 of the priority 2 entry to the next primary thread pth3 queued within the same priority, and from the primary thread pth3 to the primary thread pth4 of priority 4 It is turned on. As a result, an execution waiting queue 30 with a priority determined so that the primary threads pthl, pth2, pth3, and pth4 can be extracted in this order is generated.
  • the thread state management unit 32 deletes the primary thread of the thread group from the waiting queue 30.
  • the primary thread of the thread group that has been newly created and is waiting to be executed by the start command, or the primary thread of the thread group that has been waiting for execution after returning from the synchronization waiting state, etc. is entered as an entry of the corresponding priority. Insert in FIF O order and update the waiting queue 30.
  • the scheduler 10 controls to take out the thread group queued in the waiting queue 30 from the head and assign it to the processor, and includes an assignment list generation unit 12 and a thread assignment unit 14.
  • the thread state management unit 32 restarts when the thread group state transitions to a state such as waiting for synchronization or suspended, or when the thread is terminated.
  • the allocation list generator 12 is notified.
  • the allocation list generation unit 12 receives a rescheduling instruction from the thread state management unit 32 and performs “marking processing” or “allocation list generation processing” to be described.
  • the allocation list generation unit 12 includes an allocation thread number counter 16 and a thread allocation list 18.
  • And scheduling array 20 is used to perform thread scheduling.
  • the allocated thread number counter 16 counts the number of threads allocated to the processor 130 and is simply referred to as “counter” hereinafter.
  • the thread allocation list 18 stores primary threads of a thread group to be allocated to the processor 130. Hereinafter, the thread allocation list 18 is simply referred to as an “allocation list”.
  • the scheduling array 20 is a schedule table that holds the assignment status of threads to the processors 130, and is an array in which processor numbers that identify individual processors 130 are associated with threads that are assigned to the processors 130.
  • FIG. 9 is a diagram for explaining the scheduling array 20.
  • the scheduling array 20 stores a processor number 80, a thread 82 assigned to the processor, and a mark 84 in association with each other.
  • the processor number 80 is an identification number uniquely corresponding to the processor.
  • the mark 84 is used as a flag for ensuring the assignment of threads to processors in the marking process of the assignment list generator 12.
  • the total number of processors is 4, and the first to fourth processors are identified by numbers 1 to 4.
  • Processor numbers 1 to 3 are assigned three threads thla, thlb, and thlc in the first thread group, respectively, and processor number 4 is assigned thread th2a in the second thread group.
  • the allocation list generation unit 12 initializes the counter 16 to zero and empties the allocation list 18.
  • the allocation list generation unit 12 sequentially extracts the primary thread in the order of the leading force of the execution waiting queue 30.
  • the thread group to which the extracted primary thread belongs is referred to as an “assignment candidate thread group”.
  • the allocation list generation unit 12 adds the number of threads belonging to the allocation candidate thread group to the counter 16. If the value of counter 16 exceeds the total number of processors in the multiprocessor system, allocation list generator 12 The allocation candidate thread group is removed from the allocation candidate group, and the value of counter 16 is returned to the value before addition.
  • the allocation list generation unit 12 refers to the scheduling array 20 to check whether or not the allocation candidate thread groups sequentially extracted from the execution queue 30 are already in execution. If each thread belonging to the allocation candidate thread group is in the scheduling array 20, each thread belonging to the allocation candidate thread group is being executed. In that case, in the scheduling array 20, the processor number to which the executing thread is assigned is marked. This is called “marking process”. As a result of the marking process, a thread already assigned to the marked processor number is allocated to the processor so that the assignment destination is not changed by another processor.
  • the allocation list generation unit 12 determines that if each thread belonging to the allocation candidate thread group is not in the scheduling array 20, that is, if the allocation candidate thread group is not in the running state, the allocation candidate thread group Add the primary thread to assignment list 18 . This is called “allocation list generation processing”. Through the assignment list generation processing, the assignment list 18 lists the thread groups that are newly assigned to the processor 130 in the current scheduling.
  • the allocation list generation unit 12 is the force at which the value of the counter 16 reaches the total number of processors.
  • the waiting power of the execution waiting queue 30 is also used for marking processing and allocation list generation processing until the primary thread is extracted. Repeat these steps.
  • the thread allocation unit 14 extracts the primary thread from the allocation list 18, and all threads belonging to the thread group are marked in the scheduling array 20! / ⁇ Allocate to the processor number. At this time, the thread assigned to the unmarked processor number and in the executing state is preempted and transitions to the execution waiting state. The thread allocation unit 14 notifies the thread state management unit 32 of the thread that has been provisioned, and the thread state management unit 32 updates the thread state table 34 and manages the state change of the thread.
  • Red is assigned to processor 130 for execution.
  • a thread that has already been in execution is continuously executed on the same processor 130, and a thread that is in the execution waiting state is newly assigned to the processor 130 and changes to the execution state.
  • the thread state management unit 32 updates the thread state table 34 and manages the state change of each thread.
  • FIG. 10 is a flowchart for explaining a thread scheduling procedure by the scheduling apparatus 200 having the above configuration.
  • the thread state management unit 32 instructs the allocation list generation unit 12 to perform thread scheduling when the transition state of the thread changes from the running state force to the synchronization waiting state or the suspended state, or when the thread is terminated.
  • the allocation list generator 12 initializes the counter 16 and the allocation list 18 (S10).
  • the allocation list generation unit 12 extracts the allocation candidate thread group as well as the leading force of the waiting queue 30 (S 12).
  • the allocation list generation unit 12 counts the number of hitting threads by counting the number of threads belonging to the allocation candidate thread group to the counter 16 (S14).
  • the allocation list generator 12 determines whether or not the value of the counter 16 is equal to or less than the total number of processors (S16). If the value of counter 16 exceeds the total number of processors, all threads belonging to that allocation candidate thread group cannot be assigned to any processor at the same time! The number of threads is subtracted to return the counter value to the original value (S18), and the process proceeds to step S26.
  • the allocation list generation unit 12 checks whether each thread belonging to the allocation candidate thread group is stored in the scheduling array 20 ( S20). If a thread belonging to the allocation candidate thread group is assigned to one of the processor numbers in the scheduling array 20, the thread is assigned to that processor in the previous scheduling and is executed. That's right.
  • the allocation list generation unit 12 stores the thread in the scheduling array 20. Then, the processor number to which the thread is allocated is marked (S22). The thread assigned to the marked processor number is allocated to the processor so that it cannot be relocated by changing the assignment destination to another processor.
  • the allocation list generation unit 12 assigns the allocation candidate thread group to the allocation list 18 (S23).
  • allocation list generation unit 12 finishes generating allocation list 18 and cannot proceed to step S30 because no more threads can be allocated. .
  • the allocation candidate generation thread group is one in which the tail power of the waiting queue 30 has been extracted (Y in S26)
  • the allocation list generator 12 also has no next thread to allocate. The generation of allocation list 18 is completed, and the process proceeds to step S30.
  • the allocation list generation unit 12 does not reach the number of processors in the counter 16 (N in S24), and the allocation candidate thread group is not one that has been extracted from the end queue of the waiting queue 30 (S26). N), the next thread group in the waiting queue 30 is taken out (S28), and the processing after step S14 is repeated.
  • step S30 the thread assignment unit 14 assigns each thread belonging to the thread group stored in the assignment list 18 to a processor number that is marked! /? In the scheduling array 20. At this time, a thread that has already been allocated to an unmarked processor number is preempted from its assignment to that processor. When all the thread groups stored in the allocation list 18 have been allocated to the processor numbers, the series of thread scheduling processes ends.
  • 11 to 13 are diagrams for explaining a thread scheduling procedure under the conditions shown in the thread state table 34 of FIG.
  • FIG. 11 (a) shows the initial state of the waiting queue 30, and the primary thread pthl (hereinafter referred to as the first primary thread) of the first thread group is assigned to the second thread in the priority 1 entry.
  • the primary thread pth2 of the thread group (hereinafter referred to as the second primary thread) and the primary thread pth3 of the third thread group (hereinafter referred to as the third primary thread) are assigned to the priority 2 entry and the primary thread pth4 of the fourth thread group. (Hereinafter referred to as the 4th primary thread) are queued to priority 4 entries.
  • the execution queue 30 is a queue in which the priority is determined in the order of the first primary thread pthl, the second primary thread pth2, the third primary thread pth3, and the fourth primary thread pth4.
  • FIG. 11 (b) is a diagram for explaining the process of the marking process and the allocation list generation process by the allocation list generation unit 12.
  • the processing process table 15 indicates whether the allocation list generation unit 12 has performed the marking process or the allocation list generation process for the primary thread that has sequentially taken out the leading force of the waiting queue 30, and the counter at that time. 1 shows the value of 6.
  • the allocation list generator 12 also takes out the first primary thread pthl as the leading force of the execution queue 30 in FIG. 11A, and adds the number of threads 3 in the first thread group to the counter 16. Since the scheduling array 20 is empty and no thread is subject to the marking process, the first primary thread pthl is stored in the allocation list 18 as it is.
  • the allocation list generator 12 takes out the second primary thread pth2, which is the next entry in the waiting queue 30 in FIG. 11 (a), and sets the number of threads 1 in the second thread group to the counter 16. to add.
  • the second primary thread pth2 is not subject to the marking process and is added to the allocation list 18.
  • the counter value is 4, and since the total number of preset processors has been reached, the allocation list generator 12 finishes generating the allocation list 18.
  • the thread allocation unit 14 is configured to mark all threads belonging to the first and second thread groups listed in the allocation list 18 of FIG. Allocate to V, N, and processor numbers.
  • FIG. 11 (c) shows a scheduling array 20 in which threads are allocated according to the allocation list 18. None of the processor numbers are marked, the first to third processors are assigned three threads thla, thlb, thlc in the first thread group, and the fourth thread processor is assigned 1 in the second thread group. One thread th2a is allocated. This completes the thread scheduling at the current time to.
  • FIG. 12A shows the execution waiting queue 30 at time tl. Since the first primary thread pthl is neither waiting nor being executed, the thread state management unit 32 removes the first primary thread pthl from the waiting queue 30. As a result, at the time tl, the head of the waiting queue 30 is the second primary thread pth2.
  • the allocation list generation unit 12 Upon receiving the notification from the thread state management unit 32, the allocation list generation unit 12 initializes the counter 16 and the allocation list 18 and starts scheduling.
  • FIG. 12 (b) shows the marking process and the allocation list generation process by the allocation list generation unit 12 at time tl.
  • the allocation list generation unit 12 takes out the second primary thread pth 2 as the leading force of the waiting queue 30, adds 1 to the counter 16, and sets the counter value to 1.
  • the allocation list generation unit 12 checks whether the thread th2a of the second thread group is in the scheduling array 20. At this time, the scheduling array 20 is in the state shown in FIG. 11 (c) at the previous time tO, and the thread th2a of the second thread group is assigned to the processor number 4, so the assignment list generator 12 Mark processor number 4 in scheduling array 20 as shown in Fig. 12 (c).
  • the allocation list generation unit 12 takes out the third primary thread pth3, which is the next entry in the waiting queue 30, and adds 2 to the counter 16 as the number of threads in the third thread group. Is 3.
  • the allocation list generator 12 schedules the threads th3a and th3b of the third thread group. Check if it is in one ring array 20. Since the threads th3a and th3b of the third thread group are not in the scheduling array 20 at time tO shown in FIG. 11 (c), the allocation list generation unit 12 adds the third primary thread pth3 to the allocation list 18. .
  • the allocation list generation unit 12 takes out the fourth primary thread pth4, which is the next entry in the waiting queue 30, and adds 1 to the counter 16 for the number of threads in the fourth thread group.
  • the allocation list generation unit 12 adds the fourth primary thread pth4 to the allocation list 18.
  • the allocation list generator 12 finishes generating the allocation list 18 because the value of the counter 16 has reached the total number of processors 4.
  • the thread allocation unit 14 assigns all threads belonging to the third and fourth thread groups listed in the allocation list 18 of Fig. 12 (b) to the processor number, marked V in the scheduling array 20. Allocate.
  • FIG. 12 (c) is a diagram showing a scheduling array 20 in which threads are allocated according to the allocation list 18. Since the processor number 4 is marked, the thread th2a of the second thread group allocated to the processor number remains assigned. Processor numbers 1 to 3 that are not marked are assigned two threads th3a and th3b of the third thread group and one thread th4a of the fourth thread group, respectively. This completes thread scheduling at the current time tl.
  • FIG. 13 is a diagram showing a temporal change in the thread assignment state by the thread scheduling described in FIG. 11 and FIG.
  • the first to third processors PE1 to PE3 are assigned three threads thla to thlc of the first thread group, respectively, and the fourth processor (PE4) is assigned to thread th2a of the second thread group. Is assigned and executed.
  • FIG. 14 to FIG. 16 are diagrams for explaining another example of thread scheduling. In this example, we explain that “priority inversion” occurs.
  • FIG. 14 shows a thread state table 34 in this example.
  • the third thread group differs from the example in Fig. 7 only in that the number of threads is 4, and the other conditions are the same as in the example in Fig. 7. Therefore, the scheduling result at the first time tO is the same as in FIG.
  • the scheduling procedure at time tl when the threads in the first thread group are out of the waiting queue 30 due to, for example, waiting for synchronization will be described.
  • FIG. 15 (a) is a diagram showing the state of the execution waiting queue 30 at time tl. As in FIG. 12 (a), as a result of the first primary thread pthl being removed from the waiting queue 30, the waiting queue 30 starts with the second primary thread pth2.
  • FIG. 15B is a diagram for explaining the process of the marking process and the allocation list generation process by the allocation list generation unit 12 at time tl.
  • the allocation list generator 12 uses the second primary thread pth as the starting force of the waiting queue 30.
  • the allocation list generating unit 12 assigns the processor number 4 to which the thread th2a is allocated in the scheduling array 20 as shown in Fig. 15 (c). Put a mark.
  • the allocation list generator 12 takes out the third primary thread pth3, which is the next entry in the execution queue 30.
  • the allocation list generator 12 determines that the third thread group cannot be allocated because the counter value is 5 when the number of threads 4 of the third thread group is added to the counter 16, and the counter value becomes 5. For the 3 thread group, it is excluded from the allocation candidates, and neither the marking process nor the allocation list generation process is performed.
  • the allocation list generator 12 takes out the fourth primary thread pth4, which is the next entry in the waiting queue 30.
  • the counter 16 calculates the number of threads in the 4th thread group by 1, and sets the counter value to 2.
  • the allocation list generator 12 is a thread of the fourth thread group. Since the node th4a is not in the scheduling array 20, the fourth primary thread pth4 is added to the allocation list 18. Since the thread th4a of the fourth thread group is the last entry in the waiting queue 30, the allocation list generator 12 finishes generating the allocation list 18.
  • the thread allocation unit 14 allocates all threads belonging to the fourth thread group listed in the allocation list 18 of Fig. 15 (b) to unmarked V processor numbers in the scheduling array 20.
  • FIG. 15 (c) shows a scheduling array 20 in which threads are assigned according to the assignment list 18.
  • the thread th2a in the second thread group assigned to the marked processor number 4 is kept allocated and marked as it is! / ⁇ , one thread th4a in the fourth thread group is assigned to processor number 1. . This completes the scheduling of the thread at the current time tl.
  • FIG. 16 is a diagram showing a change over time in the thread assignment state in this example.
  • the thread assignment at time tO is the same as in FIG.
  • the thread th2a of the second thread group that should be given the highest priority is kept in the same state as in FIG. 13, but the third thread group that should be given the next priority is the number of threads. Therefore, it cannot be assigned to a free processor, and the priority is lower than that of the third thread group, and the thread th4a of the fourth thread group is assigned to the first processor and executed.
  • FIGS. 17 to 22 are diagrams for explaining yet another thread scheduling example. This example illustrates a situation where a thread that has already been allocated is preempted by another higher priority thread.
  • FIG. 17 is a diagram for explaining the thread state table 34.
  • the first thread group has a thread group up to the fifth thread group, the number of threads is 2, 3, 1, 1, 3, and the priority is 1, 2, 3, 4, 5, respectively.
  • FIGS. 18A to 18C are diagrams for explaining scheduling at the first time tO. As shown in FIG. 18 (a), the first to fifth primary threads pthl to pth5 are queued in this order in the waiting queue 30.
  • FIG. 18 (b) shows the process of marking processing and allocation list generation processing by the allocation list generation unit 12.
  • the allocation list generation unit 12 also takes out the first primary thread pthl as the head force of the waiting queue 30, counts the number of threads 2 in the counter 16, sets the counter value to 2, and sets the first primary thread pthl. Add to assignment list 18.
  • the allocation list generator 12 has the ability to extract the second primary thread pth2, which is the next entry in the waiting queue 30.
  • the number of threads in the second thread group is 3, and when added to the counter 16, the total number of processors is 4.
  • the second thread group cannot be assigned.
  • the allocation list generation unit 12 takes out the third primary thread pth3, which is the next entry in the waiting queue 30, and adds the number of threads 1 in the third thread group to the counter 16 to obtain the counter value. 3 and add the third primary thread pth3 to allocation list 18. This causes a reversal of the priority in which the third thread group, which has a lower priority than the second thread group, is preferentially assigned to the processor. [0127] Furthermore, the allocation list generator 12 takes out the fourth primary thread pth4 which is the next entry in the waiting queue 30, adds 1 to the counter 16, and adds the number of threads 1 in the fourth thread group to the counter 16. 4 and the fourth primary thread pth4 is added to allocation list 18. The allocation list generator 12 finishes generating the allocation list 18 because the value of the counter 16 has reached the total number of processors 4.
  • the thread allocation unit 14 allocates each thread belonging to the first, third, and fourth thread groups listed in the allocation list 18 of FIG. 18B to the scheduling array 20. As shown in Fig. 18 (c), two threads la and lb of the first thread group are allocated to processor numbers 1 and 2, respectively, and thread 3a of the third thread group is allocated to processor number 3 and the processors Number 4 is assigned to thread th4a of the 4th thread group.
  • each thread of the first thread group waits for synchronization at time tl.
  • the head of the waiting queue 30 becomes the second primary thread p th2.
  • the allocation list generation unit 12 also extracts the second primary thread pth2 from the head force of the waiting queue 30, and adds the number of threads 3 of the second thread group to the counter 16.
  • the counter value is 3. Since the thread of the second thread group is not in the scheduling array 20 at the previous time tO, the allocation list generator 12 adds the second primary thread pth2 to the allocation list 18.
  • the allocation list generator 12 takes out the third primary thread pth3, which is the next entry in the waiting queue 30, and adds the number of threads 1 in the third thread group to the counter 16 to obtain the counter value. Is 4. Since the thread th3a of the third thread group is in the scheduling array 20 at the previous time tO, the allocation list generation unit 12 is assigned to the scheduling array 20 in the scheduling array 20 as shown in FIG. Mark processor number 3 to which thread th3a in the thread group is assigned.
  • the thread allocation unit 14 Since the value of the counter 16 has reached the total number of processors 4, as shown in Fig. 19 (c), the thread allocation unit 14 has three threads th2a and th2b belonging to the second thread group listed in the allocation list 18. Th2c scheduling array unmarked processor number 20 Allocate to 1, 2, and 4. At this time, the thread th4a of the fourth thread group assigned to the processor number 4 is preempted by the thread th2c of the second thread group by the assignment to the processor.
  • the allocation list generator 12 takes out the second primary thread pth2 from the head of the waiting queue 30, and adds the number of threads 3 of the second thread group to the counter 16 The counter value is 3. Since each thread of the second thread group is already in the scheduling array 20, the allocation list generator 12 assigns the processor number to which the threads th2a, th2b, th2c of the second thread group are allocated as shown in FIG. Mark 1, 2, and 4.
  • the allocation list generator 12 takes out the fourth primary thread pth4, which is the next entry in the waiting queue 30, and adds the number of threads 1 in the fourth thread group to the counter 16 to obtain the counter value. Since the thread of the fourth thread group is not in the scheduling array 20, the fourth primary thread pth4 is added to the allocation list 18.
  • the thread assignment unit 14 assigns the thread th4a of the fourth thread group listed in the assignment list 18 to the scheduling array 20 as shown in FIG. 20 (c). Allocate to unmarked processor number 3.
  • the allocation list generator 12 extracts the fourth primary thread pth4 from the head of the waiting queue 30, and adds the number of threads 1 of the fourth thread group to the counter 16 The counter value is 1. Since the threads of the fourth thread group are already in the scheduling array 20, the allocation list generator 12 marks the processor number 3 to which the thread th4a of the fourth thread group is allocated as shown in FIG. 21 (c). Put on.
  • the allocation list generator 12 performs the fifth entry, which is the next entry in the waiting queue 30. Take out the immediate thread pth5 and add the number of threads 3 in the fifth thread group to the counter 16 to set the counter value to 4. Since the thread of the fifth thread group is not in the scheduling array 20, the fifth primary thread pth5 is added to the allocation list 18.
  • the thread assignment unit 14 assigns threads th5a, th5b, and th5c of the fifth thread group listed in the assignment list 18. Assigned to unmarked processor numbers 1, 2, and 4 in scheduling array 20, respectively.
  • FIG. 22 is a diagram showing a temporal change in the thread assignment state in this example.
  • two threads thla and t hlb of the first thread group are allocated to the first processor and the second processor, a thread th3a of the third thread group is allocated to the third processor, and the fourth thread is allocated to the fourth processor.
  • the group thread th4a is assigned and executed.
  • the first thread group waits for synchronization and rescheduling occurs.
  • the thread th4a of the fourth thread group with the lower priority assigned to the fourth processor is assigned. Is preempted.
  • the thread t h4a of the fourth thread group is assigned to the third processor instead.
  • the threads th5a, th5b, and th5c of the fifth thread group are assigned to the first, second, and fourth processors, respectively, instead.
  • threads are grouped, and a plurality of threads belonging to the same thread group are allocated to!
  • the synchronization / exclusive control mechanism of the multiprocessor system can be used to efficiently refer to each other's address space among the threads in the thread group and to perform the exclusive processing of the memory efficiently.
  • threads in a thread group are assigned to processors at the same time, enabling efficient communication between threads and sharing of memory.
  • the thread with the highest priority is given the highest priority as much as possible under the condition that all threads belonging to the same thread group are simultaneously assigned to the processor. Resource utilization efficiency can be maximized.
  • a thread with a lower priority than previously assigned is preempted. This preemption can help keep the priority.
  • the thread group is given a lower priority and the priority order may be reversed. This reversal of priority can improve processor utilization.
  • the execution queue 30 queues not only the thread group in the execution waiting state but also the thread group in the execution state in the order of priority and in the FIFO order within the same priority. Yes. As a result, the scheduling can be performed while maintaining the FIFO order of the thread group. If the thread group in the running state is removed from the execution queue 30, it is necessary to store the FIFO order separately to maintain the FIFO order, which complicates the processing and increases the efficiency. Will be reduced. However, in this embodiment, since the thread groups in the running state are also held in the execution queue 30 in the FIFO order, allocation processing can be performed in a batch while maintaining the FIFO order. For this reason, it is easy to perform processing with high efficiency of allocation processing.
  • the allocation list generator 12 performs marking processing in the scheduling array 20, so that the already allocated threads are rearranged by changing the allocation destination processor. It can be guaranteed that nothing will happen.
  • Running status When a thread that is in a state is continuously scheduled and executed, the thread is continuously executed on the same processor, so that the process of assigning a thread to a processor can be omitted. Processing efficiency is improved.
  • the multiprocessor system according to the second embodiment has the same configuration as that of the multiprocessor system of FIG. 1, and one thread is assigned to each processor 130 at a certain time by thread scheduling, and a plurality of threads are paralleled in the entire multiprocessor system. The thread is executed.
  • At least one processor 130 out of a plurality of processors 130 is excluded from thread scheduling, and threads are allocated to the remaining processor 130 by thread scheduling.
  • thread scheduling Different from Embodiment 1.
  • a thread group including one or more threads is defined, and the scheduling is performed on a thread group basis.
  • a thread group is not particularly defined. Scheduling is performed in units of threads.
  • a normal round robin method or priority method that controls the assignment of threads to processors in the order of priority described in the first embodiment and within the same priority order is adopted. May be.
  • An execution entity that exclusively occupies the resources in the processing element 100 operates on the processor 130 of the processing element 100 that is not a thread allocation target (hereinafter referred to as a non-allocation target PE). Is not subject to scheduling, so once assigned to a processor, the assignment to that processor is not intercepted.
  • a non-scheduling execution entity an execution entity that is not a scheduling target that operates on this non-allocation target PE is referred to as a “non-scheduling execution entity”.
  • the non-scheduled execution entity can occupy and use all resources such as the local memory 140 in the non-allocation target PE and the registers in the memory control unit 150. This is because the thread power allocated to the processing element 100 by thread scheduling is the local memory 140 in the processing element 100 or the memory control unit 1 It is the same as being able to occupy and use all resources such as 50 internal registers. In addition, for resources occupied by non-scheduled execution entities, almost all of them are allowed except for critical resources so that some accesses are not permitted so that they can be accessed from the outside, that is, other processing elements 100. Resources are mapped into the address space.
  • FIG. 23 is a diagram for explaining the address space 170 as seen from a thread assigned to a certain processor 130.
  • the resources that the non-scheduling execution entity operating in the non-allocation target PE occupies in time are memory mapped in the address space 170 of each thread operating in the other processing element 100.
  • the address space 170 includes a main memory area 172 to which main memory including shared data is mapped, and a non-scheduling target execution entity map area 176 to which occupied resources of the non-scheduling target execution entity are mapped.
  • two non-scheduling target execution entity maps # 1 and # 2 are arranged in the non-scheduling target execution entity map area 176.
  • two processing elements 100 are selected as non-allocation target PEs, and non-scheduling target execution entities operate on each non-allocation target PE.
  • Each non-scheduled execution entity map # 1, # 2 is a memory map of the resources that each non-scheduled execution entity occupies in the non-allocation target PE.
  • local memory and memory It includes a register group for controlling controller 150 from the outside.
  • the register group includes a program control register for executing and stopping programs, and a D for controlling DMA.
  • the first non-scheduled execution entity map # 1 is allocated an area for the non-scheduled execution entity map with the non-scheduled execution entity base address as the start address.
  • Second non-scheduled execution entity pine The start address of # 2 is the address obtained by adding the offset value corresponding to the size of the non-scheduled execution entity map to the non-scheduled execution entity base address.
  • there are only two non-scheduled execution entity maps # 1 and # 2 but in general, only the number of processing elements 100 that are not subject to thread scheduling and have non-scheduled execution entities running.
  • a non-scheduling target execution entity map is provided.
  • the ID power returned as the return value of the generation function also determines the number of the non-scheduled execution entity map, and the non-scheduled execution entity in the address space 170 Whether to use a non-scheduled execution entity map is determined statically.
  • the memory control unit 150 of each processing element 100 holds the power of which non-scheduled execution entity map is used by each non-scheduled execution entity map as setting information of the non-scheduling execution entity map.
  • the memory control unit 150 of each processing element 100 can grasp the force that the resource of each non-scheduled execution entity is memory-mapped to which non-scheduled execution entity map from the setting information of the non-scheduling execution entity map. Based on the non-scheduled execution entity map in the address space 170, the access request for the resource of the non-scheduling execution entity can be processed by the DMA.
  • the first and second processors are also removed from the thread scheduling target, the first non-scheduled execution entity R1 operates on the first processor, and the second non-scheduled target on the second processor. Assume that the execution entity R2 operates. Also, assume that threads are scheduled and allocated to the third and fourth processors.
  • the resource cache of the first non-scheduled execution entity R1 is mapped to the first area ER1 of the thread address space and the second area ER2 Assume that the resource cache of the second non-scheduled execution entity R2 has been mapped. Assume that the first thread A1 is assigned to the third processor and the second thread A2 is assigned to the fourth processor by thread scheduling.
  • the resource of the first processor is referred to as the resource of the first non-scheduling execution entity R 1.
  • the access from the first thread A1 to the first area ER1, which is the non-scheduled execution entity map of the first non-scheduled execution entity R1 is related to which processor the first non-scheduling execution entity R1 is operating on.
  • the access to the resource of the first non-scheduled execution entity R1 is guaranteed. The same applies when the first thread A1 accesses the second area ER2, which is the non-scheduled execution entity map of the second non-scheduled execution entity R2.
  • the second thread A2 operating on the fourth processor accesses the first area ER1 and the second area ER2, which are the non-scheduled execution entity maps of the first and second non-scheduled execution entities Rl and R2. The case is exactly the same.
  • a thread allocated to any processor 130 accesses the address of the non-scheduled execution entity map set in the address space 170, thereby occupying the non-scheduled execution entity.
  • the resource to be accessed can be directly accessed by DMA.
  • the synchronization mechanism described in the first embodiment is also effective in the present embodiment.
  • the thread performs an operation to write a value to the communication register in the memory control unit 150, which is one of the resources of the non-scheduled execution entity that is memory-mapped in the address space, and the non-scheduling execution entity communicates with it. By waiting for the completion of writing to the register for execution, synchronization can be established between the non-scheduled execution entity and the thread.
  • Another use of the non-scheduled execution entity is to process the non-scheduled execution entity by mapping the occupied resources of the non-scheduled execution entity into the memory space of a device such as a graphics display device. A synchronization mechanism that uses the occupied resources of the non-scheduled execution entity may be realized between the server and the graphics display device.
  • the thread group is not defined. Threads may be grouped as in the first embodiment, and scheduling may be performed in units of thread groups.
  • the multiprocessor system according to the third embodiment is the same as the multiprocessor system according to the first embodiment.
  • the method of memory-mapping the occupied resources of the non-scheduled execution entity described in the second embodiment is described in the second embodiment.
  • At least one processor 130 out of the plurality of processors 130 is excluded from thread scheduling, and threads are thread-scheduled to the remaining processors 130.
  • a thread group including one or more threads is defined, and scheduling is performed in units of thread groups. Descriptions of configurations and operations that are common to Embodiments 1 and 2 are omitted, and only different configurations and operations are described.
  • FIG. 24 is a diagram for explaining the address space 170 as seen from a thread assigned to a certain processor 130.
  • a main memory area 172 to which main memory including shared data is mapped a thread map area 174 to which the occupied resources of each thread in the same group are mapped, and an occupied resource of the non-scheduled execution entity And a non-scheduled execution entity map area 176 to which is mapped.
  • the thread map area 174 is as described in the first embodiment, and the non-scheduling target execution entity map area 176 is as described in the second embodiment.
  • the resources included in each thread map indicated by reference numeral 175 and the resources included in each non-scheduled execution entity map indicated by reference numeral 177 are included in the thread map. There is a difference that some resources are not allowed to be accessed. Since the types of resources to be mapped are the same, the size of both maps is the same, and the offset value for the start address is the same. .
  • the thread map area 174 is set for the address space of threads belonging to the same group, and cannot be referenced from threads belonging to different groups, but the non-scheduled execution entity map area. 176 is fixedly arranged regardless of the group to which the thread belongs, and can be referred to by the same address. Further, since the non-scheduling target execution entity map area 176 is not saved in the main memory 120, it can be referenced at any time in the thread address space.
  • FIG. 25 is a diagram showing a temporal change in the thread assignment state by the thread scheduling according to the present embodiment.
  • the first and second processors are selected as non-assignment target PEs, and threads are scheduled and assigned to the other third to sixth processors.
  • the first non-scheduled execution entity is executed in the first processor, and the second non-scheduled execution entity is executed in the second processor. Since these non-scheduling target execution entities are not subject to scheduling, they continue to occupy each processor in time until the non-scheduling target execution entities are deleted.
  • threads are scheduled and allocated in units of thread groups in the same manner as the thread scheduling example of the first embodiment described in FIG.
  • the processor may be added to the target allocated by the thread. For example, if the second non-scheduled execution entity is deleted and the second processor is released, the second processor is added to the thread allocation target at the next scheduling timing, and the second to A thread may be scheduled and assigned to the sixth processor.
  • a symmetric multiprocessor system in which all processing elements have the same configuration will be described as an example of a multiprocessor system, and one of the V ⁇ processing elements is used to manage threads. It was configured to have a scheduling function.
  • the multiprocessor system may be an asymmetric multiprocessor system including a management processing element, and the management processing element may have a thread management 'scheduling function.
  • the scheduling function may be realized as a part of the operating system (OS) function or as a process running on the OS.
  • OS operating system
  • the present invention can be applied to multiprocessor scheduling techniques.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

 スレッド状態管理部32は、複数のスレッドをグループ化して、スレッドグループの状態を管理する。実行待ちキュー30は、実行待ちおよび実行中の状態にあるスレッドグループを優先度順かつ同一優先度内ではFIFO(First In First Out)順でキューイングする。割り当てリスト生成部12は、実行待ちキュー30の先頭から順にスレッドグループを取り出し、そのスレッドグループに属するすべてのスレッドを同時にいずれかのプロセッサに割り当てられる場合に限り、そのスレッドグループをスレッド割り当てリスト18に追加する。スレッド割り当て部14は、スレッド割り当てリスト18に格納されたスレッドグループに属するすべてのスレッドをプロセッサに割り当てる。

Description

明 細 書
スケジューリング方法、スケジューリング装置およびマルチプロセッサシス テム
技術分野
[0001] この発明はマルチプロセッサシステムにおける並列処理の実行単位のスケジユーリ ング方法およびスケジューリング装置、ならびにマルチプロセッサシステムに関する。 背景技術
[0002] 最近のマルチタスクをサポートするオペレーティングシステムは、複数のプロセスを 同時に実行することができるマルチプロセス環境を実現するとともに、さらに、これら のプロセスがプロセス内部で複数のスレッドを生成して並行処理を行うことのできるマ ルチスレッド技術を搭載して 、る。プロセスは実行時に固有のリソースやアドレス空間 が割り当てられ、他のプロセスの領域にアクセスすることはできない。これに対してス レッドは、プロセスの内部で生成される実行単位であり、各スレッドはプロセス内の領 域に互いに自由にアクセスすることができる。スレッドは、オペレーティングシステムが CPUの実行時間を割り当てる基本的な単位となる。
[0003] スレッドを CPUに割り当てるスレッドスケジューリング方式として、待ち行列に入って V、るスレッドを一定時間毎に順番に選んで実行する単純なラウンドロビン方式や、ス レッドの優先度の順に実行するプライオリティ方式などがある。ラウンドロビン方式で は、待ち行列にあるスレッドが一定時間ごとに公平に CPUに割り当てられて実行され る。プライオリティ方式では、優先度毎に設けられた待ち行列に各優先度のスレッド がキューイングされ、優先度の高 、待ち行列から順にスレッドが選択され CPUに割り 当てられて実行される。
発明の開示
発明が解決しょうとする課題
[0004] 1つのシステム内に複数のプロセッサを搭載したマルチプロセッサシステムでは、並 列に処理を実行して処理全体の高速ィ匕を図ることができる。マルチプロセッサシステ ムにおいて、マルチスレッド環境を実現する場合、スレッドをいずれかのプロセッサに 割り当てて実行することになり、スレッドの実行順序によって、プロセスの実行速度や メモリ消費量などの性能が変わってくる。マルチプロセッサシステムにおけるスレッドス ケジユーリングでは、プロセッサ資源の利用の効率化や、スレッド間のデータの受け 渡しや通信の効率ィ匕などにっ 、ても配慮する必要があり、シングルプロセッサシステ ムにおけるスレッドスケジューリングとは違った工夫が必要となる。
[0005] 本発明はこうした課題に鑑みてなされたものであり、その目的は、マルチプロセッサ システムにおける並列処理の実行単位をプロセッサに割り当てる順序を制御して、処 理効率を上げ、プロセッサの利用効率を高めることのできるスケジューリング技術を提 供することにある。
課題を解決するための手段
[0006] 上記課題を解決するために、本発明のある態様のスケジューリング方法は、マルチ プロセッサシステムにお 、て、並列処理されるスケジューリング対象の実行単位を複 数のプロセッサに割り当てる順序をスケジュールする方法であって、 1つ以上の前記 スケジューリング対象の実行単位をグループィ匕し、同一グループに属する前記実行 単位の各々により占有されるプロセッサ内の資源を互いに参照できるように、各実行 単位が参照するアドレス空間に前記資源をマップし、同一グループに属するすべて の実行単位は同時に 、ずれかのプロセッサに割り当てると 、う制約の下で、グループ のプロセッサへの割り当てを制御する。
[0007] 本発明の別の態様もまた、スケジューリング方法である。この方法は、マルチプロセ ッサシステムにお 、て、並列処理されるスケジューリング対象の実行単位を複数のプ 口セッサに割り当てる順序をスケジュールする方法であって、 1つ以上の前記スケジュ 一リング対象の実行単位をグループ化してグループ単位でプロセッサへの割り当て を管理し、前記グループ毎に設定される優先度順でかつ同一優先度内では前記グ ループが待ち行列に到着した順で前記グループの優先順位を決め、同一グループ に属するすべての実行単位は同時にいずれかのプロセッサに割り当てるという制約 の下で、実行待ちおよび実行中の状態にあるグループを前記優先順位にしたがって プロセッサに割り当てる。
[0008] この態様によると、優先順位にしたがって、同一グループに属するすべての実行単 位を同時にプロセッサに割り当てることができる。この優先順位は、同一優先度内で は待ち行列への到着順に順位が決められるため、同一優先度のグループ間で到着 順を守ることができる。実行待ちだけでなく既に実行中の状態にあるグループも含め て、優先順位を決めてプロセッサに割り当てるため、割り当てるべきグループのプロ セッサへの割り当て処理を一括して簡単に行うことができる。
[0009] 本発明のさらに別の態様もまた、スケジューリング方法である。この方法は、マルチ プロセッサシステムにお 、て、並列処理されるスケジューリング対象の実行単位を複 数のプロセッサに割り当てる順序をスケジュールする方法であって、 1つ以上の前記 スケジューリング対象の実行単位を含むグループの内、実行待ちおよび実行中の状 態にあるグループを前記グループ毎に設定される優先度順でかつ同一優先度内で は到着順に格納した実行待ちキューの先頭力 順に前記グループを取り出し、取り 出したグループに属するすべての実行単位を同時に 、ずれかのプロセッサに割り当 てることができる場合に限り、そのグループに属するすべての実行単位をプロセッサ に割り当て、そうでない場合は、それ以降に前記実行待ちキュー力も取り出されるグ ループの割り当てを優先する。
[0010] この態様によると、プロセッサの総数の制約から、グループに属するすべての実行 単位を同時にプロセッサに割り当てることができな 、場合、優先順位のより低 ヽグル ープに割り当て権を譲渡することで、マルチプロセッサシステムのプロセッサの利用 効率を向上することができる。
[0011] 前記実行待ちキューの先頭力 順次取り出されるグループに属する各実行単位が 既にいずれかのプロセッサに割り当てられて実行中である場合、その実行中である 実行単位は、他のプロセッサに割り当て先を変更されて再配置されないように、その 実行中である実行単位の当該プロセッサへの割り当てを確保してもよい。これにより、 既にプロセッサに割り当てられて実行中であるグループに属する各実行単位につい ては、既に割り当てられたプロセッサへの割り当てを維持することができ、割り当て処 理に力かるコストを削減できる。
[0012] 本発明のさらに別の態様は、スケジューリング装置である。この装置は、マルチプロ セッサシステムにお 、て、並列処理されるスケジューリング対象の実行単位を複数の プロセッサに割り当てる順序をスケジュールする装置であって、 1つ以上の前記スケ ジユーリング対象の実行単位をグループ化し、同一グループに属する前記実行単位 の各々により占有されるプロセッサ内の資源を互いに参照できるように、各実行単位 が参照するアドレス空間に前記資源をマップして管理するメモリ制御部と、実行待ち および実行中の状態にあるグループを格納した実行待ちキューと、前記実行待ちキ ユーの先頭力も順にグループを取り出し、取り出したグループに属するすべての実行 単位を同時にいずれかのプロセッサに割り当てることができる場合に限り、そのダル ープに属するすべての実行単位を複数のプロセッサに割り当てる割り当て部とを含 む。
[0013] 本発明のさらに別の態様もまた、スケジューリング装置である。この装置は、マルチ プロセッサシステムにお 、て、並列処理されるスケジューリング対象の実行単位を複 数のプロセッサに割り当てる順序をスケジュールする装置であって、 1つ以上の前記 スケジューリング対象の実行単位を含むグループの内、実行待ちおよび実行中の状 態にあるグループを前記グループ毎に設定される優先度順でかつ同一優先度内で は到着順に格納した実行待ちキューと、前記実行待ちキューの先頭力 順にグルー プを取り出し、取り出したグループに属するすべての実行単位を同時にいずれかの プロセッサに割り当てることができる場合に限り、そのグループを割り当てリストに追カロ する割り当てリスト生成部と、前記割り当てリスト生成部により生成された前記割り当て リストに格納されたグループに属するすべての実行単位を複数のプロセッサに割り当 てる割り当て部とを含む。
[0014] 本発明のさらに別の態様は、マルチプロセッサシステムである。このシステムは、並 列処理されるスケジューリング対象の実行単位を複数のプロセッサに割り当てて並列 に実行するマルチプロセッサシステムであって、 1つのプロセッサは、前記スケジユー リング対象の実行単位を他の複数のプロセッサに割り当てるスケジューラを含む。前 記スケジューラは、 1つ以上の前記スケジューリング対象の実行単位をグループィ匕し 、同一グループに属する前記実行単位の各々により占有されるプロセッサ内の資源 を互 ヽに参照できるように、各実行単位が参照するアドレス空間に前記資源をマップ して管理するメモリ制御部と、実行待ちおよび実行中の状態にあるグループを格納し た実行待ちキューと、前記実行待ちキューの先頭力も順にグループを取り出し、取り 出したグループに属するすべての実行単位を同時に 、ずれかのプロセッサに割り当 てることができる場合に限り、そのグループに属するすべての実行単位を複数のプロ セッサに割り当てる割り当て部とを含む。
[0015] 本発明のさらに別の態様もまた、マルチプロセッサシステムである。このシステムは 、並列処理されるスケジューリング対象の実行単位を複数のプロセッサに割り当てて 並列に実行するマルチプロセッサシステムであって、 1つのプロセッサは、前記スケジ ユーリング対象の実行単位を他の複数のプロセッサに割り当てるスケジューラを含む 。前記スケジューラは、 1つ以上の前記スケジューリング対象の実行単位を含むダル ープの内、実行待ちおよび実行中の状態にあるグループを前記グループ毎に設定 される優先度順でかつ同一優先度内では到着順に格納した実行待ちキューと、前記 実行待ちキューの先頭力 順にグループを取り出し、取り出したグループに属するす ベての実行単位を同時にいずれかのプロセッサに割り当てることができる場合に限り 、そのグループを割り当てリストに追加する割り当てリスト生成部と、前記割り当てリス ト生成部により生成された前記割り当てリストに格納されたグループに属するすべて の実行単位を複数のプロセッサに割り当てる割り当て部とを含む。
[0016] 本発明のさらに別の態様もまた、スケジューリング方法である。この方法は、マルチ プロセッサシステムにお 、て、並列処理されるスケジューリング対象の実行単位を複 数のプロセッサに割り当てる順序をスケジュールする方法であって、複数のプロセッ サの内、少なくとも 1つのプロセッサを並列処理されるスケジューリング対象の実行単 位の割り当て対象から除外し、非割り当て対象のプロセッサ上で動作するスケジユー ル対象とならない実行単位により独占的に占有される当該プロセッサ内の資源を前 記スケジューリング対象の実行単位カゝら参照できるように、各実行単位が参照するァ ドレス空間に前記資源をマップした上で、前記実行単位の割り当て対象のプロセッサ への割り当てを制御する。
[0017] 本発明のさらに別の態様もまた、スケジューリング装置である。この装置は、マルチ プロセッサシステムにお 、て、並列処理されるスケジューリング対象の実行単位を複 数のプロセッサに割り当てる順序をスケジュールする装置であって、複数のプロセッ サの内、少なくとも 1つのプロセッサを並列処理されるスケジューリング対象の実行単 位の割り当て対象から除外し、非割り当て対象のプロセッサ上で動作するスケジユー ル対象とならない実行単位により独占的に占有される当該プロセッサ内の資源を前 記スケジューリング対象の実行単位力も参照できるように、各スケジューリング対象の 実行単位が参照するアドレス空間に前記資源をマップして管理するメモリ制御部と、 実行待ちおよび実行中の状態にある前記スケジューリング対象の実行単位を格納し た実行待ちキューと、前記実行待ちキューの先頭力 順に前記スケジューリング対象 の実行単位を取り出し、 V、ずれかのプロセッサに割り当てる割り当て部とを含む。
[0018] なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、コ ンピュータプログラム、データ構造などの間で変換したものもまた、本発明の態様とし て有効である。
発明の効果
[0019] 本発明によれば、マルチプロセッサシステムの資源を有効利用し、並列処理の高速 ィ匕を図ることができる。
図面の簡単な説明
[0020] [図 1]実施の形態 1に係るマルチプロセッサシステムの構成図である。
[図 2]図 1のプロセッサに割り当てられたスレッドから見たアドレス空間を説明する図で ある。
[図 3]図 1のプロセッサで動作するスレッドとスレッドの所属するスレッドグループを説 明する図である。
[図 4]図 3に示すスレッドグループ単位でスレッドがプロセッサに割り当てられる様子を 説明する図である。
[図 5]スレッドの状態遷移を説明する図である
[図 6]実施の形態 1に係るスケジューリング装置の構成図である。
[図 7]図 6のスレッド状態テーブルを説明する図である。
[図 8]図 6の実行待ちキューを説明する図である。
[図 9]図 6のスケジューリング配列を説明する図である。
[図 10]実施の形態 1に係るスケジューリング装置によるスケジューリング手順を説明す るフローチャートである。
[図 11]ある時刻でのスレッドの割り当ての手順を説明する図である。
[図 12]別の時刻でのスレッドの割り当ての手順を説明する図である。
[図 13]図 11および図 12のスレッドスケジューリングによるスレッドの割り当て状態の時 間変化を示す図である。
[図 14]図 6のスレッド状態テーブルの別の例を説明する図である。
[図 15]ある時刻でのスレッドの割り当ての手順を説明する図である。
[図 16]図 15のスレッドスケジューリングによるスレッドの割り当て状態の時間変化を示 す図である。
[図 17]図 6のスレッド状態テーブルのさらに別の例を説明する図である。
[図 18]ある時刻でのスレッドの割り当ての手順を説明する図である。
[図 19]別の時刻でのスレッドの割り当ての手順を説明する図である。
[図 20]さらに別の時刻でのスレッドの割り当ての手順を説明する図である。
[図 21]さらに別の時刻でのスレッドの割り当ての手順を説明する図である。
[図 22]図 18〜図 21のスレッドスケジューリングによるスレッドの割り当て状態の時間 変化を示す図である。
[図 23]実施の形態 2に係るマルチプロセッサシステムのプロセッサに割り当てられたス レッドから見たアドレス空間を説明する図である。
[図 24]実施の形態 3に係るマルチプロセッサシステムのプロセッサに割り当てられたス レッドから見たアドレス空間を説明する図である。
[図 25]実施の形態 3に係るマルチプロセッサシステムにおけるスレッドスケジユーリン グによるスレッドの割り当て状態の時間変化を示す図である。
符号の説明
10 スケジューラ、 12 割り当てリスト生成部、 14 スレッド割り当て部、 16 割 り当てスレッド数カウンタ、 18 スレッド割り当てリスト、 20 スケジューリング配列、
30 実行待ちキュー、 32 スレッド状態管理部、 34 スレッド状態テーブル、 1 00 プロセッシングエレメント、 110 メインバス、 120 メインメモリ、 130 プロセ ッサ、 140 ローカルメモリ、 150 メモリ制御部、 200 スケジューリング装置。 発明を実施するための最良の形態
[0022] 実施の形態 1
図 1は、実施の形態 1に係るマルチプロセッサシステムの構成図である。マルチプロ セッサシステムは、複数のプロセッシングエレメント(PE) 100とメインメモリ 120を有し 、それらはメインバス 110に接続されている。各プロセッシングエレメント 100は、プロ セッサ 130、ローカルメモリ 140、およびメモリ制御部 150を含む。プロセッサ 130は口 一カルメモリ 140に対してデータを読み書きすることができる。メモリ制御部 150は、 他のプロセッシングエレメント 100のプロセッサ 130からローカルメモリ 140のデータを 参照するときのインタフェースを与えるとともに、メモリの同期'排他制御の機能を提供 する。
[0023] プロセッシングエレメント 100のいずれか一つには、並列処理の実行単位であり、ス ケジユーリングの対象となる実行実体 (以下、スレッドという)をスケジューリングする機 能をもたせる。このスケジューリング機能は特権レベルで動作する。特権レベルでは 、マルチプロセッサシステムのすべての資源にアクセスする権限を有する。一方、ス ケジユーリング機能をもたない他のプロセッシングエレメント 100上で動作するプログ ラムは、ユーザレベルで動作する。ユーザレベルでは、特権レベルに比べてアクセス できる資源が限られる。
[0024] スレッドスケジューリングにより、ある時刻に各プロセッサ 130には 1つのスレッドが割 り当てられ、マルチプロセッサシステム全体で並列に複数のスレッドが実行される。各 プロセッサ 130に割り当てられたスレッドは、プロセッシングエレメント 100内のロー力 ルメモリ 140やメモリ制御部 150内部のレジスタなどのすベての資源を占有して使用 することができる。
[0025] スレッドがいずれのプロセッサ 130にも割り当てられていない場合、スレッドのコンテ キストはメインメモリ 120に退避される。スレッドのコンテキストは、そのスレッドが割り当 て先のプロセッシングエレメント 100 (以下、割り当て先 PEという)内で占有するすべ ての資源の状態であり、スレッドがプロセッサ 130において動作しているときに各種レ ジスタ内に保持されている値の集合、ローカルメモリ 140に保持されたデータ、メモリ 制御部 150の各種レジスタの内部状態などである。スレッドがプロセッサ 130上で動 作していないときは、そのスレッドのコンテキストをメインメモリ 120にコピーしておき、 再度プロセッサ 130に割り当てられたときに、そのコンテキストを読み込んで、処理を 継続できるようにする。
[0026] 本実施の形態では、 1つ以上のスレッドを要素として含むスレッドグループが定義さ れ、スレッドグループ単位でスケジューリングが行われ、スレッドグループに属するす ベてのスレッドは同時にいずれかのプロセッサ 130に割り当てられる。スレッドグルー プ内の一部のスレッドがプロセッサ 130に割り当てられ、残りのスレッドがメインメモリ 1 20に残留する状態にはならない。したがって、同一スレッドグループ内のすべてのス レッドは、実行待ち、実行中などの遷移状態を共有することになる。同一スレッドダル ープに属するスレッドは、互いのアドレス空間をカーネルのシステムコールを用いず に直接参照することができる。
[0027] 図 2は、プロセッサ 130に割り当てられたスレッドから見たアドレス空間 170を説明す る図である。アドレス空間 170には、共有データを含むメインメモリがマップされたメイ ンメモリ領域 172と、同一グループ内の各スレッドの占有資源がマップされたスレッド マップ領域 174とが含まれる。
[0028] スレッドマップ領域 174には、同一グループ内の各スレッドに対応してスレッドマツ プ # l〜# nが配置されている。プロセッサ数を nとすると同一グループ内に最大 n個 のスレッドを設けることができるから、スレッドマップにっ 、ても n個分の領域が確保さ れている。各スレッドマップ # l〜# nは、対応する各スレッドが割り当て先 PE内で占 有する資源の一部をメモリマップしたものであり、符号 175で示すように、ローカルメ モリと、メモリ制御部 150を外部力も制御するためのレジスタ群を含む力 メモリ制御 部 150を外部から制御するためのレジスタ群は、すべてがアクセス可能ではなぐ後 述の通信用レジスタのみがアクセス可能であり、斜線で示した他のレジスタにはァク セスすることはできない。アクセス可能なレジスタだけでなぐアクセス不可能なレジス タも含めて、レジスタ群全体をマップしておくことで、アクセス可能なレジスタの種類に 関係なぐスレッドマップのサイズを一定にすることができ、スレッドマップの先頭アド レスに対するオフセット値が固定値になり、プログラマにとって管理がしゃすくなる。
[0029] 各スレッドにより割り当て先 PE内で占有される資源の一部がアドレス空間にマップ されることにより、同一グループ内の各スレッドは、互いに他のスレッドが占有する資 源の一部にシステムコールを介さずにアクセスして操作することが可能となる。メモリ 制御部 150を外部から制御するためのレジスタについては、操作を許可するレジスタ に限ってアドレス空間にマップすることで、外部からの操作に一定の制限を設けること ができる。
[0030] 第 1のスレッドマップ # 1には、スレッドベースアドレスを先頭アドレスとしてスレッドマ ップのサイズ分の領域が割り当てられている。第 2のスレッドマップ # 2の先頭アドレス は、スレッドベースアドレスにスレッドマップのサイズに対応したオフセット値を加算し たアドレスになる。
[0031] 同一グループのスレッドをコンフィギュレーションする際、スレッドマップの番号 # 1 〜 # nを指定することにより、そのスレッドがどのスレッドマップを使用するかが決まる 。後述のスケジューリング装置 200は、同一グループ内の各スレッドがどのスレッドマ ップを使用して 、るかをスレッドマップの設定情報としてメモリに保持し、スレッド割り 当て時にスレッドの割り当て先 PEのメモリ制御部 150にスレッドマップの設定情報を 設定する。各プロセッシングエレメント 100のメモリ制御部 150は、スレッドがスケジュ ールされたときに、同一グループ内の各スレッドの資源がどのスレッドマップにメモリ マップされているかをスレッドマップの設定情報により把握することができ、アドレス空 間 170のスレッドマップにもとづいて、他のスレッドの資源に対するアクセス要求を D MAによって処理することができる。
[0032] なお、より詳細には、後述のスケジューリング装置 200のスレッド状態管理部 32が、 スレッドグループのスレッドマップの設定情報を管理し、スレッドマップの設定情報を 一例としてスレッド状態テーブル 34に格納して保持する。また、スケジューリング装置 200のスレッド割り当て部 14力 スレッドをプロセッサに割り当てる処理を行い、スレツ ドグループのスレッドマップの設定情報をメモリ制御部 150に設定する処理を行う。プ 口セッサに割り当てられたスレッドは、スレッドグループのスレッドマップの設定情報が メモリ制御部 150に設定された後に、スタートする。
[0033] たとえば、 2つのスレッド Al、 A2が同一のグループ Aに属するとする。グループ A の初期設定によって、グループ Aのアドレス空間の第 1領域 EA1に第 1スレッド A1の 資源カ モリマップされ、アドレス空間の第 2領域 EA2に第 2スレッド A2の資源力 Sメモ リマップされたとする。グループ Aの各スレッド Al、 A2がスケジューリングされ、第 1プ 口セッサにスレッド A1が割り当てられ、第 2プロセッサにスレッド A2が割り当てられた とする。
[0034] このとき、第 1プロセッサ上で動作する第 1スレッド A1から、第 2スレッド A2のスレッド マップである第 2領域 EA2にアクセスすると、第 2プロセッサの資源が第 2スレッド A2 の資源として参照される。第 1スレッド Al、第 2スレッド A2のプロセッサへの割り当てと 実行は、資源が準備されてカゝら行われるため、第 1スレッド A1から第 2スレッド A2のス レッドマップである第 2領域 EA2へのアクセスは、第 2スレッド A2がどのプロセッサに 割り当てられているかに関係なぐ必ず第 2スレッド A2の資源へのアクセスであること が保証される。第 2スレッド A2が第 1スレッド A1のスレッドマップである第 1領域 EA1 にアクセスする場合も同様である。
[0035] このように、いずれかのプロセッサ 130に割り当てられたスレッドは、アドレス空間 17 0内に設定されたスレッドマップのアドレスにアクセスすることで、同一グループ内の 他のスレッドが占有する資源に DMAによって直接アクセスすることができる。
[0036] 同一グループ内の他のスレッドは、いずれかのプロセッサ 130に割り当てられてい る力 どのプロセッサ 130に割り当てられるかは、スケジューリングの度に異なる。しか し、スレッドマップは、スレッドがどのプロセッサに割り当てられるかに関係なぐァドレ ス空間 170内の同じアドレスに設定されている。したがって、同一グループ内の各ス レッドは、スレッドのプロセッサへの割り当て状態には関係なぐアドレス空間 170内 のスレッドマップにアクセスすることで、他のスレッドの資源に一貫してアクセスできる ことが保証される。
[0037] 各プロセッシングエレメント 100のメモリ制御部 150内部には、スレッド間の同期通 信のために使用可能な通信用レジスタが設けられて 、る。この通信用レジスタの値は 、当該プロセッシングエレメント 100のプロセッサ 130から特殊な命令によって読むこ とができ、通信用レジスタに値がまだ書き込まれていないときは、当該プロセッサ 130 は、通信用レジスタに値が書き込まれるまで待つ。
[0038] また、この通信用レジスタは、自分以外のプロセッシングエレメント 100のメモリ制御 部 150から書き込みができる。メモリ制御部 150内部の通信用レジスタは、スレッドの 占有資源として、アドレス空間 170内にスレッドマップとしてメモリマップされている。し たがって、あるスレッドは、自分のアドレス空間 170内のスレッドマップを参照して、他 のプロセッシングエレメント 100のメモリ制御部 150の通信用レジスタにアクセスするこ とができ、値を書き込むことができる。
[0039] アドレス空間 170にメモリマップされた通信用レジスタを利用すると、メモリ制御部 1 50は、自スレッドの通信用レジスタに他スレッドが値を書き込むまで、ハートウェア的 にプロセッサがストールする機構を実現することができ、スレッド間で同期通信が可能 となる。
[0040] また、メモリ制御部 150がもつアドレス空間の参照機能を用いて、メモリでのポーリン グによる排他処理や同期処理を行うこともできる。メモリ制御部 150を介したメインメモ リに対するデータの読み書きを、メモリ制御部 150がもつメモリ同期化命令を用いて 行うことにより、メモリの同期'排他制御を行うことができる。
[0041] このように、同一スレッドグループに属するすべてのスレッドは、同時にいずれかの プロセッサ 130に割り当てられて実行されるため、プロセッシングエレメント 100のメモ リ制御部 150によるアドレス空間の参照機能、同期'排他制御機構を活用して、効率 的なデータ転送、同期通信、メモリの排他処理'同期処理などを行うことができ、処理 効率が上がる。
[0042] 図 3 (a)〜(d)は、スレッドグループを説明する図である。図 3 (a)は、 3つのスレッド t hla、 thlb、 thlcを含む第 1スレッドグループを示す。図 3 (b)は、 1つのスレッド th2 aを含む第 2スレッドグループを示す。このようなスレッドが 1つだけの場合もスレッドグ ループとして扱う。同様に、図 3 (c)は、 2つのスレッド th3a、 th3bを含む第 3スレッド グループを示す。図 3 (d)は、 1つのスレッド th4aを含む第 4スレッドグループを示す。
[0043] スレッドグループに属するスレッドの内、 1つのスレッドはプライマリスレッドに指定さ れ、そのスレッドグループを代表する。スレッドグループ単位でスレッドスケジユーリン グを行う際、プライマリスレッドを操作することでそのスレッドグループに属するすべて のスレッドをまとめて操作することができる。
[0044] 図 4は、スレッドグループ単位でスレッドがプロセッサ 130に割り当てられる様子を説 明する図である。同図は、プロセッサ総数 4のマルチプロセッサシステムにおいて、図 3に示した 4つのスレッドグループに属するスレッドのプロセッサ 130への割り当て状 態を示している。ある時刻において、第 1スレッドグループに属する 3つのスレッド thl a、 thlb、 thlcは、それぞれ第 1プロセッサ、第 2プロセッサ、第 3プロセッサに割り当 てられ、第 2スレッドグループに属する 1つのスレッド th2aは、第 4プロセッサに割り当 てられている。それ以外の第 3スレッドグループに属する 2つのスレッド th3a、 th3b、 および第 4スレッドグループに属する 1つのスレッド th4aはメインメモリ 120に退避され ている。
[0045] スレッドスケジューリングは、同一スレッドグループに属するすべてのスレッドを同時 にいずれかのプロセッサ 130に割り当てることを条件として行われる。第 1スレッドダル ープがプロセッサ 130に割り当てられるときは、第 1スレッドグループに属する 3つのス レッド thla、 thlb、 thlcが同時にいずれかのプロセッサ 130に割り当てることができ る場合に限られる。 3つのスレッド thla、 thlb、 thlcの 1つまたは 2つがプロセッサ 1 30に割り当てられ、残りがメインメモリ 120に退避して 、ると 、う状況は作らな!/、。
[0046] 図 5は、スレッドの状態遷移を説明する図である。スレッドは生成(create)コマンドに より生成され、未構築 (not configured)状態 42になる。未構築状態 42にあるスレッド に対してコンフィギュレーションコマンドを実行すると、構築(configured)状態 44に遷 移する。コンフィギュレーションコマンドの引数にプライマリスレッドを指定することで、 そのスレッドをプライマリスレッドと同一のスレッドグループに所属させることができる。 構築状態 44にあるスレッドに対して削除 (delete)コマンドを実行すると、そのスレッド は削除され、そのスレッドに使用したメモリ領域は解放される。
[0047] 未構築状態 42と構築状態 44を合わせて休止 (dormant)状態 40と 、う。構築状態 4 4にあるプライマリスレッドに対してスタートコマンドを実行すると、そのプライマリスレツ ドを含め、そのスレッドグループに属するすべてのスレッドが実行待ち(ready)状態 5 2に遷移する。以降、スレッドグループに属するすべてのスレッドは、動作(operationa 1)状態 50内で一緒に状態遷移する。以降、動作状態 50内での状態遷移を説明する 際、簡単のため、スレッドという力 これは同一スレッドグループに属するすべてのス レッドを意味している。なお、スレッドグループに対するコマンドは、プライマリスレッド に対して実行することにより、そのスレッドグループに属するすべてのスレッドに作用 する。
[0048] 実行待ち状態 52にあるスレッドは、ウェイトコマンドにより同期待ち(waiting)状態 56 に遷移し、同期待ち状態 56にあるスレッドは、シグナルを受けて実行待ち状態 52に 戻る。
[0049] 実行待ち状態 52にあるスレッドは、ディスパッチ(dispatch)コマンドにより実行中(ru nning)状態 54に遷移し、実行中状態 54にあるスレッドは、ィールド (yield)コマンドに より実行待ち状態 52に戻り、ウェイトコマンドにより同期待ち状態 56に遷移し、サスぺ ンド(suspend)コマンドにより中断状態 60に遷移する。
[0050] 同期待ち状態 56にあるスレッドは、サスペンドコマンドにより同期待ち中断 (waiting and suspended)状態 58に遷移し、同期待ち中断状態 58にあるスレッドは、レジュ一 ム (res醒 e)コマンドにより同期待ち状態 56に復帰する。同期待ち中断状態 58にある スレッドは、シグナルを受けて中断 (suspended)状態 60に遷移する。
[0051] 中断状態 60にあるスレッドは、レジュームコマンドにより実行待ち状態 52に遷移し、 実行待ち状態 52にあるスレッドは、サスペンドコマンドにより中断状態 60に遷移する
[0052] 実行中状態 54にあるスレッドは、例外処理が起こると中止(stopped)状態 62に遷移 し、中止状態 62にあるスレッドは、リスタートコマンドにより実行中状態 54または実行 待ち状態 52に遷移する。
[0053] 実行待ち状態 52、実行中状態 54、中止状態 62、および中断状態 60にあるスレツ ドはそれぞれ終了(terminate)すると、スレッドは動作状態 50から休止状態 40に移行 し、構築状態 44に遷移する。
[0054] 上記の動作状態 50にあるスレッドの内、実行中状態 54にあるスレッドは、プロセッ サ 130に割り当てられており、それ以外の状態にあるスレッドはメインメモリ 120に退 避されている。
[0055] 図 6は、実施の形態 1に係るスケジューリング装置 200の構成図である。同図は機 能に着目したブロック図を描いており、これらの機能ブロックはハードウェアのみ、ソ フトウェアのみ、またはそれらの糸且合せによっていろいろな形で実現することができる 。スケジューリング装置 200は、図 1のプロセッシングエレメント 100のいずれか一つ に設けられ、プロセッサ 130、ローカルメモリ 140、およびメモリ制御部 150を用いて 実現される。さらにメインメモリ 120を用いて実現してもよい。以下、図 6の構成を説明 するにあたり、適宜図 7〜図 9を参照する。
[0056] スレッド状態管理部 32は、スレッドの生成と削除、スレッドグループの設定、スレッド グループの優先度、およびスレッドグループ単位の状態遷移をスレッド状態テーブル 34によって管理する。
[0057] 図 7は、スレッド状態テーブル 34を説明する図である。スレッド状態テーブル 34は、 スレッドグループ ID70、スレッドグループに属するスレッド数 72、スレッドグループの 遷移状態 74、スレッドグループに属するスレッド 76、およびスレッドグループの優先 度 78を対応づけて格納する。スレッドの生成と削除、スレッドグループの設定と状態 変化、優先度の設定などがあると、スレッド状態管理部 32はスレッド状態テーブル 34 を更新する。
[0058] 同図の例では、グループ ID1の第 1スレッドグループは、スレッド数が 3で、 3つのス レッド thla、 thlb、 thlcを含み、優先度は 1に設定されており、現在の遷移状態は 実行中である。グループ ID2の第 2スレッドグループは、スレッド数が 1で、 1つのスレ ッド th2aを含み、優先度は 2に設定されており、現在の遷移状態は実行中である。グ ループ ID3の第 3スレッドグループは、スレッド数が 2で、 2つのスレッド th3a、 th3bを 含み、優先度は 2に設定されており、現在の遷移状態は実行待ちである。グループ I D4の第 4スレッドグループは、スレッド数が 1で、 1つのスレッド th4aを含み、優先度 は 4に設定されており、現在の遷移状態は実行待ちである。優先度は値が小さいほ ど優先度が高いとし、優先度は、ここでは 16段階とするが、 256段階にするなど設計 の自由度がある。
[0059] スレッド状態管理部 32は、スレッド状態テーブル 34で管理されているスレッドダル ープの内、実行待ち状態または実行中状態にあるスレッドグループを実行待ちキュ 一 30にキューイングする。実行待ちキュー 30は、実行待ち状態または実行中状態に あるスレッドグループをスレッドグループ毎に設定された優先度順で、かつ同一優先 度内では先に入れられたものが先に取り出される FIFO (First In First Out)順で優 先順位を決めてキューイングした待ち行列である。
[0060] 図 8は、実行待ちキュー 30を説明する図である。優先度 1〜16のリストの各エントリ には、その優先度をもつスレッドグループのプライマリスレッドが FIFO順でキューイン グされる。
[0061] 同図の例では、優先度 1のエントリには、第 1スレッドグループのプライマリスレッド pt hiがキューイングされ、優先度 2のエントリには、第 2スレッドグループのプライマリス レッド pth2と第 3スレッドグループのプライマリスレッド pth3がこの順でキューイングさ れ、優先度 4のエントリには、第 4スレッドグループのプライマリスレッド pth4がキュー イングされて 、る。第 2スレッドグループは第 3スレッドグループよりも先にキューに入 れられたため、第 2スレッドグループのプライマリスレッド pth2は第 3スレッドグループ のプライマリスレッド pth3よりも先にキューイングされている。
[0062] 実行待ちキュー 30の先頭の位置にある優先度 1のプライマリスレッド pthlから優先 度 2のエントリの先頭にキューイングされているプライマリスレッド pth2にリンクがつけ られる。さらに優先度 2のエントリの最初のプライマリスレッド pth2から同一優先度内 で次にキューイングされているプライマリスレッド pth3にリンクがつけられ、さらにその プライマリスレッド pth3から優先度 4のプライマリスレッド pth4にリンクがつけられる。 これによつて、プライマリスレッド pthl、 pth2、 pth3、 pth4の順に取り出すことができ るように優先順位が決められた実行待ちキュー 30が生成される。
[0063] スレッド状態管理部 32は、スレッドグループの状態が実行待ち、実行中の!/、ずれの 状態でもなくなった場合、実行待ちキュー 30からそのスレッドグループのプライマリス レッドを削除する。また、新たに生成され、スタートコマンドにより実行待ち状態になつ たスレッドグループのプライマリスレッドや、同期待ち状態などから復帰して実行待ち 状態になったスレッドグループのプライマリスレッドを該当する優先度のエントリに FIF O順で挿入し、実行待ちキュー 30を更新する。
[0064] スケジューラ 10は、実行待ちキュー 30にキューイングされているスレッドグループを 先頭から取り出して、プロセッサに割り当てる制御をするものであり、割り当てリスト生 成部 12とスレッド割り当て部 14とを含む。スレッド状態管理部 32は、スレッドグループ の状態が同期待ち、中断などの状態に遷移したり、スレッドが終了することにより、再 スケジューリングが必要となった場合、割り当てリスト生成部 12に通知する。
[0065] 割り当てリスト生成部 12は、スレッド状態管理部 32から再スケジューリングの指示を 受けて、これから述べる「マーキング処理」または「割り当てリスト生成処理」を行う。
[0066] 割り当てリスト生成部 12は、割り当てスレッド数カウンタ 16、スレッド割り当てリスト 18
、およびスケジューリング配列 20を利用して、スレッドスケジューリングを行う。
[0067] 割り当てスレッド数カウンタ 16は、プロセッサ 130に割り当てるスレッド数をカウント するものであり、以下、単に「カウンタ」という。スレッド割り当てリスト 18は、プロセッサ 130に割り当てるスレッドグループのプライマリスレッドを格納するものであり、以下、 単に「割り当てリスト」という。スケジューリング配列 20は、スレッドのプロセッサ 130へ の割り当て状況を保持するスケジュールテーブルであり、個々のプロセッサ 130を特 定するプロセッサ番号とそのプロセッサ 130に割り当てられたスレッドとを対応づけた 配列である。
[0068] 図 9は、スケジューリング配列 20を説明する図である。スケジューリング配列 20は、 プロセッサ番号 80、そのプロセッサに割り当てられたスレッド 82、およびマーク 84が 対応づけて格納される。プロセッサ番号 80は、プロセッサに一意に対応する識別番 号である。マーク 84は、割り当てリスト生成部 12のマーキング処理において、スレッド のプロセッサへの割り当てを確保するためのフラグとして用いられる。同図の例では、 プロセッサ総数は 4であり、第 1〜第 4プロセッサが 1から 4の番号で識別される。プロ セッサ番号 1〜3には、第 1スレッドグループの 3つのスレッド thla、 thlb、 thlcがそ れぞれ割り当てられ、プロセッサ番号 4には、第 2スレッドグループのスレッド th2aが 割り当てられている。
[0069] 割り当てリスト生成部 12は、スレッドスケジューリングを開始するにあたって、カウン タ 16をゼロに初期化し、割り当てリスト 18を空にする。
[0070] 割り当てリスト生成部 12は、実行待ちキュー 30の先頭力も順にプライマリスレッドを 取り出す。以下、取り出したプライマリスレッドが属するスレッドグループを「割り当て候 補スレッドグループ」と呼ぶ。割り当てリスト生成部 12は、割り当て候補スレッドグルー プに属するスレッドの個数をカウンタ 16に加算する。カウンタ 16の値がマルチプロセ ッサシステムのプロセッサ総数を超えてしまう場合は、割り当てリスト生成部 12は、そ の割り当て候補スレッドグループを割り当て候補カゝら外して、カウンタ 16の値を加算 前の値に戻す。
[0071] 割り当てリスト生成部 12は、スケジューリング配列 20を参照することにより、実行待 ちキュー 30から順次取り出した割り当て候補スレッドグループが、既に実行中の状態 にあるかどうかを調べる。割り当て候補スレッドグループに属する各スレッドがスケジュ 一リング配列 20にあれば、その割り当て候補スレッドグループに属する各スレッドは 実行中である。その場合、スケジューリング配列 20において、実行中のスレッドが割り 当てられているプロセッサ番号にマークをつける。これを「マーキング処理」という。マ 一キング処理により、マークをつけたプロセッサ番号に既に割り当てられたスレッドは 、他のプロセッサに割り当て先を変更されて再配置されないように、当該プロセッサへ の割り当てが確保される。
[0072] 割り当てリスト生成部 12は、割り当て候補スレッドグループに属する各スレッドがス ケジユーリング配列 20にない場合、すなわち、その割り当て候補スレッドグループは 実行中状態でな 、場合は、その割り当て候補スレッドグループのプライマリスレッドを 割り当てリスト 18に追加する。これを「割り当てリスト生成処理」という。割り当てリスト生 成処理によって、割り当てリスト 18には、今回のスケジューリングで新たにプロセッサ 130に割り当てられるスレッドグループがリストアップされる。
[0073] 割り当てリスト生成部 12は、カウンタ 16の値がプロセッサ総数に達する力 実行待 ちキュー 30の末尾力もプライマリスレッドを取り出すに至るまで、マーキング処理、割 り当てリスト生成処理の!/ヽずれかを繰り返し行う。
[0074] 割り当てリスト生成部 12による処理が終了すると、スレッド割り当て部 14は、割り当 てリスト 18からプライマリスレッドを取り出し、そのスレッドグループに属するすべての スレッドをスケジューリング配列 20のマークされて!/ヽな 、プロセッサ番号に割り振る。 このとき、マークされていないプロセッサ番号に割り当てられて実行中状態にあったス レッドは、プリェンブトされ、実行待ち状態に遷移する。スレッド割り当て部 14は、スレ ッド状態管理部 32にプリェンブトされたスレッドを通知し、スレッド状態管理部 32はス レッド状態テーブル 34を更新し、そのスレッドの状態変化を管理する。
[0075] スレッドの割り当て状況を保持するスケジューリング配列 20にしたがって、実際にス レッドはプロセッサ 130に割り当てられ、実行に移される。これによつて、既に実行中 状態にあったスレッドは、継続して同じプロセッサ 130上で実行され、実行待ち状態 にあったスレッドはプロセッサ 130に新たに割り当てられ、実行中状態に変化する。ス レッド状態管理部 32は、スレッド状態テーブル 34を更新して各スレッドの状態変化を 管理する。
[0076] 図 10は、以上の構成のスケジューリング装置 200によるスレッドスケジューリング手 順を説明するフローチャートである。
[0077] スレッド状態管理部 32は、スレッドの遷移状態が実行中状態力も同期待ち状態や 中断状態に変わったり、スレッドが終了した場合に、割り当てリスト生成部 12にスレツ ドのスケジューリングを指示する。割り当てリスト生成部 12は、カウンタ 16と割り当てリ スト 18を初期化する(S10)。
[0078] 割り当てリスト生成部 12は、実行待ちキュー 30の先頭力も割り当て候補スレッドグ ループを取り出す (S 12)。割り当てリスト生成部 12は、割り当て候補スレッドグループ に属するスレッドの個数をカウンタ 16にカロ算することにより、害り当てスレッド数をカウ ントする(S14)。
[0079] 割り当てリスト生成部 12は、カウンタ 16の値がプロセッサ総数以下であるかどうかを 判定する(S16)。カウンタ 16の値がプロセッサ総数を超えていた場合、その割り当て 候補スレッドグループに属するすべてのスレッドを同時にいずれかのプロセッサに割 り当てることはできな!、ため、カウンタ 16から当該割り当て候補スレッドグループのス レッド数を減算してカウンタ値を元に戻し(S 18)、ステップ S26の処理に進む。
[0080] カウンタ 16の値がプロセッサ総数以下である場合(S 16の Y)、割り当てリスト生成 部 12は、割り当て候補スレッドグループに属する各スレッドがスケジューリング配列 2 0に格納されているかどうかを調べる(S20)。スケジューリング配列 20において、割り 当て候補スレッドグループに属するスレッドがいずれかのプロセッサ番号に割り振ら れて 、れば、そのスレッドは前回のスケジューリングにお!/、てそのプロセッサに割り当 てられて実行されていたことになる。
[0081] 割り当てリスト生成部 12は、割り当て候補スレッドグループに属する各スレッドがス ケジユーリング配列 20に存在する場合(S20の Y)、スケジューリング配列 20におい て、そのスレッドが割り振られているプロセッサ番号にマークを付ける(S22)。マーク されたプロセッサ番号に割り当てられたスレッドは、他のプロセッサに割り当て先を変 更されて再配置されな ヽように、当該プロセッサへの割り当てが確保される。
[0082] 割り当てリスト生成部 12は、割り当て候補スレッドグループに属する各スレッドがス ケジユーリング配列 20に存在しない場合 (S20の N)、割り当てリスト生成部 12は、そ の割り当て候補スレッドグループを割り当てリスト 18に追加する(S23)。
[0083] 割り当てリスト生成部 12は、カウンタ 16の値がプロセッサ総数に等しい場合(S24 の Y)、それ以上のスレッドの割り当てはできないため、割り当てリスト 18の生成を終 了し、ステップ S30に進む。また、割り当てリスト生成部 12は、割り当て候補スレッドグ ループが実行待ちキュー 30の末尾力も取り出されたものである場合(S26の Y)、も はや次に割り当てるべきスレッドがないから、この場合も割り当てリスト 18の生成を終 了し、ステップ S30に進む。
[0084] 割り当てリスト生成部 12は、カウンタ 16の値がプロセッサ数に達しておらず(S24の N)、割り当て候補スレッドグループが実行待ちキュー 30の末尾カゝら取り出されたもの でない場合(S26の N)、実行待ちキュー 30の次のスレッドグループを取り出し(S28 )、ステップ S14以降の処理を繰り返す。
[0085] ステップ S30において、スレッド割り当て部 14は、割り当てリスト 18に格納されたス レッドグループに属する各スレッドをスケジューリング配列 20にお!/、てマークされて!/ヽ ないプロセッサ番号に割り振る。このとき、マークされていないプロセッサ番号に既に 割り振られて 、たスレッドはそのプロセッサへの割り当てを横取りされる。割り当てリス ト 18に格納されたすベてのスレッドグループについて、プロセッサ番号への割り振り 処理が完了した時点で、一連のスレッドスケジューリング処理は終了する。
[0086] 以下、上記のスレッドスケジューリング手順をいくつかの例を用いて説明する。図 11 〜図 13は、図 7のスレッド状態テーブル 34に示された条件の下でのスレッドスケジュ 一リング手順を説明する図である。
[0087] マルチプロセッサシステムのプロセッサ総数は 4であるとする。 4個のスレッドグルー ブカ^、ずれも実行待ちの状態にあり、 V、ずれのスレッドもまだプロセッサに割り当てら れて 、な 、初期状態にあるとする。このときの時刻を toとする。 [0088] 図 11 (a)は、実行待ちキュー 30の初期状態であり、第 1スレッドグループのプライマ リスレッド pthl (以下、第 1プライマリスレッドと呼ぶ)は優先度 1のエントリに、第 2スレ ッドグループのプライマリスレッド pth2 (以下、第 2プライマリスレッドと呼ぶ)と第 3スレ ッドグループのプライマリスレッド pth3 (以下、第 3プライマリスレッドと呼ぶ)は優先度 2のエントリに、第 4スレッドグループのプライマリスレッド pth4 (以下、第 4プライマリス レッドと呼ぶ)は優先度 4のエントリにそれぞれキューイングされて 、る。
[0089] ここで、第 2プライマリスレッド pth2は第 3プライマリスレッド pth3よりも先にキューィ ングされている。したがって、実行待ちキュー 30は、第 1プライマリスレッド pthl、第 2 プライマリスレッド pth2、第 3プライマリスレッド pth3、第 4プライマリスレッド pth4の順 に優先順位が決められた待ち行列になる。
[0090] 図 11 (b)は、割り当てリスト生成部 12によるマーキング処理と割り当てリスト生成処 理の過程を説明する図である。処理過程テーブル 15は、割り当てリスト生成部 12が 実行待ちキュー 30の先頭力も順次取り出したプライマリスレッドに対して、マーキング 処理か割り当てリスト生成処理のいずれを行つたかを示し、また、そのときのカウンタ 1 6の値を示す。
[0091] 割り当てリスト生成部 12は、図 11 (a)の実行待ちキュー 30の先頭力も第 1プライマリ スレッド pthlを取り出し、第 1スレッドグループのスレッド数 3をカウンタ 16に加算する 。スケジューリング配列 20は空の状態であり、いずれのスレッドもマーキング処理の対 象となることはないから、第 1プライマリスレッド pthlはそのまま割り当てリスト 18に格 納される。
[0092] 次に、割り当てリスト生成部 12は、図 11 (a)の実行待ちキュー 30の次のエントリで ある第 2プライマリスレッド pth2を取り出し、第 2スレッドグループのスレッド数 1をカウ ンタ 16に加算する。第 2プライマリスレッド pth2は、同様にマーキング処理の対象とな ることはなく、割り当てリスト 18に追加される。このときカウンタ値は 4になっており、プ 口セッサ総数に達しているため、割り当てリスト生成部 12は、割り当てリスト 18の生成 を終了する。
[0093] スレッド割り当て部 14は、図 11 (b)の割り当てリスト 18にリストアップされた第 1、第 2 スレッドグループに属するすべてのスレッドをスケジューリング配列 20のマークされて V、な 、プロセッサ番号に割り振る。
[0094] 図 11 (c)は、割り当てリスト 18にしたがってスレッドが割り振られたスケジューリング 配列 20を示す。いずれのプロセッサ番号もマークされておらず、第 1〜第 3プロセッ サには第 1スレッドグループの 3つのスレッド thla、 thlb、 thlcが割り振られ、第 4プ 口セッサには第 2スレッドグループの 1つのスレッド th2aが割り振られる。これによつて 、現時刻 toにおけるスレッドスケジューリングが完了する。
[0095] その後、時刻 tlにおいて、第 1スレッドグループの各スレッドが同期待ちになったり 、中断するか、終了するなど、実行中状態でも実行待ち状態でもない状態になったと する。図 12 (a)は、時刻 tlにおける実行待ちキュー 30を示す図である。第 1プライマ リスレッド pthlは実行待ちでも実行中でもなくなるため、スレッド状態管理部 32は、第 1プライマリスレッド pthlを実行待ちキュー 30から外す。その結果、時刻 tlでは、実 行待ちキュー 30の先頭は第 2プライマリスレッド pth2となっている。
[0096] 割り当てリスト生成部 12は、スレッド状態管理部 32の通知を受けて、カウンタ 16と 割り当てリスト 18を初期化して、スケジューリングを開始する。図 12 (b)は、時刻 tlに おける割り当てリスト生成部 12によるマーキング処理と割り当てリスト生成処理の過程 を示す。
[0097] 割り当てリスト生成部 12は、実行待ちキュー 30の先頭力も第 2プライマリスレッド pth 2を取り出し、カウンタ 16に第 2スレッドグループのスレッド数 1を加算し、カウンタ値を 1とする。
[0098] 割り当てリスト生成部 12は、第 2スレッドグループのスレッド th2aがスケジューリング 配列 20にあるかどうかを調べる。この時点でスケジューリング配列 20は、 1つ前の時 刻 tOにおける図 11 (c)の状態にあり、第 2スレッドグループのスレッド th2aはプロセッ サ番号 4に割り振られているから、割り当てリスト生成部 12は、図 12 (c)のように、スケ ジユーリング配列 20のプロセッサ番号 4にマークを付ける。
[0099] 次に、割り当てリスト生成部 12は、実行待ちキュー 30の次のエントリである第 3ブラ イマリスレッド pth3を取り出し、カウンタ 16に第 3スレッドグループのスレッド数 2を加 算し、カウンタ値を 3とする。
[0100] 割り当てリスト生成部 12は、第 3スレッドグループのスレッド th3a、 th3bがスケジュ 一リング配列 20にあるかどうかを調べる。第 3スレッドグループのスレッド th3a、 th3b は、図 11 (c)に示す時刻 tOにおけるスケジューリング配列 20にはないことから、割り 当てリスト生成部 12は、第 3プライマリスレッド pth3を割り当てリスト 18に追加する。
[0101] 割り当てリスト生成部 12は、実行待ちキュー 30のさらに次のエントリである第 4ブラ イマリスレッド pth4を取り出し、第 4スレッドグループのスレッド数 1をカウンタ 16に加 算し、カウンタ値を 4とする。
[0102] 割り当てリスト生成部 12は、同様にして、第 4スレッドグループのスレッド th4aがスケ ジユーリング配列 20にないことから、割り当てリスト 18に第 4プライマリスレッド pth4を 追加する。割り当てリスト生成部 12は、カウンタ 16の値がプロセッサ総数 4に達してい るため、割り当てリスト 18の生成を終了する。
[0103] スレッド割り当て部 14は、図 12 (b)の割り当てリスト 18にリストアップされた第 3、第 4 スレッドグループに属するすべてのスレッドをスケジューリング配列 20のマークされて V、な 、プロセッサ番号に割り振る。
[0104] 図 12 (c)は、割り当てリスト 18にしたがってスレッドが割り振られたスケジューリング 配列 20を示す図である。プロセッサ番号 4はマークされているため、そのプロセッサ 番号に割り振られた第 2スレッドグループのスレッド th2aはそのまま割り当てが維持さ れる。マークされていないプロセッサ番号 1〜3には、第 3スレッドグループの 2つのス レッド th3a、 th3b、第 4スレッドグループの 1つのスレッド th4aがそれぞれ割り振られ る。これによつて、現時刻 tlにおけるスレッドスケジューリングが完了する。
[0105] 図 13は、図 11および図 12で説明したスレッドスケジューリングによるスレッドの割り 当て状態の時間変化を示す図である。時刻 tOにおいて、第 1〜第 3プロセッサ(PE1 〜PE3)には、第 1スレッドグループの 3つのスレッド thla〜thlcがそれぞれ割り当て られ、第 4プロセッサ(PE4)には、第 2スレッドグループのスレッド th2aが割り当てら れて実行される。
[0106] 時刻 tlにおいて、第 1スレッドグループの 3つのスレッド thla〜thlcが同期待ちに なるなどにより実行待ちキュー 30から外れたため、再スケジューリングが行われる力 その時点で最も優先順位が高い第 2スレッドグループのスレッド th2aは第 4プロセッ サに割り当てられたまま継続して実行され、空いた第 1〜第 3プロセッサには、第 3ス レッドグノレープの 2つのスレッド th3a、 th3b、第 4スレッドグノレープの 1つのスレッド th
4aがそれぞれ割り当てられて実行される。
[0107] 図 14〜図 16は、別のスレッドスケジューリング例を説明する図である。この例にお いて、「優先順位の逆転」が起こることを説明する。
[0108] 図 14は、本例におけるスレッド状態テーブル 34を示す。第 3スレッドグループのス レッド数は 4である点だけが図 7の例とは異なり、それ以外の条件は図 7の例と同じで ある。したがって、最初の時刻 tOにおけるスケジューリング結果は、図 11と同じである から説明を省略する。第 1スレッドグループの各スレッドが同期待ちになるなどにより、 実行待ちキュー 30から外れた時刻 tlにおけるスケジューリング手順を説明する。
[0109] 図 15 (a)は、時刻 tlにおける実行待ちキュー 30の状態を示す図である。図 12 (a) と同様、第 1プライマリスレッド pthlが実行待ちキュー 30から外れた結果、実行待ち キュー 30の先頭は第 2プライマリスレッド pth2となる。
[0110] 図 15 (b)は、時刻 tlにおける割り当てリスト生成部 12によるマーキング処理と割り 当てリスト生成処理の過程を説明する図である。
[0111] 割り当てリスト生成部 12は、実行待ちキュー 30の先頭力も第 2プライマリスレッド pth
2を取り出し、カウンタ 16に第 2スレッドグループのスレッド数 1を加算し、カウンタ値を
1とする。
[0112] 割り当てリスト生成部 12は、第 2スレッドグループのスレッド th2aがスケジューリング 配列 20にあることから、図 15 (c)のように、スケジューリング配列 20においてスレッド t h2aが割り振られたプロセッサ番号 4にマークを付ける。
[0113] 次に、割り当てリスト生成部 12は、実行待ちキュー 30の次のエントリである第 3ブラ イマリスレッド pth3を取り出す。割り当てリスト生成部 12は、カウンタ 16に第 3スレッド グループのスレッド数 4をカ卩算すると、カウンタ値は 5になることから、第 3スレッドグル ープの割り当てはできな 、と判定し、第 3スレッドグループにつ 、ては割り当て候補か ら外し、マーキング処理も割り当てリスト生成処理も行わな 、。
[0114] 割り当てリスト生成部 12は、実行待ちキュー 30のさらに次のエントリである第 4ブラ イマリスレッド pth4を取り出す。カウンタ 16に第 4スレッドグループのスレッド数 1をカロ 算し、カウンタ値を 2とする。割り当てリスト生成部 12は、第 4スレッドグループのスレツ ド th4aがスケジューリング配列 20にないことから、割り当てリスト 18に第 4プライマリス レッド pth4を追加する。第 4スレッドグループのスレッド th4aは実行待ちキュー 30の 最後のエントリであるから、割り当てリスト生成部 12は、割り当てリスト 18の生成を終 了する。
[0115] スレッド割り当て部 14は、図 15 (b)の割り当てリスト 18にリストアップされた第 4スレツ ドグループに属するすべてのスレッドをスケジューリング配列 20のマークされていな Vヽプロセッサ番号に割り振る。
[0116] 図 15 (c)は、割り当てリスト 18にしたがってスレッドの割り当てが行われたスケジュ 一リング配列 20を示す。マークされたプロセッサ番号 4に割り当てられた第 2スレッド グループのスレッド th2aはそのまま割り振りが維持され、マークされて!/ヽな 、プロセッ サ番号 1に、第 4スレッドグループの 1つのスレッド th4aが割り振られる。これによつて 、現時刻 tlにおけるスレッドのスケジューリングが完了する。
[0117] 図 16は、本例におけるスレッドの割り当て状態の時間変化を示す図である。時刻 tO におけるスレッドの割り当ては図 13と同じである。時刻 tlにおいて、最も優先される べき第 2スレッドグループのスレッド th2aが実行中のまま状態が維持されるのは図 13 と同じであるが、次に優先されるべき第 3スレッドグループはスレッド数力 であるため 、空きプロセッサに割り当てることができず、優先順位が第 3スレッドグループよりも低 V、第 4スレッドグループのスレッド th4aが第 1プロセッサに割り当てられて実行される。
[0118] このように、同一スレッドグループに属するすべてのスレッド数を同時にいずれかの プロセッサに割り当てると 、う制約があるため、優先順位を最大限守ると!、ぅスケジュ 一リングポリシーでスケジューリングを行って 、ても、プロセッサ資源の利用効率を上 げるために、優先順位を逆転させることがある。
[0119] 上記の例のようにスレッドスケジューリングにおいて優先順位の逆転が起こる条件を 定式化すると次のようになる。 H、 M、 Lをスレッドグループとし、 P (X)をスレッドグル ープ Xの優先度、 N (X)をスレッドグループ Xに属するスレッドの個数、 nをプロセッサ 総数とすると、優先度について P (H)≥P (M) >P (L)が成り立つ場合であって、スレ ッド数について、以下の関係が成り立つとき、優先順位の逆転が起こる。
N (H) +N (M) >n N (H) +N (L)≤n
[0120] 上記の関係式が成り立つ場合、スレッドグループ Mに属するすべてのスレッドをプ 口セッサに割り当てることはできな 、が、優先度がそれよりも低 、スレッドグループ N に属するすべてのスレッドはプロセッサに割り当てることができるため、本実施の形態 のスレッドスケジューリング方式では、プロセッサの使用効率を上げるために、優先順 位を逆転させて、優先順位がより低 、スレッドグループ Nを割り当てる。
[0121] 図 17〜図 22は、さらに別のスレッドスケジューリング例を説明する図である。この例 では、すでに割り当てられたスレッドが他の優先順位の高 、スレッドによってプロセッ サへの割り当てを横取りされる状況を説明する。
[0122] 図 17は、スレッド状態テーブル 34を説明する図である。第 1スレッドグループ力も第 5スレッドグループまでのスレッドグループがあり、スレッド数はそれぞれ 2、 3、 1、 1、 3 であり、優先度はそれぞれ 1、 2、 3、 4、 5である。
[0123] 図 18 (a)〜(c)は、最初の時刻 tOにおけるスケジューリングを説明する図である。実 行待ちキュー 30は、図 18 (a)のように、第 1〜第 5プライマリスレッド pthl〜pth5がこ の順でキューに入っている。
[0124] 図 18 (b)は、割り当てリスト生成部 12によるマーキング処理と割り当てリスト生成処 理の過程を示す。割り当てリスト生成部 12は、実行待ちキュー 30の先頭力も第 1ブラ イマリスレッド pthlを取り出し、カウンタ 16にスレッド数 2をカ卩算し、カウンタ値を 2とす るとともに、第 1プライマリスレッド pthlを割り当てリスト 18に追加する。
[0125] 割り当てリスト生成部 12は、実行待ちキュー 30の次のエントリである第 2プライマリス レッド pth2を取り出す力 第 2スレッドグループのスレッド数は 3であり、カウンタ 16に 加算するとプロセッサ総数 4を超えるため、第 2スレッドグループは割り当てることがで きない。
[0126] そこで、割り当てリスト生成部 12は、実行待ちキュー 30のさらに次のエントリである 第 3プライマリスレッド pth3を取り出し、第 3スレッドグループのスレッド数 1をカウンタ 1 6に加算し、カウンタ値を 3とし、第 3プライマリスレッド pth3を割り当てリスト 18に追カロ する。これにより、第 2スレッドグループよりも優先順位が低い第 3スレッドグループが 優先的にプロセッサに割り当てられる優先順位の逆転が起こる。 [0127] さらに、割り当てリスト生成部 12は、実行待ちキュー 30の次のエントリである第 4ブラ イマリスレッド pth4を取り出し、第 4スレッドグループのスレッド数 1をカウンタ 16に加 算し、カウンタ値を 4とし、第 4プライマリスレッド pth4を割り当てリスト 18に追加する。 割り当てリスト生成部 12は、カウンタ 16の値がプロセッサ総数 4に達したため、割り当 てリスト 18の生成を終了する。
[0128] スレッド割り当て部 14は、図 18 (b)の割り当てリスト 18にリストアップされた第 1、第 3 、および第 4スレッドグループに属する各スレッドをスケジューリング配列 20に割り振 る。図 18 (c)のように、プロセッサ番号 1、 2には第 1スレッドグループの 2つのスレッド la、スレッド lbがそれぞれ割り振られ、プロセッサ番号 3には第 3スレッドグループの スレッド 3aが割り振られ、プロセッサ番号には第 4スレッドグループのスレッド th4aが 割り振られる。
[0129] その後、時刻 tlにおいて第 1スレッドグループの各スレッドが同期待ちになったとす る。その結果、図 19 (a)のように、実行待ちキュー 30の先頭は第 2プライマリスレッド p th2になる。
[0130] 割り当てリスト生成部 12は、図 19 (b)のように、実行待ちキュー 30の先頭力も第 2プ ライマリスレッド pth2を取り出し、第 2スレッドグループのスレッド数 3をカウンタ 16に加 算し、カウンタ値を 3とする。第 2スレッドグループのスレッドは 1つ前の時刻 tOにおけ るスケジューリング配列 20にないから、割り当てリスト生成部 12は、第 2プライマリスレ ッド pth2を割り当てリスト 18に追加する。
[0131] 次に、割り当てリスト生成部 12は、実行待ちキュー 30の次のエントリである第 3ブラ イマリスレッド pth3を取り出し、第 3スレッドグループのスレッド数 1をカウンタ 16に加 算し、カウンタ値を 4とする。第 3スレッドグループのスレッド th3aは、 1つ前の時刻 tO におけるスケジューリング配列 20にあるから、割り当てリスト生成部 12は、図 19 (c)の ように、スケジューリング配列 20にお!/、て第 3スレッドグループのスレッド th3aが割り 振られたプロセッサ番号 3にマークを付ける。
[0132] カウンタ 16の値がプロセッサ総数 4に達したため、スレッド割り当て部 14は、図 19 ( c)のように、割り当てリスト 18にリストされた第 2スレッドグループに属する 3つのスレツ ド th2a、 th2b、 th2cをスケジューリング配列 20のマークされていないプロセッサ番号 1、 2、 4に割り振る。このとき、プロセッサ番号 4に割り振られていた第 4スレッドグルー プのスレッド th4aはプロセッサへの割り当てを第 2スレッドグノレープのスレッド th2cに よって横取りされる。
[0133] 時刻 t2において、第 3スレッドグループのスレッド th3aが終了したとする。これにより 、図 20 (a)に示すように、実行待ちキュー 30から第 3プライマリスレッド pth3が外され る。
[0134] 図 20 (b)に示すように、割り当てリスト生成部 12は、実行待ちキュー 30の先頭から 第 2プライマリスレッド pth2を取り出し、第 2スレッドグループのスレッド数 3をカウンタ 1 6に加算し、カウンタ値を 3とする。割り当てリスト生成部 12は、第 2スレッドグループの 各スレッドはスケジューリング配列 20に既にあるため、図 20 (c)のように、第 2スレッド グループのスレッド th2a、 th2b、 th2cが割り振られているプロセッサ番号 1、 2、 4に マークを付ける。
[0135] 次に、割り当てリスト生成部 12は、実行待ちキュー 30の次のエントリである第 4ブラ イマリスレッド pth4を取り出し、第 4スレッドグループのスレッド数 1をカウンタ 16に加 算し、カウンタ値を 4とし、第 4スレッドグループのスレッドはスケジューリング配列 20に な 、から、第 4プライマリスレッド pth4を割り当てリスト 18に追加する。
[0136] カウンタ 16の値がプロセッサ総数 4に達したため、スレッド割り当て部 14は、図 20 ( c)のように、割り当てリスト 18にリストされた第 4スレッドグループのスレッド th4aをスケ ジユーリング配列 20のマークされていないプロセッサ番号 3に割り振る。
[0137] 時刻 t3において、第 2スレッドグループのスレッド th2aが終了したとする。これにより 、図 21 (a)に示すように、実行待ちキュー 30から第 2プライマリスレッド pth2が外され る。
[0138] 図 21 (b)に示すように、割り当てリスト生成部 12は、実行待ちキュー 30の先頭から 第 4プライマリスレッド pth4を取り出し、第 4スレッドグループのスレッド数 1をカウンタ 1 6に加算し、カウンタ値を 1とする。割り当てリスト生成部 12は、第 4スレッドグループの 各スレッドはスケジューリング配列 20に既にあるため、図 21 (c)のように、第 4スレッド グループのスレッド th4aが割り当てられているプロセッサ番号 3にマークをつける。
[0139] 次に、割り当てリスト生成部 12は、実行待ちキュー 30の次のエントリである第 5ブラ イマリスレッド pth5を取り出し、カウンタ 16に第 5スレッドグループのスレッド数 3を加 算し、カウンタ値を 4とする。第 5スレッドグループのスレッドはスケジューリング配列 20 にないから、第 5プライマリスレッド pth5を割り当てリスト 18に追加される。
[0140] カウンタ 16の値がプロセッサ総数 4に達したため、スレッド割り当て部 14は、図 21 ( c)のように、割り当てリスト 18にリストされた第 5スレッドグループのスレッド th5a、 th5 b、 th5cをスケジューリング配列 20のマークされていないプロセッサ番号 1、 2、 4にそ れぞれ割り当てる。
[0141] 図 22は、本例におけるスレッドの割り当て状態の時間変化を示す図である。時刻 tO では、第 1プロセッサ、第 2プロセッサに第 1スレッドグループの 2つのスレッド thla、 t hlbが割り当てられ、第 3プロセッサに第 3スレッドグループのスレッド th3aが割り当て られ、第 4プロセッサに第 4スレッドグループのスレッド th4aが割り当てられて実行され る。
[0142] 時刻 tlにおいて、第 1スレッドグループが同期待ちとなり、再スケジューリングが起こ る。このとき、その時点で最も優先順位が高い第 2スレッドグループの 3つのスレッド th 2a、 th2b、 th2cが割り当てられるため、第 4プロセッサに割り当てられていた優先順 位の低い第 4スレッドグループのスレッド th4aはプリェンブトされる。し力し、時刻 t2に おいて、第 3スレッドグループが終了すると、代わりに第 4スレッドグループのスレッド t h4aが第 3プロセッサに割り当てられる。時刻 t3において、第 2スレッドグループが終 了すると、代わりに第 5スレッドグループのスレッド th5a、 th5b、 th5cが第 1、第 2、第 4プロセッサにそれぞれ割り当てられる。
[0143] 以上述べたように、本実施の形態のスケジューリング装置 200によれば、スレッドを グループ化し、同一スレッドグループに属する複数のスレッドは同時に!/、ずれかのプ 口セッサに割り当てて実行することにより、マルチプロセッサシステムの同期 ·排他制 御機構を利用して、スレッドグループ内のスレッド間で互 、のアドレス空間を効率よく 参照したり、メモリの排他処理を効率よく行うことができる。また、スレッド間で通信した り、メモリを共有する場合も、スレッドグループ内のスレッドは同時にプロセッサに割り 当てられるため、効率よくスレッド間通信を行ったり、メモリの共有を行うことができる。
[0144] 仮に、同一スレッドグループに属する複数のスレッドの中に、プロセッサに割り当て られているものと、プロセッサに割り当てられずに、スレッドのコンテクストがメインメモリ に退避されているものとがあるとすると、スレッドの実体が現在どこにあるかを知る必 要があり、カーネルに問い合わせて、システムコールを通じてデータの読み出しをす ることになり、そのための処理機構は複雑でコストがかかる。し力しながら、本実施の 形態では、あるスレッドがプロセッサ上にある場合は、同一スレッドグループの他のス レッドも必ず他のプロセッサ上にあることが保証されるため、処理効率を高めることが できる。
[0145] 本実施の形態のスレッドスケジューリングでは、同一スレッドグループに属するすべ てのスレッドを同時にプロセッサに割り当てるという条件のもと、優先順位の高いスレ ッドを極力最優先にし、かつ、マルチプロセッサの資源の利用効率を最大限に上げ ることができる。優先順位の高いスレッドグループのスレッドを割り当てるために、先に 割り当てられたより優先順位の低 、スレッドはプリェンブトされる。このプリェンプショ ンによって優先順位を守ることができる。また、プロセッサ総数の制約から、あるスレツ ドグループの割り当てができな 、場合は、より優先順位の低 、スレッドグループが優 先され、優先順位の逆転が起こることもある。この優先順位の逆転によって、プロセッ サの利用効率を高めることができる。
[0146] 本実施の形態の実行待ちキュー 30は、実行待ち状態にあるスレッドグループだけ でなぐ実行中状態にあるスレッドグループも優先度順でかつ同一優先度内では FIF O順でキューイングしている。これにより、スレッドグループの FIFO順を守ってスケジ ユーリングができる。仮に、実行中状態にあるスレッドグループを実行待ちキュー 30 力 外してしまうとすると、 FIFO順を維持するためには、 FIFO順を別途記憶しておく 必要があり、処理が複雑になり、効率が低下することになる。し力しながら、本実施の 形態では、実行中状態にあるスレッドグループも FIFO順で実行待ちキュー 30に保 持するため、 FIFO順を維持しながら、割り当て処理を一括して行うことができる。その ため、割り当て処理の効率が良ぐ処理も簡単である。
[0147] また、本実施の形態では、割り当てリスト生成部 12がスケジューリング配列 20にお いてマーキング処理をすることにより、既に割り当てられたスレッドが割り当て先のプ 口セッサを変更されて再配置されることがないことを保証することができる。実行中状 態にあったスレッドが継続してスケジューリングされて実行される場合に、そのスレッド は同一のプロセッサにおいて連続して実行されることになるため、スレッドのプロセッ サへの割り当て処理を省くことができ、処理効率が向上する。
[0148] 実施の形態 2
実施の形態 2に係るマルチプロセッサシステムは、図 1のマルチプロセッサシステム と同じ構成であり、スレッドスケジューリングにより、ある時刻に各プロセッサ 130には 1 つのスレッドが割り当てられ、マルチプロセッサシステム全体で並列に複数のスレッド が実行される。
[0149] 本実施の形態のマルチプロセッサシステムでは、複数のプロセッサ 130の内、少な くとも 1つのプロセッサ 130がスレッドスケジューリングの対象外となり、残りのプロセッ サ 130にスレッドがスレッドスケジューリングにより割り当てられる点が実施の形態 1と 異なる。
[0150] また、実施の形態 1では、 1つ以上のスレッドを含むスレッドグループが定義され、ス レッドグループ単位でスケジューリングが行われた力 本実施の形態では、スレッドグ ループは特に定義されず、スレッド単位でスケジューリングが行われる。スレッドスケ ジユーリング方式は、実施の形態 1で説明した優先度順かつ同一優先度内では FIF O順でスレッドのプロセッサへの割り当てを制御してもよぐ通常のラウンドロビン方式 やプライオリティ方式を採用してもよい。
[0151] スレッドの割り当て対象外のプロセッシングエレメント 100 (以下、非割り当て対象 P Eという)のプロセッサ 130上には、当該プロセッシングエレメント 100内の資源を独占 的に占有する実行実体が動作し、この実行実体は、スケジューリングの対象外である ため、いったんプロセッサに割り当てられると、当該プロセッサへの割り当てを横取り されることがない。以下、この非割り当て対象 PE上で動作するスケジューリング対象と ならな 、実行実体のことを、「非スケジューリング対象実行実体」と呼ぶ。
[0152] 非スケジューリング対象実行実体は、非割り当て対象 PE内のローカルメモリ 140や メモリ制御部 150内部のレジスタなどのすベての資源を占有して使用することができ る。これは、スレッドスケジューリングによりプロセッシングエレメント 100に割り当てら れたスレッド力 プロセッシングエレメント 100内のローカルメモリ 140やメモリ制御部 1 50内部のレジスタなどのすベての資源を占有して使用することができることと同じで ある。また、非スケジューリング対象実行実体が占有する資源については、外側から すなわち他のプロセッシングエレメント 100からもアクセスできるように、一部のァクセ スを許可しな 、クリティカルな資源を除 、て、ほとんどすべての資源がアドレス空間に マップされる。
[0153] 図 23は、あるプロセッサ 130に割り当てられたスレッドから見たアドレス空間 170を 説明する図である。非割り当て対象 PEで動作する非スケジューリング対象実行実体 が時間的に占有する資源は、他のプロセッシングエレメント 100で動作する各スレッド のアドレス空間 170にメモリマップされる。アドレス空間 170には、共有データを含む メインメモリがマップされたメインメモリ領域 172と、非スケジューリング対象実行実体 の占有資源がマップされた非スケジューリング対象実行実体マップ領域 176とが含ま れる。
[0154] 非スケジューリング対象実行実体マップ領域 176には、この例では、 2つの非スケジ ユーリング対象実行実体マップ # 1、 # 2が配置されている。すなわち、本例では、 2 つのプロセッシングエレメント 100が非割り当て対象 PEとして選ばれ、各非割り当て 対象 PE上で非スケジューリング対象実行実体が動作して 、る。各非スケジューリング 対象実行実体マップ # 1、 # 2は、各非スケジューリング対象実行実体が非割り当て 対象 PE内で占有する資源をメモリマップしたものであり、符号 177で示すように、ロー カルメモリと、メモリ制御部 150を外部から制御するためのレジスタ群を含む。レジスタ 群には、実施の形態 1で説明した同期通信のための通信用レジスタの他、プログラム の実行や停止を行うためのプログラム制御用レジスタや、 DMAを制御するための D
MA制御用レジスタなどがあり、実施の形態 1で説明した図 2のスレッドマップの場合 とは異なり、これらのすべてのレジスタにアクセスが可能である。これらのレジスタにァ クセスすることにより、非スケジューリング対象実行実体が占有するプロセッサ資源を 直接、きめ細力べ操作することが可能である。
[0155] 第 1の非スケジューリング対象実行実体マップ # 1には、非スケジューリング対象実 行実体ベースアドレスを先頭アドレスとして非スケジューリング対象実行実体マップの サイズ分の領域が割り当てられている。第 2の非スケジューリング対象実行実体マツ プ # 2の先頭アドレスは、非スケジューリング対象実行実体ベースアドレスに非スケジ ユーリング対象実行実体マップのサイズに対応したオフセット値を加算したアドレスに なる。この例では、 2つの非スケジューリング対象実行実体マップ # 1、 # 2しか配置さ れていないが、一般には、スレッドスケジューリングの対象外となり、非スケジユーリン グ対象実行実体が動作するプロセッシングエレメント 100の数だけ、非スケジユーリン グ対象実行実体マップが設けられる。
[0156] 非スケジューリング対象実行実体を生成する際に、生成関数の戻り値として返され る ID力も非スケジューリング対象実行実体マップの番号が決まり、その非スケジユーリ ング対象実行実体がアドレス空間 170内のどの非スケジューリング対象実行実体マツ プを使用するかが静的に決まる。各プロセッシングエレメント 100のメモリ制御部 150 は、各非スケジューリング対象実行実体がどの非スケジューリング対象実行実体マツ プを使用している力ゝを非スケジューリング対象実行実体マップの設定情報として保持 する。各プロセッシングエレメント 100のメモリ制御部 150は、各非スケジューリング対 象実行実体の資源がどの非スケジューリング対象実行実体マップにメモリマップされ ている力を非スケジューリング対象実行実体マップの設定情報により把握することが でき、アドレス空間 170の非スケジューリング対象実行実体マップにもとづいて、非ス ケジユーリング対象実行実体の資源に対するアクセス要求を DMAによって処理する ことができる。
[0157] たとえば、システム初期化時に第 1、第 2プロセッサがスレッドスケジューリングの対 象力も外され、第 1プロセッサで第 1非スケジューリング対象実行実体 R1が動作し、 第 2プロセッサで第 2非スケジューリング対象実行実体 R2が動作するとする。また、第 3、第 4プロセッサにスレッドがスケジューリングされて割り当てられるとする。
[0158] 第 1、第 2非スケジューリング対象実行実体 Rl、 R2の生成時に、スレッドのアドレス 空間の第 1領域 ER1に第 1非スケジューリング対象実行実体 R1の資源カ モリマツ プされ、第 2領域 ER2に第 2非スケジューリング対象実行実体 R2の資源カ モリマツ プされたとする。スレッドスケジューリングにより、第 3プロセッサに第 1スレッド A1が割 り当てられ、第 4プロセッサに第 2スレッド A2が割り当てられたとする。
[0159] このとき、第 3プロセッサ上で動作する第 1スレッド A1から、第 1非スケジューリング 対象実行実体 R 1の非スケジューリング対象実行実体マップである第 1領域 ER 1にァ クセスすると、第 1プロセッサの資源が第 1非スケジューリング対象実行実体 R1の資 源として参照される。第 1スレッド A1から第 1非スケジューリング対象実行実体 R1の 非スケジューリング対象実行実体マップである第 1領域 ER1へのアクセスは、第 1非 スケジューリング対象実行実体 R1がどのプロセッサで動作しているかに関係なぐ必 ず第 1非スケジューリング対象実行実体 R1の資源へのアクセスであることが保証され る。第 1スレッド A1が第 2非スケジューリング対象実行実体 R2の非スケジューリング 対象実行実体マップである第 2領域 ER2にアクセスする場合も同様である。
[0160] 第 4プロセッサ上で動作する第 2スレッド A2が第 1、第 2非スケジューリング対象実 行実体 Rl、 R2の非スケジューリング対象実行実体マップである第 1領域 ER1、第 2 領域 ER2にアクセスする場合も全く同様である。
[0161] このように、いずれかのプロセッサ 130に割り当てられたスレッドは、アドレス空間 17 0内に設定された非スケジューリング対象実行実体マップのアドレスにアクセスするこ とで、非スケジューリング対象実行実体が占有する資源に DMAによって直接ァクセ スすることができる。
[0162] スレッドがアドレス空間にメモリマップされた非スケジューリング対象実行実体の占 有資源にアクセスすることにより、非スケジューリング対象実行実体が動作するプロセ ッサのハードウェア資源をシステムコールを介さずに直接的に操作することができ、 スレッドが参照するアドレス空間には、非スケジューリング対象実行実体が占有する 資源のほとんどがマップされているから、より多くのハードウェア資源の制御をユーザ の管理にゆだねることができる。たとえば、プログラムの実行、停止などの操作を外側 力 行うことも可能になる。
[0163] また、実施の形態 1で述べた同期機構は、本実施の形態においても有効である。ス レッドが、アドレス空間にメモリマップされた非スケジューリング対象実行実体の資源 の一つであるメモリ制御部 150内の通信用レジスタに値を書き込む操作を行 ヽ、非ス ケジユーリング対象実行実体がその通信用レジスタに対する書き込みの完了を待つ ことにより、非スケジューリング対象実行実体とスレッドの間で同期を取ることができる [0164] 非スケジューリング対象実行実体の他の使い方として、非スケジューリング対象実 行実体の占有資源をグラフィックス表示装置などのデバイスのメモリ空間にメモリマツ プし、非スケジューリング対象実行実体が動作するプロセッシングエレメント 100とグ ラフィックス表示装置との間で非スケジューリング対象実行実体の占有資源を利用し た同期機構を実現してもよい。
[0165] 実施の形態 3
実施の形態 2のマルチプロセッサシステムでは、スレッドグループを定義しなかった 力 実施の形態 1と同様にスレッドをグループ化し、スレッドグループ単位でスケジュ 一リングを行ってもよい。実施の形態 3のマルチプロセッサシステムは、実施の形態 1 のマルチプロセッサシステムにお!/、て、実施の形態 2で述べた非スケジューリング対 象実行実体の占有資源をアドレス空間にメモリマップする方法を採用したものである
[0166] 本実施の形態のマルチプロセッサシステムでは、実施の形態 2と同様、複数のプロ セッサ 130の内、少なくとも 1つのプロセッサ 130がスレッドスケジューリングの対象外 となり、残りのプロセッサ 130にスレッドがスレッドスケジューリングにより割り当てられ る。また、本実施の形態のマルチプロセッサシステムでは、実施の形態 1と同様、 1つ 以上のスレッドを含むスレッドグループが定義され、スレッドグループ単位でスケジュ 一リングが行われる。実施の形態 1および実施の形態 2と共通する構成と動作につい ては説明を省略し、異なる構成と動作についてのみ説明する。
[0167] 図 24は、あるプロセッサ 130に割り当てられたスレッドから見たアドレス空間 170を 説明する図である。アドレス空間 170には、共有データを含むメインメモリがマップさ れたメインメモリ領域 172と、同一グループ内の各スレッドの占有資源がマップされた スレッドマップ領域 174と、非スケジューリング対象実行実体の占有資源がマップされ た非スケジューリング対象実行実体マップ領域 176とが含まれる。
[0168] スレッドマップ領域 174については、実施の形態 1で述べた通りであり、非スケジュ 一リング対象実行実体マップ領域 176につ 、ては、実施の形態 2で述べた通りである 。なお、符号 175で示される各スレッドマップに含まれる資源と、符号 177で示される 各非スケジューリング対象実行実体マップに含まれる資源は、スレッドマップに含ま れる資源にはアクセスが許されないものがあるという違いはある力 マップされる資源 の種類としては同じであるから、両マップのサイズは同じであり、先頭アドレスに対す るオフセット値は同じ値になる。
[0169] スレッドマップ領域 174は、同一グループに属するスレッドのアドレス空間に対して 設定されるものであり、異なるグループに属するスレッドからは参照することができな いが、非スケジューリング対象実行実体マップ領域 176は、スレッドの属するグルー プに関係なく固定して配置されており、同じアドレスで参照することができる。また、非 スケジューリング対象実行実体マップ領域 176は、メインメモリ 120に退避されること がな 、ため、スレッドのアドレス空間にお ヽて 、つでも参照可能である。
[0170] 図 25は、本実施の形態のスレッドスケジューリングによるスレッドの割り当て状態の 時間変化を示す図である。この例では、第 1および第 2プロセッサが非割り当て対象 P Eとして選ばれ、それ以外の第 3〜第 6プロセッサにスレッドがスケジュールされて割り 当てられる。
[0171] 第 1プロセッサでは第 1非スケジューリング対象実行実体が実行され、第 2プロセッ サでは第 2非スケジューリング対象実行実体が実行される。これらの非スケジユーリン グ対象実行実体は、スケジューリングの対象ではないため、非スケジューリング対象 実行実体が削除されるまで、各プロセッサを時間的に占有し続ける。
[0172] 第 3〜第 6プロセッサについては、図 22で説明した実施の形態 1のスレッドスケジュ 一リングの例と同じ方法でスレッドがスレッドグループ単位でスケジュールされて、割り 当てられる。
[0173] なお、非スケジューリング対象実行実体が削除されてプロセッサへの割り当てが解 放された場合は、そのプロセッサはスレッドの割り当てた対象に加えられてもよい。た とえば、第 2非スケジューリング対象実行実体が削除されて、第 2プロセッサが解放さ れた場合、次のスケジューリングのタイミングにおいて、第 2プロセッサをスレッドの割 り当て対象に追加し、第 2〜第 6プロセッサに対してスレッドをスケジューリングして割 り当てるようにしてもよい。
[0174] 以上、本発明を実施の形態をもとに説明した。実施の形態は例示であり、それらの 各構成要素や各処理プロセスの組合せに 、ろ 、ろな変形例が可能なこと、またそうし た変形例も本発明の範囲にあることは当業者に理解されるところである。
[0175] 上記の実施の形態では、マルチプロセッサシステムとして、すべてのプロセッシング エレメントが同じ構成である対称型マルチプロセッサシステムを例にあげて説明し、 Vヽ ずれか一つのプロセッシングエレメントがスレッドの管理'スケジューリング機能をもつ ように構成した。マルチプロセッサシステムは、管理用プロセッシングエレメントを含む 非対称型マルチプロセッサシステムであってもよぐ管理用プロセッシングエレメント にスレッドの管理'スケジューリング機能をもたせてもよい。また、スケジューリング機 能はオペレーティングシステム (OS)の機能の一部として実現されてもよぐ OS上で 動作する一つのプロセスとして実現されてもょ 、。
[0176] 上記の説明では、プロセス内部で生成されるスレッドを並列処理単位とするスレッド スケジューリングを説明した力 本発明は、プロセスを並列処理単位としたプロセスス ケジユーリングにも同様に適用することができる。
産業上の利用可能性
[0177] 本発明は、マルチプロセッサのスケジューリング技術に適用することができる。

Claims

請求の範囲
[1] マルチプロセッサシステムにおいて、並列処理されるスケジューリング対象の実行 単位を複数のプロセッサに割り当てる順序をスケジュールする方法であって、
1つ以上の前記スケジューリング対象の実行単位をグループ化し、同一グループに 属する前記実行単位の各々により占有されるプロセッサ内の資源を互いに参照でき るように、各実行単位が参照するアドレス空間に前記資源をマップし、同一グループ に属するすべての前記実行単位は同時にいずれかのプロセッサに割り当てるという 制約の下で、グループのプロセッサへの割り当てを制御することを特徴とするスケジ ユーリング方法。
[2] マルチプロセッサシステムにおいて、並列処理されるスケジューリング対象の実行 単位を複数のプロセッサに割り当てる順序をスケジュールする方法であって、
1つ以上の前記スケジューリング対象の実行単位をグループ化してグループ単位 でプロセッサへの割り当てを管理し、前記グループ毎に設定される優先度順でかつ 同一優先度内では前記グループが待ち行列に到着した順で前記グループの優先順 位を決め、同一グループに属するすべての実行単位は同時にいずれかのプロセッ サに割り当てるという制約の下で、実行待ちおよび実行中の状態にあるグループを 前記優先順位にしたがってプロセッサに割り当てることを特徴とするスケジューリング 方法。
[3] マルチプロセッサシステムにおいて、並列処理されるスケジューリング対象の実行 単位を複数のプロセッサに割り当てる順序をスケジュールする方法であって、
1つ以上の前記スケジューリング対象の実行単位を含むグループの内、実行待ち および実行中の状態にあるグループを前記グループ毎に設定される優先度順でか つ同一優先度内では到着順に格納した実行待ちキューの先頭力 順に前記グルー プを取り出し、取り出したグループに属するすべての実行単位を同時にいずれかの プロセッサに割り当てることができる場合に限り、そのグループに属するすべての実 行単位をプロセッサに割り当て、そうでない場合は、それ以降に前記実行待ちキュー から取り出されるグループの割り当てを優先することを特徴とするスケジューリング方 法。
[4] プロセッサに割り当てる前記実行単位の数がプロセッサ総数に達する力、または前 記実行待ちキューの末尾カゝら前記グループが取り出されるに至るまで、前記実行待 ちキュー力 順次取り出されるグループのプロセッサへの割り当て処理を繰り返すこ とを特徴とする請求項 3に記載のスケジューリング方法。
[5] 前記実行待ちキューの先頭から順次取り出されるグループに属する各実行単位が 既にいずれかのプロセッサに割り当てられて実行中である場合、その実行中である 実行単位は、他のプロセッサに割り当て先を変更されて再配置されないように、その 実行中である実行単位の当該プロセッサへの割り当てを確保することを特徴とする請 求項 3または 4に記載のスケジューリング方法。
[6] マルチプロセッサシステムにおいて、並列処理されるスケジューリング対象の実行 単位を複数のプロセッサに割り当てる順序をスケジュールする装置であって、
1つ以上の前記スケジューリング対象の実行単位をグループ化し、同一グループに 属する前記実行単位の各々により占有されるプロセッサ内の資源を互いに参照でき るように、各実行単位が参照するアドレス空間に前記資源をマップして管理するメモリ 制御部と、
実行待ちおよび実行中の状態にあるグループを格納した実行待ちキューと、 前記実行待ちキューの先頭力も順にグループを取り出し、取り出したグループに属 するすべての実行単位を同時にいずれかのプロセッサに割り当てることができる場合 に限り、そのグループに属するすべての実行単位を複数のプロセッサに割り当てる割 り当て部とを含むことを特徴とするスケジューリング装置。
[7] 当該装置は、実行単位をグループ化する初期設定の際に、同一グループに属する 各実行単位が占有する前記資源の前記アドレス空間へのマップ先の領域を決定し、 その資源のマップ先の領域に関する設定情報を当該グループが削除されるまで保 持することを特徴とする請求項 6に記載のスケジューリング装置。
[8] 前記割り当て部によりいずれかのプロセッサに同時に割り当てられた同一グループ に属する第 1および第 2の実行単位について、前記第 1の実行単位が、前記アドレス 空間にマップされた同一グループ内の前記第 2の実行単位の資源領域にデータを 書き込む操作を行うことにより、同一グループ内の前記第 1の実行単位力 前記第 2 の実行単位にデータが渡されることを特徴とする請求項 6または 7に記載のスケジュ 一リング装置。
[9] 前記割り当て部によりいずれかのプロセッサに同時に割り当てられた同一グループ に属する第 1および第 2の実行単位について、前記第 1の実行単位が、前記アドレス 空間にマップされた同一グループ内の前記第 2の実行単位の資源領域にデータを 書き込む操作を行い、前記第 2の実行単位が、当該資源に対するデータの書き込み の完了を待つことにより、同一グループ内の前記第 1の実行単位と前記第 2の実行単 位の間で同期が取られることを特徴とする請求項 6または 7に記載のスケジューリング 装置。
[10] マルチプロセッサシステムにおいて、並列処理されるスケジューリング対象の実行 単位を複数のプロセッサに割り当てる順序をスケジュールする装置であって、
1つ以上の前記スケジューリング対象の実行単位を含むグループの内、実行待ち および実行中の状態にあるグループを前記グループ毎に設定される優先度順でか つ同一優先度内では到着順に格納した実行待ちキューと、
前記実行待ちキューの先頭力も順にグループを取り出し、取り出したグループに属 するすべての実行単位を同時にいずれかのプロセッサに割り当てることができる場合 に限り、そのグループをプロセッサへの割り当て候補となるグループを格納した割り 当てリストに追加する割り当てリスト生成部と、
前記割り当てリスト生成部により生成された前記割り当てリストに格納されたグルー プに属するすべての実行単位を複数のプロセッサに割り当てる割り当て部とを含むこ とを特徴とするスケジューリング装置。
[11] 前記割り当てリスト生成部は、プロセッサに割り当てる実行単位の個数がプロセッサ 総数に達するか、または前記実行待ちキューの末尾カゝら前記グループが取り出され るに至るまで、前記割り当てリストの生成処理を繰り返すことを特徴とする請求項 10 に記載のスケジューリング装置。
[12] 実行中の状態にある実行単位とその実行単位が割り当てられているプロセッサとの 対応関係を保持するスケジュールテーブルをさらに含み、
前記割り当てリスト生成部は、前記実行待ちキューから順次取り出したグループに 属する各実行単位が前記スケジュールテーブルにある場合、その実行単位が割り当 てられて!/、るプロセッサにフラグを設定し、前記実行待ちキューから順次取り出したグ ループに属する各実行単位が前記スケジュールテーブルになぐそのグループに属 するすべての実行単位を同時にいずれかのプロセッサに割り当てることができる場合 、そのグループを前記割り当てリストに追加し、
前記割り当て部は、前記割り当てリストに格納されたグループに属するすべての実 行単位を前記スケジュールテーブルにお 、て前記フラグが設定されて 、な 、プロセ ッサに割り当てることを特徴とする請求項 10または 11に記載のスケジューリング装置
[13] 同一グループに属する各実行単位がそれぞれの占有するプロセッサ内の資源を互 いに参照できるように、前記資源は各実行単位が参照するアドレス空間にマップされ ていることを特徴とする請求項 10から 12のいずれかに記載のスケジューリング装置。
[14] 前記割り当て部によりいずれかのプロセッサに同時に割り当てられた同一グループ に属する各実行単位が、前記アドレス空間にマップされた同一グループに属する各 実行単位の資源領域に対してデータを読み書きすることにより、同一グループに属 する複数の実行単位の間でデータの共有がなされることを特徴とする請求項 13に記 載のスケジューリング装置。
[15] 前記割り当て部によりいずれかのプロセッサに同時に割り当てられた同一グループ に属する第 1および第 2の実行単位について、前記第 1の実行単位が、前記アドレス 空間にマップされた同一グループ内の前記第 2の実行単位の資源領域にデータを 書き込む操作を行うことにより、同一グループ内の前記第 1の実行単位力 前記第 2 の実行単位にデータが渡されることを特徴とする請求項 13に記載のスケジューリング 装置。
[16] 前記割り当て部によりいずれかのプロセッサに同時に割り当てられた同一グループ に属する第 1および第 2の実行単位について、前記第 1の実行単位が、前記アドレス 空間にマップされた同一グループ内の前記第 2の実行単位の資源領域にデータを 書き込む操作を行い、前記第 2の実行単位が、当該資源に対するデータの書き込み の完了を待つことにより、同一グループ内の前記第 1の実行単位と前記第 2の実行単 位の間で同期が取られることを特徴とする請求項 13に記載のスケジューリング装置。
[17] 並列処理されるスケジューリング対象の実行単位を複数のプロセッサに割り当てて 並列に実行するマルチプロセッサシステムであって、
1つのプロセッサは、前記スケジューリング対象の実行単位を他の複数のプロセッ サに割り当てるスケジューラを含み、
前記スケジューラは、
1つ以上の前記スケジューリング対象の実行単位をグループ化し、同一グループに 属する前記実行単位の各々により占有されるプロセッサ内の資源を互いに参照でき るように、各実行単位が参照するアドレス空間に前記資源をマップして管理するメモリ 制御部と、
実行待ちおよび実行中の状態にあるグループを格納した実行待ちキューと、 前記実行待ちキューの先頭力も順にグループを取り出し、取り出したグループに属 するすべての実行単位を同時にいずれかのプロセッサに割り当てることができる場合 に限り、そのグループに属するすべての実行単位を複数のプロセッサに割り当てる割 り当て部とを含むことを特徴とするマルチプロセッサシステム。
[18] 並列処理されるスケジューリング対象の実行単位を複数のプロセッサに割り当てて 並列に実行するマルチプロセッサシステムであって、
1つのプロセッサは、前記スケジューリング対象の実行単位を他の複数のプロセッ サに割り当てるスケジューラを含み、
前記スケジューラは、
1つ以上の前記スケジューリング対象の実行単位を含むグループの内、実行待ち および実行中の状態にあるグループを前記グループ毎に設定される優先度順でか つ同一優先度内では到着順に格納した実行待ちキューと、
前記実行待ちキューの先頭力も順にグループを取り出し、取り出したグループに属 するすべての実行単位を同時にいずれかのプロセッサに割り当てることができる場合 に限り、そのグループを割り当てリストに追加する割り当てリスト生成部と、
前記割り当てリスト生成部により生成された前記割り当てリストに格納されたグルー プに属するすべての実行単位を複数のプロセッサに割り当てる割り当て部とを含むこ とを特徴とするマルチプロセッサシステム。
[19] 並列処理されるスケジューリング対象の実行単位を 1つ以上含むグループの内、実 行待ちおよび実行中の状態にあるグループを前記グループ毎に設定される優先度 順でかつ同一優先度内では到着順に格納した実行待ちキューの先頭力 順にダル ープを取り出すステップと、
実行中の状態にある実行単位とその実行単位が割り当てられて ヽるプロセッサとの 対応関係を保持するスケジュールテーブルを参照し、前記実行待ちキューから順次 取り出したグループに属する各実行単位が前記スケジュールテーブルにある場合、 その実行単位が割り当てられて 、るプロセッサにフラグを設定するステップと、 前記実行待ちキューから順次取り出したグループに属する各実行単位が前記スケ ジュールテーブルになぐそのグループに属するすべての実行単位を同時に 、ずれ かのプロセッサに割り当てることができる場合、そのグループを前記割り当てリストに 追加するステップと、
前記割り当てリストに格納されたグループに属するすべての実行単位を前記スケジ ユールテーブルにお 、て前記フラグが設定されて ヽな 、プロセッサに割り当てるステ ップとをコンピュータに実行させることを特徴とするプログラム。
[20] マルチプロセッサシステムにおいて、並列処理されるスケジューリング対象の実行 単位を複数のプロセッサに割り当てる順序をスケジュールする方法であって、 複数のプロセッサの内、少なくとも 1つのプロセッサを並列処理されるスケジユーリン グ対象の実行単位の割り当て対象力も除外し、非割り当て対象のプロセッサ上で動 作するスケジュール対象とならない実行単位により独占的に占有される当該プロセッ サ内の資源を前記スケジューリング対象の実行単位カゝら参照できるように、各実行単 位が参照するアドレス空間に前記資源をマップした上で、前記実行単位の割り当て 対象のプロセッサへの割り当てを制御することを特徴とするスケジューリング方法。
[21] マルチプロセッサシステムにおいて、並列処理されるスケジューリング対象の実行 単位を複数のプロセッサに割り当てる順序をスケジュールする装置であって、 複数のプロセッサの内、少なくとも 1つのプロセッサを並列処理されるスケジユーリン グ対象の実行単位の割り当て対象力も除外し、非割り当て対象のプロセッサ上で動 作するスケジュール対象とならない実行単位により独占的に占有される当該プロセッ サ内の資源を前記スケジューリング対象の実行単位カゝら参照できるように、各スケジ ユーリング対象の実行単位が参照するアドレス空間に前記資源をマップして管理す るメモリ制御部と、
実行待ちおよび実行中の状態にある前記スケジューリング対象の実行単位を格納 した実行待ちキューと、
前記実行待ちキューの先頭カゝら順に前記スケジューリング対象の実行単位を取り 出し、 V、ずれかのプロセッサに割り当てる割り当て部とを含むことを特徴とするスケジ ユーリング装置。
[22] 非割り当て対象のプロセッサ上で動作する非スケジューリング対象の実行単位によ り独占的に占有される当該プロセッサ内の資源の前記アドレス空間へのマップ先の 領域は、いずれのスケジューリング対象の実行単位力も見ても同じアドレスに固定さ れて 、ることを特徴とする請求項 21に記載のスケジューリング装置。
[23] 前記割り当て部により!、ずれかのプロセッサに割り当てられた前記スケジューリング 対象の実行単位が、前記アドレス空間にマップされた非割り当て対象のプロセッサ上 で動作する非スケジューリング対象の実行単位の資源領域にデータを書き込む操作 を行うことにより、非割り当て対象のプロセッサの資源が直接的に制御されることを特 徴とする請求項 21または 22に記載のスケジューリング装置。
[24] 前記割り当て部により!、ずれかのプロセッサに割り当てられた前記スケジューリング 対象の実行単位が、前記アドレス空間にマップされた非割り当て対象のプロセッサ上 で動作する非スケジューリング対象の実行単位の資源領域にデータを書き込む操作 を行 、、前記非割り当て対象のプロセッサ上で動作する非スケジューリング対象の実 行単位が、当該資源に対するデータの書き込みの完了を待つことにより、前記スケジ ユーリング対象の実行単位と前記非スケジューリング対象の実行単位の間で同期が 取られることを特徴とする請求項 21または 22に記載のスケジューリング装置。
PCT/JP2005/021663 2004-12-01 2005-11-25 スケジューリング方法、スケジューリング装置およびマルチプロセッサシステム WO2006059543A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP05809655.3A EP1837762B1 (en) 2004-12-01 2005-11-25 Scheduling method, scheduling device, and multiprocessor system
CN2005800412782A CN101069161B (zh) 2004-12-01 2005-11-25 调度方法、调度装置和多处理器系统

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004348479A JP4606142B2 (ja) 2004-12-01 2004-12-01 スケジューリング方法、スケジューリング装置およびマルチプロセッサシステム
JP2004-348479 2004-12-01

Publications (1)

Publication Number Publication Date
WO2006059543A1 true WO2006059543A1 (ja) 2006-06-08

Family

ID=36564977

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2005/021663 WO2006059543A1 (ja) 2004-12-01 2005-11-25 スケジューリング方法、スケジューリング装置およびマルチプロセッサシステム

Country Status (6)

Country Link
US (2) US7913257B2 (ja)
EP (1) EP1837762B1 (ja)
JP (1) JP4606142B2 (ja)
CN (1) CN101069161B (ja)
TW (1) TWI410866B (ja)
WO (1) WO2006059543A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011039666A (ja) * 2009-08-07 2011-02-24 Hitachi Ltd バリア同期方法及び計算機
US10553315B2 (en) * 2015-04-06 2020-02-04 Preventice Solutions, Inc. Adverse event prioritization and handling

Families Citing this family (85)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7913206B1 (en) * 2004-09-16 2011-03-22 Cadence Design Systems, Inc. Method and mechanism for performing partitioning of DRC operations
DE102005001025A1 (de) * 2005-01-07 2006-07-27 Infineon Technologies Ag Multithread-Prozessor mit Kontext-Umschaltung ohne Einschränkungen und/oder Zyklenverlust und Verfahren zum Betreiben eines solchen
US7631130B2 (en) * 2005-02-04 2009-12-08 Mips Technologies, Inc Barrel-incrementer-based round-robin apparatus and instruction dispatch scheduler employing same for use in multithreading microprocessor
US7506140B2 (en) * 2005-02-04 2009-03-17 Mips Technologies, Inc. Return data selector employing barrel-incrementer-based round-robin apparatus
US7664936B2 (en) * 2005-02-04 2010-02-16 Mips Technologies, Inc. Prioritizing thread selection partly based on stall likelihood providing status information of instruction operand register usage at pipeline stages
US7613904B2 (en) * 2005-02-04 2009-11-03 Mips Technologies, Inc. Interfacing external thread prioritizing policy enforcing logic with customer modifiable register to processor internal scheduler
US7681014B2 (en) * 2005-02-04 2010-03-16 Mips Technologies, Inc. Multithreading instruction scheduler employing thread group priorities
US7853777B2 (en) * 2005-02-04 2010-12-14 Mips Technologies, Inc. Instruction/skid buffers in a multithreading microprocessor that store dispatched instructions to avoid re-fetching flushed instructions
US7490230B2 (en) * 2005-02-04 2009-02-10 Mips Technologies, Inc. Fetch director employing barrel-incrementer-based round-robin apparatus for use in multithreading microprocessor
US7657891B2 (en) 2005-02-04 2010-02-02 Mips Technologies, Inc. Multithreading microprocessor with optimized thread scheduler for increasing pipeline utilization efficiency
US7752627B2 (en) * 2005-02-04 2010-07-06 Mips Technologies, Inc. Leaky-bucket thread scheduler in a multithreading microprocessor
US7657883B2 (en) * 2005-02-04 2010-02-02 Mips Technologies, Inc. Instruction dispatch scheduler employing round-robin apparatus supporting multiple thread priorities for use in multithreading microprocessor
US7904852B1 (en) 2005-09-12 2011-03-08 Cadence Design Systems, Inc. Method and system for implementing parallel processing of electronic design automation tools
JP4388518B2 (ja) * 2005-11-01 2009-12-24 株式会社ソニー・コンピュータエンタテインメント スレッドデバッグ装置、スレッドデバッグ方法及びプログラム
EP1963963A2 (en) * 2005-12-06 2008-09-03 Boston Circuits, Inc. Methods and apparatus for multi-core processing with dedicated thread management
US8448096B1 (en) 2006-06-30 2013-05-21 Cadence Design Systems, Inc. Method and system for parallel processing of IC design layouts
US7657856B1 (en) 2006-09-12 2010-02-02 Cadence Design Systems, Inc. Method and system for parallel processing of IC design layouts
US7990989B2 (en) * 2006-09-16 2011-08-02 Mips Technologies, Inc. Transaction selector employing transaction queue group priorities in multi-port switch
US7760748B2 (en) * 2006-09-16 2010-07-20 Mips Technologies, Inc. Transaction selector employing barrel-incrementer-based round-robin apparatus supporting dynamic priorities in multi-port switch
US7773621B2 (en) * 2006-09-16 2010-08-10 Mips Technologies, Inc. Transaction selector employing round-robin apparatus supporting dynamic priorities in multi-port switch
US7961745B2 (en) * 2006-09-16 2011-06-14 Mips Technologies, Inc. Bifurcated transaction selector supporting dynamic priorities in multi-port switch
JP5050601B2 (ja) * 2007-03-23 2012-10-17 日本電気株式会社 ジョブへの資源割当方式、ジョブへの資源割当方法およびプログラム
US20080271027A1 (en) * 2007-04-27 2008-10-30 Norton Scott J Fair share scheduling with hardware multithreading
US9384159B2 (en) * 2007-05-24 2016-07-05 International Business Machines Corporation Creating a checkpoint for a software partition in an asynchronous input/output environment
JP2009020692A (ja) * 2007-07-11 2009-01-29 Toshiba Corp タスク管理装置、タスク管理方法及びタスク管理プログラム
TWI386851B (zh) * 2007-09-14 2013-02-21 Hon Hai Prec Ind Co Ltd 排程任務更新系統及方法
JP4907488B2 (ja) * 2007-10-24 2012-03-28 株式会社リコー 画像処理装置、画像処理方法及び該方法を実行させるためのプログラムを格納したコンピュータ読み取り可能な記録媒体
TWI462011B (zh) * 2007-12-28 2014-11-21 Accton Technology Corp 程序之執行緒群組管理方法
CN101494636B (zh) * 2008-01-23 2013-01-16 中兴通讯股份有限公司 一种基于快速io互连技术的数据排序方法及装置
US8561072B2 (en) * 2008-05-16 2013-10-15 Microsoft Corporation Scheduling collections in a scheduler
US8566830B2 (en) * 2008-05-16 2013-10-22 Microsoft Corporation Local collections of tasks in a scheduler
US8769048B2 (en) * 2008-06-18 2014-07-01 Commvault Systems, Inc. Data protection scheduling, such as providing a flexible backup window in a data protection system
US8296773B2 (en) 2008-06-30 2012-10-23 International Business Machines Corporation Systems and methods for thread assignment and core turn-off for integrated circuit energy efficiency and high-performance
WO2010001736A1 (ja) 2008-07-04 2010-01-07 日本電気株式会社 マルチプロセッサシステム、マルチスレッド処理方法、及びプログラム
JP5173713B2 (ja) 2008-09-30 2013-04-03 ルネサスエレクトロニクス株式会社 マルチスレッドプロセッサ及びそのハードウェアスレッドのスケジュール方法
JP5173711B2 (ja) 2008-09-30 2013-04-03 ルネサスエレクトロニクス株式会社 マルチスレッドプロセッサ及びそのハードウェアスレッドのスケジュール方法
JP5173712B2 (ja) 2008-09-30 2013-04-03 ルネサスエレクトロニクス株式会社 マルチスレッドプロセッサ
GB0820920D0 (en) * 2008-11-14 2008-12-24 Wolfson Microelectronics Plc Codec apparatus
WO2010089900A1 (en) * 2009-02-05 2010-08-12 Nec Corporation Method, system and program for deadline constrained task admission control and scheduling using genetic approach
JP5241550B2 (ja) * 2009-02-12 2013-07-17 株式会社日立製作所 ファイル入出力方法
WO2010092483A1 (en) * 2009-02-13 2010-08-19 Alexey Raevsky Devices and methods for optimizing data-parallel processing in multi-core computing systems
US20110010716A1 (en) * 2009-06-12 2011-01-13 Arvind Raghuraman Domain Bounding for Symmetric Multiprocessing Systems
US8352946B2 (en) * 2009-08-11 2013-01-08 International Business Machines Corporation Managing migration ready queue associated with each processor based on the migration ready status of the tasks
US8832712B2 (en) * 2009-09-09 2014-09-09 Ati Technologies Ulc System and method for synchronizing threads using shared memory having different buffer portions for local and remote cores in a multi-processor system
CN101673223B (zh) * 2009-10-22 2012-03-21 同济大学 基于片上多处理器的线程调度实现方法
JP5526748B2 (ja) * 2009-12-09 2014-06-18 日本電気株式会社 パケット処理装置、パケット振り分け装置、制御プログラム及びパケット分散方法
CN101788908B (zh) * 2010-01-26 2014-11-05 浪潮(山东)电子信息有限公司 一种支持断点续航的批量数据处理方法
JP5429363B2 (ja) 2010-03-25 2014-02-26 富士通株式会社 マルチコアプロセッサシステム、制御プログラム、および制御方法
US9886315B2 (en) * 2010-08-27 2018-02-06 Ebay Inc. Identity and semaphore-based quality of service
US8789065B2 (en) 2012-06-08 2014-07-22 Throughputer, Inc. System and method for input data load adaptive parallel processing
US20130117168A1 (en) * 2011-11-04 2013-05-09 Mark Henrik Sandstrom Maximizing Throughput of Multi-user Parallel Data Processing Systems
US9158592B2 (en) 2011-05-02 2015-10-13 Green Hills Software, Inc. System and method for time variant scheduling of affinity groups comprising processor core and address spaces on a synchronized multicore processor
RU2011117765A (ru) * 2011-05-05 2012-11-10 ЭлЭсАй Корпорейшн (US) Устройство (варианты) и способ реализации двухпроходного планировщика задач линейной сложности
US9262181B2 (en) * 2011-05-10 2016-02-16 International Business Machines Corporation Process grouping for improved cache and memory affinity
EP2707796A4 (en) * 2011-05-13 2016-06-08 Samsung Electronics Co Ltd METHOD AND APPARATUS FOR ENHANCING APPLICATION PROCESSING SPEED IN DIGITAL DEVICE
KR101897598B1 (ko) * 2011-05-13 2018-09-13 삼성전자 주식회사 디지털 디바이스의 어플리케이션 처리 속도 향상 방법 및 장치
CN102193779A (zh) * 2011-05-16 2011-09-21 武汉科技大学 一种面向MPSoC的多线程调度方法
US9448847B2 (en) 2011-07-15 2016-09-20 Throughputer, Inc. Concurrent program execution optimization
US8745626B1 (en) * 2012-12-17 2014-06-03 Throughputer, Inc. Scheduling application instances to configurable processing cores based on application requirements and resource specification
US9158587B2 (en) * 2012-01-19 2015-10-13 International Business Machines Corporation Flexible task and thread binding with preferred processors based on thread layout
US9069564B1 (en) * 2012-02-14 2015-06-30 Netlogic Microsystems, Inc. Weighted instruction count scheduling
US9286115B2 (en) * 2012-06-21 2016-03-15 Microsoft Technology Licensing, Llc Performant runtime pause with no CPU utilization
CN102929707B (zh) * 2012-11-06 2015-10-07 无锡江南计算技术研究所 并行任务动态分配方法
JP5676664B2 (ja) * 2013-02-27 2015-02-25 Necプラットフォームズ株式会社 リソース管理装置、リソースの管理方法、及びプログラム
CN104422694A (zh) * 2013-09-11 2015-03-18 法国圣戈班玻璃公司 测量数据的处理装置及处理方法、光学测量系统
GB2521151B (en) * 2013-12-10 2021-06-02 Advanced Risc Mach Ltd Configurable thread ordering for a data processing apparatus
GB2521155B (en) 2013-12-10 2021-06-02 Advanced Risc Mach Ltd Configuring thread scheduling on a multi-threaded data processing apparatus
US9798596B2 (en) 2014-02-27 2017-10-24 Commvault Systems, Inc. Automatic alert escalation for an information management system
JP6364827B2 (ja) * 2014-03-10 2018-08-01 日本電気株式会社 情報処理装置、及び、そのリソースアクセス方法、並びに、リソースアクセスプログラム
JP6442947B2 (ja) * 2014-09-19 2018-12-26 日本電気株式会社 情報処理装置、情報処理方法及びそのプログラム
CN105656973B (zh) * 2014-11-25 2018-11-13 中国科学院声学研究所 一种分布式节点组内任务调度方法及系统
US9727944B2 (en) 2015-06-22 2017-08-08 Apple Inc. GPU instruction storage
US20180032376A1 (en) * 2016-07-27 2018-02-01 Samsung Electronics Co .. Ltd. Apparatus and method for group-based scheduling in multi-core processor system
CN106445675B (zh) * 2016-10-20 2019-12-31 焦点科技股份有限公司 一种b2b平台分布式应用调度与资源分配方法
US10789240B2 (en) * 2017-11-06 2020-09-29 Google Llc Duplicative data detection
JP7042105B2 (ja) 2018-02-16 2022-03-25 日立Astemo株式会社 プログラム実行制御方法および車両制御装置
US10761942B2 (en) 2018-03-12 2020-09-01 Commvault Systems, Inc. Recovery point objective (RPO) driven backup scheduling in a data storage management system using an enhanced data agent
US11048656B2 (en) * 2018-03-31 2021-06-29 Micron Technology, Inc. Multi-threaded, self-scheduling reconfigurable computing fabric
US10754706B1 (en) 2018-04-16 2020-08-25 Microstrategy Incorporated Task scheduling for multiprocessor systems
CN108595366A (zh) * 2018-04-16 2018-09-28 哈尔滨工业大学(威海) 一种实时的容错的多处理器系统结构模型
US10860443B2 (en) 2018-12-10 2020-12-08 Commvault Systems, Inc. Evaluation and reporting of recovery readiness in a data storage management system
JP7105927B2 (ja) * 2019-01-30 2022-07-25 富士フイルム株式会社 医用画像解析装置、方法およびプログラム
CN112667369A (zh) * 2020-06-08 2021-04-16 宸芯科技有限公司 一种线程调度方法、装置、存储介质及电子设备
CN114237274B (zh) * 2021-09-28 2024-04-19 航天时代飞鸿技术有限公司 融合imu的旋翼无人机环境障碍物快速感知方法及系统
US20230135951A1 (en) * 2021-10-29 2023-05-04 Blackberry Limited Scheduling of threads for clusters of processors

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09179834A (ja) * 1995-12-25 1997-07-11 Hitachi Ltd 並列システムにおけるプロセスのスケジューリング方法
JPH09274608A (ja) * 1996-04-04 1997-10-21 Hitachi Ltd マルチプロセッサシステムにおけるプロセッサ間の負荷配分制御方法
JPH1063525A (ja) * 1996-08-23 1998-03-06 Canon Inc 情報処理装置、情報処理システム及びその制御方法
JP3557947B2 (ja) * 1999-05-24 2004-08-25 日本電気株式会社 複数のプロセッサで同時にスレッドの実行を開始させる方法及びその装置並びにコンピュータ可読記録媒体

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06187312A (ja) * 1992-12-18 1994-07-08 Omron Corp マルチcpuシステムにおける処理方法および装置
JP3259620B2 (ja) * 1995-12-21 2002-02-25 株式会社日立製作所 資源割り当て方法
GB2334116A (en) * 1998-02-04 1999-08-11 Ibm Scheduling and dispatching queued client requests within a server computer
US6601146B2 (en) * 1998-06-16 2003-07-29 International Business Machines Corporation Technique for efficiently transferring moderate amounts of data across address space boundary
US6314501B1 (en) * 1998-07-23 2001-11-06 Unisys Corporation Computer system and method for operating multiple operating systems in different partitions of the computer system and for allowing the different partitions to communicate with one another through shared memory
US6910210B1 (en) * 1998-11-24 2005-06-21 Microsoft Corp. System and method for terminating applications
US6526491B2 (en) * 2001-03-22 2003-02-25 Sony Corporation Entertainment Inc. Memory protection system and method for computer architecture for broadband networks
JP2003263331A (ja) * 2002-03-07 2003-09-19 Toshiba Corp マルチプロセッサシステム
US7360219B2 (en) * 2002-12-13 2008-04-15 Hewlett-Packard Development Company, L.P. Systems and methods for facilitating fair and efficient scheduling of processes among multiple resources in a computer system
US20040237087A1 (en) * 2003-05-08 2004-11-25 Nong Ye Job scheduling techniques to reduce the variance of waiting time
JP3892829B2 (ja) * 2003-06-27 2007-03-14 株式会社東芝 情報処理システムおよびメモリ管理方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09179834A (ja) * 1995-12-25 1997-07-11 Hitachi Ltd 並列システムにおけるプロセスのスケジューリング方法
JPH09274608A (ja) * 1996-04-04 1997-10-21 Hitachi Ltd マルチプロセッサシステムにおけるプロセッサ間の負荷配分制御方法
JPH1063525A (ja) * 1996-08-23 1998-03-06 Canon Inc 情報処理装置、情報処理システム及びその制御方法
JP3557947B2 (ja) * 1999-05-24 2004-08-25 日本電気株式会社 複数のプロセッサで同時にスレッドの実行を開始させる方法及びその装置並びにコンピュータ可読記録媒体

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP1837762A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011039666A (ja) * 2009-08-07 2011-02-24 Hitachi Ltd バリア同期方法及び計算機
US10553315B2 (en) * 2015-04-06 2020-02-04 Preventice Solutions, Inc. Adverse event prioritization and handling

Also Published As

Publication number Publication date
US8166482B2 (en) 2012-04-24
US7913257B2 (en) 2011-03-22
TW200632743A (en) 2006-09-16
JP2006155480A (ja) 2006-06-15
EP1837762A4 (en) 2014-09-17
EP1837762A1 (en) 2007-09-26
TWI410866B (zh) 2013-10-01
CN101069161A (zh) 2007-11-07
US20110119674A1 (en) 2011-05-19
US20060123420A1 (en) 2006-06-08
JP4606142B2 (ja) 2011-01-05
CN101069161B (zh) 2010-10-06
EP1837762B1 (en) 2017-03-01

Similar Documents

Publication Publication Date Title
JP4606142B2 (ja) スケジューリング方法、スケジューリング装置およびマルチプロセッサシステム
KR100628492B1 (ko) 실시간 동작 수행방법 및 시스템
KR100623217B1 (ko) 스케줄링 방법과 이 방법을 실행하기 위한 프로그램을 기록한 기록매체 및 실시간 처리시스템
US8572622B2 (en) Reducing queue synchronization of multiple work items in a system with high memory latency between processing nodes
CN103999051B (zh) 用于着色器核心中着色器资源分配的策略
EP2288989B1 (en) Local collections of tasks in a scheduler
JP5597196B2 (ja) プロセス内のスケジューラインスタンス
KR20050011689A (ko) 실시간 동작 수행방법 및 시스템
KR20050016170A (ko) 실시간 동작 수행방법 및 시스템
JP2016535337A (ja) ネットワーク環境における効率的なパケット処理モデルおよびパケット処理のための最適化されたバッファ利用をサポートするためのシステムおよび方法
KR102338849B1 (ko) 실시간 운영 체제에서 스택 메모리 관리를 제공하는 방법 및 시스템
US11347546B2 (en) Task scheduling method and device, and computer storage medium
JP2010044784A (ja) システムにおける要求のスケジューリング
WO2012052775A1 (en) Data processing systems
JP5820525B2 (ja) 仮想計算機のスケジュールシステム及びその方法
WO2022160628A1 (zh) 命令处理装置、方法、电子设备以及计算机可读存储介质
CN112925616A (zh) 任务分配方法、装置、存储介质及电子设备
Al-Bayati et al. Task placement and selection of data consistency mechanisms for real-time multicore applications
EP3066568B1 (en) System and method for supporting efficient packet processing model and optimized buffer utilization for packet processing in a network environment
JP5641128B2 (ja) マルチコアプロセッサシステム、マルチコアプロセッサシステムの制御方法、およびマルチコアプロセッサシステムの制御プログラム
US10503557B2 (en) Method of processing OpenCL kernel and computing device therefor
JPH11249917A (ja) 並列型計算機及びそのバッチ処理方法及び記録媒体
Moerman Open event machine: A multi-core run-time designed for performance
CN116450298A (zh) 一种gpu任务细粒度调度方法及相关装置
JP2009211604A (ja) 情報処理装置、情報処理方法、プログラム、及び、記憶媒体

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS KE KG KM KN KP KR KZ LC LK LR LS LT LU LV LY MA MD MG MK MN MW MX MZ NA NG NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SM SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LT LU LV MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 200580041278.2

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2005809655

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2005809655

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 2005809655

Country of ref document: EP