KR940009103B1 - Mechanism for process streaming on multiprocessor environment - Google Patents

Mechanism for process streaming on multiprocessor environment Download PDF

Info

Publication number
KR940009103B1
KR940009103B1 KR1019910024515A KR910024515A KR940009103B1 KR 940009103 B1 KR940009103 B1 KR 940009103B1 KR 1019910024515 A KR1019910024515 A KR 1019910024515A KR 910024515 A KR910024515 A KR 910024515A KR 940009103 B1 KR940009103 B1 KR 940009103B1
Authority
KR
South Korea
Prior art keywords
stream
scheduler
run
run queue
processes
Prior art date
Application number
KR1019910024515A
Other languages
Korean (ko)
Other versions
KR930014109A (en
Inventor
유우종
김주만
손덕주
이종광
Original Assignee
재단법인 한국전자통신연구소
경상현
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 재단법인 한국전자통신연구소, 경상현 filed Critical 재단법인 한국전자통신연구소
Priority to KR1019910024515A priority Critical patent/KR940009103B1/en
Publication of KR930014109A publication Critical patent/KR930014109A/en
Application granted granted Critical
Publication of KR940009103B1 publication Critical patent/KR940009103B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Multi Processors (AREA)

Abstract

The stream mechanism servicing the stream process scheduling, the run-que list on the multiprocessor environment and the stream input/output system calls for either parallelization or serialization mode has the first step executing read/write/getmsg/pntmsg/ioctl in parallel;the second step executing open/close/ioctl in serial which can not be paralleled; the third step making the entry point unite to manage the scheduler; the fourth step improving system performance using plural demon scheduler; the fifth step executing the ready-to-run process in the run-que with awaking up the stream scheduler; the final step reducing the run-que table managing time by classifying each process by priority.

Description

다중처리기 환경하에서의 스트림스 메카니즘Streaming Mechanism in a Multiprocessor Environment

제1도는 스트림 구조와 메세지 흐름도를 나타낸 프로우챠트.1 is a flowchart showing a stream structure and a message flow diagram.

제2도는 단일처리기 환경하의 스트림 스케쥴러의 흐름도를 나타낸 플로우챠트.2 is a flow chart showing a flow scheduler of a stream scheduler in a single processor environment.

제3도는 단일처리기 환경하의 스트림 런큐 구성도를 나타낸 도면.3 is a block diagram of a stream run queue in a single processor environment.

제4도는 다중처리기 환경하의 스트림 스케쥴러의 흐름도를 나타낸 플로우챠트.4 is a flowchart showing a flow scheduler of a stream scheduler in a multiprocessor environment.

제5도는 다중처리기 환경하의 스트림 런큐 구성도를 나타낸 도면.5 is a block diagram of a stream run queue in a multiprocessor environment.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

1 : 사용자 프로세스(들)1: user process (s)

2 : 쓰기와 읽기 전용 큐를 가지는 스트림 헤드2: stream head with write and read-only queues

3 : 쓰기와 읽기 전용 큐를 가지는 스트림 모듈(들)3: stream module (s) with write and read-only queues

4 : 쓰기와 읽기 전용 큐를 가지는 스트림 드라이버4: stream driver with write and read-only queues

5 : 다운(down)스트림 방향으로 이동중인 제어정보와 데이타 메세지5: Control information and data messages moving in the downstream direction

6 : 업(up)스트림 방향으로 이동중인 데이타 메세지6: Data message moving in the upstream direction

본 발명은 처리기가 2개이상인 다중처리기 환경하에서 운용되는 스트림스 메카니즘에 관한 것이다.The present invention relates to a stream mechanism that operates in a multiprocessor environment with two or more processors.

스트림스는 일반적이고 융통성 있는 설비를 제공할 뿐만 아니라 유닉스(UNIX) 시스템에서 통신 서비스를 개발하기 위한 구도들의 집합이다.Streams is not only a generic and flexible facility, but also a set of constructs for developing communication services on UNIX systems.

스트림스는 유닉스 커널과 유닉스 시스템 나머지 부분사이의 문자 입출력을 위한 표준 인터페이스를 제공한다. 스트림은 헤드, 드라이버, 그리고 선택적인 모듈(들)로 이루어지는데 모듈은 필요에 따라 없을 수도 있고 2개 이상 존재할 수도 있다.Streams provides a standard interface for character input and output between the Unix kernel and the rest of the Unix system. The stream consists of a head, a driver, and optional module (s), which may or may not exist as needed.

각각은 읽기 전용 큐로 이루어지며 큐에는 큐에 있는 메세지를 처리하기 위해 서비스(scrvice), put, open, 그리고 close 프로시듀어를 가질 수 있다. 서비스 프로시듀어는 스트림스 메카니즘의 흐름 제어(flow control) 기능을 하며 put프로시듀어는 자신의 모듈이나 드라이버 또는 이웃하는 큐에 메세지를 넣는 기능을 가지며, open프로시듀어는 모듈이나 드라이버를 여는 기능을 갖고, close는 닫는 기능을 갖는다.Each consists of a read-only queue, which can have services, put, open, and close procedures to process the queued messages. The service procedure functions as the flow control of the stream mechanism, and the put procedure has the ability to put a message in its own module, driver, or neighbor queue, and the open procedure opens the module or driver. Function has a function of close.

종래에는 스트림 스케쥴링 기능과 시스템 호출 기능이 단일 처리기하에서 운용되는 것이라 다중처리기 환경에서 처리기가 2개 이상 존재하는 장점을 이용하지 못하는 단점이 있어, 시스템 성능이 향상되지 못하는 단점이 존재하였다.In the related art, the stream scheduling function and the system call function are operated under a single processor, and thus there is a disadvantage in that two or more processors are not used in a multiprocessor environment, and thus, system performance is not improved.

스트림 기능을 이용하는 것들 중 대표적인 것으로는 OSI(Open Systems Interconnection)프로토콜을 이용하는 근거리 통신망(network)과 X.25 프로토콜을 이용하는 원거리 통신망, 그리고 단말기 구동기등이 있다.Typical examples of those using the stream function are local area networks using the Open Systems Interconnection (OSI) protocol, telecommunications networks using the X.25 protocol, and terminal drivers.

본 발명은 다양한 스트림스 기능중에서 스트림 프로세스 스케쥴링 방법과 런큐리스트를 다중처리기 환경하에 맞게 구현하는 방법과, 다중처리기 환경하에서의 스트림 입출력 관련 시스템 호출의 병렬화(parallelization)와 순서화(serislization)를 적절히 제공하여 전체적인 시스템 성능 향상을 제공함을 목적으로 한다.The present invention implements a stream process scheduling method and a run queue list in a multiprocessor environment among various stream functions, and provides parallelization and serislization of system calls related to stream input / output in a multiprocessor environment. It aims to provide system performance improvement.

상기 목적을 달성하기 위해서는 스트림 스케줄링과 런큐주조, 그리고 시스템 호출을 단일 처리기와는 다른 방법으로 운용되도록 구현하는 것이다.In order to achieve the above object, stream scheduling, run queue casting, and system call are implemented in a manner different from that of a single processor.

다중처리기 환경에 맞게 구현한 스케쥴링의 기본 골격은 수행 가능한 스트림 프로세스가 런큐에 존재하면 이를 될수 있으면 빨리 수행되도록 하는 것이다.The basic framework of scheduling for a multiprocessor environment is to ensure that runnable stream processes, if present, are run as soon as possible.

그리고 이를 위해 시스템이 부팅될때 스트림 스케쥴링을 위한 데몬 프로세스가 수행되도록 했으며, 스트림에서 사용하는 런큐도 하나가 아닌 2개를 두어, 하나는 긴급한 제어를 위해 사용되는 높은 우선순위 큐로 사용하고 다른 하나는 일반적인 데이타 처리를 위한 큐로 사용한다.To do this, the daemon process for scheduling the stream is executed when the system is booted, and two runqueues are used instead of the stream, one for the high priority queue used for urgent control, and the other for general. Used as a queue for data processing.

또한 시스템 호출의 경우는 스트림 헤드에서 드라이버 사이의 통로를 오고가는 제어 메세지 또는 일반적인 데이타 메세지를 독립적으로 수행 가능하면 병렬적으로 수행되도록 하고, 병렬적으로 수행될 경우에 문제가 발생할 가능성이 있는 것은 순서적으로 수행되도록 한다.In addition, in case of system call, control message or general data message from the stream head to and from the driver should be executed in parallel as independently as possible, and if it is executed in parallel, the problem is likely to occur. Make it work as a book.

이하 첨부된 도면을 이용하여 본 발명을 단일 처리하에서와 비교하면서 상세하게 설명하겠다.The present invention will now be described in detail with reference to the accompanying drawings, in comparison with a single treatment.

제1도는 기본적인 스트림 구조와 스트림이 open된후 데이타와 제어 메세지의 흐름을 간략하게 나타낸 것으로서, 최초의 사용자 프로세스(1)가 스트림을 open하면 스트림 헤드(2)와 드라이버(4)와 각각 쓰지 전용 큐와 일기 전용 큐를 갖고 양방향으로 연결된다.1 is a simplified diagram of the basic stream structure and the flow of data and control messages after the stream is opened. When the first user process 1 opens the stream, the stream head 2 and driver 4 write queues respectively. The diary has a dedicated queue and is connected in both directions.

여기서 메세지가 이동하는 방향에 따라 2가지로 분류되는데 하나는 쓰기 전용 방향으로 이동하는 다운 스트림(down stream)으로 사용자 프로세스가 write, putmsg, 또는 ioctl시스템 호출을 사용했을 경우에 제어 메세지(5)나 데이타 메세지(7)가 헤드에서 드라이버 방향으로 이동하는 것을 말한다.There are two types, depending on the direction in which the message travels, one that is downstream in the write-only direction, when the user process uses the write, putmsg, or ioctl system call. The data message 7 is moved from the head to the driver direction.

다른 하나는 일기 전용 방향으로 사용자의 read, getmsg시스템 호출시 데이타 메세지(6)의 이동이나 ioctl시스템 호출의 결과로 제어메세지(8)나 데이타 메세지(6)를 이동하는 것을 말한다.The other is to move the control message 8 or the data message 6 as a result of the movement of the data message 6 or the ioctl system call in the read-only getmsg system call.

사용자 프로세스는 경우에 따라 2개이상 존재하며, 스트림 헤드 역시 사용자가 open하는 드라이버에 따라 2개 이상 존재(2, 10)한다.There are two or more user processes in some cases, and two or more stream heads exist (2 and 10) depending on the driver the user opens.

스트림 헤드가 다른 경우(2, 10)에 각각에 부착되어 있는 하부 드라이버(4, 11)는 서로 다른 기능을 갖는 경우로 예를 들면 하나는 근거리 통신망 제어를 위한 드라이버일 수 있고 다른 하나는 단말기 제어를 위한 단말기 드라이버일 수가 있다.In the case where the stream heads are different (2, 10), the lower drivers 4, 11 attached to each have different functions, for example, one may be a driver for local area network control and the other is terminal control. It may be a terminal driver for.

이들 드라이버들은 시스템 또는 외부 하드웨어 장치를 제어하는 기능과 드라이버 상부에 있는 헤드(2)나 모듈(3)과의 인터페이스 기능을 한다.These drivers function to control the system or external hardware devices and to interface with the head 2 or module 3 on top of the driver.

상기와 같이 구조와 기능을 갖는 스트림이 종전에는 단일 처리기 환경을 위한 것이라 자료의 이동이나 서비스 기능, 그리고 프로시듀어가 수행되는 기능등이 다중처리기 환경에는 부적합하였다.As above, the stream having the structure and function is for a single processor environment, and thus the data movement, service function, and function for performing a procedure are not suitable for a multiprocessor environment.

따라서 다중처리 환경하에서는 모든 시스템 호출에 대한 서비스를 위해, 상기에서 언급한 바와 같이 수직적 병렬화와 수평적 병렬화 개념을 도입하여 될수 있으면 처리기가 2개 이상이라는 장점을 이용하여 전체 시스템 성능을 최대한 향상시키도록 하였다.Therefore, in the multiprocessing environment, as mentioned above, the concept of vertical parallelism and horizontal parallelism can be introduced for the service of all system calls. It was.

수직적인 병렬화를 위해 같은 큐내에 있는 서비스 프로시듀어와 put프로시듀어는 서로 다른 처리기에 할당되어 동시에 수행 가능하도록 했으며, 수평적인 병렬화를 위해 서로 다른 스트림에 있는 모든 프로시듀어는 동시에 수행가능하도록 했다.Service procedures and put procedures in the same queue for vertical parallelism are assigned to different handlers so that they can run concurrently. For horizontal parallelism, all procedures in different streams can run concurrently. did.

여기서 서로 다른 스트림이라함은 임의의 프로세스가 스트림 헤드가 다른 통로(19)를 통해서 서비스 받기를 원할 경우를 의미한다.Here, different streams mean when a process head wants the stream head to be serviced through another passage 19.

이렇게 하기 위해서 전역 변수와 자료구조 보호를 위해 스핀록과 세마포 개념을 도입하였으며 사용자에게는 투명성을 제공하였다.To do this, we introduced the concept of spinlocks and semaphores to protect global variables and data structures, providing transparency to the user.

이는 스트림 스케쥴러 및 런큐와 밀접한 관계가 있는 것으로 자세한 것은 스트림 스케쥴러와 런큐를 다중처리기 환경에 적합하도록 수정한 도면(도면 4와 도면 5)을 소개하는 부분에서 설명하겠다.This is closely related to the stream scheduler and the run queue, and the detailed description thereof will be described in the introduction of the drawings (FIGS. 4 and 5) in which the stream scheduler and the run queue are modified to be suitable for a multiprocessor environment.

그러나 여기서 병렬적으로 수행되어서는 아니되는 시스템 호출이 있는데 이것이 바로 open, close 그리고 일부 ioctl이다.But here are system calls that should not be executed in parallel: open, close and some ioctls.

open의 경우 같은 드라이버에 대해 2개의 스트림 헤드가 할당되지 않도록 병렬화 되어서는 아니되며, close경우 다른 프로세스가 미처리된 데이타를 가지고 있으면 open된 스트림을 close해서는 안된다.In the case of open, it should not be parallelized so that no two stream heads are allocated for the same driver. In the case of close, the open stream should not be closed if another process has raw data.

일부 ioctl의 경우 어느 프로세스가 스트림 헤드 바로 밑에 모듈을 삽입중이거나 삭제중일 경우 이웃하는 모듈로의 데이타 이동은 삽입이나 삭제가 완료될때까지 잠시 중단되어야 한다.For some ioctls, if a process is inserting or deleting a module directly under the stream head, data movement to the neighboring module must be paused until the insertion or deletion is complete.

이와같이 병렬화가 가능한 시스템 호출은 동시에 수행되도록 하고, 불가능한 것은 순서적으로 수행되도록 기존의 스트림 관련 시스템 호출을 수정하여 다중처리기 환경을 최대한 이용하도록 하였다.In this way, system calls that can be parallelized are executed at the same time, and existing stream-related system calls are modified so that the impossible can be performed in order to make the most of the multiprocessor environment.

제2도는 다중처리기 환경을 위해 수정한 도면 4와의 비교를 위해 단일처리기하에서 스트림 스케쥴러가 호출되는 흐름도를 나타낸 것이다.Figure 2 shows a flow diagram in which the stream scheduler is called under a single processor for comparison with Figure 4 modified for a multiprocessor environment.

단일 처리기환경하에서 스트림 스케쥴러가 호출되는 경우는 인터럽트가 발생하여 인터럽트 서비스를 완료한 후 인터럽스가 발생하기 전의 시점으로 변환하기 전(12)과 프로세스 관리에서 사용하는 런큐에 수행가능한 프로세스가 없는 경우(13), 그리고 시스템 호출처리중 지정된 검사지점(Check Point)(14)을 통해 이루어 진다.When the stream scheduler is called in a single processor environment, when there is no process that can be executed in the run queue used in process management (12) before the interrupt occurs and before the interrupt service is completed, before the interrupt occurs. 13) and through a designated Check Point 14 during system call processing.

이 경우에는 어느 한순간에 오직 하나의 스케쥴러만이 구동하게 된다.In this case, only one scheduler runs at any one time.

스케쥴러가 구동되는 경우도 인터럽트 서비스 완료후 반환하기 전에 호출되는 경우와 나머지 경우와 다르다. 인터럽트 서비스 완료후 반환되기 전(12)에는 조건이 만족되면(15) 직접 스케쥴러를 구동(16)하지만, 나머지 경우(13, 14)는 스케쥴러 구동을 위한 준비작업(17, 18, 19)을 거친다.The scheduler starts up differently than when called after returning from the interrupt service before returning. After the interrupt service is completed (12), if the condition is satisfied (15), the scheduler is directly driven (16), but in the other cases (13, 14), the scheduler (17, 18, 19) goes through preparation for the scheduler operation. .

여기서 준비 작업이라 함은 다른 프로세스에 의해 현재 스케줄러가 구동중인가를 검사함과 동시에 스케쥴되기를 기다리는 수행가능한 프로세스가 런큐에 존재하는가를 검사하는 것을 말한다.In this case, the preparatory work refers to checking whether there is an executable process in the run queue waiting to be scheduled at the same time as checking whether the current scheduler is running by another process.

만일 현재 스케쥴러가 구동중이거나 수행가능한 스트림 프로세스가 런큐에 존재하지 않으면 스케쥴러는 구동되지 않는다(20).If the current scheduler is running or there is no stream process available in the run queue, the scheduler is not driven (20).

따라서 단일처리기하에서의 스트림 스케쥴링을 위한 흐름은 스케쥴러가 구동되도록 들어오는 진입점(Entry Point)이 획일화 되어 있지 못하고, 2개 상의 스케쥴러가 동시에 수행되지 않아 다중처리기 시스템에는 적합하지 않는데, 다중처리기 시스템에서의 스케쥴링은 제4도에서 설명하겠다.Therefore, the flow for stream scheduling under a single processor is not suitable for a multiprocessor system because the entry point for the scheduler is not uniformized and two schedulers are not simultaneously executed. Scheduling will be described in FIG.

제3도는 단일처리기하에서 프로세스 관리에서 사용하는 런큐와는 독립적으로 운용되는 스트림 프로세스 관련 런큐 리스트를 나타낸 것이다.Figure 3 shows a stream process related run queue list that is operated independently of run queues used in process management under a single processor.

런큐는 수행 가능한 스트림 프로세스들을 단일방향 링크로 연결한 것으로, 링크 리스트의 머리(qhead)를 나타내는 변수(21)와 꼬리(qtail)를 나타내는 변수(22)를 가지고 있다. 런큐에 연결된 프로세스들은 머리쪽으로 갈수록 우선순위가 높으며(23), 꼬리쪽으로 갈수록 우선순위가 낮다(24).The run queue is a unidirectional link of runnable stream processes, and has a variable 21 representing a head of a link list and a variable 22 representing a tail. Processes connected to the run queue have a higher priority toward the head (23) and a lower priority toward the tail (24).

긴급한 결과를 원하는 제어 메세지는 머리쪽으로 삽입되고, 큐에 있는 프로세스를 수행시키기 위해 런큐에 있는 프로세스를 떼어갈때는 하상 앞쪽에서 떼어간다.Control messages for urgent results are inserted into the head, and when the process in the run queue is detached to run the queued process, it is removed from the front of the bottom.

따라서 우선순위가 높은 메세지를 런큐에 삽입하는 경우에는 앞쪽으로부터 삽입되기 때문에 별다른 문제가 없으나, 우선 순위가 낮은 메세지를 삽입할 경우에는 삽입되는 자신의 우선순위보다 높은 메세지를 검색하여 그 뒤에로 위치시켜야 하기 때문에 삽입하는 시간이 소요되는 경우가 존재한다. 이러한 문제는 다음에 나오는 다중처리기 환경하에서의 런큐 취급법으로 해결했는데, 이에 대한 것은 제5도에서 자세하게 언급하겠다.Therefore, when inserting a high-priority message into the run queue, it is not a problem because it is inserted from the front, but when inserting a low-priority message, a message higher than its priority to be inserted should be searched and placed after it. Therefore, there is a case where it takes time to insert. This problem was solved with the following run-queue handling in a multiprocessor environment, which will be discussed in detail in Figure 5.

제4도는 다중처리기하에서의 스트림 스케쥴링을 위한 흐름도이다.4 is a flow chart for stream scheduling under a multiprocessor.

여기서는 단일처리기하에서의 스케쥴링 방식인 제2도와 비교하면서 다중처리기를 위해 변경한 부분을 중심으로 설명하겠다. 다중처리를 위해 변경한 것중 특이한 것이 3가지 존재하는데 그 중의 하나는 스트림 스케쥴러 구동을 위한 진입점(Entry Point)이 단일화되었다는 것이다(25).This section focuses on the changes made for the multiprocessor as compared to FIG. 2, which is a scheduling method under a single processor. There are three distinctive changes for multiprocessing, one of which is that the entry point for driving the stream scheduler is unified (25).

이유는 단일처리기의 경우 처리가 하나밖에 없어 진입점이 2개라도 하나인 경우와 같은 상황이 발생하지만, 다중처리기의 경우 처리기가 2개 이상이라서 진입점이 단일화되어 있지 않은 경우 race condition이나 데드록이 발생할 가능성이 있기 때문이다.The reason is that in case of single processor, there is only one processing, so even if there are two entry points, the same situation occurs. In the case of multiprocessors, if there are two or more handlers, race conditions or deadlocks may occur. Because there is a possibility.

이와같이 진입점을 단일화 함으로서 스트림 스케쥴링 관리를 체계적으로 관리시킬 수 있고, 다음에 언급되는 타임어(timer) 구동을 용이하게 할 수 있다.As such, by unifying entry points, stream scheduling management can be managed systematically, and timer driving described below can be facilitated.

진입점(25)에서는 런큐에 수행되기를 기다리는 프로세스가 존재하는가를 검사하고, 스케쥴러 구동조건이 만족하는가를 검사하는 부분(26)에서는 스케쥴링을 위한 데몬 프로세스(Domon Process)가 모두 수행중인가를 검사한다. 물론 모든 데몬 프로세스가 수행중이면 스케쥴러를 구동시키지 않는다.The entry point 25 checks whether there is a process waiting to be executed in the run queue, and in the part 26 that checks whether the scheduler driving condition is satisfied, the entry point 25 checks whether all daemon processes for scheduling are running. . Of course, do not run the scheduler when all daemon processes are running.

둘째는 스트림 관련 프로세스 스케쥴링을 위한 스케쥴러가 하나가 아니라 처리기 갯수에 비례하여 2개 이상 존재시키는 것이다(27)(경험으로 스트림 바운드 잡(stream bound job)이 아닌 경우 2개가 이상적).The second is to have more than one scheduler for scheduling stream-related processes, not one, but proportional to the number of processors (27) (two ideally for non-stream bound jobs).

단일처리기의 경우 스케쥴러를 구동시키면(16)(제2도) 스케쥴러가 하나이고, 어느 프로세스가 현재 스케쥴러를 구동중이면 다른 프로세스가 스케쥴러를 구동시킬 수 없기 때문에 하나의 스케줄러만 구동되지만(16), 다중처리기의 경우 스케쥴러를 구동시키면 스트림 런큐 리스트에서 스케쥴되기를 기다리는 프로세스의 갯수에 따라 2개 이상의 스케쥴러가 구동될 수 있다(27).In the case of a single processor, if you run the scheduler (16) (Figure 2), there is only one scheduler, and if one process is currently running the scheduler, only one scheduler is running (16) because no other process can run the scheduler. In the case of the multiprocessor, two or more schedulers may be driven according to the number of processes waiting to be scheduled in the stream run queue list (27).

다중처리기에서의 이들 스케쥴러는 시스템 부팅시 데몬 프로세스로 존재하여 자신이 수행시킬 프로세스가 없으면 휴식상태(sleep)로 있다가, 타임어 또는 인터럽트, 시스템 호출등에 의해 깨어나(wakeup) 조건이 만족되면 스케쥴러를 구동시킨다.In the multiprocessor, these schedulers exist as daemon processes at system boot time. If there are no processes to run, they go to sleep, and then wake up the scheduler when a wakeup condition is met by a timer, interrupt, or system call. Drive it.

스트림 런큐에서 수행되기를 기다리는 프로세스를 수행시킬 때는 우선순위가 높은 프로세스를 먼저 수행시키는데 이것은 제5도에서 언급하겠다.When executing a process that waits to be executed in a stream run queue, a higher priority process is executed first, which will be mentioned in FIG.

이렇게 2개 이상의 스트림 스케쥴러를 구동시킴으로서 스트림 관련 프로세스의 수행시간과 전체 시스템 성능을 향상시킬 수 있다.Running two or more stream schedulers in this way can improve the execution time and overall system performance of the stream-related processes.

여기서 스케쥴러 구동시 동기화를 위해 사용한 것은 세마포(Semaphore)이다.Here, Semaphore is used for synchronization when the scheduler is running.

세째는 스케쥴링을 마친 데몬 프로세스(27)가 다시 휴식상태(sleep)로 들어갈때 일정한 시간만큼 시간을 세팅(setting)하여(28) 외부의 사건(인터럽트, 시스템 호출등)에 의해 자신이 깨어나지 않더라도 스스로 깨어나어(29) 스케쥴되기를 기다리는 프로세스가 런큐에서 대기하고 있나를 검사하여 대기하고 있으면 곧바로 수행시키는 것이다.Third, when the scheduled daemon process 27 enters sleep again (28), it sets a certain amount of time (28) so that even if it is not awakened by an external event (interrupt, system call, etc.) The process that awakens (29) waits to be scheduled and checks if it is waiting in the run queue and immediately executes it.

이렇게 타임어(Timer) 개념을 도입하면 스트림 관련 프로세스가 런큐에서 대기하는 시간을 많이 단축시킬 수 있어 시스템 성능향상의 효과를 얻을 수 있다.The introduction of the Timer concept can greatly reduce the time that stream-related processes wait on the run queue, resulting in improved system performance.

제5도는 다중처리기하에서의 스트림 관련 런큐 구조를 나타낸 것이다.5 shows a stream related run queue structure under a multiprocessor.

단일처리기의 경우 하나의 런큐로 우선순위가 높은 프로세스 리스트(21, 23)와 (제3도) 낮은 프로세스 리스트(22, 24)(제3도)를 관리하여 우선순위가 낮은 프로세스를 런큐에 삽입할 경우 시간을 많이 소비하는 단점이 존재하였다.In the case of a single processor, a single run queue manages high priority process lists 21 and 23 and low process lists 22 and 24 (FIG. 3) to insert low priority processes into the run queue. There was a disadvantage in that it consumes a lot of time.

그러나 제5도와 같이 우선순위가 높은 프로세스를 위한 큐(30)와 낮은 프로세스를 위한 큐(31)를 분리하여 런큐를 관리할 경우 위와 같은 단점은 제거된다.However, when managing the run queue by separating the queue 30 for the high priority process and the queue 31 for the low process as shown in FIG. 5, the above disadvantage is eliminated.

우선순위가 높은 프로세스(30)가 존재하고 스트림 스케쥴러가 구동되면 이것은 즉시 수행된다. 우선순위가 낮은 프로세스(31)는 우선순위가 높은 프로세스가 없을 경우에 수행된다. 대기중인 프로세스를 런큐에서 떼어낼때는 항상 앞에서부터 떼어낸다.If there is a high priority process 30 and the stream scheduler is running this is done immediately. The low priority process 31 is performed when no high priority process exists. Whenever you remove a waiting process from the run queue, you always detach it from the front.

우선순위가 낮은 프로세스가 삽입될 경우에 낮은 순위를 위한 런큐 리스트를 별도로 관리함으로 제3도에서와 같은 검색작업을 필요하지 않게 되어 시간이 단축된다. 또한 큐 관리를 2개로 함으로써 스케쥴러가 2개 이상 존재하는 장점을 극대화할 수 있다.When a low priority process is inserted, the run queue list for the low priority is managed separately, thereby eliminating the need for searching as in FIG. You can also maximize the advantage of having more than one scheduler by setting two queues.

이와같이 본 발명은 첫째, 다양한 스트림스 기능중에서 스트림 프로세스 스케쥴링 방법과, 둘째 런큐 리스트를 다중처리기 환경하에 맞게 구현하는 방법과, 셋째, 다중처리기 환경하에서의 스트림 입출력 관련 시스템 호출의 병렬화와 순서화를 적절히 제공하여 전체적인 시스템성능을 향상시키는 효과가 있다.As described above, the present invention provides a method for scheduling stream processes among various stream functions, a method for implementing a run queue list under a multiprocessor environment, and a third method for parallelizing and ordering stream I / O related system calls under a multiprocessor environment. It has the effect of improving the overall system performance.

Claims (1)

수직적인 병렬화와 수평적인 병렬화 개념을 도입하여 read, write, getmsg, pntmsg 그리고 ioctl 일부 시스템 호출을 병렬적으로 수행시키는 단계 1과, 병렬화개념을 도입할 수 없는 open, close 그리고 ioctl의 일부 시스템 호출을 순서적으로 수행시키도록 하는 단계 2와, 스케쥴러 구동을 위한 진입점(entry point)을 하나로 하여 스케쥴러 관리를 체계적으로 하는 단계 3과, 스트림 관련 스케쥴러를 하나가 아닌 처리기 갯수에 비례하여 2개이상 시스템 부팅시 데몬 프로세스로 두어 스트림 관련 프로세스의 수행시간을 단축시키고 전체 시스템 성능을 향상시키는 단계 4와, 스트림 스케쥴러가 외부의 사건(인터럽트, 시스템 호출들)에 의해서만 깨어나는 것이 아니라 자체적으로 타이어를 두어 일정한 시간경과 후에 스스로 깨어나 스트림 런큐에 수행되기를 기다리는 프로세스가 있으면 수행시키는 단계 5와, 스트림 프로세스를 런큐에 연결할때 우선순위가 높은 것과 낮은 것을 구별하여 서로 독립적으로 관리함으로써 프로세스를 런큐에 삽입하거나 삭제하는 시간을 단축시키는 단계 6으로 수행시킴을 특징으로 하는 다중 처리기 환경하에서의 스트림스 메카니즘.Introduces the concept of vertical parallelism and horizontal parallelism to perform some parallel read, write, getmsg, pntmsg and ioctl system calls and to perform some system calls in open, close and ioctl that cannot introduce parallelism. Step 2 to perform the sequence, step 3 to systematically manage the scheduler by having one entry point for running the scheduler, and two or more systems in proportion to the number of processors rather than one schedule related to the stream Step 4 to reduce the execution time of stream-related processes and improve overall system performance by placing them as daemon processes at boot-up, and the stream scheduler does not wake up solely by external events (interrupts, system calls), but instead puts tires on its own A program that wakes itself up after timeout and waits for it to run on a stream run queue. Step 5 to perform the process, and step 6 to shorten the time to insert or delete the process into the run queue by managing the stream processes to the run queue independently of each other by distinguishing between the high priority and the low priority. Streaming mechanism in a multiprocessor environment.
KR1019910024515A 1991-12-26 1991-12-26 Mechanism for process streaming on multiprocessor environment KR940009103B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019910024515A KR940009103B1 (en) 1991-12-26 1991-12-26 Mechanism for process streaming on multiprocessor environment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019910024515A KR940009103B1 (en) 1991-12-26 1991-12-26 Mechanism for process streaming on multiprocessor environment

Publications (2)

Publication Number Publication Date
KR930014109A KR930014109A (en) 1993-07-22
KR940009103B1 true KR940009103B1 (en) 1994-09-29

Family

ID=19326136

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019910024515A KR940009103B1 (en) 1991-12-26 1991-12-26 Mechanism for process streaming on multiprocessor environment

Country Status (1)

Country Link
KR (1) KR940009103B1 (en)

Also Published As

Publication number Publication date
KR930014109A (en) 1993-07-22

Similar Documents

Publication Publication Date Title
US5257372A (en) Methods for efficient distribution of parallel tasks to slave processes in a multiprocessing system
US5390329A (en) Responding to service requests using minimal system-side context in a multiprocessor environment
Lampson A scheduling philosophy for multiprocessing systems
US5452452A (en) System having integrated dispatcher for self scheduling processors to execute multiple types of processes
US6505229B1 (en) Method for allowing multiple processing threads and tasks to execute on one or more processor units for embedded real-time processor systems
US5448732A (en) Multiprocessor system and process synchronization method therefor
US20060010446A1 (en) Method and system for concurrent execution of multiple kernels
US5991790A (en) Generation and delivery of signals in a two-level, multithreaded system
US7676809B2 (en) System, apparatus and method of enhancing priority boosting of scheduled threads
US6938246B2 (en) Diagnostic tool for a portable thread environment
US20050066149A1 (en) Method and system for multithreaded processing using errands
JPH02300939A (en) Semaphore operation system
KR940009103B1 (en) Mechanism for process streaming on multiprocessor environment
CN116225741A (en) Heterogeneous multi-core inter-core communication scheduling method
WO2019203573A1 (en) Method and apparatus for managing kernel services in multi-core system
Schon et al. On interrupt-transparent synchronization in an embedded object-oriented operating system
EP0942366A2 (en) Event-driven and cyclic context controller and processor employing the same
JP2693916B2 (en) Task scheduling method
Brandenburg et al. Accounting for interrupts in multiprocessor real-time systems
JPH05108380A (en) Data processing system
JP2947195B2 (en) Interrupt mask control method
Nemitz Efficient Synchronization for Real-Time Systems with Nested Resource Access
Burgess et al. BED: a multithreaded kernel for embedded systems
Lopez et al. Prioritized Asynchronous Calls for Parallel Processing on Responsive MultiThreaded Processor
WO1992003783A1 (en) Method of implementing kernel functions

Legal Events

Date Code Title Description
A201 Request for examination
G160 Decision to publish patent application
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 19980616

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee