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

  Discussion on internet phone and pbx

An interesting emerging market is using Internet phone and a corporation's high speed LAN to replace same corporation's PBX. Create a page report on the issue.

  How many pages are needed to store the entire job

Assume a program has 510 bytes and will be loaded into page frames of 256 bytes each, and the instruction to be used is at byte 377. How many pages are needed to store the entire job

  Write a paper describing the operating systems

Write a paper describing the operating systems used by Huffman Trucking

  Network security case study

In this case study, you require to construct a network checklist to establish certain process that enable you and other network security specialists to assess a network from different possible threats and vulnerabilities.

  Question about misused applications

Corporations sometimes buy expensive applications, and then under utilize these. In a sense, economic downturn has been beneficial, as many corporations are starting to more regularly

  Why are computers equipped with multiple layers of cache

Why are computers equipped with multiple layers of cache - Would it be good to have one big one?

  Creating programs to compute

Compare zero-, one-, two-, and three-address machines through writing programs to compute X = (A+B X C)/D - E X F)

  Explain the design goals of windows xp

Explain the design goals of Windows XP and describe the booting process for Windows XP system

  What exactly are the static and dynamic chains

Do I have enough information to do this problem and What exactly are the static and dynamic Chains? I am not a programmer and I am trying to get this right.

  1 whenever a thread references a part of the virtual

1 whenever a thread references a part of the virtual address space that is not currently loaded in the primary memory

  A distributed file service

explain if 5 clients accessed the same file in a Distributed File Service how many copies of the file may exist on the network? List where the copies are.

  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