Question: Multihreaded Bank System in C 1 Introduction For this assignment, you will write programs for a multithreaded banking system simulation This will give you an

Multihreaded Bank System in C

Multihreaded Bank System in C 1 Introduction For this assignment, you will

write programs for a multithreaded banking system simulation This will give youan opportunity to exercise mutexes and thread coordination. You will write client/server

1 Introduction For this assignment, you will write programs for a multithreaded banking system simulation This will give you an opportunity to exercise mutexes and thread coordination. You will write client/server programs with a single server that supports multiple clients communicating through TCP/IP network connections. Having to support multiple concurrent client-service threads in the server will require the use of mutexes to protect and manage shared data structures 2 Server: Multithreaded Bank Server program Your server process should spawn a single session-acceptor thread. The session-acceptor thread will accept incoming client connections from session-acceptor thread should spawn a separate client-service thread that communicates exclusively with the connected client. You may have more than one client connecting to the server concurrently, so there may be multiple client-service threads running concurrently in the same server process. The bank server process will maintain a simple bank with multiple accounts. There will be a maximum of 20 accounts. Initially you as needed. Information for each account will consist of separate client For each new connection, the r bank will have no accounts, but clients may open accounts . Account name (a string up to 100 characters long) . Current balance (a floating-point number) . In-session flag (a boolean flag indicating whether or not the account is currently being serviced) The server will handle each client in a separate client-service thread. Keep in mind that any client can open a new account at any time, so adding accounts to your bank must be a mutex-protected operation. 3 Client: Connecting to the server The client program requires the name of the machine running the server process as a command-line argument. The machine running the server may or may not be the same machine running the client processes. On invocation, the client process must make repeated attempts to connect to the server Once connected, the client process will prompt for commands. The syntax and meaning of each command is specified in the next section 1 Introduction For this assignment, you will write programs for a multithreaded banking system simulation This will give you an opportunity to exercise mutexes and thread coordination. You will write client/server programs with a single server that supports multiple clients communicating through TCP/IP network connections. Having to support multiple concurrent client-service threads in the server will require the use of mutexes to protect and manage shared data structures 2 Server: Multithreaded Bank Server program Your server process should spawn a single session-acceptor thread. The session-acceptor thread will accept incoming client connections from session-acceptor thread should spawn a separate client-service thread that communicates exclusively with the connected client. You may have more than one client connecting to the server concurrently, so there may be multiple client-service threads running concurrently in the same server process. The bank server process will maintain a simple bank with multiple accounts. There will be a maximum of 20 accounts. Initially you as needed. Information for each account will consist of separate client For each new connection, the r bank will have no accounts, but clients may open accounts . Account name (a string up to 100 characters long) . Current balance (a floating-point number) . In-session flag (a boolean flag indicating whether or not the account is currently being serviced) The server will handle each client in a separate client-service thread. Keep in mind that any client can open a new account at any time, so adding accounts to your bank must be a mutex-protected operation. 3 Client: Connecting to the server The client program requires the name of the machine running the server process as a command-line argument. The machine running the server may or may not be the same machine running the client processes. On invocation, the client process must make repeated attempts to connect to the server Once connected, the client process will prompt for commands. The syntax and meaning of each command is specified in the next

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!