ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 19 May 2017 My Price 8.00

COMP604 Operating Systems

Hi there are you able to help me with my assignment attached please.

 

COMP604 Operating SystemsAssignmentSemester 2, 2016DUE ON:Week 12 Monday, 17 October 2016, 11:59 PMAssignment Worth:30% of total marksNB:This is a team or individual assignment: The assignment is intended to be a team assignment for teamsof two. However, if you feel it inconvenient to do this as a team, you are free to choose to submit anindividually worked assignment. For those who feel a bit “challenged” with programming due to their major'snature, this is a chance to team up with somebody more comfortable with programming.NB:Assignments will be accepted up to five (5) days late, but a penalty of 5% per day (or part of a day) latewill be imposed on either the team or the individual depending on the circumstances.NB:Students are referred to the school’s policy on plagiarism. A confirmed case will incur zero mark to allthe involved students.1. Assignment GoalThe goal of this assignment is to develop a better understanding of multithreading andprocess/thread synchronization using semaphores. You can do this assignment either usingJava(Runnableinterface andjava.util.concurrent.Semaphore) orC/C++(Pthreads).2. Assignment OverviewIn Lecture 5 and Lab 5, we have discussed a semaphore-based solution to the producer-consumerproblem using a bounded buffer. In this assignment we will design a programming solution to thebounded-buffer problemusing the producer and consumer processes. The solution presented inLecture 5 uses three semaphores:emptyandfull, which count the number of empty and fullslots in the buffer, andmutex, which is a binary (or mutual exclusion) semaphore that protects theactual insertion or removal of items in the buffer. For this assignment, standard countingsemaphores will be used foremptyandfull, and a binary semaphore will be used to representmutex. The producer and consumer--running as separate threads--will move items to and from abuffer that is synchronized with these empty, full, and mutex structures. You can solve thisproblem using either Java concurrent API or POSIX Pthreads API.3. Assignment TasksTask 1: The Buffer(or Buffer.java)Internally, the buffer will consist of a fixed-size array of typebuffer_item(which will be definedusing atypedef). The array ofbuffer_itemobjects will be manipulated as a circular queue.The definition ofbuffer_item, along with the size of the buffer, can be stored in a Java class fileor C header file such as the following:/* buffer.h */// Java: constant.javatypedef int buffer_item; // Java: omit it in Java or use wrapper class#define BUFFER_SIZE 5// Java: public static final int BUFFER_SIZE = 5;The buffer will be manipulated with two functions,insert_item()andremove_item(), whichare called by the producer and consumer threads, respectively. A skeleton outlining thesefunctions appears as:

Attachments:

Answers

(11)
Status NEW Posted 19 May 2017 02:05 AM My Price 8.00

-----------

Not Rated(0)