W40-Multi core & threading

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Performance Bottleneck: When a CPU has big number of cores and each core can potentially request data from memory simultaneously, this means that there can be multiple memory read

and write requests happening at the same time from different cores.

Computer Games - The various objects like cars, humans, birds in the game are implemented as separate threads. Also playing the background music at the same time as

playing the game is an example of multi-threading.

Each core can process

several threads.

Multithreading is the ability of an handling multiple

simultaneous threads within a single process

So a thread is smallest unit of processing

that can be performed in an operating-system

Multithreading:

the ability of handling multiple, simultaneous threads within a single process.

Decode: In the decode stage

the fetched instruction is decoded to determine what operation it represents. This stage is generally independent of multithreading and doesn't change significantly in a multithreaded environment.

Multithreading on a single processor, Context Switching: To switch between threads

the processor performs a context switch. This involves saving the current state of the executing thread, including its program counter, registers, and other relevant information, and loading the state of the next thread to be executed.

Fetch: In the fetch stage,

the processor retrieves the next instruction to be executed from memory.

Processes:

A process is a fundamental runtime entity in an operating system. It represents a running program with its own memory space, code, data, and resources. Each process is an independent entity with its own runtime state, such as registers, program counter, and stack.

Market Demand:

CPU manufacturers also consider market demand when deciding the number of cores in a product. If the demand for high-core-count CPUs is limited, manufacturers may focus on other areas of improvement, such as power efficiency.

Size and Complexity:

Each core on a CPU requires physical space. As more cores are added, the size increases. There is a practical limit to how large can be manufactured efficiently, and increasing core count may require shrinking the size of individual cores, which can impact their performance.

to ensure that the CPU cores can operate efficiently, the memory subsystem needs to provide enough bandwidth to accommodate these requests.

If the memory bandwidth is insufficient for the demands of multiple cores, it can lead to performance bottlenecks.

Diminishing Returns:

Many software applications are not optimized to take advantage of a large number of cores, and the gains in performance may not justify the increased complexity and cost of adding more cores.

Power Consumption:

More cores generally lead to increased power consumption. This can lead to challenges in managing heat dissipation and power efficiency, especially in laptops and mobile devices where power constraints are crucial.

Cost:

Producing CPUs with a high number of cores can be more expensive due to the complexity of manufacturing and the need for additional components like cache and memory controllers.

Restrictions of a large number of cores in personal computers

Size and Complexity, power consumption, diminishing returns, market demand, thread synchronisation, cost, performance bottleneck

fetch stage: In a multithreaded environment, there are multiple threads, each with its own set of instructions.

The processor switches between threads during this stage to fetch instructions from different threads.

Text Editors - When you are typing in an editor, spell-checking, are done concurrently by multiple threads.

The same applies for Word processors also.

Threads:

Threads are lightweight units of execution within a process. They share the same memory space and resources but have their own execution context. Threads are used for concurrent execution and can be considered as runtime entities within a process.

Multithreading on a single processor,Time Slicing: The processor allocates a small time slice (quantum) to each thread

When a thread's time slice expires or when it reaches a point where it must wait for an external event (e.g., I/O operation), a context switch occurs, and the processor starts executing another thread.

Thread Synchronization:

With more cores, thread synchronization becomes more critical. Coordinating the activities of multiple cores and ensuring data consistency can add overhead and complexity to software development.

Multithreading on a single processor: Multithreading on a single processor system still follows the fundamental Fetch-Decode-Execute (FDE) cycle,

but it does so in a way that alternates the execution of multiple threads to give the appearance of multi-tasking even though only one thread is executing at any given moment.

Note: Memory bandwidth refers to the rate at which data

can be read from or written to computer memory (typically RAM) within a given period of time.

Multithreading: a thread of execution is the

e smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system.

In a single processor with multithreading, the processor may rapidly switch between threads, allowing each thread to execute a portion of its instructions. This is where the interleaving of threads occurs,

giving the appearance of parallelism.

Execute: In the execute stage, the actual operation specified by the instruction is carried out.

in a single processor with multithreading, the processor may rapidly switch between threads, allowing each thread to execute a portion of its instructions.

IDE - IDEs like Android Studio run multiple threads at the same time. You can open multiple programs at the same time. It also gives suggestions on the completion of a command which

is a completelyseperate thread

Each core contains its own ALU, Control Unit and Registers thus allowing it

to work on tasks independently.

examples of multithreaded applications

web browsers, computer games, text editors, IDE


संबंधित स्टडी सेट्स

C1tizenship and Civ1cs Unit 2: System of Government

View Set

Chapter 1: Preparing for the Patient Encounter

View Set

AWS Solutions Architect Associate

View Set

Chapter 4 - The Relational Model

View Set

Patho/Pharm Exam 3 (SI questions)

View Set

Networking Chapter 3 - Data and Signals, [3] Data and Signal, chap 3 Data and Signals, DATA AND SIGNALS, chp 2 - fundamentals of data and signals, Chapter 2, Fundamentals of data and signals, terms, Chapter 2 Fundamentals of Data and Signals, Chapter...

View Set