Understanding Parallelism and Memory Management in Computing

BASICS:

PARALLELISM: Coexistence of processes.

ATTENDANCE: Parallels between related processes (which require synchronization).

TIMING: The correspondence of a temporal order between processes arising from the communication between them needed to ensure mutual exclusion.

THREADS: Value of dominance and dependence between the operating system and processes.

Shared Variable: Variable that can be updated by two or more processes.

CRITICAL SECTION: Location of the program where there is a shared variable.

PRIMITIVE: Control structures to indicate parallelism or concurrency composed of pairs of statements that indicate respectively the division and merger control wire (Parbegin-Parend / COBEGIN-COEND).

Mutual Exclusion: A programming technique used to execute the critical section of a program.

TYPES OF MUTUAL EXCLUSION ALGORITHMS:

  • Active Standby: Algorithms that base their operation on establishing the expected entry to the critical section with a loop that will be broken when a certain condition is met. They are called active standby because the process is not blocked during execution but will be competing for processor time. For this reason, these algorithms overload the system unnecessarily. (Mayor and others, p. 82)
  • Dekker’s Algorithm: It bases its operation on a two-dimensional table of logic elements (switches).
  • Locks Mutex: Use a named Mutex switch through which synchronization occurs.
  • Alternation: Use a variable called Time to perform the synchronization.

WAIT NO ACTIVE: Down algorithms are expected to enter the critical section by blocking the process, ensuring competition for the processor until the condition of release is met. (Mayor and others, p. 82)

Traffic Lights: It bases its operation on an integer variable used as a counter for input requests to a critical section that is shared by all system processes. Designed by Dijkstra (1965), it is called traffic light due to its ability to manage process traffic wishing to access shared data.

Critical Region: Only allows shared data to be accessed from certain areas, being transparent from the rest. It presents little problems with synchronization and does not allow several activities to perform read operations simultaneously.

Conditional Critical Regions: This is an improvement on the previous method to correct some synchronization problems.

Monitors: In the above mechanisms, the programmer must provide an explicit synchronization method. Monitors allow you to share data between processes, guaranteeing mutual exclusion, without the programmer having to provide it explicitly. Monitors have all the functions that operate on a set of shared data in a single module and should be borne by the appropriate language (e.g., Modula and Ada).

Event Counter: Based on an integer variable that allows for access operations, thereby enabling synchronized activities without having to force mutual exclusion.

Posts: More than a timing mechanism, it is a cooperative mechanism based on a shared memory area managed by the OS and hidden processes. A process sends a message to another deposited in the area of shared memory, and the receiver reads it.

Messages (Cont.): There are two types of communication between processes:

  • Direct: Processes send and receive messages directly to each other.
  • Hint: The messages are sent and received through mailboxes.

Remote Calls: Similar to passing parameters in a call to a routine or procedure, it involves passing messages from one process to another, ensuring that even if one process does not end, the other will be on hold.

Rendez-vous: It is the culmination of all previous mechanisms, dealing with a slight modification of the method of remote calls where the call, rather than an entire procedure, is only a statement group within it. This method has been implemented in Ada.

MECHANISMS OF HARDWARE: Are hardware instructions that ensure mutual exclusion:

  • Disable Interrupts: Today’s computers allow interrupts to be disabled, so if a device generates an interrupt, it is disabled, and the recognition and treatment are slow to be enabled again, forcing mutual exclusion. Usually, disabling and re-enabling the interrupt can be done with a machine instruction.
  • Instruction Test-and-Set: Some of today’s computers provide a machine instruction called Test-and-Set whose mission is to force mutual exclusion, even when many computers are not capable of supporting such instruction; it is not enough by itself to ensure mutex.
  • Lock: Based on the above statement and designed to allow access to the critical section of a process in the absence of other activity within its critical section.

Memory Management:

Storage Hierarchy:

  • COST
  • ACCESS TIME
  • CAPACITY

Management Strategies:

  • Monoprogramming
  • Dedicated Memory (not Manager)
  • Monitor (Appearance of the OSs)
  • Border Protection
  • Address Remapping (Static – Compilation / Dynamics – Execution)
  • Swapping
  • Multiprogramming
  • Memory Protection
  • Neighboring Partitions of Fixed Size
  • Neighboring Partitions of Variable Size
  • Fragmentation Internal / External
  • Compaction

Page: Memory management scheme that divides the resource sections of the same size called page frames or frames and the program into blocks of the same size called pages. This creates a page table. With this strategy, it does not require storing the blocks of the program (pages) in neighboring frames (contiguous).

Segmentation: Memory management scheme that supports the user’s perspective on the physical memory of the system, based on a set of segments with an ID and an offset. The segmentation is performed by the assembler or the compiler.

Paging Segment: Memory management scheme that segments the page table appropriate to the size of the program (IBM 370 series).

Segmentation with Paging: Paged segments consist of changing the contents of the segment table for a segment page table to indicate their lengths (Intel 386, Multics/Honeywell, GE 645).

Virtual Memory: Memory management scheme that allows the execution of programs partially loaded into main memory.

Load: Requests for pages, advance.

Selection of Space: Location.

Replacement: FIFO, LRU, LFU.

Memory Cache: French cacher (hide), also known as buffer cache. It is a technique that uses blocks (which obviously are) hard drives but are maintained in RAM for the purpose of improving system performance.

RECORDS MANAGEMENT:

1950 – 1960: Sequential files
1960 – 1970: Indexed sequential files
1970 – 1980: Random Access files
1980 – 1990: Database management system (DBMS), data marts, data warehouse
1990 – current: Management system relational database / object (ORDBMS), cluster file system.

FUNDAMENTAL CONCEPTS:

LOGICAL AND PHYSICAL ORGANIZATION OF DATA:

Organization Description: Physical Description
Physical: Bit logic unit
Information: Character Byte minimum information (8 bits)
EX: A fixed character Field Word # Bytes Record Block Register Physical File Area Data Areas.

KEY FIELD: A field that identifies the record and sets it apart from other records, e.g., ID (# CI, serial).

PHYSICAL RECORD / BLOCK: The smaller amount of data that can be transferred in a transaction I/O between main memory and peripheral devices or vice versa (a line of imp.).

BLOCKING FACTOR: Number of logical records that may contain a physical record.

FIELD: Basic data element with a unique value. The fields are differentiated by their ID and their magnitude, and in the case of a variable-length field, the length of it. The fields are classified by their type and length.

REGISTRATION: Collection of related fields that can be handled as a unit.

FILE: Collection of similar records with a unique name and is managed by the user and the applications of it as a unit.

DATABASE: Set of interrelated data and a group of programs to allow access to such data.

DIRECTORY: Space reserved for the OS to keep track of files on the system.

WHAT IS A DATABASE? A management system database (in English DBMS, database management system) consists of a set of interrelated data and a program group to access that data. (HF Korth) The Defense is a collection of integrated records (DM Kroenke). It is a collection of interrelated data elements that can be processed by one or more application systems. (GW Hansen)

Why are DATABASES?

  • Aislamiento of data (different files involving different formats)
  • Access to multiple users (Inconsistency of multiple updates)
  • Redundancia and inconsistency of data (Data repeated in several files)
  • Dificultades to access data (Lack of applications for reports not provided)
  • Problemas Security and Integrity (Each user has his own view and the data must satisfy the constraints of consistency)

DATA WAREHOUSE: A repository or the repository of integrated information available for search and analysis. The data come from multiple sources and related data of different types. The information contained in it is the product of operational data from the union of several Data Marts. This showed that overall 80% of the data used comes from 20% of system fonts.

Data Mart: A data repository with standardized dimensions and a bus architecture, which is extracted from operational databases and is designed to serve a particular area of the company. The bus architecture allows them to act together as a virtual data warehouse.

Online Analytical Processing (OLAP): Search tools typically used in Data Mart and Data Warehouse.

ON-LINE TRANSACTION PROCESSING (OLTP): Data capture process to the moment when the transaction is generated.

CASE TOOLS: A dictionary of information resources consists of: analysis and design components (data flow diagrams, Entity-Relationship diagrams, database diagrams, screen designs), program structures, algorithms, data repository.

OBJECTIVES:

Administration system of files provided to users and use the services required for the use of files.

Meeting the needs of data management and user requirements.

Ensure the consistency and validity of data.

Protecting data against events that may cause loss or destruction.

Provide support for E/S for a wide number of types of storage devices.

Optimizing performance.

FILE SYSTEM ARCHITECTURE:

At the lowest level, device drivers or drivers communicate directly with peripheral devices or their drivers or channels. Each device driver is responsible for starting the E/S on a device and processing the completion of a petition.

  • Access Method
  • E/S Logic
  • Supervisor Basic E/S
  • Basic File System
  • Device Manager

The Basic File System: or level of E/S physics provides the primary interface with the external environment to the computer. This level deals with data blocks that are exchanged with disk or tape systems, placing the blocks in the secondary storage device and buffering them in memory.

The Basic File System: is outside the data content or structure of the files involved.

The Basic and Supervisor E/S: is responsible for the initiation and completion of all E/S. Remain at this level control structures that are responsible for the E/S with the devices, planning, and the status of files. Besides dealing with the selection of the device where it will be the E/S with the files.

The E/S Logic: is the file system that allows users and applications access to records, offering a capacity of E/S of general-purpose registers and maintaining basic data about files.

The Access Method: is the file system level closest to the user. Each method provides a standard interface between applications and file systems and devices that store data. Some methods of access are the battery, sequential, indexed sequential, indexing, and dispersion.

SECURITY ADMINISTRATION:

Criteria:

  • To prevent unauthorized access (espionage, theft, sabotage).
  • Maintenance of the equipment (hardware and software).
  • Minimize risk by claims (fire, flood, earthquake, viruses, plague).
  • The security level is relative (importance to the organization).

Classification:

  • External Security: Strategies and mechanisms to safeguard the installation without the intervention of the computer system.
  • Internal Security (Protection): Strategies and mechanisms for protecting the facility through the resources of the computer system itself.
  • Physical Security: Strategies and mechanisms to safeguard the installation from natural disasters and unauthorized access (fire systems, security grills, etc.).
  • Administrative Security: Strategies and mechanisms to prevent logical access (access control, firewall, security tx = parity bit Hamming code, CRC + checksum).

Internal Security: It is based on authentication (user ID).

Simple, uniform, and comprehensive (not supplied).

The default state is not accessible.

Minimizing privileges.

Password: Something the user knows, something that has the user, something that is the user.