Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aksiksi/gtipc
A client/server IPC interface using POSIX APIs.
https://github.com/aksiksi/gtipc
c ipc linux posix unix
Last synced: 6 days ago
JSON representation
A client/server IPC interface using POSIX APIs.
- Host: GitHub
- URL: https://github.com/aksiksi/gtipc
- Owner: aksiksi
- Created: 2018-02-18T18:52:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T17:08:25.000Z (over 6 years ago)
- Last Synced: 2024-10-23T09:00:16.507Z (14 days ago)
- Topics: c, ipc, linux, posix, unix
- Language: C
- Homepage:
- Size: 355 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GTIPC
This project was implemented for CS6210 (Advanced Operating Systems) at Georgia Tech in Spring 2018.
## Overview
The goal GTIPC is to implement a low-level IPC client/server protocol and interface targeting the Unix platform.
The main requirements for this project are:
1. Implement a blocking IPC client that can communicate with some server process.
2. Implement a non-blocking/asynchronous IPC client that performs the same tasks.
3. Design a client API and library that can be used in a generic C/C++ Unix application.
4. Present a sample application that utilizes the aforementioned client API.The GTIPC API interface provides clients with three "dummy" IPC services:
1. A service that can multiply two 32-bit integers (MUL service).
2. A service that generates four pseudorandom 32-bit integers (RAND service).
3. A service that creates and/or appends a line of text to a given file path (FILE service).See `gtipc/types.h` for the structure of arguments to each of these services.
## Build
* To build everything: `make`
* To build just the GTIPC static library: `make lib`
* To build only the sample client application: `make client`All build artifacts will be in `bin/`.
## Sample Client
A sample client is included in `sample/client.c`.
### Build and Run
To build, simply run `make` in the root directory.
* To run the server: `./bin/gtipc-server` (**do this first**)
* To run the sample client `./bin/gtipc-client`### Operation
1. Initialize the GTIPC library
2. 1024 asynchronous requests to the MUL service (triggers shared memory resize)
3. 128 synchronous (blocking) requests to the RAND service
4. Spawns 10 background threads that each perform (in parallel):
1. An asynchronous request to RAND
2. An asynchronous request to the FILE service
3. A synchronous request to RAND
4. Join both of the asynchronous requests
5. 1024 asynchronous requests to the MUL service (back on main thread)
6. Join all 2048 asynchronous requests
7. Exit the GTIPC library### Performance Results
Environment: Ubuntu (v4.10 kernel), GCC 5.4.0, 2 CPUs
* Time to dispatch first 1024 async requests: **21299 usecs**
* Time to complete 128 sync and 2048 async requests: **898769 usecs**## Implementing Your Own Client
1. In your client application: `#include "gtipc/api.h"`.
2. Point your compiler to the `includes/` directory when compiling, and then point to `libgtipc.a` during linking.
3. Make sure to start the GTIPC server before testing your application!