Last Sync: 2022-11-08 08:00:05
This commit is contained in:
parent
e7ccc39019
commit
9b66e3d692
7 changed files with 34 additions and 21 deletions
|
@ -1,26 +1,26 @@
|
|||
---
|
||||
categories:
|
||||
- Electronics
|
||||
tags: [electricity, electrical-fcircuits]
|
||||
tags: [electricity, electrical-circuits]
|
||||
---
|
||||
|
||||
# Circuits
|
||||
|
||||
An electrical circuit is a set of electrical components connected in such a way that current flows in a loop from a voltage source, through the cirucit elements and back to the source.
|
||||
An electrical circuit is a set of electrical components connected in such a way that current flows in a loop from a voltage source, through the circuit elements and back to the voltage source.
|
||||
|
||||
Below is a basic circuit representing a 9-volt [battery]() with a 10,000$\Omega$ resistor attached accross its terminals. Through the application of [Ohm's Law](/Electronics/Physics_of_electricity/Ohms_Law.md) we can determine that the maximum current will be 0.9 miliamps.
|
||||
Below is a basic circuit representing a 9-volt [battery]() with a 10,000$\Omega$ [resistor](/Electronics/Resistance.md) attached accross its terminals. Through the application of [Ohm's Law](/Electronics/Physics_of_electricity/Ohms_Law.md) we can determine that the maximum current will be 0.9 miliamps.
|
||||
|
||||

|
||||
|
||||
## Open and short circuits
|
||||
|
||||
A circuit with a break in its loop is called an **open circuit**. When a circuit is open, no current flows.
|
||||
A circuit with a break in its loop is called an **open circuit**. When a circuit is open, no current flows. We can induce an open circuit through the use of a switch component that closes and breaks the circuit when invoked.
|
||||
|
||||
A **short circuit** is a path in a circuit that allows current to flow with little or no resistance. This is usually unintentional and results in excessive current flowing through the circuit. A short circuit is the opposite to an open circuit. With an open circuit there is an infinite resistance between the two terminals.
|
||||
|
||||
## Vertical circuit diagrams
|
||||
|
||||
Sometimes circuits can be represented in a vertical manner rather than in an actual circuit. In this approach current is represented as flowing in a straight line from the voltage source (represented with a circle) to ground.
|
||||
Sometimes circuits can be represented in a vertical manner rather than in an actual circuit. This is done to simplify the representation. In this approach current is represented as flowing in a straight line from the voltage source (represented with a circle) to ground.
|
||||
|
||||
The circuit below is functionally identical to the previous circuit but represented vertically:
|
||||
|
||||
|
|
0
Electronics/LEDs.md
Normal file
0
Electronics/LEDs.md
Normal file
|
@ -56,7 +56,7 @@ The CPU's [controller](/Hardware/Chipset_and_controllers.md). It takes the instr
|
|||
|
||||
## The system clock
|
||||
|
||||
Whilst modern CPUs and threading make it appears as though the CPU is capable of running multiple processes at once, access to the CPU is in fact sequential. The illusion of simultaneous computation is due to the fact the processor is so fast that we do not detect the sequential changes. For this to happen, the CPU needs to have a means of scheduling and sequencing processes. This is made possible through the system clock, hence when talking about the speed of the CPU we do so with reference to _clock speeds_ and the _clock cycle_.
|
||||
Whilst modern CPUs and multithreading make it appear[] as though the CPU is capable of running multiple processes at once, access to the CPU is in fact sequential. The illusion of simultaneous computation is due to the fact the processor is so fast that we do not detect the sequential changes. For this to happen, the CPU needs to have a means of scheduling and sequencing processes. This is made possible through the system clock, hence when talking about the speed of the CPU we do so with reference to _clock speeds_ and the _clock cycle_.
|
||||
|
||||
The clock's circuitry is based on a quartz crystal system like that used in watches. At precisely timed intervals, the clock sends out pulses of electricity that cause bits to move from place to place within [logic gates](/Hardware/Logic_Gates/Logic_gates.md) or between logic gates and [registers](/Hardware/CPU/CPU_architecture.md#registers).
|
||||
|
||||
|
@ -64,12 +64,16 @@ Simple instructions such as add can often be executed in just one clock cycle, w
|
|||
|
||||
We measure the speed of a chip process within the CPU in **Hertz (Hz)**. One Hertz is equivalent to _1 cycle per second_ where a "cycle" is equivalent to a single clock **tick**. Thus a tick covers a period of 1 second.
|
||||
|
||||
A speed of 2GHz for example means two billion cycles per second. This would mean that the clock was completing two billion cycles at each tick.
|
||||
A speed of 2GHz for example means two billion cycles per second. This would mean that the clock was completing two billion cycles at each tick. It is clock speed that is being referred to when computers are marketed in terms of the number of Hz a processor possesses.
|
||||
|
||||
## Processing cycles
|
||||
|
||||
Each "cycle" is the execution of a process that commences once the [kernel](/Operating_Systems/The_Kernel.md) hands control to the CPU. Each cycle follows a sequence of events known as [fetch, decode, and execute](/Hardware/CPU/Fetch_decode_execute.md).
|
||||
|
||||
## Electromagnetism: broader scientific context
|
||||
|
||||
Hertz was the scientist who detected electromagentic waves and more broadly in science, we use Hertz to measure the number of electromatic waves (cycles) in a signal.
|
||||
Hertz was the scientist who detected electromagentic waves and more broadly in science, we use Hertz to measure the frequency of electromatic wave cycles in a signal.
|
||||
|
||||

|
||||
|
||||
As the diagram above shows, a cycle is equal to one ascending and one descending crest. The more cycles the greater the Hertz.
|
||||
As the diagram above shows, a cycle is equal to one ascending and one descending crest. The more cycles per time unit, the greater the Hertz. We see the Hz increase as the number of cycles increases over time.
|
||||
|
|
|
@ -5,13 +5,12 @@ categories:
|
|||
tags: [motherboard, chipset]
|
||||
---
|
||||
|
||||
|
||||
# Chipset and controllers
|
||||
|
||||
A **controller** is simply a circuit that controls a process. The **chipset** is a combination of controllers placed on the same piece of silicon.
|
||||
|
||||
The chipset manages the data flow between the different components that comprise the [motherboard](/Hardware/Motherboard.md): processor, [memory](/Hardware/Memory/RAM_types.md), [harddisk](/Operating_Systems/Disks/What_are_disks.md) and peripherals.
|
||||
The chipset manages the data flow between the different components that comprise the [motherboard](/Hardware/Motherboard.md): processor, [memory](/Hardware/Memory/Memory.md), [harddisk](/Operating_Systems/Disks/What_are_disks.md) and peripherals.
|
||||
|
||||
Buses run in and out of the chipset into these key motherboard components. The main chipset is a kind of junction that sits between the memory and CPU through which the [system bus](/Hardware/Bus.md#system-bus) passes.
|
||||
Buses run in and out of the chipset into these key motherboard components. The main chipset is a kind of junction that sits between the memory and CPU through which the [system bus](/Hardware/Bus.md#system-bus) passes.
|
||||
|
||||
The chipset is sometimes called the "glue" or "traffic controller" of the motherboard or _an intelligent intersection of buses_.
|
||||
|
|
|
@ -11,29 +11,39 @@ In essence the memory is just a temporary and volatile storage area for a series
|
|||
|
||||
> This is where the running kernal and processes reside - they're just big collections of bits. A CPU is just an operator on memory. It reads its instructions and data from the memory and writes back out to the memory. (Ward 2021)
|
||||
|
||||
Technically, the harddisk is also memory but nonvolatile although we typically distinguish "disk storage" from memory. We can think of memory as active storage that is utilised during runtime and disk memory as dormant storage that only becomes active once it is loaded into memory.
|
||||
Technically, the harddisk is also memory of a non-volatile sort however we typically distinguish "disk storage" from memory. We can think of memory as active storage that is utilised during the runtime of a program and disk memory as dormant storage that only becomes active once it is loaded into memory.
|
||||
|
||||
Programs that are executing are loaded into memory because the chips that comprise memory can read and store data much faster than the harddisk. It would be possible to run a program from the harddisk but it would be 500 - 1000 times slower than memory.
|
||||
|
||||
## Memory types
|
||||
|
||||
### DRAM
|
||||
|
||||
When we think of memory we generally think of the _main_ memory: the 8GB or 16GB+ slots of volatile, non-permanent storage that is utilised by the CPU during the runtime of programs. This is DRAM memory: Dynamic Random Access memory. DRAM uses capacitors that lose charge over time due to leaks. As a result DRAM is memory that needs to be refreshed (recharged) frequently. For this reason and because it only uses one transistor and capacitor per bit, DRAM is the less expensive form of volatile memory.
|
||||
When we think of memory we generally think of the _main_ memory: the 8GB or 16GB+ slots of volatile, non-permanent storage that is utilised by the CPU during the runtime of programs. This is DRAM memory: Dynamic Random Access memory. DRAM uses capacitors that lose [charge](/Electronics/Current.md) over time due to leaks. As a result DRAM is memory that needs to be refreshed (recharged) frequently. For this reason and because it only uses one transistor and capacitor per bit, DRAM is the less expensive form of volatile memory.
|
||||
|
||||
### SRAM
|
||||
// TODO: Add notes in Electronics on capacitors
|
||||
|
||||
### SRAM
|
||||
|
||||
SRAM (Static Random Access Memory) is also volatile memory but, in terms of the electronics, it is different in its implementation. In contrast to DRAM it doesn't use capacitors. As a result the transistors do not leak and therefore do not need to be refreshed, hence why SRAM is _static_ and DRAM is _dynamic_. It also uses multiple transistors per bit. This makes it faster than DRAM but more expensive. DRAM is at least ten times slower than SRAM. SRAM is used as [cache memory](/Hardware/Memory/Role_of_memory_in_computation.md#the-role-of-the-cache) on the [motherboard](/Hardware/Motherboard.md) of which there are two types: L1 (on the processor chip) and L2 (separate from the processor).
|
||||
|
||||
SRAM (Static Random Access Memory) is also volatile memory but, in terms of the electronics, it is different in its implementation. In contrast to DRAM it doesn't use capacitors. As a result the transistors do not leak and therefore do not need to be refreshed, hence why SRAM is _static_ and DRAM is _dynamic_. It also uses multiple transistors per bit. This makes it faster than DRAM but more expensive. DRAM is at least ten times slower than SRAM. SRAM is used as [cache memory](/Hardware/Memory/Role_in_computation.md#the-role-of-the-cache) on the [motherboard](/Hardware/Motherboard.md) of which there are two types: L1 (on the processor chip) and L2 (separate from the processor).
|
||||
### Relative speeds
|
||||
|
||||
The table below details the relative speeds of the different types of memory and those of other types of motherboard storage.
|
||||
|
||||
| Storage type | Access speed (clock cycles) | Relative times slower |
|
||||
|--------------|-----------------------------|-----------------------|
|
||||
| ------------ | --------------------------- | --------------------- |
|
||||
| CPU register | 2 | |
|
||||
| L1 cache | 4 | 2x |
|
||||
| L2 cache | 6-20 | 3-10x |
|
||||
| DRAM memory | 50 | 25x |
|
||||
| Harddisk | 2000 | 1000x |
|
||||
|
||||
## The memory hierarchy
|
||||
|
||||
The diagram below compares the different forms of memory within a computing device in terms of speed, monetary cost and capacity:
|
||||
|
||||

|
||||
|
||||
## References
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ The following steps outline the way in which memory interacts with the processor
|
|||
1. A file is loaded from the harddisk into memory.
|
||||
2. The instruction at the first address is sent to the CPU, travelling accross the data bus part of the [system bus](/Hardware/Bus.md#system-bus).
|
||||
3. The CPU processes this instruction and then sends a request accross the address bus part of the system bus for the next instruction to the memory controller within the [chipset](/Hardware/Chipset_and_controllers.md).
|
||||
4. The chipset finds where this instruction is stored within the [DRAM](/Hardware/Memory/RAM_types.md#dram) and issues a request to have it read out and send to the CPU over the data bus.
|
||||
4. The chipset finds where this instruction is stored within the [DRAM](/Hardware/Memory/Memory.md#dram) and issues a request to have it read out and send to the CPU over the data bus.
|
||||
|
||||
> This is a simplified account; it is not the case that only single requests are passed back and forth. This would be inefficient and time-wasting. The kernel sends to the CPU not just the first instruction in the requested file but also a number of instructions that immediately follow it.
|
||||
|
||||
|
|
|
@ -77,8 +77,8 @@ procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
|
|||
- The core memory output distinguishing:
|
||||
- Total kbs swapped to disk
|
||||
- Total kbs free
|
||||
- Total kbs currently in [buffer](/Hardware/Memory/Role_in_computation.md#relation-between-cache-and-buffers) and not written
|
||||
- Total amount of virtual memory in the [cache](/Hardware/Memory/Role_in_computation.md#relation-between-cache-and-buffers)
|
||||
- Total kbs currently in [buffer](/Hardware/Memory/Role_of_memory_in_computation.md#relation-between-cache-and-buffers) and not written
|
||||
- Total amount of virtual memory in the [cache](/Hardware/Memory/Role_of_memory_in_computation.md#relation-between-cache-and-buffers)
|
||||
- `swap`
|
||||
- Distinguishes amount of memory [swapped](/Operating_Systems/Disks/Swap_space.md) in (`si`) to memory and swapped out (`so`) to disk
|
||||
- `io`
|
||||
|
@ -136,7 +136,7 @@ This will typically be the same for all Linux systems.
|
|||
|
||||
### `free` : available physical memory
|
||||
|
||||
`free` displays the total amount of free and¬used physical and swap memory in the system, as well as the [buffers and caches](/Hardware/Memory/Role_in_computation.md#relation-between-cache-and-buffers) used by the kernel.
|
||||
`free` displays the total amount of free and¬used physical and swap memory in the system, as well as the [buffers and caches](/Hardware/Memory/Role_of_memory_in_computation.md#relation-between-cache-and-buffers) used by the kernel.
|
||||
|
||||
```bash
|
||||
$ free
|
||||
|
|
Loading…
Add table
Reference in a new issue