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

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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