Design a java "hello world" program

Assignment Help Operating System
Reference no: EM13944880

Design a Java "Hello World" program that should mimic distributed processing of printing the string "Hello World!" on display.

For doing this the main() method should just create 5 threads and store references to them in an array of threads, which will be passed to each thread for communication purposes. Then the main() method should start all threads, wait for their completion and exit. It must not control the threads in any way or send any other information to them.

Each thread will compete for the display access and once it is granted, the thread prints out only one character of the string (namely the next one in order) and then starts to compete for the display access again for printing the next character. If all characters of the string are printed, the thread exits. This way each of the threads will execute the same algorithm and print just a few string characters.

Printing a string character can be considered as a critical part of the thread code. For this, implement a mechanism providing mutual exclusion, but without using any synchronization approaches (semaphores, locks, etc.). Each of the threads should be able to communicate with other threads by sending messages to them. The communication must be purely distributed in the sense that no other shared object is available to threads besides of the Thread array workers.

Reference no: EM13944880

Questions Cloud

Which is better for the is manager to employ and why : Which is better for the IS manager to employ and why?
State of the kid : A USA Today Snapshot summarized the results of a 'State of the Kid' survey conducted by the Highlights magazine.  A total of 500 children were surveyed, 200 were considered young kids (with ages 9-10 years old) and 300 were older (with ages 11-14 yea..
A light, inextensible cord passes over a light : A light, inextensible cord passes over a light, frictionless pulley with a radius of 4.2 cm. It has a(n) 19 kg mass on the left and a(n) 5.3 kg mass on the right, both hanging freely. Initially their center of masses are a vertical distance 4.4 m ..
How are each of the theories similar : How is learning defined and/or described by each of these theories? How are each of the theories similar? How do they differ?
Design a java "hello world" program : Printing a string character can be considered as a critical part of the thread code. For this, implement a mechanism providing mutual exclusion, but without using any synchronization approaches (semaphores, locks, etc.).
Advantages of using a sample to represent the population : A brief description of the media example you found, including details about the sample. What population do you believe this sample best represents? What are the advantages and disadvantages of using a sample to represent the population in your par..
Best understanding of the physical universe : Welcome to PHYS 151, "Mechanics and Heat." In this class we will explore the foundations of modern mechanics from the point of view of our current, best understanding of the physical universe.
Engage with stakeholders to initially brainstorm : You will need to engage with stakeholders to initially brainstorm some solutions that address the causes of the problem.
Justification for using the approximate model : Show all work, including justification for using the approximate model to find this probability. You may upload a picture as part of your supporting work if you wish.

Reviews

Write a Review

Operating System Questions & Answers

  Benefits of the just in time inventory management system

Determine what does just in time inventory management have to do with the Carle Heart Center in Urbana, Illinois?

  What is a thread

What types of problems lend themselves to Processes? Is one better than the other? Why or Why Not.

  Write about the dual roles for the operating system

The dual operating system roles by presenting a GUI to the user and hardware resources management are conflict one with another.

  Pseudo code description of the fair share thread scheduler

Description of your experiments to test the fair-share thread scheduler. Once we read your report, we should have a clear understanding of how you went about solving the problem.

  Question about spreadsheet applications

As a result of your work on high school reunion assignment, you decide to learn more about MS. Excel and the several uses of spreadsheet applications.

  A unix file system

A UNIX file system has 1-kilobyte blocks and 32-bit disk addresses. What is the maximum file size if each i-node contains 20 direct entries and one single, double, and triple indirect entry each? Draw a picture and give all calculations properly anno..

  The closing process of a project is the last stage of the

the closing process of a project is the last stage of the life cycle of a project is to finalize all activities across

  How much cylinder skew is needed for an oceangate disk

How much cylinder skew is needed for an oceangate disk operating at 20,000 rpm(new series for the christmas promotions) which has a seek time of 0.5 milliseconds? This disk has 800 sectors of 512 bytes each on each track?

  Question about big oh relationship

Provide witnesses n0 and c that can be used to prove the relationship. Select your witnesses to be minimal, in the sense that n0-1 and c are not witnesses, and if d

  Explain the elements and capabilities of a fault

Discuss briefly the network management software components and describe the elements and capabilities of a fault, configuration, accountingn and security server.

  Question no1consider a scenario of post mailbox there are

question no.1consider a scenario of post mailbox there are two processes named sender s and receiver r. both processes

  What are the criteria for choosing a process for swapping

What are the criteria for choosing a process for swapping into memory from the swap device? What are the criteria for choosing a process for swapping out of the memory to the swap device?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd