KR0164139B1 - Method of nanagement of ready queue for enhancing o.s real-time - Google Patents

Method of nanagement of ready queue for enhancing o.s real-time Download PDF

Info

Publication number
KR0164139B1
KR0164139B1 KR1019950007766A KR19950007766A KR0164139B1 KR 0164139 B1 KR0164139 B1 KR 0164139B1 KR 1019950007766 A KR1019950007766 A KR 1019950007766A KR 19950007766 A KR19950007766 A KR 19950007766A KR 0164139 B1 KR0164139 B1 KR 0164139B1
Authority
KR
South Korea
Prior art keywords
ready
queue
map
operating system
task
Prior art date
Application number
KR1019950007766A
Other languages
Korean (ko)
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 KR1019950007766A priority Critical patent/KR0164139B1/en
Application granted granted Critical
Publication of KR0164139B1 publication Critical patent/KR0164139B1/en

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

본 발명은 운영체제의 실시간성을 높이기 위한 레디큐(Ready Queue)관리 방법에 관한 것으로, 특히, 우선순위 기반의 스케줄링 방식(Priority-Based Scheduling)을 가지는 운영제체의 레디큐 관리에 적용 가능한 방법에 관한 것이다. 따라서 운영체제의 성능에 큰 영향을 미치는 컨텍스트 스위칭(Context Switching) 시간을 보다 효율적이고 고정시간 이내에 수행되도록 하여, 운영체제의 스케줄러가 가장 높은 우선 순위를 갖는 태스크를 찾는 연산을 연결비용 ◎(1)에 가능케 함으로써 운영체제의 실시간 성을 높여 운영체제가 각종 자원의 관리에 적용 가능함으로 매우 유용하다.The present invention relates to a method of managing a ready queue for improving real-time of an operating system, and more particularly, to a method applicable to a ready queue management of an operating system having a priority-based scheduling scheme. will be. Therefore, the context switching time, which greatly affects the performance of the operating system, is performed more efficiently and within a fixed time, so that the operation scheduler of the operating system finds the task having the highest priority in connection cost ◎ (1). This is very useful because the operating system can be applied to the management of various resources by improving the real-time performance of the operating system.

Description

운영체제의 실시간성을 높이기 위한 레디큐(Ready Queue)관리 방법Ready Queue Management Method to Enhance Real Time of Operating System

제1도는 일반적인 레디큐(Ready Queue)관리 방법의 유형을 나타내는 계통도.1 is a schematic diagram showing the type of a general ready queue management method.

(a)는 우선순위 p를 가진 태스크가 p번째 레디큐 요소에 연결되어 있는 유형을 나타내는 계통도 이며,(a) is a schematic diagram showing the type of the task with priority p connected to the pth ready queue element,

(b)는 하나의 레디큐 요소에 우선순위 순서로 태스크가 연결되어 있는 유형을 나타내는 계통도 이며,(b) is a schematic diagram showing the types of tasks connected in order of priority to a single queue element.

제2도는 본 발명 운영체제의 실시간성을 높이기 위한 레디큐(Ready Queue)관리 방법을 나타내는 흐름도로,2 is a flowchart illustrating a method of managing a ready queue for improving real time of an operating system of the present invention.

(a)는 삽입의 경우를 나타내는 흐름도 이며,(a) is a flowchart showing the case of insertion,

(b)는 찾기의 경우를 나타내는 흐름도 이며,(b) is a flowchart showing a case of finding,

(c)는 삭제의 경우를 나타내는 흐름도 이다.(c) is a flowchart showing the case of deletion.

본 발명은 운영체제의 실시간성을 높이기 위한 레디큐(Ready Queue)관리 방법에 관한 것으로, 특히, 우선순위 기반의 시케줄링 방식(Priority-Based Scheduling)을 가지는 운영체제의 레디큐 관리에 적용 가능한 방법이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for managing a ready queue for improving real-time performance of an operating system. In particular, the present invention is a method applicable to a ready queue management of an operating system having a priority-based scheduling scheme.

따라서 운영체제의 성능에 큰 영향을 미치는 컨택스트 스위칭(Context Switching) 시간을 보다 효율적이고 고정시간 이내에 수행되도록 하여주며, 운영체제가 관리하는 각종 자원의 관리에 적용 가능함으로 매우 유용하다.Therefore, Context Switching time, which greatly affects the performance of the operating system, can be performed more efficiently and within a fixed time, and it is very useful because it can be applied to management of various resources managed by the operating system.

공지된 바와같이 운영체제에 있어서, 스케줄러(Scheduler)는 프로세서(Processor)들의 이용 가능한 시간을 각 처리과정에서 분할하는 작용을 하는 것으로써, 실행될 작업에 대한 프로세스(Process)를 만들어 준비(Ready)상태로 만들어 주고, 한 프로세서가 시스템을 독점하는 것을 방지하기 위해서 한 프로세서의 할당시간을 배정하는 역할을 한다.As is known, in the operating system, a scheduler divides the available time of processors in each process, thereby creating a process for a task to be executed and preparing the ready state. It allocates one processor's allocation time to prevent one processor from monopolizing the system.

또한 큐(Queue)는 프로세서에 의하여 처리되기를 기다리고 있는 일들의 집단이나 대기행렬을 뜻하는 것으로, 일반적으로 주기억장치 속에 들어 있으며, 번지지정에 의하여 서로 연결된다.A queue is also a group or queue of things waiting to be processed by the processor. It is usually contained in main memory and connected to each other by address assignment.

한편 우선순위 기반의 스케즐링 방식을 가지는 기존의 운영체제 레디큐 관리 방식은 크게 두가지로 나누어 진다.On the other hand, the existing operating system ready queue management method having priority-based scheduling method is largely divided into two types.

이하 도면을 참조하여 설명하면, 일반적인 레디큐(Ready Queue)관리 방법의 유형을 나타내는 계통도는 제1도와 같이 도시할 수 있는바,Referring to the drawings, a schematic diagram showing the type of a general ready queue management method can be shown as shown in FIG.

(a)도와 같은 방식의 경우, 우선순위가 낮은 0부터 우선순위가 높은 (L-1)까지 L개의 레디큐에 각각의 우선순위 번지(큐요소)에 대응하는 태스크가 정보를 입출력할 수 있도록 유기적으로 연결되어 구성된다.In the case of (a), the task corresponding to each priority address (queue element) can input and output information to L ready queues from low priority 0 to high priority (L-1). It is organically connected.

우선순위 p를 가진 태스크(task)는 항상 p번째 레디큐 요소에 연결된다. 각각의 큐 요소에 연결되는 태스크들은 선입력선출력(FIFO : First In First Out)방식으로 관리됨으로 연결 비용은 ◎(1)이다. 이때 현재 실행되고 있는 태스크가 어떤 사건에 의해 레디큐에서 제거될 때, L-1번째 큐 요소부터 시작하여 최초의 태스크가 연결되어 있는 큐 요소를 찾아내어야 한다. 즉, 최악의 영우 가장 높은 우선순위를 갖는 태스크를 발견하기 위해서는 ◎(L)의 비용이 소모된다.A task with priority p is always connected to the pth ready queue element. Since the tasks connected to each queue element are managed in First In First Out (FIFO), the connection cost is (1). When a task that is currently running is removed from a ready queue by an event, it must find the queue element to which the first task is connected, starting with the L-1th queue element. That is, the cost of ((L) is consumed to find the task having the highest priority.

(b)도와 같은 방식은 (a)도의 방식과는 달리 하나의 큐 요소를 관리 하는데, 이 큐에 연결된 태스크들은 우선순위 순서로 연결되기 때문에 가장 우선순위가 높은 태스크는 큐의 가장 앞쪽에 있어 ◎(1)의 비용으로 이 태스크를 발견할 수 있다. 그러나 연결연산의 경우 정렬연산이 필요하기 때문에 현재 시스템에 살아있는 총 태스크의 수가 N개인 경우 최악의 경우에는 ◎(N)의 연결 비용이 필요한 단점이 있다.Unlike the method of (a), (b) manages a queue element differently from the method of (a). Since the tasks connected to this queue are connected in order of priority, the highest priority task is located at the front of the queue. You can find this task at the cost of (1). However, in the case of concatenation, since the sort operation is necessary, if the total number of tasks in the current system is N, in the worst case, there is a disadvantage that a consolidation cost of (N) is required.

상기와 같은 특성을 갖는 각각의 태스크(task)는 '◎'로 표현되었으며, 각각의 태스크 우선순위(Priority)는 해당 ◎의 상단에 표시하였다.Each task having the above characteristics is represented by '◎', and each task priority is indicated at the top of the corresponding?.

또한 (b)에서와 같이 태스크의 우선순위 관계는 p1≥p2≥p3의 관계를 갖음을 의미한다.In addition, as shown in (b), the priority relationship of tasks means that p1≥p2≥p3.

본 발명은 상기와 같은 종래의 문제점을 해결하기 위해 레디큐에 태스크를 연결하는 비용과 가장 순위가 높은 태스크를 찾는 비용 모두를 ◎(1)의 비용으로 구현 가능케 함을 특징으로 한다.The present invention is characterized in that it is possible to implement both the cost of connecting the task to the ready-to-ready and the cost of finding the highest priority task at the cost of (1) in order to solve the conventional problems as described above.

즉, 본 발명의 동작 순서에 필수적인 함수를 sylos_log2(x)라 하고, 이 함수 sylos_log2(x)를 다음과 같이 정의한다.That is, a function essential to the operation sequence of the present invention is called sylos_log2 (x), and this function sylos_log2 (x) is defined as follows.

음이 아닌 32비트 정수 x에 대해,For non-negative 32-bit integer x,

이 정의에서 (int)는 프로그래밍 언어의 캐스팅(casting)역할을 한다.In this definition, (int) is the casting of the programming language.

이 함수의 소프트웨어적인 구현은 아래와 같다.A software implementation of this function is shown below.

배열 log2_tbl [ ]은 0이 아닌 32비트 정수에 대한 함수 sylos_log의 계산을 빠르게 수행하기 위하여 0부터 255까지의 256개의 정수에 대한 sylos_log2값을 미리 계산하여 저장한 것이다. 즉, 정수 x가 0부터 255까지의 정수 중 하나라면 log2_tbl [x]의 값은 sylos_log2(x)와 같게 되는 것이다.The array log2_tbl [] is a pre-calculated and stored sylos_log2 value for 256 integers from 0 to 255 for fast calculation of the function sylos_log for non-zero 32-bit integers. In other words, if the integer x is one of 0 to 255, the value of log2_tbl [x] is equal to sylos_log2 (x).

예를들어, 설명하면 32비트 정수 x는For example, the 32-bit integer x

x=A*224+B*216+C*28+D(0≤A,B,C,D256)로 표현 가능하다.It can be expressed as x = A * 224 + B * 2 16 + C * 2 8 + D (0≤A, B, C, D256).

즉, 256진수로 (ABCD)256이 된다. 이때 sylos_log2(x)는 0이 아닌 최상위비트(Most Significant non-zero bit)의 위치를 찾는 연산이기 때문에 만약 A가 0이 아니면In other words, it is (ABCD) 256 in 256 digits. In this case, sylos_log2 (x) is an operation that finds the position of the most significant non-zero bit, so if A is not 0

상기와 같은 형태로 먼저, A, B, C, D중 가장 중요도가 높은 0이 아닌 수를 찾는다.In the form as described above, first, find the non-zero highest number among A, B, C, and D.

즉, 가장 중요도가 높은 0이 아닌 수가 A이면,That is, if the non-zero most significant number is A,

그리고, A, B, C, D는 8비트이기 때문에 0부터 256까지 sylos_log2의 값에 대해서는 미리 계산하여 데이터값 표(테이블)를 만들어 참조한다.Since A, B, C, and D are 8 bits, the values of sylos_log2 from 0 to 256 are calculated in advance and a data value table (table) is created and referenced.

32비트중 최상위비트(MSB)의 위치를 31, 최하위비트(LSB)의 위치를 0이라 정했을 때, 32비트 양의 정수 x에 대해 sylos_log2(x)는 32비트 중 1의 값을 가지는 최상위 비트의 위치를 계산하여 준다.When the position of the most significant bit (MSB) of the 32 bits is 31 and the position of the least significant bit (LSB) is 0, for the 32-bit positive integer x, sylos_log2 (x) is the most significant bit having the value of 1 out of 32 bits. Calculate the location.

예를들면,For example,

sylos_log2(Oxdeadbeef)=31. (단, 여기서 deadbeef는 각각 16진수(Hexa code)이다)가 되고, 이때 sylos_log2는 음이 아닌 32비트 정수에만 적용가능하다.sylos_log2 (Oxdeadbeef) = 31. (Where deadbeef is a hexadecimal number each), where sylos_log2 is only applicable to non-negative 32-bit integers.

이 제약을 추가적인 32비트 메타 비트 맵을 사용하여 1024비트까지 확장가능하다. 동일한 확장 방법으로 그 이상의 비트 수도 지원이 가능하지만 실제 응용에 있어 1024는 충분한 숫자이므로 본 발명에서는 최대 비트 수를 1024로 제한하여 생각한다. 1024비트와 메타 비트맵을 다음과 같이 C언어로 구성하여,This restriction can be extended to 1024 bits using an additional 32-bit metabit map. The same extension method can support more bits, but in actual applications, since 1024 is a sufficient number, the present invention contemplates limiting the maximum number of bits to 1024. 1024 bits and meta bitmap in C language,

1024비트 중 p번째 비트는 bitmap[(int)(p/32]의 p%32(p를 32로 나눈 나머지)번째 비트에 해당한다. 메타 비트 맵의 x번째 비트가 0이면 bitmap[x]가 0임을 나타내고 1이면 bitmap[x]가 양의 정수임을 나타낸다. 이와 같은 가정아래, 적어도 1개 이상의 0이 아닌 비트가 있으면 다음과 같은 계산을 통해 1024비트 중 값이 1인 최상위 비트의 위치 p를 구할수 있다.The pth bit of the 1024 bits corresponds to the p% 32 bit (the remainder of p divided by 32) of bitmap [(int) (p / 32) .If the xth bit of the metabitmap is 0, bitmap [x] is 0 indicates that bitmap [x] is a positive integer Under this assumption, if there is at least one non-zero bit, the following calculation calculates the position p of the most significant bit of 1024 bits: You can get it.

태스크의 우선순위가 0부터 L-1(L은 0보다 크고 1024보다는 길거나 작은 순위)의 값을 가질 때, ◎(1) 레디큐 관리는 우선 제1도의(a)와 동일한 형태로 관련 데이큐를 구성하고 추가적으로 다음과 같은 데이터 구조를 설정한다.When the priority of a task has a value from 0 to L-1 (L is higher than 0 and longer or smaller than 1024), (1) The ready queue management is first performed in the same form as in (a) of FIG. Configure and additionally set the following data structure:

그리고 L개의 비트중 p번째 비트는 p번째 큐요소가 비어 있으면 0, 1개 이상의 태스크가 연결되어 있으면 1의 값을 가진다. meta_ready_map의 x번째 비트는 ready-map[x]가 0이면 0, 0이 아니면 1의 값을 가진다. 그리고 레디큐에 새로 태스크가 연결되거나 연결되어 있던 태스크가 큐로부터 제거될 때 위의 조건은 계속 유지가 되도록 하여야 한다.The pth bit of the L bits has a value of 0 if the pth cue element is empty and 1 if one or more tasks are connected. The xth bit of meta_ready_map has the value 0 if ready-map [x] is 0, and 1 if it is not 0. And when the new task is connected to the ready queue or the task which is connected is removed from the queue, the above condition must be maintained.

상기와 같은 상황에서 다음과 같은 계산을 통해 가장 높은 우선순위를 가지고 있는 태스크가 연결되어 있는 큐요소를 찾아 낼수 있다.In the above situation, the queue element to which the task with the highest priority is connected can be found through the following calculation.

즉, p번째 큐 요소의 첫 번째 태스크가 다음 실행될 때 태스크로 선택이 된다. 우선순위 방식의 스케줄링 방식을 가지는 운영체제들은 가장 낮은 우선순위를 가지는 그리고, 단순히 무한 루우프를 도는 태스크를 생성시켜 준비 상태로 만들어 놓기 때문에 sylos_log2함수가 -1을 내놓을 가능성은 없다.In other words, the first task of the pth queue element is selected as the next task. Operating systems with priority scheduling schemes have the lowest priority, and simply create tasks that round infinite loops and make them ready, so sylos_log2 is unlikely to yield -1.

상기와 같은 sylos_log2함수를 사용한 레디큐 관리에는 삽입(insertion), 최우선순위찾기(top priority task finding), 삭제(deletion)의 3가지 연산이 포함되어 있는데, 이를 흐름도를 이용하여 설명한다.Reddy queue management using the sylos_log2 function includes three operations: insertion, top priority task finding, and deletion, which will be described using a flowchart.

제2도는 본 발명 운영체제의 실시간성을 높이기 위한 레디큐(Ready Queue)관리 방법을 나타내는 흐름도로, (a)도는 삽입(INSERTION)의 경우를 나타내는 흐름도이다.FIG. 2 is a flowchart illustrating a method of managing a ready queue for improving real time of an operating system of the present invention, and FIG. 2A is a flowchart illustrating a case of insertion.

우선순위가 p인 태스크를 레디큐에 연결하려고 하면 (단계 S1), 이때 p번째 레디큐가 비어있는지의 여부를 판단하여(단계 S2), 비어있지 않으면 해당 레디큐를 p번째 레디큐에 FIFO순으로 연결하며(단계 S5), 비어 있으면 p를 32로 나눈 몫을 x로 하고 p를 32로 나눈 나머지를 y로 하여(단계 S3), 각각 meta_ready_map에 meta_ready_map(0×1Lx)를 계산하여 치환하고, ready_map[x]에 ready_map[x];(0x1Ly)를 계산하여 치환하는 단계(단계 S4)를 순차적으로 수행하고 마지막으로 단계 S5를 수행한다.(상기에서 연산자 는 C언어 프로그래밍에서 사용하는 연산자 와 동일한 의미를 지니는 것으로 0×1x의 수학적 의미는 2x와 같으며, 연산자는 C언어 프로그래밍에서 사용하는 연산자와 동일한 의미를 지닌 것으로 ready_map[x](0×1Ly)는 ready_map[x]와 (0×1Ly)를 오아(OR)연산을 수행하는 것을 의미한다 즉, ''는 '로지칼 오아'를 의미한다.)If you try to attach a task with priority p to the ready queue (step S1), then it is determined whether the pth ready queue is empty (step S2), and if it is not empty, the ready queue is FIFO ordered to the p ready queue. (Step S5), if empty, the quotient of p divided by 32 is x and the remainder of p divided by 32 is y (step S3), meta_ready_map to meta_ready_map, respectively. Compute and replace (0 × 1Lx), and perform step (step S4) of calculating and replacing ready_map [x]; (0x1Ly) in ready_map [x] sequentially and finally performing step S5. The operator has the same meaning as the operator used in C language programming. The mathematical meaning of 0 × 1x is the same as 2 x . Is the operator used in C language programming Has the same meaning as ready_map [x] (0 × 1Ly) means to perform OR operation on ready_map [x] and (0 × 1Ly). 'Means' logical ora.)

(b)도는 찾기(FINDING)의 경우를 나타내는 흐름도 이다.(b) is a flowchart showing the case of finding.

sylos_log2(meta_ready_map)를 x라 하고(단계 F1), sylos_log2(ready_map[x])를 y라 하여(단계 F2), 32*x+y에 의해 찾고자 하는 가장 높은 우선순위 p를 구하여(단계F3), p번째 레디큐의 첫 번째 태스크에 CPU를 할당한다(단계 F4).Let sylos_log2 (meta_ready_map) be x (step F1) and sylos_log2 (ready_map [x]) be y (step F2) to obtain the highest priority p we want to find by 32 * x + y (step F3), The CPU is allocated to the first task of the pth red queue (step F4).

(c)도는 삭제(DELETION)의 경우를 나타내는 흐름도 이다.(c) is a flowchart which shows the case of DELETION.

레디큐에서 제거하고자 태스크의 우선순위를 p라 하고(단계 D1), 해당 태스크를 레디큐에서 제거한다(단계 D2), 이때 p번째 레디큐가 비어있는지의 여부를 판단하여(단계 D3), 비어있지 않으면 삭제가 완료된 것으로 간주하여 동작을 끝내고, 비어있으면 p를 32로 나눈 몫을 x라 놓고, p를 32로 나눈 나머지를 y라 놓은 후(단계 D4), ready_map[x]의 y번째 비트를 0으로 만들고(단계 D5), 다시 ready_map[x]가 0인가를 판단하여(단계 D6), 0이 아니면 동작을 끝내고, 0이면 meta_ready_map의 x번째 비트를 0으로 만드는 단계(단계 D7)를 순차적으로 수행한다.The priority of the task to be removed from the ready queue is called p (step D1), and the task is removed from the ready queue (step D2). At this time, it is determined whether the pth ready queue is empty (step D3). Otherwise, the operation is considered complete and the end of the operation. If empty, the quotient of p divided by 32 is x, the remainder of p divided by 32 is set to y (step D4), and the yth bit of ready_map [x] is set. Make it 0 (step D5), again determine if ready_map [x] is 0 (step D6), terminate the operation if it is not 0, and set the x-th bit of meta_ready_map to 0 (step D7) if it is 0 Perform.

즉, 상기와 같은 순서에 의해 sylos_log2함수와 메타 비트 맵을 사용하여 운영체제의 성능에 큰 영향을 미치는 레디큐의 관리 비용을 ◎(1)에 가능하게 한다.That is, by using the sylos_log2 function and the metabit map in the above-described order, it is possible to manage the cost of the ready queue which has a great influence on the performance of the operating system.

한편, 운영제체는 시스템이 보유하고 있는 각종 하드웨어적인 또는 소프트웨어적인 자원들을 관리하여야 한다. 따라서 본 발명에서 설명된 알고리즘을 이용하면 자원관리 역시 적은 메모리에 빠른 속도로 가능하다.On the other hand, the operating system must manage various hardware or software resources held by the system. Therefore, using the algorithm described in the present invention, resource management is also possible at a low memory speed.

동일한 종류인 L개(논의의 편의를 위해 L≤1024로 가정한다.)의 자원이 있을 때, 각 자원에 0부터 L-1가지의 숫자를 부여하고 할당된 자원의 값은 0인 비트로 표시하고, 할당하지 않은 자원은 값이 1인 비트로 표시한다. 그리고, 메타비트 맵을 레디큐와 관련된 메타 비트 맵과 동일한 방식으로 각 비트의 값을 정한다.When there are L resources of the same type (assuming L≤1024 for the sake of discussion), assign 0 to L-1 numbers to each resource and indicate the value of the allocated resource as a bit with 0. Unallocated resources are marked with a bit of value 1. The metabit map is then set to the value of each bit in the same manner as the metabit map associated with the ready queue.

메타 비트 맵의 sylos_log2값이 -1이면 여유 자원이 없음을 의미하고, 0이상이면 레디큐의 경우와 동일한 방식을 사용하여 ◎(1)의 비용으로 여유 자원을 찾을 수 있다. 이 방식은 기존의 연결 리스트를 사용한 자원 관리 방식에 비해 메모리 효율이 좋다는 장점을 가지고 있다.If the sylos_log2 value of the meta bitmap is -1, it means that there is no free resource. If the value of sylos_log2 is 0, the free resource can be found at the cost of (1) by using the same method as in the case of ready queue. This method has the advantage of better memory efficiency than the resource management method using the existing linked list.

상술한 바와같이 본 발명은 운영체제의 스케줄러가 가장 높은 우선순위를 갖는 태스크를 찾는 연산을 연결비용 ◎(1)에 가능케 함으로써 운영체제의 실시간성을 높여 준다.As described above, the present invention improves the real-time performance of the operating system by enabling the scheduler of the operating system to find the task having the highest priority at the connection cost (1).

Claims (4)

운영체제의 실시간성을 높이기 위한 레디큐(Ready Queue)관리 방법에 있어서, 레디큐(Ready Queue)에 태스크를 연결(삽입 : insertion), 삭제(deletion), 가장 순위가 높은 태스크를 찾기(finding)의 연결비용을 ◎(1)으로 구현토록 하기 위한 함수 sylos_log2(x)는 아래의 식을 만족함을 특징으로 하는 운영체제의 실시간성을 높이기 위한 레디큐(Ready Queue)관리 방법.In the Ready Queue management method for improving the real-time performance of the operating system, the task is connected to the Ready Queue (insertion, deletion, finding the highest priority task). Function sylos_log2 (x) to implement the connection cost as ◎ (1) is a Ready Queue management method for improving the real-time performance of the operating system, characterized by the following equation. 음이 아닌 32비트 정수 x에 대해,For non-negative 32-bit integer x, (단, (int)는 C 프로그래밍 언어의 캐스팅(casting)역할을 한다.)(However, (int) serves as a cast for the C programming language.) 제1항에 있어서, 상기 삽입(INSERTION)하는 방법은 우선순위가 p인 태스크를 헤디큐에 연결하려고 하면 (단계 S1), 이때 p번째 레디큐가 비어있는지의 여부를 판단하여(단계 S2), 비어있지 않으면 해당 레디큐를 p번째 레디큐에 FIFO순으로 연결하며(단계 S5), 비어있으면 p를 32로 나눈 몫을 x로 하고 p를 32로 나눈 나머지를 y로 하여 (단계 S3), 각각 meta_ready_map(0x1Lx)를 계산하여 치환하고, ready_map[x]에 ready_map[x](0x1Ly)를 계산하여 치환한 후(단계 S4), 단계 S5를 순차적으로 수행하여 구현할 수 있음을 특징으로 하는 운영체제의 실시간성을 높이기 위한 레디큐(Ready Queue)관리 방법.The method of claim 1, wherein the INSERT method attempts to connect a task having priority p to the heady queue (step S1), and determines whether or not the p-th ready queue is empty (step S2). If not empty, connect the ready queue to the pth ready queue in FIFO order (step S5), if empty, the quotient of p divided by 32 is x and the remainder of p divided by 32 is y (step S3), respectively. meta_ready_map Compute and replace (0x1Lx), and ready_map [x] for ready_map [x] After calculating and replacing (0x1Ly) (step S4), step S5 can be carried out sequentially to implement a ready queue (Ready Queue) management method for improving the real-time characteristics of the operating system. 제1항에 있어서, 찾기(FINDING)를 하는 방법은 sylos_log2(meta_ready_map)를 x라 하고(단계 F1), sylos_log2(ready_map[x])를 y라 하여(단계 F2), 32*x+y에 의해 찾고자 하는 태스크 p를 구하는 단계(단계 F3)를 순차적으로 수행하여 구현할 수 있음을 특징으로 하는 운영체제의 실시간성을 높이기 위한 레디큐(Ready Queue)관리 방법.The method of claim 1, wherein the method of finding (FINDING) is called sylos_log2 (meta_ready_map) x (step F1), and sylos_log2 (ready_map [x]) is y (step F2), and 32 * x + y. Ready queue management method for improving the real-time of the operating system, characterized in that it can be implemented by performing the step (step F3) to obtain the task p to find. 제1항에 있어서, 상기 삭제(DELETION)를 하는 방법은 레디큐에서 제거하고자 태스크의 우선순위를 p라하고(단계 D1), 해당 태스크를 레디큐에서 제거한다(단계 D2), 이때 p번째 레디큐가 비어있는지의 여부를 판단하여(단계 D3), 비어있지 않으면 삭제가 완료 된 것으로 간주하여 동작을 끝내고, 비어있으면 p를 32로 나눈 몫을 x라 놓고, p를 32로 나눈 나머지를 y라 놓은 후(단계 D4), ready_map[x]의 y번째 비트를 0으로 만들고(단계 D5), 다시 ready_map[x]가 0인가를 판단하여(단계 D6), 0이 아니면 동작을 끝내고, 0이면 meta_ready_map의 x번째 비트를 0으로 만드는 단계(단계 D7)를 순차적으로 수행함으로써 구현할 수 있음을 특징으로 하는 운영체제의 실시간성을 높이기 위한 레디큐(Ready Queue)관리 방법.The method of claim 1, wherein the method of deleting is called priority of a task to be removed from the ready queue (step D1), and the corresponding task is removed from the ready queue (step D2). Determine if the queue is empty (step D3); if not empty, consider the deletion to be complete, end the operation; if empty, divide the p divided by 32 with x, then divide p with 32 and y After releasing (step D4), set the yth bit of ready_map [x] to 0 (step D5), again determine if ready_map [x] is 0 (step D6), if not 0, end the operation, and if it is meta_ready_map Ready queue management method for improving the real-time performance of the operating system, characterized in that it can be implemented by sequentially performing the step (step D7) to make the x-th bit of the (0).
KR1019950007766A 1995-04-03 1995-04-03 Method of nanagement of ready queue for enhancing o.s real-time KR0164139B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019950007766A KR0164139B1 (en) 1995-04-03 1995-04-03 Method of nanagement of ready queue for enhancing o.s real-time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019950007766A KR0164139B1 (en) 1995-04-03 1995-04-03 Method of nanagement of ready queue for enhancing o.s real-time

Publications (1)

Publication Number Publication Date
KR0164139B1 true KR0164139B1 (en) 1998-12-15

Family

ID=19411479

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019950007766A KR0164139B1 (en) 1995-04-03 1995-04-03 Method of nanagement of ready queue for enhancing o.s real-time

Country Status (1)

Country Link
KR (1) KR0164139B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100617228B1 (en) * 1999-03-19 2006-08-31 엘지전자 주식회사 method for implementation of transferring event in real-time operating system kernel

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100617228B1 (en) * 1999-03-19 2006-08-31 엘지전자 주식회사 method for implementation of transferring event in real-time operating system kernel

Similar Documents

Publication Publication Date Title
US7386619B1 (en) System and method for allocating communications to processors in a multiprocessor system
Lehoczky et al. The rate monotonic scheduling algorithm: Exact characterization and average case behavior
WO2005081113A2 (en) Memory allocation
EP3553657A1 (en) Method and device for allocating distributed system task
JP3887353B2 (en) Apparatus and method for integrating workload manager with system task scheduler
US5606685A (en) Computer workstation having demand-paged virtual memory and enhanced prefaulting
US8434085B2 (en) Scalable scheduling of tasks in heterogeneous systems
US9448857B2 (en) Memory access method for parallel computing
WO2018120991A1 (en) Resource scheduling method and device
JP4185103B2 (en) System and method for scheduling executable programs
CN110633135A (en) Asynchronous task allocation method and device, computer equipment and storage medium
US7681196B2 (en) Providing optimal number of threads to applications performing multi-tasking using threads
CN110008013B (en) Spark task allocation method for minimizing job completion time
CN113448743A (en) Method, electronic device and computer program product for task processing
US6976021B2 (en) Method, system, and computer program product for managing a re-usable resource with linked list groups
US6629114B2 (en) Method, system, and computer program product for managing a re-usable resource
KR0164139B1 (en) Method of nanagement of ready queue for enhancing o.s real-time
JP4409568B2 (en) Band control program and multiprocessor system
JP4121525B2 (en) Method and computer system for controlling resource utilization
CN115878910A (en) Line query method, device and storage medium
JP2924725B2 (en) Buffer allocation control system
WO2022088074A1 (en) Instruction processing method based on multiple instruction engines, and processor
US20030018867A1 (en) Method to manage multiple communication queues in an 8-bit microcontroller
CN117149440B (en) Task scheduling method and device, electronic equipment and storage medium
CN115174585B (en) Message generation method based on Elasticissearch, redis data management system and master control equipment

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20060907

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee