preview

Advantages And Disadvantages Of Multithreading

Decent Essays

threads to work.

Also , this is a generation where almost everyone has a smartphone and hence many of us confuse multithreading and multitasking as similar.
Almost all mobiles are Dual-Core or Quad-Core and this therefore means that the mobile has either 2 or 4 CPU’s which are capable of executing different instructions at the same time.
The different threads can hereby run in parallel on different CPUs which can help execute instructions faster and accurately.
Multi-threading is not the same as multi-tasking, multi-tasking is the ability to run multiple programs at the same time; while multi-threading is the ability to execute different portions of the same program at the same time.
In very easy language multi threading in Operating System …show more content…

Only 1 program at a time gets the electronic equipment for execution whereas the others square measure waiting their flip. The complete plan of getting a multi-programmed system is to optimize system utilization (more specifically electronic equipment time). The presently capital punishment program gets interrupted by the package between tasks (for example looking forward to IO, recall the mail packaging example) and transfer management to a different program in line (another customer). Running program keeps execution till it voluntarily offers the electronic equipment back or once it blocks for IO. As you'll see, the planning goal is extremely clear: processes looking forward to IO mustn't block different processes that wastes the cpu’s times. The concept is keeping the CPU under work as long as there are processes able to …show more content…

We’ll consider threads as kid methods that share the parent process resources however execute severally. Multiple threads of one method will share the CPU in an exceedingly single CPU system or (purely) run in parallel in an exceedingly data processing system. A multitasking system will have multi rib processes wherever totally different processes share the CPU and at identical time every has its own threads.
The question is why we want to possess multiple threads of execution among one method context. Let’s consider an example wherever it's additional convenient to possess a multi rib application. Suppose that we simply have a UI application wherever you would like to issue a command that need while to end let's consider a mathematical computation. Unless you run this command in an exceedingly separate execution thread you'll not be able to move with the most application user interface (for example change a progress bar) as a result of its attending to be not responding whereas the calculation is

Get Access