Sunteți pe pagina 1din 3

ADVANCED UNIX PROGRAMMING

Course Duration: 4 Days

Course Overview: The UNIX operating system providex a rich API which has been
standardized across all UNIX platforms. This five-day course covers most of the POSIX-
standard calls and the basics of UNIX network programming. Some of the topics
covered in this course are device and file I/O, memory mapped I/O, file and directory
manipulation, process manipulation, signals, pipes, and network communication, both
client and server.

This class is aimed at students who already know the basics of C programming and
want to know how to take advantage of the services (system calls) offered by a Linux or
UNIX kernel. The class also covers functions in the ANSI standard C library that provide
either commonly-needed functions and/or a better interface to some of the system calls.

After the student has completed the source, they will be able to write portable code that
can make use of of file and directory manipulation, processes, signals, inter-process
communication on within a machine, and network communication.

This course is hands on, with an approximate 50/50 percent mix of lab and lecture.

Who should attend:


Programmers who:
want to know how to program using the standard system calls
and library functions provided on all UNIX systems,
want to know how to write network client and server programs
will benefit most from this course.

Prerequisites: The programmer must

· be familiar with the C programming language,


· be familiar with basic UNIX file manipulation,
· knows how to use a UNIX editor or knows how to transfer files to/from
themachine where the student will be doing the editing.
COURSE OUTLINE
Introduction
Files and Directories, part 2
· Student and Instructor introductions
· Inode number
· Assumptions about your background
· rename
· Class logistics, schedule
· Link count
· Class texts
· Linking files
· Typographic conventions
· Unlinking files
· Standards
· Symbolic links
· Standards and portability
· Filesystem
· System Calls and Library Functions
· Lab
· Error handling
· Lab Files and Directories, part 3
· Creating directories
Unbuffered I/O
· Deleting directories
· Introduction
· Changing the current directory
· File descriptors
· The current directory's path
· open
· Reading from directories
· umask
· Lab
· close
· read and write Other I/O Topics
· lseek · Atomic appending
· Lab · File Sharing
· Synchronous I/O
The Standard I/O Library
· Memory mapped I/O
· Introduction
· Lab
· Opening and closing FILEs
· Buffering The Environment of a Process
· Other non-I/O stdio functions · Command line arguments
· I/O functions · Command-line argument processing
· Lab · Environment variables
· Process termination
Miscellaneous Functions, part 1
· Dynamic memory allocation
· Time functions and values
· Lab
· Determining system limits at runtime
· Password and group file functions Working with Processes, part 1
· Lab · Process identifiers
· Process groups
Files and Directories, part 1
· Sessions
· The stat functions
· Controlling terminal
· st_mode: File type and permission
· fork
bits
· Waiting for children
· chmod and fchmod
· Zombies
· access: check file accessibility
· Lab
· File ownership of new files
· Changing ownership
· File size
· File times
· Lab
· Introduction
Working with processes, part 2 · select
· The exec family of functions · select and non-blocking I/O
· Set user-ID and group-ID files · A networking example
· Lab · Lab
Simplified signal handling Network Communication, part 1
· Signal concepts · IPv4 address structure
· Some important signals · Byte ordering
· Generating signals · Name and address mapping
· kill · Utility functions
· alarm · Example
· Handling signals · Ports
· Example · Example
· Lab · Lab
Reliable signal handling Network Communication, part 2
(UDP)
· Unreliable signals
· Reliable signal terminology · An introduction to UDP
· Signal sets and the functions that · Function calls used with UDP
work with them · A sample server
· Handling signals · A sample client
· Interrupted system calls · Lab
· Reentrant functions Network Communication, part 3
· fork, exec, and signals (TCP)
· Lab · An introduction to TCP
Miscellaneous Functions, part 2 · Function calls used with TCP
· Resource usage · A sample server
· Setting resource limits · A sample client
· Non-local gotos · Lab
· Lab Network Communication, part 4
Daemon Processes · UDP programming considerations
· What is a daemon? · TCP programming considerations
· Becoming a daemon · Server architecture choices
· Daemon error logging · Getting a signal when I/O is
available
· Lab
Advanced I/O, part 1 · Socket options
· I/O Redirection · Lab
· fcntl
· File locking
· Lab
Interprocess Communication
· Pipes
· Shared memory
· Command-line access to IPC
structures
· Lab
Advanced I/O, part 2

S-ar putea să vă placă și