Last Sync: 2022-09-07 19:30:05
This commit is contained in:
parent
c63c288e76
commit
fd875b926c
4 changed files with 72 additions and 42 deletions
|
@ -6,7 +6,7 @@ tags: [physics, electricity]
|
|||
|
||||
# Coulombs Laws
|
||||
|
||||
Coulomb's Laws express the fundamental relationship between charge, force and attraction. They are also known as the **Electrostatic Laws**.
|
||||
Coulomb's Laws express the fundamental relationship between electric charge, force and attraction. They are also known as the **Electrostatic Laws** and define **the electic force**.
|
||||
|
||||
## First Law
|
||||
|
||||
|
@ -15,3 +15,15 @@ Coulomb's Laws express the fundamental relationship between charge, force and at
|
|||
Within the atom we see this at work in the way that negatively charged electrons are attracted to the positively charged nucleus. This attractive force is balanced by the centrifugal force caused by the electron's rotation around the nucleus. This keeps the electrons in orbit. Without it, they would spiral into the nucleus.
|
||||
|
||||
Within circuits, the first law dictates the movement of charge from negatively charged atoms to positively charged atoms through the conductor.
|
||||
|
||||
## Second Law
|
||||
|
||||
The attraction or repulsion between charges acts along the line between the two charges.
|
||||
|
||||
## Third Law
|
||||
|
||||
The size of the electric force varies inversely as the square of the distance between the two charges. Thus if the distance between the two charges is doubled, the attraction or repulsion becomes weaker, decreasing to a quarter of the original value.
|
||||
|
||||
## Fourth Law
|
||||
|
||||
The size of the electric force is proportional to the value of each charge measured in coulombs.
|
||||
|
|
|
@ -6,32 +6,41 @@ tags: [motherboard]
|
|||
---
|
||||
|
||||
#
|
||||
|
||||
# Bus
|
||||
|
||||
A bus is a communication system that transfers data between components inside a computer, or between computers.
|
||||
|
||||
## Main buses
|
||||
|
||||
### System bus
|
||||
The primary pathway between the CPU and [memory](Memory/Basics.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.
|
||||
|
||||
The primary pathway between the CPU and [memory](Memory/Basics.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.
|
||||
|
||||
### 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)
|
||||
|
||||
Connects peripheral devices such as disks and printers to the [motherboard](/Hardware/Motherboard.md)
|
||||
|
||||
### 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.
|
||||
|
||||
### Backside bus
|
||||
|
||||
Transfers secondary cache (L2 cache) data at faster speeds, allowing more efficient CPU operations
|
||||
|
||||
## Bus standards
|
||||
|
||||
### Parallel and serial transmission types
|
||||
|
||||
There is a distinction between buses that use serial and buses that use parallel transmission. They are distinguished by the way in which data in the form of bits is transferred from one point to another, along the bus.
|
||||
|
||||
Serial Transmission is the type of transmission in which a single communication link is used to transfer the data from an end to another. On other hand Parallel Transmission is the transmission in which multiple parallel links are used that transmit each bit of data simultaneously.
|
||||
|
@ -39,18 +48,21 @@ Serial Transmission is the type of transmission in which a single communication
|
|||
<img src="../img/serial-transmission.jpg" width="800px"/>
|
||||
<img src="../img/parallel-transmission.jpg" width="800px"/>
|
||||
|
||||
* Serial buses are cheaper to implement than parallel buses
|
||||
* Serial buses operate at greater [latency](/Hardware/Bus.md#latency) than parallel buses
|
||||
- Serial buses are cheaper to implement than parallel buses
|
||||
- Serial buses operate at greater [latency](/Hardware/Bus.md#latency) than parallel buses
|
||||
|
||||
## Latency
|
||||
|
||||
Latency means _delay_: the delay from the time the data is requested until the time it arrives. In the context of a microprocesser and buses a key locus of latency would be between the time a request takes to travel accross the system bus from the CPU to the memory.
|
||||
|
||||
### Bandwidth
|
||||
In general, bandwidth is a measure of the capacity for a communications channel to transmit data. A bus is a channel between two components thus we can talk about the bandwidth of buses. The speed and efficiency of a bus is a function of its bandwidth, although other factors such as its length and proximity to the source and receiver are also important.
|
||||
|
||||
In general, bandwidth is a measure of the capacity for a communications channel to transmit data. A bus is a channel between two components thus we can talk about the bandwidth of buses. The speed and efficiency of a bus is a function of its bandwidth, although other factors such as its length and proximity to the source and receiver are also important.
|
||||
|
||||
Bandwidth can be calculated in terms of how many bits can be transferred per second. The wider the bus, the more bits that can be transferred. If we have a bus that can run at 66MHz and transfer 64 bits, 64 bits is 8Mb thus the bandwidth is 8 x 66 = 528Mb.
|
||||
|
||||
## Standards
|
||||
|
||||
The mode of transmission is used to distinguish the different bus standards.
|
||||
|
||||
SCSI (Small Computer System Interface) and ATA (Advanced Technology Attachment) are used for hard drive devices (i.e. internal buses). USB (Univeral Serial Bus) and SATA (Serial Advanced Technology Attachment) are used for peripheral devices, keyboards and modem devices (i.e external buses).
|
||||
|
|
|
@ -36,4 +36,8 @@ Cache controllers use complex algorithms to determine what should go into the ca
|
|||
|
||||
## Relation between cache and buffers
|
||||
|
||||
The terms _cache_ and _buffer_ are often used interchangeably but there is a significant difference. Buffer 'size' refers to the amount of physical memory in RAM that is dedicated to a process where this size is measured in terms of the amount of disk blocks it would take up in the harddrive. Cache is also a measure of memory but it is expressed in terms of [virtual memory](/Operating_Systems/Virtual_memory_and_the_MMU.md): the page size of the memory.
|
||||
The terms _cache_ and _buffer_ are often used interchangeably but there is a significant difference. Buffer 'size' refers to the amount of physical memory in RAM that is dedicated to a process where this size is measured in terms of the amount of disk blocks it would take up in the harddrive. Cache is also a measure of memory but it is expressed in terms of [virtual memory](/Operating_Systems/Virtual_memory_and_the_MMU.md): the page size of the memory.
|
||||
|
||||
Buffers and caches are both mechanisms for avoiding writing data to a storage device in the midst of active computation. Every time data is saved, the OS doesn't immediately write it to disk. It keeps it in the most short term memory in case it is edited again or until the processor is free. In this state it is kept in buffers. When written to disk it becomes blocks. This is why you shouldn't immediately remove a disk device without first saving / syncing int.
|
||||
|
||||
Similarly with transferring memory to and from the RAM. The OS keeps occurent memory in the processor caches to enable reuse and not to overburden the CPU, this page data is then moved to RAM when convenient.
|
||||
|
|
|
@ -7,10 +7,9 @@ tags:
|
|||
- bootloader
|
||||
---
|
||||
|
||||
|
||||
# The boot process
|
||||
|
||||
The primary or boot [partition](Disks.md#primary-extended-and-logical-partitions) of a harddisk contains a bootloader. It is the job of the bootloader to locate the [kernel](The_Kernel.md) on the harddrive and inject it into memory so that they operating system can start. This is the boot process.
|
||||
The primary or boot [partition](Disks.md#primary-extended-and-logical-partitions) of a harddisk contains a bootloader. It is the job of the bootloader to locate the [kernel](/Operating_Systems/The_Kernel.md) on the harddrive and inject it into memory so that they operating system can start. This is the boot process.
|
||||
|
||||
## Boot loaders
|
||||
|
||||
|
@ -19,9 +18,10 @@ The boot loader loads the kernel into memory from the disk and then starts the k
|
|||
Like the kernel itself, the boot loader requires a driver in order to access the disk but it can't use the same one as the kernel since at this point, the kernel is not yet loaded into memory. So it has its own special driver: this is either the BIOS or the UEFI firmware.
|
||||
|
||||
A boot loader's core functionality includes the ability to do the following:
|
||||
* select from multiple kernels
|
||||
* switch between sets of kernel parameters
|
||||
* provide support for booting other operating systems
|
||||
|
||||
- select from multiple kernels
|
||||
- switch between sets of kernel parameters
|
||||
- provide support for booting other operating systems
|
||||
|
||||
### BIOS and UEFI
|
||||
|
||||
|
@ -38,7 +38,6 @@ Device Start End Sectors Size Type
|
|||
/dev/nvme0n1p3 59594752 1000214527 940619776 448.5G Linux filesystem
|
||||
```
|
||||
|
||||
|
||||
Whilst UEFI is installed on the hardware, most of its configuration is stored in the EFI partition on the disk, whereas with BIOS, everything is on the chip. This make booting faster with UEFI.
|
||||
|
||||
Even though most modern computers use UEFI, it may still be referred to as BIOS for user-continuity. This is like on Windows. With Linux you have to explicitly create your boot process so the two are clearly distinguishable.
|
||||
|
@ -52,6 +51,7 @@ The de facto standard boot loader for Linux is GRUB: Grand Unified Boot Loader.
|
|||
You see the GRUB default menu when you first start a Linux machine. It will offer you various options for loading your installed OS or other OSs. GRUB is a filesystem like the main disk. If you press `e` in this screen you can view and edit specific boot parameters. Pressing `c` gives you access to the GRUB command line interface. This allows you to interact with GRUB in the same way as you would with any other filesystem, allowing for advanced configuration.
|
||||
|
||||
## The boot sequence
|
||||
|
||||
1. The machine's BIOS or boot firmware (in the case of UEFI) loads and runs a boot loader. It finds the bootloader by looking for the part of the disk that contains either the MBR or GPT sector.
|
||||
2. The boot loader finds the kernel image on disk, loads it into memory and starts it.
|
||||
3. The kernel initializes the devices and its drivers.
|
||||
|
@ -61,6 +61,7 @@ You see the GRUB default menu when you first start a Linux machine. It will offe
|
|||
7. At the end of the boot process, init starts a process allowing you to log in.
|
||||
|
||||
## Boot diagnostics
|
||||
|
||||
Linux keeps a log of the boot process as part of the [journal]() log of everything that happens on disk. We can use the command `journalct -k` to view the diagnostics generated during the boot. Here is a selection:
|
||||
|
||||
```
|
||||
|
@ -107,6 +108,7 @@ We can see that the first thing that is registered is the OS image that contains
|
|||
## Initial kernel actions
|
||||
|
||||
The diagnostics above are a running commentary provided by the kernel itself about its actions. The details will be specific to the machine in question but the general sequence is as follows for all operating systems:
|
||||
|
||||
1. CPU inspection
|
||||
2. Memory inspection
|
||||
3. Device bus discovery
|
||||
|
|
Loading…
Add table
Reference in a new issue