Skip to main content

Posts

Showing posts from September, 2016

Multitasking vs Multithreading

Threads - BASIC CONCEPTS


Most of us are confused between multitasking and multithreading. In this post let us try to give a brief description about multitasking, Threads and multithreading. Multithreading is one of the major features of Java.
What is multitasking?
Before learning about multitasking we should understand “what is a process?” A process is a task which is under execution. So multiple processes running at the same time is known as multitasking.
Example:
 When you open a web browser and a word document at the same time, you are making the operating system to undergo multitasking. So multitasking is a method of running more than one task simultaneously. We say that both the processes are executing simultaneously but in reality the instructions are executed one at a time. Then how do we justify our statement “multitasking“? Here comes the concept of context switching. The control of execution jumps between the processes with negligible time gaps. The time gaps are so small that b…

Binary Trees

A data structure is said to be linear if its elements form a sequence or linear lists. Examples : ARRAYS , LINKED LISTS , STACKS , QUEUE
A data structure is said to be non-linear if its elements form a hierarchical order. Here the data items are appeared at various levels.