Question: 4.a: Discuss briefly the differences between a process and a thread. What is the best way to stop executing threads, assuming they still have not

4.a: Discuss briefly the differences between a process and a thread. What is the best way to stop executing threads, assuming they still have not finished their work? 5 MARKS b: Write a Java animation applet that uses a thread to continuously scroll a text message across the screen from right to left. The message itself and the rate at which the text scrolls can be passed to the applet as HTML based parameters. 10 MARKS c: Outline the design and give the full source code for a Java class that will be used as a thread safe buffer to hold an integer value. The value may be updated randomly by one or more Producer threads, provided that it has already been consumed by one of a number of Consumer threads. Each value produced must be consumed exactly once and there may be multiple producer and consumer threads executing (and attempting to access the buffer) concurrently 10 MARKS
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
