CS4348 Operating systems: Java Data Structures

$20 Bonus + 25% OFF

Securing Higher Grades Costing Your Pocket?
Book Your Assignment at The Lowest Price
Now!

Students Who Viewed This Also Studied

CS4348 Operating Systems

Task

I. Project Organization

This project will study the coordination of multiple threads using semaphores.

You should do the following pieces to complete your project.  Each piece is explained below:

•Design 40 points

Design

The design should consist of two things:  (1) a list of every semaphore, its purpose, and its initial value, and (2) pseudocode for each function. The pseudocode should be similar to the pseudocode shown in the textbook for the barbershop problem. Every wait and signal call must be included in the pseudocode.

Code

Your code should be nicely formatted with plenty of comments.  The code should be easy to read, properly indented, employ good naming standards, good structure, and should correctly implement the design.  Your code should match your pseudocode.   

Output

Output will be graded by running your program.

Summary

The summary section should discuss your simulation, any difficulties encountered, what was learned, and results.  It should be at least one page in length.

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.util.concurrent.Semaphore).

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.

Any mechanisms for thread coordination other than the semaphore are not allowed.

Elevator Simulation

In this project threads are used to simulate people using an elevator to reach their floor.

This project is similar to the “barbershop” example in the textbook.  The threads to be used are as follows:

Person:

1)49 people are in line at the elevator at the beginning of the simulation (1 thread per person).

2)Each person begins at floor 1.

3)Each person randomly picks a floor from 2 to 10.

4)A person will wait for an elevator to arrive at floor 1.

5)A person will board the elevator only if there is room.

6)Once at the destination floor, the person exits the elevator.

Elevator:

1)There is 1 elevator (1 thread for the elevator).

2)The elevator can only hold 7 people.

3)The elevator begins on floor 1.

4)The elevator leaves after the 7th person enters.

Main

1)Creates all threads and joins all person threads.

2)When last person reaches their floor, the simulation ends.

Other rules:

1)Each activity of each thread should be printed with identification (e.g., person 1).

2)A thread may not use sleeping as a means of coordinating with other threads.

3)Busy waiting (polling) is not allowed. 

4)Mutual exclusion should be kept to a minimum to allow the most concurrency.

5)The semaphore value may not obtained and used as a basis for program logic.

6)All activities of a thread should only be output by that thread.

7)Your output must include the same information and the same set of steps as the sample output.

Sample output:

Your project’s output should match the wording of the sample output:

Elevator door opens at floor 1

Person 0 enters elevator to go to floor 5
Person 1 enters elevator to go to floor 2
Person 2 enters elevator to go to floor 8
Person 3 enters elevator to go to floor 4
Person 4 enters elevator to go to floor 6
Person 5 enters elevator to go to floor 7
Person 6 enters elevator to go to floor 2
Elevator door closes
Elevator door opens at floor 2
Person 1 leaves elevator  
Person 6 leaves elevator  
Elevator door closes
Elevator door opens at floor 4
Person 3 leaves elevator  
Elevator door closes
Elevator door opens at floor 5
Person 0 leaves elevator  
Elevator door closes
Elevator door opens at floor 6
Person 4 leaves elevator  
Elevator door closes
Elevator door opens at floor 7
Person 5 leaves elevator  
Elevator door closes
Elevator door opens at floor 8
Person 2 leaves elevator  
Elevator door closes
Elevator door opens at floor 1

Simulation done

III. Project Guidelines

Submitting

Submit your project on eLearning.  Include in your submission the following files:

1)‘design.xxx’ where xxx is doc, docx, or pdf.

2)‘summary.xxx’ where xxx is doc, docx, or pdf.

3)‘project2.c’, ‘project2.cpp’, or ‘Project2.java’ along with any other source files.

4)‘readme.txt’ containing:

a)the complete command line used to compile your program

b)the complete command line used to run your program

c)any other details the TA should know 

Partial or Missing Submissions

It is your responsibility to upload all of the right files on time.  It is recommended that you double-check the files you upload to make sure they are the right ones.

Academic Honesty

This is an individual project. All work must be your own. Comparison software may be used to compare the work of all students. Similar work will be reported to the Office of Judicial Affairs for investigation.

Grading

The written portions will be graded subjectively based on completeness and quality. The code will be graded based on points allocated for each key part of the processing as determined by the instructor.  The output will be graded based on expected results.

Resources

The web has many articles on threads and there are books available on threads.  The course website also contains example source code.

CS4348 Operating Systems

Answer in Detail


Solved by qualified expert

Get Access to This Answer

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Amet dictum sit amet justo donec enim diam vulputate ut. Neque convallis a cras semper auctor neque vitae. Elit at imperdiet dui accumsan. Nisl condimentum id venenatis a condimentum vitae sapien pellentesque. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Malesuada fames ac turpis egestas maecenas pharetra convallis posuere. Et ultrices neque ornare aenean euismod. Suscipit tellus mauris a diam maecenas sed enim. Potenti nullam ac tortor vitae purus faucibus ornare. Morbi tristique senectus et netus et malesuada. Morbi tristique senectus et netus et malesuada. Tellus pellentesque eu tincidunt tortor aliquam. Sit amet purus gravida quis blandit. Nec feugiat in fermentum posuere urna. Vel orci porta non pulvinar neque laoreet suspendisse interdum. Ultricies tristique nulla aliquet enim tortor at auctor urna. Orci sagittis eu volutpat odio facilisis mauris sit amet.

Tellus molestie nunc non blandit massa enim nec dui. Tellus molestie nunc non blandit massa enim nec dui. Ac tortor vitae purus faucibus ornare suspendisse sed nisi. Pharetra et ultrices neque ornare aenean euismod. Pretium viverra suspendisse potenti nullam ac tortor vitae. Morbi quis commodo odio aenean sed. At consectetur lorem donec massa sapien faucibus et. Nisi quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus. Duis at tellus at urna condimentum mattis pellentesque. Vivamus at augue eget arcu dictum varius duis at. Justo donec enim diam vulputate ut. Blandit libero volutpat sed cras ornare arcu. Ac felis donec et odio pellentesque diam volutpat commodo. Convallis a cras semper auctor neque. Tempus iaculis urna id volutpat lacus. Tortor consequat id porta nibh.

36 More Pages to Come in This Document. Get access to the complete answer.

Looking for the best dissertation help in Sydney? Contact MyAssignmenthelp.com to get required dissertation help in various Australian cities. Apart from Sydney, we provide premier quality academic assistance to students in Perth, Adelaide, Melbourne, Brisbane, etc. Students, who spend time finding answer ‘who can write my dissertation perfectly’, must try our services. The reason is the credibility of our writers, who efficiently respond to students’ searches ‘can anyone write my dissertation for me’. So quit thinking, who can I write my dissertation according to Australian university standards and let our experts help you.

More CS4348 CS4348 Operating Systems: Questions & Answers

CBOP 3203 object oriented programming


Write a class program based on the information given below.
 
Class Name:
· Coordinate
Attribute:
· x, y
-Coordinates of a point
 
ONE Constructor:
· to set the initial value for the attributes
 
Member methods:
· void s …

View Answer

ITECH1100 Understanding the Digital Revolution

Task 1 – Costs of operating the business Using Excel, create a spreadsheet called operating_costs.xlsx that calculates the projected annual outgoing costs of running Story Boomerang. Your spreadsheet should be configured such that the working hours, hourly rates, and fixed and utility costs can be …

View Answer

Information System

For the Final Project Part I: Milestone One you will use the Student Information System Requirements Definitions document and the Final Project Part I Solution Submission Template document to complete the milestone activity. Refer to instructor and peer feedback in the discussion forum from the prev …

View Answer

Information Technology

C++ and Java Order: -APA 6th Edition -No peer to peer/reference material over six years old -Please use the full page because my professor is a stickler for that kind of thing -Please understand this is a critical thinking assignment and there shouldn’t be any: This essay or assignment will cover .. …

View Answer

Content Removal Request

If you are the original writer of this content and no longer wish to have your work published on Myassignmenthelp.com then please raise the
content removal request.

Choose Our Best Expert to Help You

Norris Ware

I have been a professor of microeconomics at the Singapore University of Technology and Design

800 – Completed Orders

Hire Me

Junior Aguirre

I have pursued my PhD degree on nursing from London University.

450 – Completed Orders

Hire Me

Still in Two Minds? The Proof is in Numbers!

33845 Genuine Reviews With a Rating of 4.9/5.

Management

Assignment: 3 Pages, Deadline:
6 days

Very good piece of work, exactly what I needed. Everything was done very smooth from order to the end.

User ID: 5***28 London, Great Britain

Organizational Behavior

Assignment: 10 Pages, Deadline:
9 days

Thank you for your help, I manage to submit my assignment on time and I got a good grade!

User ID: 5***28 London, Great Britain

Marketing

Assignment: 6 Pages, Deadline:
12 days

Fantastic work, I received my order on time and it was very well done. I got exellent mark for my assingment!

User ID: 5***28 London, Great Britain

Project Management

Assignment: 6 Pages, Deadline:
11 days

I have very complicated project to do and your experts helped me with an exellent work. Thank you so much!

User ID: 5***28 London, Great Britain

Statistics

Programming: 1 Page, Deadline:
26 days

A good solution has been provided and I am satisfied with the solution provided.

User ID: 7***32 Zimbabwe

Finance

Home Work: 8 Pages, Deadline:
19 days

Got the assignment ahead of time and it is very good with attention to detail with all the calculations as asked earlier.

User ID: 8***20 India

It Write Up

Assignment: 20 Pages, Deadline:
3 days

Excellent Job, got excellent grades and passed in the assignment highly recommend. Best solution out there

User ID: 6***94 Mauritius

It Write Up

Essay: 0.8 Pages, Deadline:
1 day

I am one of the regular customer and I am happy with experts which helps me to clear my study. I am satisfied with solutions and thank you for helping …

User ID: 2***87 Bexley, Australia

Accounting

Home Work: 1 Page, Deadline:
8 days

thank you you guys, even though i dont have high marks, but im happy with your effort on that. really appreciate for that

User ID: 6***24 Australia

Management

Assignment: 2.4 Pages, Deadline:
4 days

thank you expert and your team. u guys really helpful for my assignment . really appreciate your effort

User ID: 6***24 Australia

Management

Assignment: 3 Pages, Deadline:
6 days

Very good piece of work, exactly what I needed. Everything was done very smooth from order to the end.

User ID: 5***28 London, Great Britain

Organizational Behavior

Assignment: 10 Pages, Deadline:
9 days

Thank you for your help, I manage to submit my assignment on time and I got a good grade!

User ID: 5***28 London, Great Britain

Marketing

Assignment: 6 Pages, Deadline:
12 days

Fantastic work, I received my order on time and it was very well done. I got exellent mark for my assingment!

User ID: 5***28 London, Great Britain

Project Management

Assignment: 6 Pages, Deadline:
11 days

I have very complicated project to do and your experts helped me with an exellent work. Thank you so much!

User ID: 5***28 London, Great Britain

Statistics

Programming: 1 Page, Deadline:
26 days

A good solution has been provided and I am satisfied with the solution provided.

User ID: 7***32 Zimbabwe

Finance

Home Work: 8 Pages, Deadline:
19 days

Got the assignment ahead of time and it is very good with attention to detail with all the calculations as asked earlier.

User ID: 8***20 India

It Write Up

Assignment: 20 Pages, Deadline:
3 days

Excellent Job, got excellent grades and passed in the assignment highly recommend. Best solution out there

User ID: 6***94 Mauritius

It Write Up

Essay: 0.8 Pages, Deadline:
1 day

I am one of the regular customer and I am happy with experts which helps me to clear my study. I am satisfied with solutions and thank you for helping …

User ID: 2***87 Bexley, Australia

Accounting

Home Work: 1 Page, Deadline:
8 days

thank you you guys, even though i dont have high marks, but im happy with your effort on that. really appreciate for that

User ID: 6***24 Australia

Management

Assignment: 2.4 Pages, Deadline:
4 days

thank you expert and your team. u guys really helpful for my assignment . really appreciate your effort

User ID: 6***24 Australia

Have any Query?
Reference no: EM132069492

WhatsApp
Hello! Need help with your assignments? We are here

GRAB 25% OFF YOUR ORDERS TODAY

X