Question: II. Project Description Language/Platform This project must target a Unix platform and execute properly on our cs1 or csgrads1 Linux server The project must be







II. Project Description Language/Platform This project must target a Unix platform and execute properly on our cs1 or csgrads1 Linux server The project must be written in C, C++, or Java. If using C or C++, you must use POSIX pthreads and semaphores (no mutexes, locks, etc.) If using Java, you must use Java Threads and Java Semaphores (java.utilsoncurrentSemaphore) You may not use the "synchronized" keyword in Java for mutual exclusion. You may not use Java data structures that have built-in mutual exclusion. Other approaches require approval. Bank Simulation A bank is simulated by using threads and semaphores to model customer and employee behavior This project is similar to the "barbershop" example in the textbook. The following rules apply Customer: 1) 2) 3) 4) 5 created initially, one thread each. Each customer will make 3 visits to the bank. Each customer starts with a balance of $1000 On each visit a customer is randomly assigned one of the following tasks make a deposit of a random amount from $100 to $500 in increments of $100 make a withdrawal of a random amount from $100 to S500 in increments of $100 - withdrawals request a loan of a random amount from S100 to $500 in increments of $100 a) b) may exceed the balance c) 5) Steps for each task are defined in the task table Bank Teller 1) 2) Two created initially, one thread each. Serves next customer in the teller line
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
