Skip to content

Our Project for Operating System Course taken during summer 2023 semester

Notifications You must be signed in to change notification settings

Salma-Mamdoh/Concurrent-Wi-Fi-Router-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Concurrent Wi-Fi Router Simulator

Table of Contents

Problem Definition

It is required to simulate a limited number of devices connected to a router’s Wi-Fi using Java threading and semaphore. Routers can be designed to limit the number of open connections...

Solution Design

Your program must contain the following classes:

  1. Router Class: This class contains a list of connections and methods to occupy a connection and release a connection.
  2. Semaphore Class: As given in the synchronization lab (Check Lab 3).
  3. Device Class: Represent different devices (threads) that can be connected to the router...

Program Output

You will print the output logs in a file, which simulates the execution order of the devices threads and the printed messages of each device.

NOTE THAT: This is just an example not the only scenario that can be applied.

Sample Input

    What is the number of WI-FI Connections?
    2
    What is the number of devices Clients want to connect?
    4
    C1 mobile
    C2 tablet
    C3 pc
    C4 pc
  

Sample Output

    - (C1)(mobile)arrived
    - (C2)(tablet)arrived
    - Connection 1: C1 Occupied
    - Connection 2: C2 Occupied
    - C4(pc) arrived and waiting
    - C3(pc)arrived and waiting
    - Connection 1: C1 login
    - Connection 1: C1 performs online activity
    - Connection 2: C2 login
    - Connection 2: C2 performs online activity
    - Connection 1: C1 Logged out
    - Connection 1: C4 Occupied
    - Connection 1: C4 log in
    - Connection 1: C4 performs online activity
    - Connection 2: C2 Logged out
    - Connection 2: C3 Occupied
  

Usage

  1. Clone the repository.
  2. Compile the Java files.
  3. Run the Network class and follow the on-screen instructions.

About

Our Project for Operating System Course taken during summer 2023 semester

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages