Threads refer to the smallest and simplest executable segment a programmed instruction . Threads are independently managed by a scheduler ( typically part of an operating system ) . Any process consists of multiple threads , which share the resources such as memory allocations . Multi-threading enables time-division multiplexing , where the processor switches between various software threads , thereby resulting in several processes to be simultaneously executed by the operating system .
Multi-threading has several advantages :
2 Faster execution .
3 Optimized use of System variables .
4 Lesser resource intensive .
5 Simplified sharing and parallelism .
No comments:
Post a Comment