Unix Portability Changes in V8.4

Unix Portability Changes in V8.4

UNIX PORTABILITY CHANGES IN V8.4 Rupesh Shantamurty OpenVMS Engineering 1 © Copyright 2010 Hewlett-Packard Development Company, L.P. AGENDA –Overview of Unix Portability Initiative –Semaphores –UTF-8 support –GNV Update –Q & A 2 © Copyright 2010 Hewlett-Packard Development Company, L.P. UNIX PORTABILITY - OVERVIEW 3 © Copyright 2010 Hewlett-Packard Development Company, L.P. UNIX PORTABILITY INITIATIVE OBJECTIVE GOAL BENEFIT • Ease Porting of • OpenVMS will be • Less OpenVMS applications from like any other development UNIX, LINUX “UNIX flavor” for cost and Open easy application • Enhanced Source to portability application OpenVMS • Cost of porting portfolio on from UNIX to OpenVMS, OpenVMS is including Open comparable to Source porting one applications "flavor" of UNIX • Familiar UNIX- to another style development environment 4 © Copyright 2010 Hewlett-Packard Development Company, L.P. RECENT DEVELOPMENTS & V8.4 Byte Range File Lock APIs Standard Stat Locking Structure SEMAPHORES Symbolic Links POSIX style GNV Updates pathnames statvfs/fstatvfs Pthreads Encryption UTF-8 Routines Shared Objects SUPPORT 5 © Copyright 2010 Hewlett-Packard Development Company, L.P. SEMAPHORES 6 © Copyright 2010 Hewlett-Packard Development Company, L.P. INTRODUCTION - SEMAPHORES Semaphores - Inter Process Communication mechanism for synchronization across multiple processes. –System V Semaphores –POSIX Semaphores 7 © Copyright 2010 Hewlett-Packard Development Company, L.P. NEED FOR SEMAPHORES ON OPENVMS PRE V8.4 SOLUTION IN IMPACT V8.4 • Semaphore API Implements Reduces porting implementation was Semaphore APIs time Reduces cost of not available Applications using porting • Implement emulator semaphores can be Facilitates porting solutions ported without code of other Open Source • Performance issues change applications to due to layered OpenVMS emulator solutions 8 © Copyright 2010 Hewlett-Packard Development Company, L.P. SYSTEM V SEMAPHORE API Generates a standard inter process f t ok () communication key s e m ge t () Gets a set of semaphores Performs operations on semaphores in a s e mop () semaphore set s e m c tl() Semaphore control operations 9 © Copyright 2010 Hewlett-Packard Development Company, L.P. POSIX SEMAPHORE API Opens/creates a named semaphore for use by a s e m _ o p e n () process. s e m _ i n i t () Initializes an unnamed semaphore sem_getvalue () Gets the value of a specified semaphore. s e m _ w a i t () Performs a semaphore lock. sem_trywait () Conditionally performs a semaphore lock Performs a semaphore lock by waiting for a sem_timedwait () specified time. s e m _ p o s t () Unlocks a semaphore. s e m _ u n l i n k () Removes the specified named semaphore. sem_destroy () Destroys an unnamed semaphore. s e m _ c l o s e () De-allocates the specified named semaphore. 10 © Copyright 2010 Hewlett-Packard Development Company, L.P. USING SEMAPHORE API Application programs need to include the following header files • POSIX SEMAPHORE: #include<semaphore.h> • System V SEMAPHORE: #include <sys/ipc.h> #include <sys/sem.h> 11 © Copyright 2010 Hewlett-Packard Development Company, L.P. CONSIDERATIONS – System V Semaphores: • Maximum number of semaphore sets allowed on a system is 1024 • Maximum value of a semaphore is 32767 • Maximum number of SEM_UNDO operations allowed for a process is 1024. • No support for IPC_PRIVATE – POSIX Semaphores: • Unnamed semaphores not supported across processes 12 © Copyright 2010 Hewlett-Packard Development Company, L.P. UTF-8 SUPPORT 13 © Copyright 2010 Hewlett-Packard Development Company, L.P. INTRODUCTION –UTF-8 . UTF-8 (8-bit Unicode Transformation Format) is a variable-length character encoding for Unicode. UTF-8 can represent any character in the Unicode standard. UTF-8 is becoming the preferred encoding for e- mail, web pages. 14 © Copyright 2010 Hewlett-Packard Development Company, L.P. CRTL APIS SUPPORTING UTF-8 mkdir() stat() opendir() chdir() rmdir() chmod() creat() chown() open() readdir() rename() fopen() link() 15 © Copyright 2010 Hewlett-Packard Development Company, L.P. NEED FOR UTF-8 SUPPORT PRE V8.4 SOLUTION IN IMPACT V8.4 • UTF-8 character-set Support UTF-8 CRTL APIs support support was not character-set with UTF-8 file format available CRTL APIs specification E.g. CIFS support Applications with Japanese requiring this OpenVMS feature can be ported without code changes 16 © Copyright 2010 Hewlett-Packard Development Company, L.P. USING UTF-8 SUPPORT • $DEFINE / SYSTEM - $_ DECC$FILENAME_ENCODING_UTF8 “ENABLE” • $DEFINE / SYSTEM DECC$EFS_CHARSET “ENABLE” • Requirement: ODS-5 disk 17 © Copyright 2010 Hewlett-Packard Development Company, L.P. EXAMPLE USAGE OF UTF-8 SUPPORT 18 © Copyright 2010 Hewlett-Packard Development Company, L.P. GNV 19 © Copyright 2010 Hewlett-Packard Development Company, L.P. GNV V2.1-3 –Available @ Sourceforge –Changes : Support for Symlink Capability –> ln -s Installation changes Stability in setting up Mount Point Mixed Architecture Environments – Configuration files Bash – Command recall Improvements in cc wrapper mnt – improvement in record keeping 20 © Copyright 2010 Hewlett-Packard Development Company, L.P. GNV V2.1-3 – CALL TO ACTION –Community Participation is key –Want to contribute to GNV Project •Subscribe to the mailing list: https://lists.sourceforge.net/lists/listinfo/gnv-develop – Want to be part of GNV Developer Team •send a mail to -> [email protected] 21 © Copyright 2010 Hewlett-Packard Development Company, L.P. Q&A 22 © Copyright 2010 Hewlett-Packard Development Company, L.P..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    22 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us