Threads in Programming

Photo by Olliss on Unsplash

An application can have multiple processes, the process can have multiple threads.

In computer science, a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system.

The implementation of threads and processes differs between operating systems, but in most cases a thread is a component of a process.

Multiple threads can exist within one process, executing concurrently and sharing resources such as memory, while different processes do not share these resources.

In particular, the threads of a process share its executable code and the values of its dynamically allocated variables and non-thread-local global variables at any given time.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store