The Wayback Machine - https://web.archive.org/web/20240921171500/https://www.geeksforgeeks.org/what-is-random-access-machine/
Open In App

What is Random Access Machine?

Last Updated : 16 Dec, 2021
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

The algorithm required to solve a problem on a sequential computer is called a sequential algorithm. Algorithms written to solve a problem on a parallel computer are called parallel algorithms. The sequential algorithm is written in the form of steps, which are done sequentially by PE, i.e. sequential algorithm uses sequential steps to solve a problem. In a parallel algorithm, we have to see where the communication is taking place, where we have to move the output of particular steps.

Algorithms written for a particular architecture cannot be applied to another architecture, in other words, to solve the same problem on different parallel computers, different algorithms must be written based on parallel computer architecture.

Writing parallel algorithms is a complex task, to deal with this problem various parallel models called abstract machines were designed hypothetically.

Abstract machines are just imaginary notions, they don’t exist in reality. Here we can make inferences to solve a problem.

There are two types of Abstract Machine

Random Access Machine (RAM)

Random Access Machine or RAM model is a CPU. It is a potentially unbound bank of memory cells, each of which can contain an arbitrary number or character. Memory cells are numbered and it takes time to access any cell in memory or say all operations (read/write from memory, standard arithmetic, and Boolean operations) take a unit of time. RAM is a standard theoretical model of computation (infinite memory and equal access cost). The Random Access Machine model is critical to the success of the computer industry.

Random Access Machine

Random Access Machine

  • The Random Access Machine (RAM) model is a one address computer.
  • RAM is a sequential machine. RAM consists of memory, read-only input tape, output tape only, and writes a program.
  • The program is not stored in memory and cannot be modified.
  • The input tape consists of a series of integers. Each time an input value is read, the input head moves forward one square.
  • Similarly, the output head moves forward after each write. Memory consists of an infinite sequence of registers, designated r0, r1, r2,….
  • Each register can contain an integer. Register r0 is the accumulator, where the calculation is done.
  • RAM must have the same instructions as LOAD, STORE, READ, WRITE, ADD, SUBTRACT, MULTIPLY, DIVIDE, TEST, JUMP, and HALT.
  • The worst-case time complexity function of a RAM program is f(n), which is the maximum time taken by the program to execute on all inputs of size n.
  • We assume that each of these steps takes a constant, that is, O(1) time.

In RAM, Here each step of an algorithm consists of the following steps:

  • Read: (Up to) N processors simultaneously (in parallel) read from N memory locations (as in memory) and store the values in their local registers.
  • Compute: (Up to) N processors perform basic arithmetic or logical operations on values in their registers.
  • Write: (Up to) N processors simultaneously write from their registers in (up to) N memory locations.

Each step, READ, COMPUTE, WRITE, is assumed to take O(1) time in the case of RAM. It should be noted that not all processors need to perform a given step of the algorithm. When a subset of processors takes a step, other processors remain idle during that time. Algorithms for PRAM have to specify which subset of processors should be active during the execution of a phase.



Similar Reads

Difference between Random Access Memory (RAM) and Content Addressable Memory (CAM)
Random Access Memory (RAM) is used to read and write. It is the part of primary memory and used in order to store running applications (programs) and program's data for performing operation. It is mainly of two types: Dynamic RAM (or DRAM) and Static RAM (or SRAM). RAM is made up of small memory cells that are arranged in a grid pattern. Each cell
4 min read
Ferro-electric Random Access Memory
Ferro-electric Random Access Memory (FRAM) is a type of Random Access Memory, which uses a ferro-electric capacitor to achieve it's non-volatility (content is not lost when power is turned off).The di-electric constant of a ferroelectric material usually has a high value. The most widely used ferroelectric material is PZT (Lead Zirconate Titanate).
2 min read
Magnetic Random Access Memory (M-RAM)
MRAM stands for magnetoresistive random access memory and is a non-volatile type of RAM. Magnetic state refers to the electrical resistance of a metal when it is placed in a magnetic field. The MRAM uses magnetic states and magnetisation direction in a ferromagnetic material(a material which is highly susceptible to magnetization to store data bits
4 min read
PRAM or Parallel Random Access Machines
Parallel Random Access Machine, also called PRAM is a model considered for most of the parallel algorithms. It helps to write a precursor parallel algorithm without any architecture constraints and also allows parallel-algorithm designers to treat processing power as unlimited. It ignores the complexity of inter-process communication. PRAM algorith
3 min read
Difference Between Sequential and Random Memory Access
Magnetic tapes and other sequential access storage technologies read and write data linearly. This implies that the gadget has to process all previous data before accessing a specific piece of data. On a cassette tape, for instance, you have to fast-forward through the first four tracks to hear the fifth song. It may take a while to retrieve data u
6 min read
Random Access Memory (RAM)
Random Access Memory (RAM) is a type of computer memory that stores data temporarily while a computer is running. It's called "random access" because the computer can access any part of the memory directly and quickly. RAM (Random Access Memory) is very similar to memory in the Human Brain. The human brain's memory is the most essential part played
13 min read
Random Access Memory (RAM) and Read Only Memory (ROM)
Memory is a fundamental component of computing systems, essential for performing various tasks efficiently. It plays a crucial role in how computers operate, influencing speed, performance, and data management. In the realm of computer memory, two primary types stand out: Random Access Memory (RAM) and Read-Only Memory (ROM). Understanding the diff
8 min read
Different Types of RAM (Random Access Memory )
In the computer world, memory plays an important component in determining the performance and efficiency of a system. In between various types of memory, Random Access Memory (RAM) stands out as a necessary component that enables computers to process and store data temporarily. In this article, we will explore the world of RAM, exploring its defini
8 min read
Difference between Random Access Memory (RAM) and Hard Disk Drive (HDD)
A person novice to computers often is in confusion between Random Access Memory (RAM) and Hard Disk Drive (HDD). The data on which CPU needs to work out is stored temporarily in RAM. The disadvantage of RAM is, it's volatile and data is lost once the computer is turned off or shut down at failure. On the other hand, HDD is not volatile and used to
6 min read
Difference between Uniform Memory Access (UMA) and Non-uniform Memory Access (NUMA)
In computer architecture, and especially in Multiprocessors systems, memory access models play a critical role that determines performance, scalability, and generally, efficiency of the system. The two shared-memory models most frequently used are UMA and NUMA. This paper deals with these shared-memory models, explaining their characteristics, adva
5 min read
Support vector machine in Machine Learning
In this article, we are going to discuss the support vector machine in machine learning. We will also cover the advantages and disadvantages and application for the same. Let's discuss them one by one. Support Vector Machines : Support vector machine is a supervised learning system and is used for classification and regression problems. Support vec
9 min read
Turing Machine Construction (Transducers Turing Machine) in Java
Prerequisite - Turing Machine Turing Machines can broadly be classified into two types, the Acceptors and the Transducers. Acceptor Turing Machine is an automaton used to define Turing-acceptable languages. Such a machine can be used to check whether a given string belongs to a language or not. It is defined as a 7-tuple machine. Coming to Transduc
10 min read
Random-Scan Display
In Random-Scan Display electron beam is directed only to the areas of screen where a picture has to be drawn. It is also called vector display, as it draws picture one line at time. It can draw and refresh component lines of a picture in any specified sequence. A Pen plotter is an example of random-scan device. The number of lines regulates refresh
2 min read
Random Numbers Ecosystem in Julia - The Natural Side
If we keenly observe, randomness can be effectively derived from nature. Despite being explainable by scientific phenomena, the behavior of most matter on earth is random(though it may depend on the conditions around). Eg: The fluttering of leaves on a tree though justifiable by physics, is random to the human eye, the movement of players on a foot
5 min read
Random Testing in Software Testing
Random testing is software testing in which the system is tested with the help of generating random and independent inputs and test cases. Random testing is also named monkey testing. It is a black box assessment outline technique in which the tests are being chosen randomly and the results are being compared by some software identification to chec
4 min read
Random Early Detection (RED) Queue Discipline
RED is among the first Active Queue Management (AQM) algorithms. RED was proposed in 1993 by Sally Floyd. RED is called by three different names; a.k.a Random Early Discard or Random Early Drop and Random Early Detection (so there are 3 possible full forms of RED). The main goal of RED is to: Avoid congestion: Passive Queue Management suffers from
8 min read
MAC Address and Random MAC Address
MAC Addresses are the address which are specified by the Manufacturer.MAC address help in communicating with the devices with communicating with other devices over the network. They are 12 digit hexadecimal numbers in which first three set bits specify the manufacturer of the device and last 3 specify the specific device. Random MAC Address They ar
3 min read
8085 program to access and exchange the content of Flag register with register B
Problem - Write an assembly language program in 8085 microprocessor to access Flag register and exchange the content of flag register F with register B. Example - Assumptions - Initial values of flag register, register B and stack pointer are is 00, 3F, and 3FFF respectively. PSW stands for PROGRAM STATUS WORD. PSW combines accumulator A and flag r
3 min read
Direct memory access with DMA controller 8257/8237
Suppose any device which is connected to input-output port wants to transfer data to memory, first of all it will send input-output port address and control signal, input-output read to input-output port, then it will send memory address and memory write signal to memory where data has to be transferred. In normal input-output technique the process
3 min read
Difference between Simultaneous and Hierarchical Access Memory Organisations
In the Computer System Design, Memory organisation is primarily divided into two main types on the basis of the manner in which CPU tries to access different levels of Memory. These two types include Simultaneous Access Memory Organisation and Hierarchical Access Memory Organisation. Let us understand the difference between the two from the followi
2 min read
Direct Memory Access (DMA) Controller in Computer Architecture
DMA Controller is a hardware device that allows I/O devices to directly access memory with less participation of the processor. DMA controller needs the same old circuits of an interface to communicate with the CPU and Input/Output devices. What is a DMA Controller?Direct Memory Access uses hardware for accessing the memory, that hardware is called
5 min read
Implementation of Access Matrix in Distributed OS
As earlier discussed access matrix is likely to be very sparse and takes up a large chunk of memory. Therefore direct implementation of access matrix for access control is storage inefficient. The inefficiency can be removed by decomposing the access matrix into rows or columns.Rows can be collapsed by deleting null values and so for the columns to
5 min read
Difference between Seek Time and Disk Access Time in Disk Scheduling
Seek Time: A disk is divided into many circular tracks. Seek Time is defined as the time required by the read/write head to move from one track to another. Example, Consider the following diagram, the read/write head is currently on track 1. Now, on the next read/write request, we may want to read data from Track 4, in this case, our read/write hea
3 min read
Memory Access Methods
These are 4 types of memory access methods: 1. Sequential Access:- In this method, the memory is accessed in a specific linear sequential manner, like accessing in a single Linked List. The access time depends on the location of the data. Applications of this sequential memory access are magnetic tapes, magnetic disk and optical memories. 2. Random
2 min read
Difference between Transfer Time and Disk Access Time in Disk Scheduling
1. Transfer Time : Time required to transfer the required amount of data. It can be calculated by the given formula Transfer time, = Data to be transfer / transfer rate Data to be transfer is given in the question and transfer rate is sometimes given and sometimes it may not be given. It can be calculated by the given formula. Transfer Rate, = {(Nu
2 min read
Remote Direct Memory Access (RDMA)
Remote Direct Memory Access(RDMA) is the access of memory of one computer by another in a network without involving either one's operating system, processor or cache.It improves throughput and performance of systems as it frees up many resources. Operations such as read and write can be performed on remote machine without interrupting CPU of that m
4 min read
Difference between Rotational Latency and Disk Access Time in Disk Scheduling
1. Rotational Latency : Rotational Latency is also known as Rotational time. The amount of time taken by the disk to rotate the track when the read/write head come to exact sector or we can also say that the time taken by the desired sector to come under the read/write head is called rotational latency. Rotational Latency is depends on the rotation
4 min read
Why User's Access is Prone to Attack?
An application's mechanism for handling user access only as strong as the weakest of these components. Have you ever wondered about the above statement and why user access is considered the weakest component, well if you haven't wondered about this then there is no problem but you must be aware of some important concepts of user access? The defense
6 min read
Conditional Access System and its Functionalities
A Conditional Access System or a CA system uses the scrambling and encryption techniques to prevent the reception that is not authorized. Scrambling is a process of making the data, photos as well as music incomprehensible. Encryption on the other hand is a process of protecting the data that is sent over a network using keys. The encrypted data is
7 min read
How to Prevent Broken Access Control?
Access control is a security mechanism to put restrictions on the accessibilities of the resources and decide who or what can view or use the resources of a company. This is checked after authentication, and what authorized users are allowed to do. It is not an easy task to do, any failure while checking, can lead to data modification or destructio
5 min read