Monday, April 30, 2007

What is a thread?

A thread is most fundamental unit of a computer program which is under execution independent of other parts.A thread and a task are similar and often confused.An operating system executes a program by allocating it certain resources like memory,CPU cycles and when there are many a programs doing several things corresponding to several users requests.In such a scenario each program is viewed as a 'task' by OS for which it identifies an allocate resources. An OS treats each application e.g. Word Processor,spreadsheet,email client etc as a separate task , if a certain program initiates some parallel activity e.g. doing some IO operations,printing then a 'thread' will be created fro doing this job.


rishabh on October 8, 2010 at 3:18 AM said...

a thread is the lightest process, they are used to divide the whole task into small units , these unnits are called as threads.

Anonymous said...

Thread means sequence of execution of statement.

refer this for java material and about thread...Click Here


Interview Questions On Java,Java EE Copyright © 2016. Reads: best tracker