Repository contains unix programming tasks for network programming, ipc and multithreading.
- Parallelize finding the determinant of matrix
- Implement parallel prefix sum algorithm
The solutions are in the folder parallel_programming
.
- Create three threads. The first thread must wait for the end of the third thread, and the second must cancel the third. File:
pthread_canceled.cpp
- Implement producer and consumer using
pthread_rwlock_t
andpthread_mutex_lock
. File:pthread_mutex.cpp
- Implement producer and consumer using
pthread_cond_t
. File:wait_pthread
The solutions are in the folder posix_threads
.
Implement asynchronous echo-server using each of these technologies: libevent
, libev
, libuv
, Boost.Asio
The solutions are in the folder asynchronous_network
.
- Implement echo-server and client using each of these technologies:
- simple TCP approach
- multiplexing using
select
- multiplexing using
poll
- multiplexing using
epoll
- multiplexing using
kqueue
- Implement asynchoronous chat-server using
epoll
- Implement the display of IP addresses for the given host on the command line in
showip.c
The solutions are in the folder sockets_multiplexing
.
-
The user enters several bash commands into the command line. For example:
who | sort | uniq -c | sort -nk1
We need to read the data from
STDINT
and output result toSTDOUT
. Each command must be executed in separate unix process. To transfer data between processes, usepipe
-
Implement inter-process communication using
pipe
, named pipefifo channel
andsocketpair
-
Implement unkillable proccess. The process must ignore the signals
SIGTERM
andSIGINT
-
Create child process that waits for and processes the
SIGTERM
signal from the parent process
The solutions are in the folder processes_channels_signals
.
- Implement process communication using unix message queues. Сreate two solutions: one with POSIX
mq_open
, the second with SysVmsgget
message queue - Implement process synchronization using unix semaphores. Сreate two solutions: one with POSIX
sem_open
, the second with SysVsemget
semaphore
The solutions are in the folder unix_ipc
.