Results 1 to 6 of 6

Thread: Thread Management in .Net

  1. #1
    Join Date
    Jan 2011
    Posts
    8

    Thread Management in .Net

    I just know that the .Net Framework itself has no thread management, but (sometimes) it is based on the functions of the operating system. The Windows operating system to set up a scheduler. Its task is the allocation and management of threads to the CPUs. I am looking for more details about this matter. I hope that some of members hanging out there will help me in this matter.

  2. #2
    Join Date
    Jan 2009
    Posts
    99

    Re: Thread Management in .Net

    On a computer with only a single core CPU is distributed in the time-slicing method. This allocation of the CPU is made to the many tasks one after another and always for a short period of time (the time slice). In Windows XP, these time slots are usually in the millisecond range. Ultimately, of course, only one task at present to be active. In a multi-core or multi-processor environment, however, the allocation of tasks carried out on the cores in a more complex version. The basis for this is also the time slicing. in addition, there are other logics, however, allow for true parallel processing.

  3. #3
    Join Date
    Jan 2009
    Posts
    143

    Re: Thread Management in .Net

    The applications are represented at runtime as a managed threads in .Net. Managed threads can occur in two forms. They are either of the foreground thread or background thread. An application by a .NET managed environment requires at least one Foreground thread. By the end, so will the application. Background threads can turn an application does not keep them alive. If the application is completed, the background thread will be deleted. By default, threads are created as a foreground thread. The Property Thread.IsBackground provides information as to which thread type it is. .Net applications can generally be parallelized in two ways: either you create the threads explicitly by the program logic or by the framework can create the threads implicitly.

  4. #4
    Join Date
    Jan 2006
    Posts
    211

    Re: Thread Management in .Net

    Generating (about 200,000 cycles) and erase (about 100,000 cycles) of threads is a relatively time-consuming process. For short running processes of the administrative overhead would be excessive to suggest book and make the profit by the parallel dashed. Therefore, one tries to produce as little as possible or delete the thread. For this, the CLR internally managed a pool of so-called worker threads. The developer interacts with the pool. It passes its threads to this pool management. To this end it is the class type ThreadPool from the namespace System.Threading is available. This thread pool, it can use, for example, to store assignments, timers and asynchronous I / O operations and controls to be run through .Net. To run a method under the control of the framework, the developer of the method passes to the pool. To this end it is the method ThreadPool.QueueUserWorkItem() available. The method passed is executed when a thread in the pool is available.

  5. #5
    Join Date
    Apr 2008
    Posts
    242

    Re: Thread Management in .Net

    Although the .Net Framework from Microsoft is designed for multithreaded environments, so this is of course only for the framework. To have its own code, the developer of programming itself, however, take care. Threading, ie the programming of parallel applications is also in .Net is no simple matter. If until now was always spoken of the software development in general, the same goes for the entire development process, so the modeling, the encoding and the accompanying modules or integration test. It must also be noted that at present nearly all of the development process accompanying assistance emanating from the processed strictly sequential programs.

  6. #6
    Join Date
    Aug 2008
    Posts
    129

    Re: Thread Management in .Net

    The first step in the development of parallel programs is to find all the pieces of code that can be processed in parallel. You can, usually two techniques are out of parallelism, task parallelism and data parallelism. In the task parallel code is the two or more independent tasks broken down into. These are executed at run time as two or more independent threads or processes. An example of this may apply to the spelling correction of the test system. Relative to a booking system could be designed to load the customer data after entering the customer number as a separate task. In data parallelism, it is assumed that the data processed by the task are completely separated. One example is the rendering of complex graphics or screen content. The parallelization of code should not also to a certain number of CPUs to be restricted. Rather, the code must be designed so that it can use any number of CPUs. It is therefore necessary, since future CPUs will be equipped with even more cores. The limits of the tasks have to be determined dynamically. At a minimum, should the task duration to determine whether it makes sense at all, it into several CPU cores to distribute and run in parallel. But already in the code to have the arrangements to be installed.

Similar Threads

  1. Replies: 5
    Last Post: 16-07-2012, 11:52 AM
  2. Synchronize a producer thread and a consumer thread in C#
    By Ayuka in forum Software Development
    Replies: 6
    Last Post: 10-11-2010, 04:04 AM
  3. Meet Global Management Gurus at Goa Institute of Management (GIM)
    By Career-Minded in forum Education Career and Job Discussions
    Replies: 1
    Last Post: 09-01-2009, 05:21 PM
  4. Replies: 0
    Last Post: 21-11-2008, 11:49 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,520,022.11031 seconds with 17 queries