Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do you know how to solve this? I have the complete PDF E0) 10of5 Concordia University Department of Computer Science and Software Engineering Comp 5461

Do you know how to solve this? I have the complete PDF

image text in transcribed
E0) 10of5 Concordia University Department of Computer Science and Software Engineering Comp 5461 Operating Systems Summer 2024 Programming Assignment 1 Submission through Moodle Due Date: 27 June 2024 (@ 23:59. Objectives This is an introductory assignment to operating systems and Java. You will simply use Java while grasping concurrency and atomicity concepts. Tools You will use Java 1.5 or later for this assignment. You can work on the assignment on any machine you wish (i.e., personal laptop) as long as you use Java 1.5 or a later version, and the assignment works in the lab as expected. You can also use any source code editing & compiling tools, such as TextPad, vim, Emacs, Eclipse, JBuilder, NetBeans, etc. All these tools have easy configurable convenient syntax highlighting. You can use whichever you prefer but you need to make sure that your programs run as expected at the Concordia lab before you submit them. Setting Up Your Environment To work in the labs, you will need to set up your environment first, which will be explained in the first tutorial. If you require help - don't hesitate to ask your lab instructor for it! Source Code There are four files provided with the assignment. You will need these files to work on the assignment. A soft copy of the needed code is available for download from the course web site. File Checklist Account.java AccountManager.java Depositor.java Withdrawer. java Background To begin, realize that this assignment is \"'a bit\" artificial in a sense, and should only be considered for learning purposes. In this assignment, we deal with concurrent execution of multiple threads operating on a shared data structure (Accounts). You will be learning more of Java along the way. An array of accounts hold 10 account information (imagine like OS resources of the same type). The account array has a valid state once it is initialized. We will employ 10 threads for deposit and 10 threads for withdrawal; each thread is bound to a specific account. There will be one depositor thread and one withdrawer thread that are bound to one specific account. The depositor is responsible for depositing X amount to the account and the withdrawer is responsible for withdrawing the same X amount from the same account. As a result of running 20 threads the final accounts' balance/state should be the same as initial accounts' balance/state. The main goal is to maintain the accounts' state valid regardless of the number of the concurrent threads accessing them, and regardless of their order. E.g.: of consistent run Print initial account balances Account: 1234 Name: Mike Balance: 1000.0 Account: 2345 Name: Adam Balance: 2000.0 Account: 3456 Name: Linda Balance: 3000.0 Account: 4567 Name: John Balance: 4000.0 Account: 5678 Name: Rami Balance: 5000.0 Account: 6789 Name: Lee Balance: 6000.0 Account: 7890 Name: Tom Balance: 7000.0 Account: 8901 Name: Lisa Balance: 8000.0 Account: 9012 Name: Sam Balance: 9000.0 Account: 4321 Nangumiebeiei

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions

Question

What is IUPAC system? Name organic compounds using IUPAC system.

Answered: 1 week ago

Question

What happens when carbonate and hydrogen react with carbonate?

Answered: 1 week ago