辅导案例-CSCI 320

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
CSCI 320 Operating Systems
Fall 2019
Semester Project
Synchronization

Out: 12/6/2017
Presentation Due: 12/12/2019@10:30am
Project Due: 12/13/2017 @ 8:00pm
Submission: Blackboard


10 Discussion of Condition Variables (written)
10 Research on Condition Variables in Java (written)
25 Synchronization in Producer (Java)
25 Synchronization in Consumer (Java)
20 Evaluation and Testing
10 SW Eng, code quality
20 points analysis/questions

Total 120 points


Presentation (5 minutes strict)
You must install “Mersive Solstice” App to display slides

20 approach/design decisions
20 experiments you will run
20 questions you seek to answer

Total 60 points: presentation
Outcomes
Upon completion of this project students will reinforce theoretical concepts covered in class concerning synchronization mechanisms. Additionally, students will reinforce their SW Engineering skills in implementing a solution for the producer/consumer synchronization problem in Java. This assignment will
require you to investigate how synchronization mechanisms are used in the
Java Programming Language, JDK 9 or later. Think very carefully about what
you are being asked to do. This is an experiment. Completing this assignment will require you to implement
synchronization and test your implementation under different loads. That is to use different numbers of threads and evaluate how or if the system breaks.
The Assignment You will begin with the Producer/Consumer code presented in class. The Java files and a Netbeans project will be provided. If you use NetBeans, you will need to install Netbeans IDE. This is free and can be found at http://www.netbeans.org. The version of Netbeans demonstrated in class was Netbeans version 11.2 using JDK 9. For information on Netbeans installation, refer to http://www.netbeans.org. The Java files consists of three classes, namely SynchronizationTest.java,
Producer.java, and Consumer.java. Please refer to the screencast for Thursday 5-Dec-2019 on the course YouTube channel for a detailed description of these classes.
• SynchronizationTest.java: creates critical section, producer threads, and consumer threads, waits for them and cleans up.
• Producer.java: adds string to critical section, ArrayList
• Consumer.java: removes string from critical section,
ArrayList The behavior of the experiment can be modified in several ways
• Change the amount of time that the parent waits before exiting. Remember that when a parent exits, the child thread it creates are also removed.
• Change the number of producer threads and consumer threads that contend for access to the critical section. Requirements for the experiment are:
• You must use condition variables in Java. This will require you to do research investigating how condition variables are created in Java and how they are used in Java
• You cannot change the critical section data structure. It must be an ArrayList. This was purposely done because it is not synchronized. You must use condition variables to synchronize the access to the critical section.
• Your submission must compile and must run. Submissions that do not compile will receive a zero without review.
• Develop a method for testing your solution. Suggestions includes changing the load incrementally and observing how the synchronization performs under load. Other modifications you can make is to change thread priorities as well as changing the proportions of producers to consumers (i.e. twice as many producers as consumers, three times, etc.).
• Remember you must use condition variables to synchronize. In doing so, you will realize that in class we discussed general theoretical concepts, but when you use these mechanisms in an actual programming language, the designers may choose to implement them with differences from what the theory says. This is part of using any operating systems facility. From one implantation in a language to the next, the same concept can take many forms.
Submitting Your work 1. Prepare written work in a single document (MS-Word or PDF only) 2. If you are using an IDE other than NetBeans, include all Java source files needed to compile and run your program. The grader will not add missing files to your submission. If you use NetBeans, you may submit the entire NetBeans project along with your document. 3. Assemble all pieces of your submission into a single folder. 4. Zip your folder. Use zip only. DO NOT use Tar, Rar, or 7-zip 5. Verify that the ZIP file you create actually works by unzipping, compiling and linking. If you submit a NetBeans project, it is your responsibility to verify that what you intend to submit can be opened and run by NetBeans. 6. Upload your zip file to Blackboard. If your ZIP file is too large to upload via blackboard, please store it in a cloud storage drive (Microsoft OneDrive, Google G-Drive, Dropbox) and submit a link to the cloud drive. It is your responsibility to ensure that any link to a cloud drive works. Test your submission link.
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468