Design a "hello world" program in java

Assignment Help Computer Engineering
Reference no: EM1328308

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: EM1328308

Questions Cloud

Discusses weaknesses and their remedies : Describe an unknown company with technological computer products that are similar to Apple Inc. This information will help this unknown company to increase its market share.
Elucidate a firm competes in the market : Elucidate a firm competes in the market. Does the firm engage in price or non-price competition
Explain paypal''s business model - major drivers : Explain Paypal's Business Model - Major Drivers and why has it become such a success when other forms of digital cash have failed
Time value of money-internal rate of return : You're given a business opportunity to spend $12000 in Joe's Bakehouse. He offers to pay you $6000 in two year's time and then $11000 in 4 years' time. Find out the internal rate of return without using Excel.
Design a "hello world" program in java : Each of the threads must be able to communicate with other threads by sending messages to them. The communication should be purely distributed in the sense that no other shared object is available to threads besides of the Thread array workers.
Economists have estimated the subsiquent transportation : Economists have estimated the subsiquent transportation elasticities.
Explain student query- e-business : Explain Student query- E-Business and Difference between Internet and Intranet and Extranet
Show the change management and technology demands : I would like to know how large firms and short firms utilize change management concepts to meet growing technology demands.
Brand extensions can endanger brands : Consider the statements "Brand extensions can endanger brands" and "Brand extensions are an important brand growth strategy." Take a stand and justify one statement, supporting it with examples.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Generate the tables attach the primary key and foreign key

Generate the tables attach the primary key and foreign key

  Express what makes one algorithm better than another

A non-technical friend has asked whether some algorithms are better than others. express what makes one algorithm better than another.

  Describe the object-oriented databases

Describe the database planning and development process. What steps are involved, and what tools may be appropriate or helpful.

  What are the advantages of using this model

What are the stages of the CCM? What happens at each stage.What are the advantages of using this model.

  Determine one protocol which works at the osi layer 2

suppose you are Dave Baker, the Senior System Administrator from Minnesota Consulting Group (MCG). The company with which MCG has an ongoing contract wishes to have some basic TCP/IP concepts explained to senior decision-makers.

  Which of following statements is true

Which of following statements is true

  What are the kinds of information systems

What are the kinds of information systems

  What are disadvantages of low class

What are disadvantages of low class What are advantages of high value?

  Creating flowchart and pseudocode utilizing control breaks

Generate a Flowchart and Pseudocode utilizing the Control Breaks for Xhemrock is a brake pad manufacturing company. This company utilizing the raw materials like carbon powder, ash, iron, and resin.

  How can translate into the broader area of business ethics

What responsibility do computing professionals have to society at large and to other members in their profession.how can translate into the broader area of business ethics.

  How to make an xml file in visual studio

How to make an xml file in Visual Studio

  Threats against network services

Users are familiar with some network services like HTTP (Hypertext Transport Protocol) - the Web; and SMTP (Simple Mail Transport Protocol) and POP (Post Office Protocol) - e-mail and instant messaging.

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