Skip to content

Unix Network Programming, IPC, Multithreading. Libevent, Libev, Libuv, Boost.Asio. OpenMP, Intel TBB, MPI

Notifications You must be signed in to change notification settings

BagritsevichStepan/unix-programming

Repository files navigation

Unix Programming

Repository contains unix programming tasks for network programming, ipc and multithreading.

Tasks

Parallel Programming

OpenMP. Intel TBB. MPI

  1. Parallelize finding the determinant of matrix
  2. Implement parallel prefix sum algorithm

The solutions are in the folder parallel_programming.

POSIX Threads

  1. 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
  2. Implement producer and consumer using pthread_rwlock_t and pthread_mutex_lock. File: pthread_mutex.cpp
  3. Implement producer and consumer using pthread_cond_t. File: wait_pthread

The solutions are in the folder posix_threads.

Network Programming

Libevent. Libev. Libuv. Boost.Asio

Implement asynchronous echo-server using each of these technologies: libevent, libev, libuv, Boost.Asio

The solutions are in the folder asynchronous_network.

Sockets. Multiplexing

  1. 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
  2. Implement asynchoronous chat-server using epoll
  3. 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.

Unix IPC

Unix Processes. Channels. Signals

  1. 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 to STDOUT. Each command must be executed in separate unix process. To transfer data between processes, use pipe

  2. Implement inter-process communication using pipe, named pipe fifo channel and socketpair

  3. Implement unkillable proccess. The process must ignore the signals SIGTERM and SIGINT

  4. Create child process that waits for and processes the SIGTERM signal from the parent process

The solutions are in the folder processes_channels_signals.

Unix Message Queues. Semaphores

  1. Implement process communication using unix message queues. Сreate two solutions: one with POSIX mq_open, the second with SysV msgget message queue
  2. Implement process synchronization using unix semaphores. Сreate two solutions: one with POSIX sem_open, the second with SysV semget semaphore

The solutions are in the folder unix_ipc.

About

Unix Network Programming, IPC, Multithreading. Libevent, Libev, Libuv, Boost.Asio. OpenMP, Intel TBB, MPI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published