Understanding Computer Memory and Processor Management

Memory: There Are Two Types: Internal: Stores data temporarily while programs are running. – Ancillary (also called external memory) that stores information in the long run, even after shutdown. Main Features of Memory:

  • Capacity: Represents the global volume of information (in bytes) that can be stored in memory.
  • Access Time: Corresponds to the time interval between the application read/write and data availability.
  • Cycle Time: Represents the minimum time interval between two successive hits.
  • Throughput: Defines the amount of information exchanged per unit time, expressed in bits per second.
  • No Volatility: Characterizes the ability of memory to store data when it receives no power.
  • Sustaining Loads: Represents the operation to maintain loads at different positions due to the dissipation of memory types.

Types of Random Access Memory:

  • RAM: Read-Only Memory.
  • ROM: Flash memory is an intermediate type between RAM and ROM.
  • DRAM: Used mainly for the computer’s main memory.
  • SRAM: Used particularly in the processor cache.

Given that DRAM needs to be refreshed or updated at regular intervals, this is known as the refresh cycle. Each memory point is characterized by an address that corresponds to a number of row and column numbers. This access is not instantaneous; the period of time involved is called latency. The time to access information in memory is equal to cycle time plus latency. Types of ROM:

  • BIOS: A program that controls the main input/output interfaces.
  • Bootstrap Loader: Looks for the operating system on a floppy disk and, in the event of a malfunction, on the hard disk.
  • CMOS Setup: Used to modify system parameters (often erroneously called BIOS).
  • Power Self-Test: Runs automatically when you boot the system, allowing you to test the system.

BUSES: A bus is a set of physical connections that unite multiple hardware components to communicate with each other. The purpose of buses is to reduce the number of routes necessary for communication between different bus components. A bus is characterized by the amount of information transmitted simultaneously, expressed in bits. The term “width” designates the number of bits that a bus can transmit simultaneously. Moreover, the bus speed is defined by its frequency (expressed in Hertz), i.e., the number of packets of data that can be sent or received per second. Every time you send or receive data, we can speak of a cycle. In this way, we can find the maximum transfer speed of the bus (the amount of data that can be transported per unit time). Subset of a Bus:

  • Address Bus: Carries memory addresses to access the processor for reading or writing data. This is a unidirectional bus.
  • Data Bus: Transfers both instructions coming from the processor and those directed toward it. This is a bidirectional bus.
  • Control Bus: Carries commands and synchronization signals; this is also a bidirectional bus.

The Main Bus: or Internal Bus System allows the processor to communicate with the system’s main memory (RAM). The Expansion Bus: Allows various components of the motherboard (USB, etc.) to communicate with each other. The Chipset: Regulates the flow of data between buses. North Bridge: Responsible for controlling transfers between the processor and RAM. South Bridge: Handles communications between peripheral devices. The Processor (CPU): The processor (CPU) is the brain of the computer, allowing the processing of numerical information, i.e., information entered in binary format, and the execution of instructions stored in memory. Operation: The processor is an electronic circuit that operates at the speed of an internal clock, sending pulses called “cycles” or “peaks.” The clock speed is the number of pulses per second, expressed in Hertz. With each clock cycle, the processor performs an action that corresponds to an instruction or part of it. Instructions: The instructions are stored in main memory, waiting to be processed by the processor. There are two types:

  • Operation Code: Represents the action that the processor must run.
  • Operand Code: Defines the parameters of the action.

The instructions can be grouped into different categories:

  • Memory Access: Memory access or transfer of information between registers.
  • Arithmetic: Operations such as addition, subtraction, division, or multiplication.
  • Logical Operations: Operations such as AND, OR, NOT, NOT EXCLUSIVE, etc.
  • Control: Sequence controls, conditional connections, etc.

Logs:

When the processor executes instructions, the information is stored temporarily. The most important registers are:

  • Accumulator Register (ACC): Stores the results of arithmetic and logical operations.
  • Status Register (PSW): Contains the system status indicators (leading digit, overflow, etc.).
  • Instruction Register (IR): Contains the instruction currently being processed.
  • Program Counter (PC): Contains the address of the next instruction to be processed.
  • Buffer Register: Temporarily stores information from memory.

Cache Memory:

A Cache is fast memory that can reduce waiting times for the various data stored in RAM. There are different types:

  • Level 1 Cache Memory: Integrated directly into the processor, divided into two parts:
    • Instruction Cache: Contains instructions from RAM.
    • Data Cache: Contains information from RAM.
  • Level 2 Cache: Located in the same housing as the processor, it serves as an intermediary between the processor and its internal cache RAM.
  • Level 3 Cache: Located on the motherboard.

Control Signals:

The control signals are electronic signals that orchestrate the various units of the processor involved in the execution of an instruction.

Functional Units:

The processor consists of a group of interrelated units:

  • Control Unit: Links incoming information, decodes it, and sends it to the execution unit.
  • Execution Unit: Complies with the duties assigned to the training unit, consisting of:
    • Arithmetic Logic Unit: Implements basic arithmetic and logic functions.
    • Floating Point Unit: Performs calculations that the arithmetic logic unit cannot perform.
  • Bus Management Unit: Manages the flow of incoming and outgoing data.

STRUCTURE OF THE COMPUTER The computer is a set of modular electronic components, i.e., components that can be replaced by others. Hardware refers to all material elements of the computer, while software refers to programs.

Here we explain the motherboard and power supply, so I will skip it…

The Chipset: The chipset is an electronic circuit whose function is to coordinate the transfer of data between computer components.

The Clock and the CMOS Battery: The real-time clock (RTC) is a circuit that synchronizes the system signals, continuously fed through a battery (button battery) or a battery located on the motherboard.

The BIOS: The program used as an interface between the OS and the motherboard. BIOS settings are used only as an interface for configuration, and data are stored in the CMOS.

Processor Socket: This is simply the brain of the computer. It executes programs from a set of instructions and is characterized by its frequency, i.e., the speed with which it executes various instructions. An 800 MHz processor can perform 800 million operations per second. Since the processor emits heat, it is necessary to dissipate it to prevent the circuit from melting. This is why it is usually mounted on a heatsink.

1. PROCESSOR MANAGEMENT: There are two basic ways of working with a computer: batch and interactive. In the latter, the processor is constantly attending to the user in a dialogue. A process is a program that has started its execution and is being treated by the operating system as a whole. Monoprogramming: Until the implementation of this program is complete, another program cannot begin to run. Only one process executes a program at a time.

1.1. Multiprogramming: A process can be decomposed into different threads or independent tasks that can be run concurrently. It is said that a process (or thread) is in a ready state when the processor can initiate or continue its execution. A process enters the blocked state when the processor cannot continue working with it because it has to wait for the completion of an input/output operation.

To measure the efficiency of a system, the following parameters are often used:

  • Yield: The number of tasks performed during a period of time.
  • Processor Utilization Rate: The usage time with respect to the total time of the processor.

Image ” alt=”Processor Utilization” />

  • Runtime of a Process: The time elapsed since initiating its implementation until it concludes.
  • Machine Time: The time it takes for the system to respond to the request for performing a particular task.

Response Ratio: The ratio
R = Image ” alt=”Response Ratio” /> = Image ” alt=”Response Ratio” />

1.1.1. Scheduling Algorithms: If several processes are prepared, the system must elect them to give time. One of the scheduling algorithms of interest (for its simplicity and widespread use) is round robin. Each process is assigned a fixed time interval or period. A process typically has an associated priority. Static Priorities: Can be given depending on the relevance of the processes (or users). Dynamic Priorities: Assigned and changed by the operating system itself. Mixed Priorities: A mixture of the two.

Another algorithm of interest is Priority Scheduling: The scheduler gives the turn to the process with higher priority.

1.1. Modes of Processing: Multiprogramming: The main memory contains different processes that the operating system will assign to the processor alternately in time. Multiuser System: A multiprogramming system that provides concurrent use by different users for identification, authentication, and control.

Queue Processing (Batch Processing): When a job is entered, it is included in a queue and does not begin execution until selected by the system according to available memory.

Parallel Processing of Queue: Ranks the jobs queued in different classes according to priority intervals, processing time expected, and memory usage provided.

Multiprocessing System: These systems are designed to operate with two or more processors working simultaneously, distributing different processes or threads among different processors.

1.1. States of a Process: A process may be in different situations or states from the standpoint of execution. An unborn child is a process that has not started execution, i.e., it is pending memory or disk for implementation to begin. Ready State: When it is in main memory, with no outstanding disk I/O, and eligible to enter. Active State: Corresponds to the process currently being treated by the processor. Blocked State: Interrupts or distributor to serve a higher-priority process (that is entitled to the shift).

A process moves from the blocked state to the ready state when the I/O operation ends.