Foreground and background processing

Assignment Help Basic Computer Science
Reference no: EM13962213

Multitasking; Process control in Unix

1. What is an operating system process? How is it different from a program? Why do we need the concept of a process, rather than simply talk about programs running in memory?

2. Describe the differences between foreground and background processing. What advantage does background processing provide?

3. Develop a C program under the Unix environment which clearly demonstrates to a user running it the concept of multitasking, even on a single CPU architecture. The output should clearly show the separate identities of parent and child processes, and the isolation of data between the two processes.

Identifying parallelism

4. A formal way to identify parallelism in an activity is to draw a taskdependence graphin a directed graph in which each vertex represents a task to be completed. An edge from vertex u to vertex means that task u must be completed before task v begins, so that task v "depends on" u. If there is no path from u to v, then the tasks are independent and may be performed concurrently.

Consider the following problem: Alice is the leader of a crew of workers who maintain a large estate. There are four principal tasks: mowing the lawns, pruning the trees and hedges, repairing the fences, and inspecting the work to ensure it has all been done satisfactorily. Mowing must be completed before the work is inspected, as must the pruning and fence repair. The estate has a security system which must be switched off before work commences (i.e. before Alice and her team arrives), and switched on again after the team leaves.

a) Draw the dependence graph corresponding to the above problem, showing all the tasks involved. (In a project management plan, this scheme is often referred to as a "work breakdown structure").


b) Alice has 8 people in her crew, including herself. (The crew members are: Alice, Bert, Cressida, Dominic, Edgar, Frank, Gus and Harriet). Alice will be solely responsible for inspecting the work, but decides that she herself and three other people (Bert, Dominic and Gus) will mow the estate's four lawns (referred to as north, south, west and east lawns, each of which are of equal area), two other people (Cressida and Frank) will prune the trees, whilst Edgar and Harriet will repair the fences. Redraw the graph to show the allocation of the crew to particular tasks. (Hint: a single task in the original graph may be come multiple tasks in the revised version, each of which is performed by a particular person).


c) Alice is a fast worker, and can mow any of the lawns in one hour, as can Dominic. Frank and Gus can complete any of the manual tasks in two hours. Bert, Cressida, Edgar and Harriet take three hours to do their work. If the manual work starts at 10:00 a.m. in the morning, at what time can Alice inspect the work? In your answer, refer to the dependence graph showing the allocation of crew to tasks.

5. Discuss the concepts of task decomposition and data decomposition within the context of parallel programming.
[5 marks]


Data races, critical sections, processor loading

6. Research the phenomenon of data races. Give an example of how an unprotected data race can give rise to data inconsistency.How do OpenMP and Cilk resolve this problem?

7. Present your own fully documented and tested programming example illustrating the prevention of a data race in a parallelised program.


8. What is meant by the phrase ‘thread-safe'?.

9. Present your own fully documented and tested programming example illustrating the use of locks to govern access to critical sections.

10. Present your own fully documented and tested programming example illustrating the problem of unbalanced loads. Describe the use of OpenMP's scheduler as a means of mitigating this problem.

Write down all above questions in single word document with including total 2500-3000 words count, Write down explained answer for all questions.

Reference no: EM13962213

Questions Cloud

What is the annual inventory cost : A local jacket distributor expects to sell 9,000 black fleece jackets in a year. Assume that EOQ model assumptions are valid. Each jacket costs $50, ordering cost is $100 per order, and holding cost is 1 dollar per jacket per month. What is the annua..
Cryptographic and network security : Using the two keys (memory words) cryptographic and network security, encrypt the following message: "Be at the third pillar from the left outside the lyceum theatre tonight at seven. If you are distrustful bring two friends."
Explain how interest groups influence state politics : Contrast the differing opinions between liberals and conservatives in regard to the policy of grants-in-aid. Explain how interest groups influence state politics
Determine product your business will manufacture or produce : Suppose you start your own business. Determine a product your business will manufacture or produce. Ideally, the chosen product will be a general description, for example a smartphone, not a specific brand or item, for example a iPhone 6. Do some inf..
Foreground and background processing : Describe the differences between foreground and background processing. What advantage does background processing provide?
Complicate the organization-environment relationship : Some organizations become part-owners of other firms through mergers and acquisitions. How does the nature of practical ownership complicate the organization-environment relationship?
Disadvantage of the general monoalphabetic cipher : A disadvantage of the general monoalphabetic cipher is that both sender and receiver must commit the permuted cipher sequence to memory.A common technique for avoiding this is to use a keyword from which the cipher sequence can be generated.
Characteristics of the products being sold : Consider the retailers' objectives, the characteristics of the products being sold, and the type of customers who visit those sites answer
How does scale of a sculpture affect how we respond to it : Sculpture: How does the scale of a sculpture affect how we respond to it? Does a large sculpture seem more important than a small one? Nonrepresentational sculpture can be controversial. Should public art be representational so everyone "gets it

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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