We already know about processes, isn’t it!! Process-based multitasking allows two or more programs to execute concurrently as we all know process is a program in execution. Now multitasking can be broadly categorized into two types: By multitasking we mean accomplishment of more than one task for example in your windows operating system you can listen to audio songs and program in android at the same time. So we can say multithreaded program is a synonym of multitasking. A thread defines a separate path of execution. Each part of this type of program is called a thread. A multithreaded program is one which contains more than one part which can run concurrently. There is a popular concept in programmers’ world called multithreaded programming. When a process can support multiple threads it can perform multiple tasks.įigure single threaded process and multithreaded process 12.2.2 Multithreading Processes are known as traditional or heavy-weight by this we mean that process has a single thread of execution. Thread is considered to be a basic unit of CPU utilization. Thread has a sharing nature hence it can share its code section, data section, and other operating-system resources, such as open files and signals with other threads belonging to same process. Modern operating systems have modified the process concept to allow a process to have multiple threads of execution so that more than one task can be accomplished at the same time.Ī thread comprises a thread ID, a program counter, a register set, and a stack. We cannot type numbers and characters at same time and run the spell checker concurrently or simultaneously. For example when we run a word processor we can say a process is running word processor which is a program and it is under control o a single thread of execution. We can say single thread of control allows the process to perform only one task at one time. Thread can be understood as a process is a program which executes a single thread of instruction. Just like a cotton thread which you use to stitch clothes threads in computer science is one of the indispensible phenomenon about which you should be aware of.
0 Comments
Leave a Reply. |