What is Multithreading? How to use Multithreading in asp.net

What is Multi-threading? How to use Multi-threading in asp.net



Multi-threading enables you to write very efficient program that make maximum use of CPU, because idle time can be kept to minimum.

A multi-threaded program contains two or more parts that can run concurrently. Each part of such a program is called a thread;
 Each thread defines a separate path of execution. Thus, multithreading is a specialized form of multitasking. The advantage of threading is the ability to create applications that use more than one thread of execution.

For example, a process can have a user interface thread that manages interactions with the user and worker threads that perform other tasks while the user interface thread waits for user input.

They are handled in the .NET Framework with classes from the base class library.

[Window Title]
Microsoft Windows

[Main Instruction]
Windows detected a hard disk problem

[Content]
Back up your files immediately to prevent information loss, and then contact the computer manufacturer to determine if you need to repair or replace the disk.

[V] Show details  [Start the backup process] [Ask me again later] [Cancel]

[Expanded Information]

Immediate steps in asp.net:

Because a disk failure will cause you to lose all programs, files and documents on the disk, you should back up your important information immediately.  Try not to use your computer until you have repaired or replaced the hard disk.

Which disk is failing?

The following hard disks are reporting failure:

Disk Name: ST932032 ST9320325AS SCSI Disk Device
Volume: D:\;C:\;E:\;G:\


Types of multitasking:

There are two distinct types of multitasking: process-based and thread-based.
A process is a program that is executing. Thus, process-based multitasking is the feature that allows your computer to run two or more programs concurrently. In process-based multitasking, a program is the smallest unit of code that can be dispatched by the scheduler.


A thread is a dispatch able unit of executable code. In a thread-based multitasking environment, all processes have at least one thread, but they can have more. This means that a single program can perform two or more tasks at once.

Process-based multitasking handles the concurrent execution of programs. Thread-based multitasking deals with the concurrent execution of pieces of the same program.

Comments

Popular posts from this blog