Skip to content

C programs demonstrating local client-server communication using UNIX-domain stream sockets to validate Fibonacci sequences, highlighting inter-process communication in a Unix environment (Operating Systems II, UNIWA).

Notifications You must be signed in to change notification settings

Operating-Systems-2-aka-Uniwa/Sockets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UNIWA

UNIVERSITY OF WEST ATTICA
SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING AND INFORMATICS

University of West Attica · Department of Computer Engineering and Informatics


Operating Systems II

UNIX-Domain Stream Sockets Communication for Fibonacci Sequence Validation

Vasileios Evangelos Athanasiou
Student ID: 19390005

GitHub · LinkedIn


Supervision

Supervisor: Vasileios Mamalis, Professor

UNIWA Profile

Co-supervisor: Nikolaos Psarras, Applications Lecturer

UNIWA Profile · LinkedIn


Athens, June 2022



README

UNIX-Domain Stream Sockets Communication for Fibonacci Sequence Validation

This repository contains an assignment for Operating Systems II, focusing on inter-process communication using UNIX-domain stream sockets to validate Fibonacci number sequences exchanged between a client and a server.


Table of Contents

Section Folder/File Description
1 assign/ Assignment material
1.1 assign/ASK-2C-OS-II-LAB-2021-22.png Assignment description in English
1.2 assign/ΑΣΚ-2Γ-ΛΣ-ΙΙ-ΕΡΓ-2021-22.png Assignment description in Greek
2 src/ Source code implementations
2.1 src/server.c Server program implementation
2.2 src/client.c Client program implementation
3 README.md Project documentation
4 INSTALL.md Usage instructions

1. Project Overview

The project implements communication between two programs using UNIX-domain stream sockets:

  • A server program listens for client connections.
  • A client program sends a sequence of integers.
  • The server checks whether the received numbers match the first N values of the Fibonacci sequence.
  • The server returns a response indicating whether the sequence is valid.

This assignment demonstrates inter-process communication techniques in Unix-like systems.


2. Objectives

  • Implement socket-based communication using UNIX-domain sockets.
  • Exchange structured data between client and server programs.
  • Validate Fibonacci sequences on the server side.
  • Return validation results to the client.
  • Demonstrate client-server interaction in a local system environment.

3. Key Features

  • Client–Server Communication
    Programs communicate locally using UNIX sockets.

  • Sequence Validation
    Server verifies correctness of Fibonacci sequences.

  • Interactive Client
    Client allows repeated sequence submission.

  • Local IPC Mechanism
    Uses UNIX-domain sockets instead of network sockets.


4. Program Structure

4.1 Server Program (server.c)

  1. Create UNIX-domain socket.
  2. Bind to a socket path.
  3. Listen for client connections.
  4. Receive integer sequences.
  5. Validate Fibonacci sequence.
  6. Send result back to client.

4.2 Client Program (client.c)

  1. Connect to server socket.
  2. Send integer sequences.
  3. Receive server response.
  4. Allow repeated user input.

About

C programs demonstrating local client-server communication using UNIX-domain stream sockets to validate Fibonacci sequences, highlighting inter-process communication in a Unix environment (Operating Systems II, UNIWA).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages