tidy up
This commit is contained in:
parent
08bbd8647f
commit
b1f88e8636
7 changed files with 46 additions and 54 deletions
16
zk/Bus.md
16
zk/Bus.md
|
|
@ -18,14 +18,14 @@ can mean:
|
||||||
|
|
||||||
## Main buses
|
## Main buses
|
||||||
|
|
||||||
| Bus type | Description |
|
| Bus type | Description |
|
||||||
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| System bus | The primary pathway between the CPU and [memory](Memory.md). It comprises the **data bus** that transfers data from the memory to the CPU and the **address bus** which transmits requests from the CPU to memory. |
|
| System bus | The primary pathway between the CPU and memory. It comprises the **data bus** that transfers data from the memory to the CPU and the **address bus** which transmits requests from the CPU to memory. |
|
||||||
| Internal bus | Connects local devices for example the harddisk to the CPU. |
|
| Internal bus | Connects local devices for example the harddisk to the CPU. |
|
||||||
| External bus | Connects peripheral devices such as disks and printers to the [motherboard](Motherboard.md) |
|
| External bus | Connects peripheral devices such as disks and printers to the [motherboard](Motherboard.md) |
|
||||||
| Expansion bus | Allows expansion boards to access the CPU and memory. |
|
| Expansion bus | Allows expansion boards to access the CPU and memory. |
|
||||||
| Frontside bus | Main computer bus that determines data transfer rate speed and is the primary data transfer path between the CPU, RAM and other [motherboard](Motherboard.md) devices. |
|
| Frontside bus | Main computer bus that determines data transfer rate speed and is the primary data transfer path between the CPU, RAM and other [motherboard](Motherboard.md) devices. |
|
||||||
| Backside bus | Transfers secondary cache (L2 cache) data at faster speeds, allowing more efficient CPU operations |
|
| Backside bus | Transfers secondary cache (L2 cache) data at faster speeds, allowing more efficient CPU operations |
|
||||||
|
|
||||||
## Bus standards
|
## Bus standards
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ tags:
|
||||||
|
|
||||||
At the core of a computer sits the Central Processing Unit. This is the assembly
|
At the core of a computer sits the Central Processing Unit. This is the assembly
|
||||||
of chips that execute all computation. Instructions are passed to the CPU along
|
of chips that execute all computation. Instructions are passed to the CPU along
|
||||||
the data bus part of the [system bus](Bus.md) from the
|
the data bus part of the [system bus](Bus.md) from the memory. The
|
||||||
memory. The [kernel](The_kernel.md), also residing in memory,
|
[kernel](/zk/The_kernel.md), also residing in memory, sequences and schedules
|
||||||
sequences and schedules the sending of data to the CPU and manages requests from
|
the sending of data to the CPU and manages requests from the CPU for data in
|
||||||
the CPU for data in memory.
|
memory.
|
||||||
|
|
||||||
The CPU comprises three core components:
|
The CPU comprises three core components:
|
||||||
|
|
||||||
|
|
@ -29,13 +29,12 @@ The CPU comprises three core components:
|
||||||
## Registers
|
## Registers
|
||||||
|
|
||||||
This is the part of the CPU that stores data. The memory cells that comprise it
|
This is the part of the CPU that stores data. The memory cells that comprise it
|
||||||
do not have [capacitors](Memory.md) (unlike RAM)
|
do not have capacitors (unlike RAM) so they cannot store very much data but they
|
||||||
so they cannot store very much data but they work faster, which is what is
|
work faster, which is what is important. Because their memory capacity is so
|
||||||
important. Because their memory capacity is so small, we measure the size of
|
small, we measure the size of registers in bits rather than bytes.
|
||||||
registers in bits rather than bytes.
|
|
||||||
|
|
||||||
In terms of speed, registers sit at the top part of the overall
|
In terms of speed, registers sit at the top part of the overall
|
||||||
[memory hierarchy](Memory.md#the-memory-hierarchy).
|
[memory hierarchy](./The_memory_hierarchy.md).
|
||||||
|
|
||||||
There are five main types of register in the CPU:
|
There are five main types of register in the CPU:
|
||||||
|
|
||||||
|
|
@ -49,15 +48,15 @@ There are five main types of register in the CPU:
|
||||||
|
|
||||||
## Arithmetic Logic Unit
|
## Arithmetic Logic Unit
|
||||||
|
|
||||||
See [Arithmetic Logic Unit](Arithmetic_Logic_Unit.md)
|
See [Arithmetic Logic Unit](././Arithmetic_Logic_Unit.md))
|
||||||
|
|
||||||
## Control Unit
|
## Control Unit
|
||||||
|
|
||||||
The CPU's [controller](Chipset_and_controllers.md). It
|
The CPU's [controller](Chipset_and_controllers.md). It takes the instructions in
|
||||||
takes the instructions in binary form from RAM memory (separate from the CPU,
|
binary form from RAM memory (separate from the CPU, but connected) and then
|
||||||
but connected) and then signals to the to ALU and memory registers what it is
|
signals to the to ALU and memory registers what it is supposed to do to execute
|
||||||
supposed to do to execute the instructions. Think of it as the overseer that
|
the instructions. Think of it as the overseer that gets the ALU and registers to
|
||||||
gets the ALU and registers to work together to run program instructions.
|
work together to run program instructions.
|
||||||
|
|
||||||
## The system clock
|
## The system clock
|
||||||
|
|
||||||
|
|
@ -73,11 +72,9 @@ cycle_.
|
||||||
The clock's circuitry is based on a quartz crystal system like that used in
|
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
|
watches. At precisely timed intervals, the clock sends out pulses of electricity
|
||||||
that cause bits to move from place to place within
|
that cause bits to move from place to place within
|
||||||
[logic gates](Logic_gates.md) or
|
[logic gates](/zk/Logic_gates.md) or between logic gates and
|
||||||
between logic gates and
|
[registers](./CPU_architecture.md). This is covered in greater detail in the
|
||||||
[registers](CPU_architecture.md#registers). This is
|
discussion of [clock signals in digital circuits](Clock_signals.md).
|
||||||
covered in greater detail in the discussion of
|
|
||||||
[clock signals in digital circuits](Clock_signals.md).
|
|
||||||
|
|
||||||
Simple instructions such as add can often be executed in just one clock cycle,
|
Simple instructions such as add can often be executed in just one clock cycle,
|
||||||
whilst complex operations such as divide will require a number of smaller steps,
|
whilst complex operations such as divide will require a number of smaller steps,
|
||||||
|
|
@ -95,16 +92,14 @@ Hz a processor possesses.
|
||||||
## Processing cycles
|
## Processing cycles
|
||||||
|
|
||||||
Each "cycle" is the execution of a process that commences once the
|
Each "cycle" is the execution of a process that commences once the
|
||||||
[kernel](The_kernel.md) hands control to the CPU. Each cycle
|
[kernel](The_kernel.md) hands control to the CPU. Each cycle follows a sequence
|
||||||
follows a sequence of events known as
|
of events known as [fetch, decode, and execute](Fetch_decode_execute.md).
|
||||||
[fetch, decode, and execute](Fetch_decode_execute.md).
|
|
||||||
|
|
||||||
## Electromagnetism: broader scientific context
|
## Electromagnetism: broader scientific context
|
||||||
|
|
||||||
Hertz was the scientist who detected
|
Hertz was the scientist who detected
|
||||||
[electromagentic waves](Electromagnetism.md).
|
[electromagentic waves](Electromagnetism.md). We use Hertz as a measure of the
|
||||||
We use Hertz as a measure of the frequency of electromatic wave cycles in a
|
frequency of electromatic wave cycles in a signal.
|
||||||
signal.
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,7 @@ A **controller** is simply a circuit that controls a process. The **chipset** is
|
||||||
a combination of controllers placed on the same piece of silicon.
|
a combination of controllers placed on the same piece of silicon.
|
||||||
|
|
||||||
The chipset manages the data flow between the different components that comprise
|
The chipset manages the data flow between the different components that comprise
|
||||||
the [motherboard](Motherboard.md): processor,
|
the [motherboard](Motherboard.md): processor, memory,
|
||||||
[memory](Memory.md),
|
|
||||||
[harddisk](What_are_disks.md) and peripherals.
|
[harddisk](What_are_disks.md) and peripherals.
|
||||||
|
|
||||||
Buses run in and out of the chipset into these key motherboard components. The
|
Buses run in and out of the chipset into these key motherboard components. The
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ tags:
|
||||||
We cannot yet mount or interact with the partitions we have created. This is
|
We cannot yet mount or interact with the partitions we have created. This is
|
||||||
because we have not added a filesystem to each partition.
|
because we have not added a filesystem to each partition.
|
||||||
|
|
||||||
> A filesytem is a form of [database](Basic_database_concepts.md); it
|
> A filesytem is a form of database; it supplies the structure to transform a
|
||||||
> supplies the structure to transform a simple block device into the
|
> simple block device into the sophisticated hierarchy of files and
|
||||||
> sophisticated hierarchy of files and subdirectories that users can understand.
|
> subdirectories that users can understand.
|
||||||
|
|
||||||
Linux recognises many types of filesystems. The native Linux filesystem is the
|
Linux recognises many types of filesystems. The native Linux filesystem is the
|
||||||
**ext4** (Fourth Extended Filesystem). Another common filesystem is **FAT**
|
**ext4** (Fourth Extended Filesystem). Another common filesystem is **FAT**
|
||||||
|
|
@ -87,10 +87,9 @@ UUID=c53577b5-92ef-4a0a-9a19-e488bfdfa39c /home ext4 rw,relatime 0 2
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
It shows my root and home filesystems and my
|
It shows my root and home filesystems and my [swap](Swap_space.md) file. Note
|
||||||
[swap](Swap_space.md) file. Note that we use the UUID
|
that we use the UUID to name the partition rather than its name in `/dev/`. The
|
||||||
to name the partition rather than its name in `/dev/`. The order of the
|
order of the parameters is as follows:
|
||||||
parameters is as follows:
|
|
||||||
|
|
||||||
- Device name or UUID
|
- Device name or UUID
|
||||||
- The mount point
|
- The mount point
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@ created: Monday, March 11, 2024
|
||||||
# Machine code
|
# Machine code
|
||||||
|
|
||||||
No matter how a program was originally written, it eventually needs to execute
|
No matter how a program was originally written, it eventually needs to execute
|
||||||
on a [[CPU_architecture|CPU]] as a series of machine language instructions.
|
on a [CPU architecture](/zk/CPU_architecture.md) as a series of machine language
|
||||||
|
instructions.
|
||||||
|
|
||||||
## Example machine instruction
|
## Example machine instruction
|
||||||
|
|
||||||
|
|
@ -60,5 +61,5 @@ instruction:
|
||||||
## Difficulty
|
## Difficulty
|
||||||
|
|
||||||
Binary sequences are hard to understand, even if converted to the
|
Binary sequences are hard to understand, even if converted to the
|
||||||
[[Hexadecimal_number_system]]. We have a better way of managing operations on
|
[hexadecimal number system](./Hexadecimal_number_system.md). We have a better
|
||||||
the machine level: [assembly](Assembly.md)
|
way of managing operations on the machine level: [assembly](Assembly.md)
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,7 @@ It has the following jobs to manage:
|
||||||
- Managing read-only memory
|
- Managing read-only memory
|
||||||
- Allowing for the use of disk space as auxiliary memory
|
- Allowing for the use of disk space as auxiliary memory
|
||||||
|
|
||||||
> Modern CPUs include a
|
> Modern CPUs include a [memory management unit](./Memory_Management_Unit.md)
|
||||||
> [memory management unit](Virtual_memory_and_the_MMU_in_Linux.md#the-memory-management-unit-mmu)
|
|
||||||
> which provides the kernel with **virtual** memory. In this scenario, memory
|
> which provides the kernel with **virtual** memory. In this scenario, memory
|
||||||
> isn't directly accessed by the process instead it works on the assumption that
|
> isn't directly accessed by the process instead it works on the assumption that
|
||||||
> is has access to the entire memory of the machine and this is then translated
|
> is has access to the entire memory of the machine and this is then translated
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ tags:
|
||||||
|
|
||||||
# What are disks?
|
# What are disks?
|
||||||
|
|
||||||
A disk is a mass storage [block_device](Devices.md) which we
|
A disk is a mass storage [block_device](Devices.md) which we can write to and
|
||||||
can write to and read from.
|
read from.
|
||||||
|
|
||||||
## SCSI
|
## SCSI
|
||||||
|
|
||||||
|
|
@ -22,10 +22,9 @@ The following diagram represents the basic anatomy of a disk device.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- A disk is divided up into [partitions](Partitions.md)
|
- A disk is divided up into [partitions](./Linux_disk_partitions.md) which are
|
||||||
which are subsections of the overall disk. The kernel presents each partition
|
subsections of the overall disk. The kernel presents each partition as a
|
||||||
as a [block device](Devices.md) as it would with an entire
|
[block device](Devices.md) as it would with an entire disk.
|
||||||
disk.
|
|
||||||
- The disk dedicates a small part of its contents to a **partition table**: this
|
- The disk dedicates a small part of its contents to a **partition table**: this
|
||||||
defines the different partitions that comprise the total disk space.
|
defines the different partitions that comprise the total disk space.
|
||||||
- The **filesystem** is a database of files and directories: this comprises the
|
- The **filesystem** is a database of files and directories: this comprises the
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue