Please develop a Java program to simulate the creation and execution of prioritized processes. The following data types must be implemented to support the simulation:
• A node type to represent a process. The node will contain a process id, a priority and a time slice (in milliseconds). The time slice indicates how long the process will “run” (i.e. sleep).
• A Min-Heap to store the process nodes so that a node with the lowest priority number is at the top of the heap ready to go when the next process is chosen. (NOTE: in many priority-based systems, priority 0 is the highest priority. IE the lower the number, the higher the priority). Because all of the threads in your program need to access this heap data structure, you must synchronize access to the operations on the heap that must not be interrupted before completion.
• A runnable/thread type to “consume”/retrieve a node off the top of the heap. The thread will simulate execution by sleeping for the duration of the time slice.
o When a process has completed its “execution,” the thread reports the process id, its priority value, and the time when it completed. Use a single line for the report, and make sure that the
time is precise enough to see sub-second execution times.
o If there is no work available on the heap, the thread can go to sleep for a pre-determined idle time in milliseconds.
• A second runnable/thread type to create and add processes to the heap. Let this thread wake up at random periodic intervals and add some new processes into the heap occasionally. [ this thread should wake up at least 3 times and add processes. It should not run forever ]
• the main program will create a single heap.
• the main program should spawn 2 instances of your consumer threads. The main program should pass a reference to the shared heap to all of its threads upon creation. consumer threads will pull the next available process off the heap and do their work.
• the main program should spawn the thread that adds processes to the heap.
• the program can detect that the producer thread is complete, and can then monitor the heap until it is empty. It can then notify the other idle consumer threads to exit.
Hi there, I do Java programming and have strong foundation in data structures and algorithms. I went through the requirements and I would like to do this project if given the opportunity. Let me know if you are interes Plus
22 freelance font une offre moyenne de $135 pour ce travail
Hello Sir/ Ma’am We are a group of Software Engineers (Programmers) having 10+ years of experience. Expert in JAVA, C, C++ , C# , Python, ANDROID,IOS, MATLAB, IONIC. Done 600+ projects here on FREELANCER.COM Plus
Hi There I've excellent programming and development skills and knowledge. I can provide an efficient, perfect, well documented development of your Programming and Computer project according to 100% accuracy and Plus
HI...I am proficient in core Java programming for last 10 years and well skilled on data structures programming including priority queue using heap as linked list and synchronised thread access to the the linked list f Plus
Hey, I have got a huge experience in java programming, check my profile for sure. It'll be pleasure for me to work on that project.
Hello, Sir Weebside Inc. is a professional freelancer service provided to worthy clients like you. We can provide our best developers to provide you High-Quality Product with 100% Delivery Rate, 100% Satisfaction. Plus
hello i'm a java developer highly skilled in multithreading. i did a similar project before. it was also about simulating computer processes. it would be a pleasure to work with you. thank you in advance.
Hi I have read your requirement carefully. It's a great chance to introduce my skill. I am a talented software developer with over 11+ years experience. I have full experience in threads in Java. You can save time Plus
Hi I have 18 years of software development experience in java. I can develop your java thread simulation app with the highest quality Lets talk about the details Regards Fatih
Hi, I am a full-stack Java developer having more than 4 years of professional experience. Apart from that, I've been helping students on this platform with their assignments, projects, lab tasks etc since 2015. I ha Plus
Hello. I have read your description and I am so interested in your project. I am confident in your project and I can finish it clearly on time. I am well experienced and skillful Java programmer. I have +5 years o Plus
Hi There, I'm a professional Java Developer, among the most experienced, and skilled freelancers on this platform. I can always ensure a delivery within the time required. I am really looking forward to hearing from y Plus
easyTask easyTask easyTask easyTask easyTask easyTask easyTask easyTask easyTask easyTask easyTask easyTask
Hi, Hope you are well. I will give you Best results....! Please send me you all the details before award project. --- Let discus your project. Deadline and budget? --- Services: software, website, Database, We Plus
Hi, I am very happy to bid your project. I read your requirements carefully,so i see what you mean. I have been experiments with C Programming, Java, JavaFX, Software Architecture I'd like to work with you. i'll c Plus
i read ur all description and i have decided to bid on ur project so plz accept my bid so i can discuss further regrading the project and we can start the project on throw website 've been developer for 5+ years us Plus
Hi there, I am JAVA developer, please check my skills below: 7+ Years experience in design and development of Enterprise Software Systems built on Java and J2EE technologies. Expert in Rich Internet Applicat Plus
Hi, I have good experience in java multi threading, this seems to be a well known producer consumer problem implementation. Let me know , i can do this task seemlessly
Hi, I'm experienced java developer working more than 3 years in that field. I had a lot of practice with threads and seems there will be no problems doing that project. Approximate time - 1-2 days (probably less). F Plus
hi, I'm a java developer and recent graduate, I've been working on multiple side project in Java, made WhatsApp type chat application using java and NetBeans IDE. I can help you make your application.
Java developer senior for 3 years. Also experience with multithreading, memory allocation. I've had 5 stars reviews on freelancer so far.