Skip to content
SimittinPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Multithreaded RPC-Based Distributed Task Processing System

Author: A.Melih Bostancıeri
Assignment Title: Multithreaded RPC-Based Distributed Task Processing System

General Information

  • Course: CSE 303 – Fundamentals of Operating Systems
  • Assignment: Homework 02 – RPC & Multithreading
  • Language: C
  • Platform: Linux/WSL

Project Description

This project implements a distributed task processing system using Remote Procedure Call (RPC) and multithreading. The client sends tasks to a remote server, which queues and processes them using worker threads. The client can also query the server for task results.


File Structure

client.c         # Client application
server_impl.c    # Server application (with worker threads)
task.x           # RPC interface definition
task.h           # Header generated by rpcgen
task_clnt.c      # Client code generated by rpcgen
task_svc.c       # Server code generated by rpcgen
task_xdr.c       # XDR code generated by rpcgen
Makefile         # Build instructions

Build Instructions

  1. Generate RPC files:
    rpcgen task.x
  2. Build the project:
    make

This will produce the following binaries: client, server


Run Instructions

Start the server first:

./server

Then start the client:

./client <server_ip>

Example:

./client localhost

Supported Task Types

  1. Reverse String
  2. Sum of Integer List
  3. Fibonacci Number

Design Overview

  • Server: Maintains a thread-safe queue, processes tasks with 3 worker threads, stores results in a protected array.
  • Client: Menu-driven interface for submitting tasks and querying results.
  • RPC: Communication over UDP, 256-byte limit for task and result strings.

Test Scenarios

  • Test each task type with sample inputs.
  • Submit tasks from multiple clients concurrently.
  • Query results before and after processing to check for "PENDING" and final result.

Notes

  • The server and client are implemented in C using POSIX threads.
  • Code and build process are tested on Linux/WSL.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages