As computer programming languages have evolved, language designers have increasingly provided more features to help the programmer avoid errors (either at compile time or run time) in the implementation of a solution. Discuss with critical comment, using appropriate illustrations from a range of programming languages, the extent to which the above statement can be considered true. Functional programming languages offer the possibility of eliminating some of the errors associated with concurrency. Discuss, using examples from a functional programming language, how this might be achieved. An issue in imperative programming is concurrently executing threads accessing shared data: for example, in the programming language Java, two concurrently executing threads reading from and writing to an instance of an ArrayList. Carefully describe what these issues are, together with any possible solution. Do not include issues that occur when tasks with different priorities are involved. A potential consequence of concurrently executing threads that have individual priorities is "priority inversion". Describe carefully, using a realistic example, what "priority inversion" is and describe in the context of this example how the consequences of "priority inversion" may be overcome. Compare and contrast cyclic scheduling with rate-monotonic scheduling as a means of ensuring that the deadlines are met for events scheduled in a real-time system. In your comparison show clearly what these two forms of scheduling involve. When several threads access a common data structure there is the potential for the ABA problem to occur. Carefully describe, using an appropriate example, what the ABA problem is and how it may be avoided.
Get Free Quote!
399 Experts Online