• Title/Summary/Keyword: 세마포어

Search Result 13, Processing Time 0.03 seconds

Design for the Semaphore Interface Function of the Dual Core Embedded Linux System (듀얼코어 임베디드 리눅스 시스템에서 코어간 세마포어 인터페이스 기능 설계)

  • Jung, Ji-Sung;Lee, Jae-Gi
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2018.10a
    • /
    • pp.97-100
    • /
    • 2018
  • 세마포어 처리문제는 프로세스간 메시지를 전송하거나 공유메모리를 통해 특정 데이터를 공유할 때 발생되는 문제로 공유된 자원에 여러 개의 프로세스가 동시에 접근하면 안되며, 단지 한번에 하나의 프로세서만 접근 가능하도록 하여야 한다. 세마포어 기본정책은 호출되는 코어에 생성되며, 다른 코어에서는 IPI를 통해 존재 여부를 확인한다. 동일 코어에서 접근 시 기존방식으로 사용한다. 본 논문에서는 서로 다른 코어 및 운영체제에서 다른 코어에서 접근할 때에는 IPI를 통해 존재 여부를 확인한 후 더미 세마포어 구조체를 생성하여 관련 정보를 유지하고 해당 요청을 처리해 주는 세마포어 인터페이스 기능 설계 방법을 제안한다. 제안하는 세마포어 인터페이스 기능 설계 방안은 멀티 태스킹 기술 구현으로 기존 코어가 가지고 있는 성능상의 문제를 해결해 준다.

Design and Implementation of Recursive Semaphore for Real-Time Operating Systems (실시간 운영 체제에서 Recursive Semaphore 설계 및 구현)

  • Lee Won-Yong;Kim Yong-Hee;Son Pi1-Chang;Lee Cheol-Hoon
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2005.11a
    • /
    • pp.922-924
    • /
    • 2005
  • 실시간 시스템의 개발 및 운영에 사용되는 실시간 운영체제는 여러 개의 태스크가 동시에 작업할 수 있는 멀티태스킹 환경과 각 태스크에 우선순위를 부여하여 가장 높은 우선순위의 태스크가 CPU 를 선점하는 스케줄링 방법, 그리고 태스크간 동기화 및 통신을 위한 메커니즘을 제공하고 있다. 또한 여러 태스크들에 의해 사용되는 공유자원을 관리하기 위해 세마포어(Semaphore)를 사용하여 태스크간 동기화를 제공한다. 그러나 하나의 태스크가 세마포어를 이용하여 공유자원에 대해 여러 번 접근 할 경우, 데드락(Deadlock)을 일으킬 소지가 많다. 본 논문에서는 실시간 운영체제인 $iRTOS^{TM}$ 에서 데드락을 방지하기 위한 재귀적 세마포어(Recursive Semaphore)를 설계 및 구현하였다.

  • PDF

Implementation of Semaphores to Prevent Priority Inversion (우선순위 역전을 해결하기 위한 세마포어의 구현)

  • 양희권;윤기현;성영락;이철훈
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2003.04a
    • /
    • pp.199-201
    • /
    • 2003
  • 실시간 운영체제(Real-Time OS)는 우선순위 기반의 선점형 스케줄링을 제공하는 운영체제로서 시간 결정성 (Determinism)을 보장하는 특징이 있다. 그러나, 우선순위가 높은 태스크가 우선순위가 낮은 태스크에 의해 CPU를 점유 당하는 우선순위 역전(Priority Inversion)이 발생하여 시간 결정성이 보장되지 못하면 시스템의 심각한 결함을 야기할 수 있다. 본 논문에서는 우선순위 역전을 해결하기 위하여 Priority Inheritance Protocol 을 적용한 세마포 (Semaphore)의 구현에 대해 기술한다.

  • PDF

A Java Class Luibrary for Higher-Level Synchronization Mechanism (고수준 동기화를 위한 자바 클래스 라이브러리)

  • Kim, Myeong-Ho
    • Journal of KIISE:Computing Practices and Letters
    • /
    • v.5 no.2
    • /
    • pp.283-294
    • /
    • 1999
  • 병행적 프로그램 개발을 위한 Java 언어의 기능은 저수준의 기능으로 프로그래밍이 불편하고 오류를 범할 가능성이 높다. 본 논문에서는 병렬 알고리즘에서 빈번히 활용되는 세마포어, 여러 유형의 버퍼와 버퍼그룹, 베리어 작업 영역등의 동기화 제어구조를 클래스 라이브러리의 형태로 개발하였다. 이 라이브러리를 활용하면 동기화 기능의 구현에 관한 복잡한 내용이 제어구조 클래스에 효과적으로 은폐되고, 병렬 알고리즘의 구조와 이를 구현하기 위한 제어가 분리될 수 있다. 단일 목적의 동기화 기능을 위하여 복수 구현이 제공되므로 알고리즘의 구조를 수정하지 않으면서도 보다 적절한 구현을 선택하도록 프로그램을 변경할수도 있다.

A Counter-based Adaptive Priority Scheduling Policy for the Readers-Writers Problem (독자-필자 문제를 위한 카운터 기반의 적응적 우선 스케줄링 정책)

  • Kang, Sung-Il;Lee, Heung-Kyu
    • The Transactions of the Korea Information Processing Society
    • /
    • v.5 no.11
    • /
    • pp.2997-3009
    • /
    • 1998
  • 독자-필자 문제(readers-writers problem)를 위한 기존의 스케쥴링 정책들은 대부분 독자나 필자 중 어느 한 쪽에 편향된 처리 성향을 가지고 있기 때문에 응답 시간이나 처리량, 둘 중 하나의 성능이 상당히 좋지 않은 특성이 있다. 본 논문에서는 이러한 문제를 개선하고자 새로룬 동적 스케쥴링 정책인 CAP(Counter-based Adaptive Priority)을 제안한다. CAP은 동시에 수행될 수 없는 필자에게 가중치를 주는 기법과 소수의 독자를 무작정 지연시키는 것을 막기 위한 에이징(aging) 기법을 동적으로 결합하여 사용하고 있다. CAP은 기는(starvation) 문제를 가지고 있지 않으며 주어진 상황에 동적으로 대응하는 능력을 가지고 있기 때문에 처리량과 응답 시간 모두 FCFS에 비하여 더 우수하다. 제안된 정책에 대한 효과성을 입증하기 위하여 세마포어 기반의 해법을 제시하고 사건-기반 시뮬레이션을 사용하여 기존의 정책들과 성능을 비교하였다.

  • PDF

Design and Implementation of a Radar Beam Scheduler using iRTOS Real-time Operating System (iRTOS 실시간 운용체제를 이용한 레이타 빔스케쥴러 설계 및 구현)

  • 황용철;이철훈
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2000.10c
    • /
    • pp.62-64
    • /
    • 2000
  • 레이다 빔 스케쥴러는 레이타의 전체적인 운용과 제어를 담당하는 레이다 통제기의 핵심기능으로서 레이다의 운용시간 및 송신 전력 등 한정된 가용 자원을 효율적으로 관리하기 위한 최적화 기법이 매우 중요하다. 본 논문은 충남대에서 개발한 실시간 운용체제인 iRTOS를 기반으로 하여 방위각 방향은 기계적 회전을 하고 고각 방향은 위상을 가변하여 다수의 위협 표적을 실시간으로 탐지하고 추적하는 회전형 3차원 위상배열 레이다에 적용 가능한 레이다 빔 스케쥴러의 구현 알고리즘에 관한 내용이다. 제안된 레이다 빔 스케쥴러는 우선 순위를 갖는 핵심적인 스케쥴링 태스크와 이를 보조하기 위한 다수의 기능 태스크를 정의하고 생성하였으며 태스크간 데이터 교환을 위하여 인터럽트 처리, 시간 관리, 세마포어 및 메시지 큐 등을 적용하였다. 레이다 빔 스케쥴러의 성능을 검증하기 위하여 다수의 모의 표적을 발생시켜 빔 스케쥴러의 상태와 성능을 확인하였으며, 자체 개발한 실시간 운용체제인 iRTOS를 이용하여 3차원 레이다 빔 스케쥴러를 구현할 수 있음을 확인하였다.

  • PDF

An Efficient Semaphore Implementation Scheme with Event (이벤트를 고려한 효과적인 세마포어 구현 알고리듬)

  • Han, Ki-Hee;Sihn, Bong-Sik;Pi, Chan-Ho;Chong, Jong-Wha
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2002.04a
    • /
    • pp.687-690
    • /
    • 2002
  • In this paper, we present a novel semaphore implementation scheme which shortens finish time of high priority tasks and improves reliability of a system. The real-time systems have time constraints. Especially, the task with hard real-time constraints must meet its deadline. Consequently, managing shared resources is considered guaranteeing mutual exclusion as well as meeting task's deadline under unfavorable condition. According to the number and sort of the locked semaphores under the event occurred, this paper presents the reduction of the finish time of high priority task by decision whether the context switched or not. The experimental results show that the proposed method gives performance improvements in finish time of high priority tasks of about 11% over zuberi[4] method.

  • PDF

Train interval control and train-centric distributed interlocking algorithm for autonomous train driving control system (열차자율주행제어시스템을 위한 간격제어와 차상중심 분산형 연동 알고리즘)

  • Oh, Sehchan;Kim, Kyunghee;Choi, Hyeonyeong
    • Journal of the Korea Academia-Industrial cooperation Society
    • /
    • v.17 no.11
    • /
    • pp.1-9
    • /
    • 2016
  • Train control systems have changed from wayside electricity-centric to onboard communications-centric. The latest train control system, the CBTC system, has high efficiency for interval control based on two-way radio communications between the onboard and wayside systems. However, since the wayside system is the center of control, the number of input trains to allow a wayside system is limited, and due to the cyclic-path control flows between onboard and wayside systems, headway improvement is limited. In this paper, we propose a train interval-control and train-centric distributed interlocking algorithm for an autonomous train-driving control system. Because an autonomous train-driving control system performs interval and branch control onboard, both tracks and switches are shared resources as well as semaphore elements. The proposed autonomous train-driving control performs train interval control via direct communication between trains or between trains and track-side apparatus, instead of relying on control commands from ground control systems. The proposed interlocking algorithm newly defines the semaphore scheme using a unique key for the shared resource, and a switch that is not accessed at the same time by the interlocking system within each train. The simulated results show the proposed autonomous train-driving control system improves interval control performance, and safe train control is possible with a simplified interlocking algorithm by comparing the proposed train-centric distributed interlocking algorithm and various types of interlock logic performed in existing interlocking systems.

Task Synchronization Mechanism for Round Robin based Proportional Share Scheduling (라운드 로빈 기반 비례지분 스케줄링을 위한 동기화 기법)

  • Park, Hyeon-Hui;Yang, Seung-Min
    • Journal of KIISE:Computer Systems and Theory
    • /
    • v.36 no.4
    • /
    • pp.291-303
    • /
    • 2009
  • Round robin based proportional share scheduling(RRPS) defines weight which determines share for each task and allocates CPU resource to each task in proportional to its respective weight. RRPS uses fairness as the measure of performance and aims at high fairness of scheduling. However, researches for scheduling fairness problem due to synchronization among tasks have been rarely investigated. In this paper, we discuss that scheduling delay due to synchronization may result high unfairness in RRPS. We explain such a situation as weight inversion. We then propose weight inheritance protocol(WIP), a synchronization mechanism, that prevents weight inversion. We also show that WIP can reduce unfairness using fairness analysis and simulation.

Teaching Process Synchronization with the Bank Account Problem (은행계좌 문제를 사용한 프로세스 동기화 교육)

  • Yang, Hee-Jae
    • Journal of the Korea Society of Computer and Information
    • /
    • v.19 no.12
    • /
    • pp.359-368
    • /
    • 2014
  • Process synchronization is one of the most difficult subject for students learning the Operating System courses. It is due to the fact that concurrent process environment, where many events occur at the same time, is difficult to understand for ordinary human who thinks only one thing at a time. Classical synchronization examples like the Bounded buffer problem or the Dining philosopher problem fail to hook attention and interest from lower grade students who just begin to study the Operating System courses in college because these examples are either too technical or too unrealistic. In this paper we propose another synchronization example named the Bank account problem as an alternative to the classical ones. Bank account problem is proved to succeed getting high interest and understanding from the student as it is easy and realistic, and almost every student has the experience using bank account in real life. Various synchronization subjects including controlling the execution sequence of each process, incorrect result due to the race conditions, use of semaphores, deadlock, and monitor are considered to apply them to the Bank account problem.