GitXplorerGitXplorer
s

CSE-344

public
2 stars
1 forks
0 issues

Commits

List of commits on branch master.
Verified
e0dd3ca22965c14b3a3efe98e8e10bc291065013

Delete CNAME

ssglbl committed 3 months ago
Verified
55f12e3adf24b898ed414e9f82b1c8576cd321d4

Create CNAME

ssglbl committed 3 months ago
Verified
4d0fdc7017da847c4a0d2436463a40d65d40c64b

Update README.md

ssglbl committed a year ago
Verified
2a9692858ce6305e7fa67c6c0508ce97a5aef0e8

Update README.md

ssglbl committed 2 years ago
Verified
1c5dfe86f82ae1427920d4ffeb7ee7fae9d9a044

Theme

ssglbl committed 2 years ago
Verified
bd53dfa5feea7f9162b8164a1f3358f1d6f64519

Update README.md

ssglbl committed 2 years ago

README

The README file for this repository.

Assignments of CSE-344 / System Programming on POSIX Systems

String replacement with low-level system calls.

Simulating parent-child process relationship. Parent process reads input coordinates from file and forward them for calculations to children processes.

Simulating bakers synchronization problem using named and unnamed semaphores. (inspired by cigarette smokers synchronization problem)

Simulating supplier thread - consumer threads relationship using System V semaphores / semaphore sets.

Using;

  • semget => creating a semaphore set (multiple semaphores)
  • semctl => initializing semaphore set indexes to a number (Using SemUnion)
  • semctl => Checking value of semaphore set index.
  • semop => Incrementing/decrementing the value of semaphore (or multiple semaphores together) using struct sembuf.
  • tprintf=> Variadic function which uses snprintf() and vprintf() to act like a printf with timestamp.
  • detached thread (for supplier) and joinable threads (for clients)

Simulating the usage of POSIX threads to parallelize a couple of mathematical tasks.

Simulating 2 process-pooled servers (Y and Z) executing on the same system as the clients. Which;

  • Y and Z are daemon processes that have no controlling terminal.
  • Y is singleton (measure against double instantiation).
  • Y have p children processes (workers).
  • If children of Y are already busy, they send requests to Z through pipe.
  • Z is a server instantiated by Server Y.
  • Z have children process pool (workers) and delegates requests to its children using shared memory segment.
  • Client connects to server Y through the server fifo (given as a commandline argument), sends its request, receives its response through its client fifo, prints it to STDOUT and exit. (Also it exits gracefully in case of SIGINT)

Simulating a connection system wihch have 3 programs. The servant processes will answer the requests coming from the server through sockets. The client will make requests to the server through sockets, and the server will respond to those requests via the information acquired from the servants. (Using ip address and unique port numbers). It's not fully implemented due to time restrictions.