In this project, you will write a multithreaded program that simulates management of a set of bank accounts. This program is referred to as the server. When the server is started, a fixed number of bank accounts are created, and users can perform transactions on these accounts, as well as query an account’s current balance. Each request requires access to multiple records from a database, and also requires some processing time. Since many user requests may arrive simultaneously, servicing the requests sequentially, one after another, would cause a high average latency for the users; servicing the requests in parallel is required to keep response times small. Thus, your program must use multiple threads to service the requests simultaneously. User requests are made via the command line. When the user types in a request, the server program records the request and presents the user with a transaction ID, and then immediately accepts more requests. The requests are processed in the background; when finished, the results of the requests are printed to a file in order to avoid interfering with user input. The program should contain two types of threads, a “main” thread, and one or more “worker” threads. The main thread will initialize any state of the server and create all other “worker” threads. Each worker thread will service one request at a time. After servicing a request, the worker thread will service another request, and so on, until the server exits. The number of worker threads is specified as an argument on the command line.
-
Notifications
You must be signed in to change notification settings - Fork 0
elmcgill/c-multi-threaded-server
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A project with sever and client programs. The client sends bank requests, while the server handles multiple client requests with multiple threads.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published