- refer to this pthread program to print even and odd numbers in different threads.
http://dhinu-programs.blogspot.in/2016/05/pthread.html
- Good article about user space threads and kerneal space threads
http://www.evanjones.ca/software/threading.html
- Difference between mutex and semaphore
- Posix Semaphores
- System V semaphores between different process.
- Classical synchronization problems
- Mutexes between multiple process
- Joinable and detached threads - The thread attributes that the system should store for a joinable thread.
- http://www.domaigne.com/blog/computing/joinable-and-detached-threads/
- Assistace data
- reference time
- ref position
- ionospheric model
- UTC model
- acquisition assistance
Designing servers
There are a number of different ways to
design servers. These models are discussed in detail in a book by
Douglas E. Comer and David L. Stevens entiteld Internetworking with TCP/IP Volume III:Client Server Programming and Applications published by Prentice Hall in 1996. These are summarized here.
Concurrent, connection oriented servers
The
typical server in the Internet domain creates a stream socket and forks
off a process to handle each new connection that it receives. This
model is appropriate for services which will do a good deal of reading
and writing over an extended period of time, such as a telnet server or
an ftp server. This model has relatively high overhead, because forking
off a new process is a time consuming operation, and because a stream
socket which uses the TCP protocol has high kernel overhead, not only in
establishing the connection but also in transmitting information.
However, once the connection has been established, data transmission is
reliable in both directions.
Iterative, connectionless servers
Servers
which provide only a single message to the client often do not involve
forking, and often use a datagram socket rather than a stream socket.
Examples include a finger daemon or a timeofday server or an echo server
(a server which merely echoes a message sent by the client). These
servers handle each message as it receives them in the same process.
There is much less overhead with this type of server, but the
communication is unreliable. A request or a reply may get lost in the
Internet, and there is no built-in mechanism to detect and handle this.
Single Process concurrent servers
A
server which needs the capability of handling several clients
simultaneous, but where each connection is I/O dominated (i.e. the
server spends most of its time blocked waiting for a message from the
client) is a candidate for a single process, concurrent server. In this
model, one process maintains a number of open connections, and listens
at each for a message. Whenever it gets a message from a client, it
replies quickly and then listens for the next one. This type of service
can be done
with the select system call.
- reference link
- Program