Briefly explain the differences between local and Aneka threads.

 The differences between local and Aneka threads are:-

Local thread.

  • In computer science, a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system.
  • The implementation of threads and processes differs between operating systems, but in most cases, a thread is a component of a process.
  • Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources.
  • In particular, the threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time.

Aneka thread

  • Aneka offers the capability of implementing multi-threaded applications over the Cloud by means of the Thread Programming Model.
  • This model introduces the abstraction of distributed thread, also called Aneka thread, which mimics the behavior of local threads but executes over a distributed infrastructure.

IN LONG 

Local Thread

  • As Aneka threads exist and operate in a distributed environment, their life cycle differs from that of local reads. 
  • The following figure depicts the possible execution states for local threads supported by the .Net framework.


  •  A thread may be in one or more of those statuses at any given moment. When a new thread is created, its status is Unstarted, and when the Start method is called, it changes to Running. There is also a Background state that specifies whether a thread is operating in the background or the foreground. The diagram below depicts the life cycle of an Aneka Thread. Because the two thread types are essentially different, one is local and the other is distributed, the possible states they might take vary from instantiation to termination.
  • Most state transitions in local threads are managed by the developer, who causes the state transition by executing methods on the thread instance, but many state transitions in Aneka threads are handled by middleware. Aneka threads have more states than local threads since they support file staging and are scheduled by the middleware, which might queue them for a long period. Because Aneka allows the reservation of nodes for thread execution connected to a given application, an explicit condition signaling execution failure due to a missing reservation credential has been included. This happens when a thread is routed to an execution node within a time frame in which only nodes with particular reservation credentials can be run.
  • The normal state transitions Unstarted [Started]-[Queued] - Running Completed/Aborted/Failed.

ANEKA THREAD



  • An Aneka thread is found in the Unstarted condition at first. When the Start() method is invoked, the thread enters the started state, from which it can go to the StagingIn state if there are files to upload for execution, or immediately to the Queued state. If an error occurs when uploading files, the thread fails and its execution finishes in the Failed state, which can also be reached if an exception occurs when executing Start(). Another possible outcome is the Rejected state, which occurs if the thread is launched with an incorrect reservation token. This is the last state, and it suggests that the execution will fail due to a lack of permissions. Once the thread is in the queue, if there is a free node where it can be executed, the middleware transports all of the object data and dependent files to the distant node and begins execution, setting the status to Running. If the thread throws an error or fails to create the anticipated output files, the execution is regarded as a failure, and the thread's end state is set to Fail. If the execution succeeds the final state is changed to Completed. If there are any output files to retrieve, the thread state is set to StagingOut until the files are gathered and forwarded to their final destination and after the successful transfer, the thread state is set to Completed. If the developer terminates the application's execution er explicitly invokes the Abort() function at any time, the thread is aborted and its final state is set to Aborted.

The following flow chart pictorially shows the Aneka Thread instance state transitions.



Comments

Popular posts from this blog

Suppose that a data warehouse for Big-University consists of the following four dimensions: student, course, semester, and instructor, and two measures count and avg_grade. When at the lowest conceptual level (e.g., for a given student, course, semester, and instructor combination), the avg_grade measure stores the actual course grade of the student. At higher conceptual levels, avg_grade stores the average grade for the given combination. a) Draw a snowflake schema diagram for the data warehouse. b) Starting with the base cuboid [student, course, semester, instructor], what specific OLAP operations (e.g., roll-up from semester to year) should one perform in order to list the average grade of CS courses for each BigUniversity student. c) If each dimension has five levels (including all), such as “student < major < status < university < all”, how many cuboids will this cube contain (including the base and apex cuboids)?

Discuss classification or taxonomy of virtualization at different levels.

Suppose that a data warehouse consists of the four dimensions; date, spectator, location, and game, and the two measures, count and charge, where charge is the fee that a spectator pays when watching a game on a given date. Spectators may be students, adults, or seniors, with each category having its own charge rate. a) Draw a star schema diagram for the data b) Starting with the base cuboid [date; spectator; location; game], what specific OLAP operations should perform in order to list the total charge paid by student spectators at GM Place in 2004?