지난일들/ARINK653

ARINC 653 HYPERVISOR- Steven H.VanderLeest

바위맨 2013. 7. 24. 15:41
반응형


Abstract

- ARINC653 serial I/O, scheduler를 적용한 Xen에 대한 연구

- Hyeprvisor기술을 사용하게 되면 PC상에서 최종 타겟의 성능을확인해 볼 수 있는 장점이 있다. 

- 다음 3가지 토픽을 주제로 한다. 

1. ARINC 653에 중점을 맞춘다. 이유는 개발 비용 절감, system weight 절약, 인증 비용 절감의 효괄를 얻을 수 있다는 점이다. 이 표준은 CPU, I/O, Memory 이 세가지 요소에 대한 관리를 주 목적으로 한다. 

2. ARINC 653에 가상화 기술을 적용하기 위해서 기존 가상화 기술에 대해서 다시 재고해 본다. 

3. Xen에서  ARINC653 hypervisor를 적용해서 실햄을 수행한다. 


Introduce

- 리눅스 기반으로 Xen hypervisor를 사용한 환경에서 ARIC653을 적용한 prototype을 사용했다. 

- partition OS 는 domain 내부에서 partitioned OS가 실행되게 된다.

- open source prototype 환경에서 실험을 함으로써 ARINC653의 적용에 따른 성능 trade-off를 확실히 알 수 있다. 

- Xen 과 같은 hypervisor를 사용해서 underlying partitoning개발 환경을 지원하게 되면 다음 세 단계의 개발 과정을 진행하게 된다. 

1. PC환경에서 target 에 대한 환경을 구성해서 개발 진행

2. 동일 processor를 사용하는 보드환경에 동작 실험

3. 실제 타겟에서 개발 진행. 

- 위와 같은 세 단계의 과정을 거치게 되는데, 결과적으로 Hypervisor를 사용함으로써 모두 PC환경에서 개발을 진행할 수 있게 되고 결과적으로는 개발 비용이 매우 절감된다. 


Overview of ARINC653

- Arinc653은 개발 비용 절감, 시스템 부하 감소, 적은 인증 비용을 위해서 개발된 파티셔닝 방식이다.

- 여러 어플리케이션 들이 하나의 computing자원에서 실행이 될 수 있도록 해준다. 


History and Current Implementatiions

- ARINC653에서 가장 중요시 되는 점은 하나의 어플리케이션이 다른 어플리케이션에 영향을 끼치지 않으면서 독립적으로 실행이 가능하도록 환경을 제공하는 것이다. 

- 각각은 'Partition'이라고 하는 각각의 독립된 가상 환경을 가지게 된다. 

- 개념적으로 partition은 모든 시스템 자원에 대해서 Mutually-exclusive하게 접근한다. 

- 파티션 끼리는 서로 성능에영향을 미치지 않는다. 

- 파티션은 시/공간으로 분할이 되어진다. 

- 과거 Federated systems은 IMA시스템으로 옮겨오고 있다. 만일 하나의 어플리케이션이 다른 어플리케이션에까지 영향을 미치게 된다면 IMA환경에서 기존의 어플리케이션을 재사용하기 위해서는 인증절차를 다시 거쳐야만 한다. 

- 이런 불필요한 과정을 없애기 위해서 ARINC653은 isolation환경을 제공한다. 

- 각 파티션은 DO-178B에서 처럼 criticality level을 갖는다. 

- ARINC 653은 세 개의 level로 파티션 환경을 구성한다. 

1. Hardware: processor, memory, I/O devices, etc

2. Hardware Interface system

3. Operating system

- 각 파티션은 파티션 환경에서의 서비스를 사용하기 위해서 APEX(Application/Executive) I/F를 사용한다. 


- ARINC 653은 다양한 RTOS에서 실행이 되어진다. 

- 또한, 이런 RTOS들은 simulation approach를 가지고 있다. 


- Figure2와 같은 구조를 통해서 각 파티션들은 APEX를 사용해서 H/W리소스를 사용할 수 있게 된다. 

- Xtratum은 ARINC653을 완전히 수용하지 않지만 API는 같은 표준을 따르고 있다. 

Approaches to Resource Sharing

- ARINC653의 가장 핵심 기능은 fault를 완전히 고립 시키는 것이다. 

- Open source hypervisor상에서 표준 resource sharing을 중점ㅇ로한 prototype을 실험 해 보았다. 

- resource sharing에는 두 가지 타입이 존재한다. (exclusive, sharing)


Application to ARINC 653

- Time-partitioning은 가상화 방식과 매우 유사하다. 

- 두 가지 접근 방식이 있을 수 있는데

1. 기존의 virtualization기술에 safety-critical 기술이 추가

2. safety-critical 기술에 virtualization기술의 추가

- ARINC653의 사용자들은 두 번째 접근 방식을 사용한다. 

- DO-178b(항공 시스템에 대한 가이드라인)을 hypervisor위에 추가한다. 

- 첫 번째 접근 방식을 사용하지 않은 이유는

1. hypervisor에서 개발을 시작하는게 더 어렵기 때문에다. 가상화 기술은 utilization을 향상 시키기 위해서 시작 되었는다 그러나 ARINC 653같은 경우에는 안정성을 목표로 하고있기 때문에 약간의 성능 저하는 감수하게 된다. 

2. hypervisor에서는 partition간에 communication을 지원하지 않기 때문이다. 그런데 ARINC 653에서는 Communication이 필수적이다. 

3. ARINC653의 인증을 유지하기 위해서는 DO-187B의 규격을 매우 엄격하게 준수해야하는데 이 또한 매우 어렵다. 


Prototype ARINC 653 Hypervisor

- ARINC 653을 가상화 기술에 사용하기 위해서 RTOS에 추가했다. 

- Xen Hypervisor에서 ARINC 653을 적용해서 실험한다. 


ARINC 653 Partitioned Serial Deriver

- prototype ARINC653을 실행시키기 위해서 간단한 serial I/O를 구현하다. 

-The back-end driver includes an a653ser_back kernel module and an a653serd user-space daemon, both residing in dom0, while the front-end driver consists of the a653ser_front kernel module, residing in each unprivileged domain that requires serial I/O


a653ser_frond kernel Module

- a653ser_front module은 unprivileged domain이 초기화 될때 로드 되어 I/O에 대한 설정을 실행

- 시작할때 linux kernel의 다양한 캐릭터API를 사요해서 /dev/a653ser을 등록한다. 

- 이 구조는 두개의 ring buffer를 포함한다.(tofe, tobe)

- ring에서 producer와 consumer를 포함한다.

- front module은 event channel을 할당한다. 

The front-end module also allocates an event channel. It grants access to the shared ring memory page via the Xen grant table mechanism.

- 초기화 과정이 완료된 이후에는 front-end 모듈은 read/wait 요청을 기다린다(from char device)


a653ser_back Kernel Module

a653ser_back은 dom0에서 시스템 초기화할때 로드 되어 진다. 

a653ser_frond와 동일하게 캐릭터 디바이스로 /dev/a653ser로 등로고디어진다. 

- XenBus watch callback function으로 등로되서 front-end domain information update시에 실행

The XenBus watch callback will scan through all domains listed in the XenBus and look for a device entry called a653ser. If it finds a valid device entry containing a grant reference to the shared memory page containing the ring buffers, the module will attempt to connect to the front-end. This involves mapping the shared memory page into its own virtual memory space, and binding a virtual IRQ handler routine to the event channel

- ...?


a653serd User-space Daemon

a653serd 데몬은 DOM0의 user-space에서 실행이 된다. 

The a653serd daemon executes within dom0’s user-space. The daemon initially opens a file descriptor to the physical serial device and to the a653ser_back  module’s  a653ser  character device. It reads the baud rate from the a653ser device via the GET_BAUD ioctl and configures the serial port with the specified baud rate. It reads the ARINC 653 major frame schedule from the hypervisor and informs the a653ser_back module of it via the SET_MAJOR_FRAME ioctl. Finally, it creates a read loop and a write loop thread using the pthread library.

  The read loop and write loop threads each execute forever loops and never return. The read loop repeatedly executes the READ_MESSAGE ioctl. When a message is read from the a653ser device, the daemon writes it out to the serial device file descriptor. The write loop does the inverse, invoking the WRITE_MESSAGE ioctl to pass along a message to the back-end module whenever a complete message is read from the physical serial device.


반응형