Repository navigation
Introduction
- Computing: Computing is any activity that uses computers. It includes developing hardware and software, and using computers to manage and process information, communicate and entertain. Computing is a critically important, integral component of modern industrial technology. Major computing disciplines include computer engineering, software engineering, computer science, information systems, and information technology.

- Operating System: An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.
:max_bytes(150000):strip_icc()/81-operating-system-5808ddd13df78cbc288d7500.jpg)
-
Thread: Thread is the smallest unit of execution that can be performed in an operating system. It is not itself a program but runs within a program. In other words, threads are not independent of one other. Each thread shares code section, data section, etc. with other threads. They are also known as lightweight processes.
-
Multithreading: In computer architecture, multithreading is the ability of a central processing unit (CPU) (or a single core in a multi-core processor) to execute multiple processes or threads concurrently, supported by the operating system. This approach differs from multiprocessing. In a multithreaded application, the processes and threads share the resources of a single or multiple cores, which include the computing units, the CPU caches, and the translation lookaside buffer (TLB). The main idea of multithreading is to achieve parallelism by dividing a process into multiple threads. 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 variables at any given time.

- Process: In computing, a process is an instance of a computer program that is being executed. It contains the program code and its activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently. During the process life cycle, it passes through different stages – Start, Ready, Running, Waiting and Terminating. A process can have only one thread, called primary thread, or multiple threads having their own set of registers, program counter and stack.

- Multiprocessing: Multiprocessing is the use of two or more central processing units (CPUs) within a single computer system. The term also refers to the ability of a system to support more than one processor or the ability to allocate tasks between them. There are many variations on this basic theme, and the definition of multiprocessing can vary with context, mostly as a function of how CPUs are defined (multiple cores on one die, multiple dies in one package, multiple packages in one system unit, etc.).

- Multitasking: Multitasking is a method to allow multiple processes to share processors (CPUs) and other system resources. Each CPU (core) executes a single task at a time. However, multitasking allows each processor to switch between tasks that are being executed without having to wait for each task to finish. Depending on the operating system implementation, switches could be performed when tasks perform input/output operations, when a task indicates that it can be switched, or on hardware interrupts.

An algorithm is a sequence of steps that take inputs from the user and after some computation, produces an output. Depending on the architecture of computers, we have two types of algorithms:
Sequential algorithm is an algorithm in which some consecutive steps of instructions are executed in a chronological order to solve a problem. So in the simplest sense, in Serial Computing software has been written for serial computation and and Serial Processing is the processing of one event in a moment.
- A problem is broken into a discrete series of instructions
- Instructions are executed sequentially one after another
- Only one instruction may execute at any moment in time
- Executed on a single processor

In parallel algorithms the problem is divided into sub-problems and are executed in parallel to get individual outputs. Later on, these individual outputs are combined together to get the final desired output. A parallel algorithm is an algorithm that can execute several instructions simultaneously on different processing devices and then combine all the individual outputs to produce the final result. Parallel algorithms are highly useful in processing huge volumes of data in quick time.
Note: It is not easy to divide a large problem into sub-problems. Sub-problems may have data dependency among them. Therefore, the processors have to communicate with each other to solve the problem.
In the simplest sense, Parallel Computing is the simultaneous use of multiple compute resources to solve a computational problem and Parallel Processing is the processing of two or more events at the same time. It is a challenging task for the professionals to create concurrent applications and get the most out of computer hardware.
- A problem is broken into discrete parts that can be solved concurrently
- Each part is further broken down to a series of instructions
- An overall control/coordination mechanism is employed
- Instructions from each part execute simultaneously on different processors

The model of a parallel algorithm is developed by considering a strategy for dividing the data and processing method and applying a suitable strategy to reduce interactions. Here are two famous model:
-
Data Parallel: In data parallel model, tasks are assigned to processes and each task performs similar types of operations on different data. Data parallelism is a consequence of single operation that is being applied on multiple data items.
-
Process Parallel: In process parallel model, tasks assigned to processes and each task performs different types of operations on same data. process parallelism is a consequence of multiple operations that is being applied on single data item.
Why Use Parallel Computing?
- Save time and/or money
- Solve larger/more complex problem
- Provide concurrency
- Take advantage of non-local resources
- Make better use of underlying parallel hardwares
Who is Using Parallel Computing?
- Science and Engineering
- Industrial and Commercial
- Global Applications

In computing, a processor or processing unit is an electronic circuit which performs operations on some external data source, usually memory or some other data stream. The term is frequently used to refer to the central processor (central processing unit) in a system, but typical computer systems (especially SoCs) combine a number of specialised "processors". There are several different processors. We use two Kind of processors many more:
-
CPU: A central processing unit (CPU) is the electronic circuitry within a computer that carries out the instructions of a computer program by performing the basic arithmetic, logical, control and input/output (I/O) operations specified by the instructions. The computer industry has used the term "central processing unit" at least since the early 1960s.[1] Traditionally, the term "CPU" refers to a processor, more specifically to its processing unit and control unit (CU), distinguishing these core elements of a computer from external components such as main memory and I/O circuitry.
-
GPU: A graphics processing unit (GPU) is a specialized electronic circuit designed to rapidly manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mobile phones, personal computers, workstations, and game consoles. Modern GPUs are very efficient at manipulating computer graphics and image processing, and their highly parallel structure makes them more efficient than general-purpose CPUs for algorithms where the processing of large blocks of data is done in parallel. In a personal computer, a GPU can be present on a video card, or it can be embedded on the motherboard.
In order to number of cores in a processors we have the following two kinds of processors:
- Single-core processors: Single-core processors are capable of executing one thread at any given time. These processors use context switching to store all the necessary information for a thread at a specific time and then restoring the information later. The context switching mechanism helps us make progress on a number of threads within a given second and it looks as if the system is working on multiple things.
Note: Single-core processors come with many advantages. These processors require less power and there is no complex communication protocol between multiple cores. On the other hand, the speed of single-core processors is limited and it is not suitable for larger applications.
- Multi-core processors: Multi-core processors have multiple independent processing units also called cores.
Note: One advantage over here is that the execution in multi-core processors are faster than that of single-core processors. It is suitable for larger applications. On the other hand, complex communication protocol between multiple cores is an issue. Multiple cores require more power than single-core processors.
The cores of processors follow a cycle for executing. This cycle is called the Fetch-Decode-Execute cycle. It involves the following steps:
-
Fetch: This is the first step of cycle, which involves the fetching of instructions from the program memory.
-
Decode: Recently fetched instructions would be converted to a series of signals that will trigger other parts of the CPU.
-
Execute: It is the final step in which the fetched and the decoded instructions would be executed. The result of execution will be stored in a register.