Open System Services Porting Guide (G06.24+, H06.03+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to Porting
- 2 The Development Environment
- 3 Useful Porting Tools
- 4 Interoperating Between User Environments
- Purpose of Interoperability
- The OSS User Environment
- OSS Commands for the Guardian User
- Guardian Commands for the UNIX User
- OSS Pathname and Guardian Filename Conversions
- Running the OSS Shell and Commands From TACL
- Running Guardian Commands From the OSS Shell
- Running OSS Processes With Guardian Attributes
- Using OSS Commands to Manage Guardian Objects
- 5 Interoperating Between Programming Environments
- 6 OSS Porting Considerations
- 7 Porting UNIX Applications to the OSS Environment
- 8 Migrating Guardian Applications to the OSS Environment
- General Migration Guidelines
- C Compiler Issues for Guardian Programs
- Using New and Extended Guardian Procedures
- Using OSS Functions in a Guardian Program
- Interoperating With OSS Programs
- Starting an OSS Program From the Guardian Environment
- C Compiler Considerations for OSS Programs
- Porting a Guardian Program to the OSS Environment
- How Arguments Are Passed to the C or C++ Program
- Differences in the Two Run-Time Environments
- Which Run-Time Routines Are Available
- Use of Common Run-Time Environment (CRE) Functions
- Replacing Guardian Procedure Calls With Equivalent OSS Functions
- Which IPC Mechanisms Can Be Used
- Interactions Between Guardian and OSS Functions
- 9 Porting From Specific UNIX Systems
- 10 Native Migration Overview
- 11 Porting or Migrating Sockets Applications
- 12 Porting Threaded Applications
- A Equivalent OSS and UNIX Commands for Guardian Users
- B Equivalent Guardian Commands for OSS and UNIX Users
- C Equivalent Inspect Debugging Commands for dbx Commands
- D Equivalent Native Inspect Debugging Commands for dbx Commands
- E Standard POSIX Threads Functions: Differences Between the Previous and Current Standards
- Glossary
- Index
Contents
Open System Services Porting Guide—520573-006
iv
6. OSS Porting Considerations (continued)
6. OSS Porting Considerations (continued)
Using Interprocess Communication (IPC) Mechanisms 6-3
Using Sockets 6-5
Using Message Queues 6-6
Using Pipes and FIFO Files 6-7
Using Signals 6-9
Using Shared Memory 6-9
Using Semaphores 6-10
Using the $RECEIVE File 6-10
Memory Model Considerations 6-10
Memory Allocation and Deallocation 6-11
Virtual Memory Management 6-12
Considering Design Trade-Offs 6-12
Using Process-Creation Calls 6-13
Using fork() and the exec Set of Functions in UNIX 6-13
Using fork() and the exec Set of Functions in OSS 6-13
Using the tdm_spawn Set of Functions for Load Leveling 6-15
Using PROCESS_SPAWN_ 6-15
Which Call to Use for Process Creation 6-16
The SIGCHLD Signal and the Creation of Zombie Processes 6-17
Performing File Operations 6-18
Opening an OSS File 6-19
Directory Operations 6-20
Caching Considerations 6-20
File Caching for Regular Disk Files 6-21
Using Symbolic Links 6-22
Porting Servers and Demons 6-23
Careful Programming With Static Servers 6-24
Static Servers and Load Balancing 6-24
Guardian LISTNER Versus UNIX and OSS inetd 6-25
Starting a Guardian Server Process 6-26
Starting an OSS Server Process 6-26
7. Porting UNIX Applications to the OSS Environment
General Porting Guidelines 7-1
Scope of Portability 7-2
Levels of Portability 7-2
Porting Analysis 7-3
Design Trade-Offs 7-3