Parallelism-driven Library Management System. A high-performance, parallel Library Management System built in C that leverages system calls, thread pooling, and mutex locks for efficient concurrent operations.
- Multi-threaded Architecture: Utilizes POSIX threads for parallel operations
- Mutex-based Resource Management: Prevents race conditions in critical sections
- Socket-based Client-Server Model: Supports multiple concurrent client connections
- Real-time Book Management: Track book availability and lending status
- User Authentication: Secure login system for both librarians and clients
- Data Persistence: Maintains state across sessions using binary data files
- POSIX-compliant operating system (Linux/Unix)
- GCC compiler
- pthread library
- Network socket support
make all # Builds both server and client
make server # Builds only the server
make client # Builds only the client
make clean # Removes compiled binaries
./server
./client
- Create librarian accounts
- Add new books to the library
- Monitor book inventory
- View all client transactions
- Real-time system status monitoring
- Create user accounts
- Borrow books (up to 15 books per user)
- Return books
- View borrowed books
- Browse available books
- Dedicated threads for client connections
- Mutex locks for shared resource access:
library_mutex
: Book inventory operationslibrarian_mutex
: Librarian account managementclient_mutex
: Client operations
book
: Basic book informationlibrary_book
: Extended book info with copy trackingclient
: User account and borrowed bookslibrarian
: Staff account management
- TCP/IP-based client-server communication
- Custom message protocol for operations
- Connection pooling for multiple clients
- Password-protected accounts
- Session management
- Concurrent access control
- Data integrity protection
.
├── lib/
│ ├── book.h
│ ├── client.h
│ ├── include.h
│ └── server.h
├── src/
│ ├── client.c
│ └── server.c
├── data/
│ ├── books.dat
│ ├── clients.dat
│ └── librarians.dat
└── Makefile
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the Unlicense - see the LICENSE file for details.