没有合适的资源?快使用搜索试试~ 我知道了~
OSE Tutorial.pdf
需积分: 4 11 下载量 193 浏览量
2008-10-28
15:20:53
上传
评论 1
收藏 376KB PDF 举报
温馨提示
试读
43页
ose 操作系统 入门 This tutorial demonstrates some basic functionality in OSE Delta. It uses some of the most common system calls and creates a number of different process to show how they can interact. The system calls used in the example are only explained briefly. For more information about the system calls, refer to the Real Time Kernel Reference Manual.
资源推荐
资源详情
资源评论
Tutorial
Enea OSE Systems AB
OSE
Tutorial
OSE /
Tutor i a l
Tutorial
Document No: 420e/OSE89-2 R1.1.2
Copyright
Copyright (C) 1998 by Enea OSE Systems AB. All rights reserved. No part of this publication may
be reproduced, transmitted, stored in a retrieval system, or translated into any language or computer
language, in any form or by any means, electronic, mechanical, optical, chemical or otherwise,
without the prior written permission of Enea OSE Systems AB. The software described in this
document is furnished under a licence agreement or a non-disclosure agreement. The software may
be used or copied only in accordance with terms of agreement.
Disclaimer
Enea OSE Systems AB makes no representations or warranties with respect to the contents hereof
and specifically disclaims any implied warranties of merchantability or fitness for any particular
purpose. Further, Enea OSE Systems AB reserves the right to revise this publication and to make
changes from time to time in the contents hereof without obligation to Enea OSE Systems AB to
notify any person of such revision or changes.
Trademarks
OSE is a registered trademark of Enea OSE Systems AB.
Tutorial /
R1.1.2
OSE /
Tutor i a l
-
toc : 1
Tutorial
Table Of Contents
1 Introduction
1.1 Terminology 1 : 1
1.2 Communication in OSE Delta 1 : 1
2 POTS
3 Implementation
3.1 The telephone process 3 : 1
3.1.1 Function makeCall 3 : 3
3.1.2 Function acceptCall 3 : 5
3.1.3 Function waitForConnectionClosed 3 : 6
3.2 Process phoneSwitch 3 : 7
3.3 Process switch_manager 3 : 8
3.4 Process check_number 3 : 10
3.5 Process startUp_System 3 : 11
3.5.1 Function addPhoneLine 3 : 12
3.5.2 Function eventStack 3 : 13
3.6 The eventProcess 3 : 14
3.6.1 Function pickUpPhone 3 : 15
3.6.2 Function hangUpPhone 3 : 16
3.7 Process printProxy and function proxyPrint 3 : 17
3.7.1 Process printProxy 3 : 17
3.7.2 Function proxyPrint 3 : 17
4 Appendix
4.1 startup.con 4 : 1
4.2 events.con 4 : 1
4.3 pots_err.h 4 : 1
4.4 pots.sig 4 : 3
4.5 pots.c 4 : 5
Tutorial /
R1.1.2
OSE /
Tutor ial
-
1 : 1
Introduction
Tutorial
1 Introduction
This tutorial demonstrates some basic functionality in OSE Delta. It uses some of the most common
system calls and creates a number of different process to show how they can interact. The system
calls used in the example are only explained briefly. For more information about the system calls,
refer to the Real Time Kernel Reference Manual.
1.1 Terminology
POTS Plain Old Telephone System.
A-side The subscriber who made the telephone call in the current connection.
B-side The subscriber who was called by the A-side in the current connection.
C-side The subscriber trying to make a call to either the A or B side of a present
connection.
1.2 Communication in OSE Delta
All communication between processes is made with signals. Every process has one signal-queue
where all incoming signals are stored until they have been processed by a receive() system call.
Signals of the same type are processed in FIFO order. When calling receive, you also specify the
signals you want to receive. Any other signals are left in the queue and only the signals specified
are received.
Tutorial /
R1.1.2
OSE /
Tutor ial
-
2 : 1
POTS
Tutorial
2POTS
This example is a very simple implementation of a telephone switch. Since no hardware is present,
all external events are simulated by processes. When a connection is made, the physical hardware
involved in the connection is also represented by processes. This example is not a good
representation of a real phone switch, since it has been simplified in order to make it small enough
to be easily understood. Every subscriber is represented by a telephone process. When a connection
is made, a switch-manager process is created to supervise the connection. If either side goes down,
the supervision process kills the other side and then itself.
The external events are simulated by a separate eventProcess. It sends two different signals to the
telephone processes. The first signal type is called OFF_HOOK and indicates that the receiver has
been picked up and a number has been dialed. The second signal is called HANG_UP. By letting
the phone number be a part of the OFF_HOOK signal we reduce the number of signals needed in
this example. To further reduce the example, all telephone calls are answered automatically without
the B-side explicitly picking up the receiver.
剩余42页未读,继续阅读
资源评论
hefutao
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功