Monitor Colour and Monochrome Printing

Assignment Help Other Subject
Reference no: EM133002031

COMP6240 Operating Systems

Problem 1: WAR controlling:

Daintree warehouse uses small robots called WARs (Warehouse Assistance Robot) for carrying its goods between storage and docks for loading and unloading. The partial layout of the warehouse with two outbound docks and two storage sections is shown below. Track 1 and Track 2, which connect Storage 1 with Dock 1 and Storage 2 with Dock 2, respectively, intersect with each other.

1077_figure.jpg

WARs are simple robots which repeatedly travel back and forth in the same track, being ‘Loaded' in their trip from Storage to Dock and return ‘Unloaded' in the return trip. Each WAR has a unique number for identification but its status changes between ‘Loaded' and ‘Unloaded' from trip to trip. After initial setup, it was immediately identified that WARs operating in both tracks can collide in the intersection, therefore, Daintree employed you to solve the problem. The assigned task is as follows:

1. The intersection can become deadlocked if two WARs from different directions enter the intersection (WARs can only go forward). Collison is evident if more than one WAR enter the intersection simultaneously. So, for safety purpose, not more than one WAR is allowed to enter the intersection.

2. The solution should be starvation free. I.e. a stream of WARs from any one direction should not prevent WARs from other directions to cross the intersection.

3. There are three checkpoints (sensors) in the intersection to which each WAR reports. Add 200 ms delay after each checkpoint to simulate the time to pass the checkpoint. The system keeps track of WARs passing in each track (i.e. counts every time a WAR in a track crosses the intersection).

4. Loading and unloading of goods happen instantly (i.e. the assumption is no time is required) after a WAR crosses the intersection.

Using semaphores, design and implement an algorithm that prevents deadlock. Use threads to simulate multiple/concurrent WARs and assume that the group of WARs are constantly attempting to use the intersection from all four directions (N, S, W, E). Your program should input parameters at runtime to initialise the number of WARs from each direction. For example, the input "N=3 S=1 E=1 W=1" would indicate that the simulation should start with 3, 1, 1 and 1 WARS starting from north, south, east and west direction respectively. WARs should be numbered continuously starting from 1 (e.g. WAR-1, WAR-2 etc.) You may choose how to number the WARs but the total number of WARs from each direction (N, S, E, W) must match the input. Depending on whether a WAR is going towards the Dock or towards the Storage it will be "Loaded" or "Unloaded", respectively.

Problem 2 : Monitor Colour and Monochrome Printing:

The newly established School of Information and Physical Sciences (SIPS) at UoN bought a new multi-printer that can print both in colour and in monochrome. The multi-printer has three printing heads which can print up to three jobs in parallel. We classify a job as either Monochrome (M) or Colour (C) based on its mode of printing. However, the printer can operate in either of its two modes (Monochrome or Colour) at a time. If a Monochrome job is currently printing in the printer then the other two vacant printing heads can be used for Monochrome printing only - a Colour printing job must wait. A printing job (Monochrome or Colour) must specify beforehand the number of pages it will be printing. So the assumptions in operating the multi- printer are
• Monochrome and Colour jobs cannot be printed at the same time.
• No more than three jobs can use the printer simultaneously.
• Printing a single page takes the same time (1 sec) in all jobs.
• Each job can have different number of pages to print, therefore, can take different time to print.
• A Monochrome job with ID y (i.e. My) should NOT be served before a Monochrome job with ID x (i.e. Mx) where x < y. And the same for the Colour jobs.
• No time is wasted in job selection and dispatching.
Using monitor, design and implement an algorithm that ensures the operation of the multi-printer according to the above characteristics. Use threads to simulate multiple concurrent printing jobs. Your solution should be fair - stream of Monochrome printing jobs should not cause the Colour Printing jobs wait forever or vice versa.

Problem 3 : Colour and Monochrome Printing with semaphore:

You will need to implement a solution for Problem 2 (Colour and Monochrome Printing) using semaphore.

Using semaphore, design and implement an algorithm that ensures the operation of the multi-printer according to the above characteristics. Use threads to simulate multiple concurrent printing jobs. Your solution should be fair - stream of Monochrome printing jobs should not cause the Colour Printing jobs wait forever or vice versa.

Additional Task for COMP6240 Students: [NOT for COMP2240 students]:

In the lecture, two algorithms, namely Dekker's algorithm and Peterson's algorithm, were discussed as software approaches to mutual exclusion. A couple of other algorithms exist in the literature for the same purpose. You are asked to perform a survey on the software approaches to mutual exclusion and prepare a report on that. Your survey should include at least four different algorithms (may and may not include the above two). You should discuss the design principle, suitability of generalisation for n processes, suitability for multiprocessor/multi-core environment, relative advantages/disadvantages.

Your survey report should be between 4 and 6 pages (single space) of content, excluding cover and references.

Attachment:- Operating Systems.rar

Reference no: EM133002031

Questions Cloud

Which alternative should splish select : The other is to receive a single lump-sum payment of $ 2,203,990 at the end of the 12 years. Which alternative should Splish select?
What is the effective rate : Bank A pays 8.6 percent compounded weekly on all deposits. What is the effective rate?
Find out change in net working capital : UML Inc. had an EBIT of 71,000, depreciation expense of 8,500, and paid 19,000 in taxes. Its interest costs were $9,600; its long-term borrowing reduced by $4,0
What is the value of xyz stock when the required return : XYZ company's growth for the future to be a constant 8%. XYZ's recent dividend was $0.88. What is the value of XYZ stock when the required return is 12%?
Monitor Colour and Monochrome Printing : Monitor Colour and Monochrome Printing - algorithm that ensures the operation of the multi-printer according to the above characteristics
Why the equally weighted portfolio is useful : Explain why the equally weighted portfolio is useful for attribution analysis?
Determine what is the coupon rate on the bond : What is the coupon rate on this bond? You have just paid $1,135.90 for a bond, which has 10 years before it, matures. It pays interest every six months.
Discuss the concept of taxation : Discuss the concept of taxation and how its related to public finance.
How might this arrangement lead to a conflict of interest : Mortgage brokers generally provide their services free of charge to interested borrowers and are instead compensated by lenders

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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