Multi Vendor UNIX Programming

Skills covered:

Overview

This course discusses the use of system-level programming interfaces provided by UNIX and Linux to develop applications. The course is illustrated with practical examples in UNIX's 'native' C language which show how to write programs to exploit the features of UNIX and how to choose the correct API calls for the task. UNIX is an excellent environment for client/server programming.

You will learn how to create both client and server applications using sockets and other inter-process communication methods, and how to create robust multi-threaded applications using the standard pthreads library.

The course concentrates on a common approach to the different variants of UNIX, using the Single Unix Specification (SUS) and explores features available in to X/Open System Interface (XSI). This broad-ranging UNIX course is designed to provide delegates with the skills and knowledge which is applicable to all flavours of UNIX including Linux, HP-UX, UnixWare, Solaris, AIX etc.

Objectives

At the end of this course you will be able to:

  • Write programs that can access and update information in files
  • Use the concepts of the UNIX virtual memory system
  • Handle signals in a safe and reliable way
  • Program UNIX and Internet sockets interfaces
  • Build multi-process applications
  • Understand passing information between co-operating processes using IPC
  • Implement UNIX client/server applications
  • Create multi-threaded programs and synchronise shared resources

Prerequisites

  • Delegates must have a good working knowledge of the C programming language. This can be gained by attending our C Programming course.
  • A familiarity with UNIX processes, system calls and general philosophy is assumed. This can be gained from attending QA's UNIX Fundamentals course.

Syllabus

Chapter 1: UNIX for Programmers

  • UNIX standards and compatibility
  • System calls and library functions
  • Error handling
  • Limits
  • Dates and times

Chapter 2: Basic UNIX IO

  • Opening and closing files
  • Reading and writing files
  • File descriptors
  • File status and the inode
  • Random access

Chapter 3: Files and Directories

  • Directories in detail
  • Symbolic links
  • Access permissions
  • Reading directories
  • File and record locking

Chapter 4: Introduction to Processes

  • What is in a process?
  • Process ids, and how they are used
  • Resource limits

Chapter 5: Virtual Memory

  • The process address space
  • Virtual and physical memory
  • Memory mapped files

Chapter 6: Signals

  • What is a signal?
  • Reacting to a signal
  • Signal masks and signal sets
  • Writing a signal handler
  • Alarm, and interval timers

Chapter 7: Working with Multiple Processes

  • Creating a new process - fork
  • Inheritance
  • Overlaying a process - exec
  • Synchronising parent and child

Chapter 8: Pipes and FIFOs

  • Anonymous pipes
  • Reading an writing to pipes
  • Named pipes (FIFOs)
  • Working with named pipes

Chapter 9: IPC

  • Overview
  • Resource keys
  • IPC types and routines
  • IPC commands

Chapter 10: IPC Message Queues

  • Manipulating queues
  • Contents of a message queue
  • Sending messages
  • Receiving messages

Chapter 11: IPC Semaphores

  • Uses of semaphores
  • XSI semaphores
  • Semaphore APIs and operations
  • Implementing a read/write lock

Chapter 12: Shared Memory

  • IPC shared memory
  • Attaching shared memory
  • Reading and writing shared memory

Chapter 13: Sockets

  • Domain and socket types
  • Using datagram sockets
  • Using stream sockets
  • UNIX domain socket APIs

Chapter 14: Internet Domain Sockets

  • Hosts, addresses, and ports
  • Byte ordering
  • Getting host and service information
  • Internet domain socket APIs
  • POSIX 1 functions

Chapter 15: Threads

  • Thread architecture
  • Creating and controlling threads
  • Thread safety
  • Thread specific data

Chapter 16: Thread synchronisation

  • Using a mutex
  • Using reader-writer locks
  • Using condition variables
  • Avoiding deadlocks

Chapter 17: Groups, Sessions, and Daemons

  • Process groups
  • Session groups
  • The controlling terminal
  • Daemon processes

Training provider

Teaching mode: Classroom - Instructor Led
Duration: 5 days
Gooroo has partnered with the global leaders in IT training to give you access to quality training, personalised to you, targeted at increasing your job opportunities and salary.

Our pricing

We do not display pricing as Gooroo members qualify for special discounts not available elsewhere. You must enquire through Gooroo to get this benefit.

New courses are happening all the time

Our partner's expert training consultant will provide you with the times and all the details you need. Enquire today.

Top skills covered in this course

Unix
Worldwide
This skill has an average salary of
US$94,890
and is mentioned in
1.46%
of job ads.
iOS (Apple)
Worldwide
This skill has an average salary of
US$84,536
and is mentioned in
0.63%
of job ads.