Placement Overview

Download Report

Transcript Placement Overview

Overview of my student placement
Philipp Spliethoff
21 July 2015
Agenda
SOIS Proof of Concept – File Store Service
Basic Overview
Specific implementations
Documentation
XtratuM
Context Analyser
2
Placement Overview
Spacecraft Onboard Interface
Services (SOIS)
3
Placement Overview
SOIS – Overview
Standardised Interfaces of spacecraft equipment by
specifying well-defined service
Abstracting subnetworks of the spacecraft
Three service layers:
Application Support Layer services
Provide common capabilities needed onboard
Use subnetwork layer services (locally or remotely)
Transfer Layer services
Subnetwork Layer services
Associated with one underlying data link
Mapped to best possible extend (using convergence
functions)
Defined by the Consultative Committee for Space Data
System (CCSDS)
4
Placement Overview
Spacecraft Onboard Interface Services
Application
Layer
Mission
Specific
Applications
Communication Management
Application
Support Layer
Transfer
Layer
Cmd & Data
Acquisition
Services
Time
Access
Service
File &
Packet Store
Services
Message
Transfer
Service
Device
Enumeration
Service
Device
Discovery
Service
Test
Service
Transport Protocol
Network Protocol
Subnetwork
Layer
Memory
Access
Service
Packet
Service
Synchronisation
Service
Datalink Convergence Protocols
Milbus
5
Placement Overview
SpaceWire
CAN
Wireless
SOIS – Benefit
Reusability of user-applications
Independent development of s/w and h/w
(stable subnetworks)
Core services
Porting subsystems and payload across missions
reduced development time and cost
6
Placement Overview
Spacecraft Onboard Interface Services
Proof of Concept
File Store Service
7
Placement Overview
SOIS File Store Service
The SOIS File Store Services provide a standard
interface to allow onboard software to request:
access to files resident in a file store
modifications to files in a file store
management of files within a file store (e.g.,
create, delete, rename)
Split into File Access Service and File
Management Service
8
Placement Overview
SOIS FSS – File Access Service Primitives
Open a file
Close a file
Read from a file
Write to a file
Optional:
Seek to an Offset of a file
 Easy to implement
9
Placement Overview
One-to-one wrapping
on POSIX system
calls (open, close,
lseek etc.)
SOIS FSS – File Management Service Primitives
list the contents of a directory
copy and move files
create and delete files.
Optional features:
create, rename and delete directories
get and change the user entity’s current directory
rename files
lock or unlock files
list the currently locked files
find a file within a file store
get the status of a file
10
Placement Overview
SOIS File Store Service
SSMM
providing flat Memory I/F
SSMM
providing flat Memory I/F
OBC
User
Applications
Data Storage
Remote File System
File and
Packet
Store
Services
File and Packet
Store System
Service Primitives
Block Access
Network File and Packet
Store Access Protocols
Network File and Packet
Store Access Protocols
Remote Block
Storage Protocol
Remote Block
Storage Protocol
Subnetwork Packet
Service
Subnetwork Packet
Service
Subnetwork Packet
Service
Subnetwork Packet
Service
Subnetwork-Specific
Packet Protocol
Subnetwork-Specific
Packet Protocol
Subnetwork-Specific
Packet Protocol
Subnetwork-Specific
Packet Protocol
Example Deployment of the SOIS File Store Service using multiple Distributed Mass Memories
11
Placement Overview
SOIS FSS – My Implementation
RTEMS Library
Highly Configurable (at build time) through preprocessor directives
Implements all features defined by the SOIS
(minimal and optional)
AVL Tree added to global utility repository
non-deterministic state machine to evaluate
wildcard expressions
Documented using Doxygen
12
Placement Overview
SOIS FSS – Implementation
Based on:
RTEMS 4.8
RTEMS In Memory File System (IMFS)
Direct Function Calls
Can easily be advanced to use network protocol
OBC
User
Applications
File
Store
Services
Service Primitives
Network File Store Access
Protocols
File Store System
Network File Store Access
Protocols
Direct Function Call acting as
Underlying Transport
13
Placement Overview
IMFS
Block Access
Data Storage
SOIS FSS – Function Implementation
Direct wrapper functions to all POSIX compatible FS
Open, Close, Read, Write, Seek, CreateFile, DeleteFile, CreateDir,
DeleteDir
Implementation through combination of existing POSIX function
ListDirectory, CopyFile, MoveFile, MoveDir
Additional mechanism needed
GetWorkingDirectory, RenameDir, FindFile,
FileLocks(Lock/UnlockFile, ListLockedFiles…)
MoveDir is not defined by SOIS FSS, implements RenameDir through
use of POSIX calls (rename() is broken in RTEMS 4.8)
14
Placement Overview
SOIS FSS – Locking
Lock unopened files
Locks restrict access to the file
Lock types:
lock-owner read-only access, all other user entities no access
lock-owner read-only access, all other user entities read-only
access
lock-owner read-write access, all other user entities no access
No native locking from file system
No way to check if a file is opened
Possible Solutions:
1. POSIX chmod() to change access rights according to the lock
2. Create lock files on the file system
3. Use a internal structure to store information about locks
15
Placement Overview
SOIS FSS – Locking Design
16
Placement Overview
Util – AVL Tree
Self balancing binary search tree
Search in log(n) time
Fast lookup
Balancing done when item is
inserted/deleted (log(n) time)
Insert Sequence: A, B, C, D, E, F
A
B
D
C
B
D
A
E
E
C
E
Binary Tree
17
Placement Overview
AVL Tree
F
Operations:
Insert
Delete
Find
Inorder Walk (e.g. print content
sorted
SOIS FSS - FindFile
SOIS recommends using wildcards to match
file names
non-deterministic finite state machine to
evaluate wild card characters to represent the
expression
Comparison between a filename and the
machine in linear time
Possible characters: *, +, ?, {, }
18
Placement Overview
State machine
State machine for
“a*c?d+e”
19
Placement Overview
Documentation
Doxygen
20
Placement Overview
Doxygen
Generate documentation from comments in source files
Languages: C++, C, Java, Objective-C, Python, IDL
(Corba and Microsoft flavors), Fortran, VHDL, PHP, C#,
and to some extent D
Output as HTML, Latex, rtf, PS, PDF, Man-Pages
Highly configurable
Open Source and licensed under GNU GPL
Documentation is not affected by GPL
Internal Preprocessor
Easy switch between different Documentation version
(e.g. customer and internal version)
21
Placement Overview
Doxygen – HTML Output Sample
22
Placement Overview
XtratuM
23
Placement Overview
XtratuM - Overview
Hypervisor for embedded systems enabling partitioning
Free and Open Source (GPLv2)
Applications on top don’t derive that
Developed for leon2
Able to run RTOS like RTEMS or Linux
Target:
Get it working on leon3
Test features
24
Placement Overview
XtratuM - Conclusion
Easy to set up
Hardware and partitions are defined in a XML file
Documentation is available
created Detailed xml file description
<CyclicPlanTable>
<Plan id="0" majorFrame="10s">
<Slot id="0" start="0ms" duration= "5s" partitionId="0"/>
<Slot id="1" start="5s" duration= "1s" partitionId="1"/>
<Slot id="2" start="6s" duration= "500ms" partitionId="2"/>
<Slot id="3" start="6500ms" duration= "100ms" partitionId="3"/>
<Slot id="4" start="6700ms" duration= "50ms" partitionId="4"/>
<Slot id="5" start="6800ms" duration= "10ms" partitionId="5"/>
<Slot id="6" start="6900ms" duration= "5ms" partitionId="6"/>
<Slot id="7" start="6950ms" duration= "1ms" partitionId="7"/>
<Slot id="8" start="7000ms" duration= "2s" partitionId="8"/>
</Plan>
</CyclicPlanTable>
25
Placement Overview
XtratuM - Conclusion
Features:
IPC restricted by Partition hierarchy and
definition
XAL – Basic C support
RTEMS – is available, but I didn’t test it
Altenatives:
LithOS
PaRTiKle (GPLv2)
26
Placement Overview
Context Analyser
27
Placement Overview
Context Analyser
Get real timing information about RTEMS tasks
running on hardware
Approach:
Output Task ID to IO pins of the RASTA/FPGABoard
Inserted code into the RTEMS source code to
output the ID
28
Placement Overview
Context Analyser
Result:
Works with Oscilloscope
Logic Analyser is ordered
29
Placement Overview