Uploaded by tiniumoh

(4) Is RAM run by CPU or OS - Quora

advertisement
1
4
Search Quora
Is RAM run by CPU or OS?
Answer
Follow · 3
Request
Ad by Toptal
What are the most in-demand freelance jobs for 2022?
The demand for remote designers, developers, project managers, and finance experts
is ramping up, and will continue to grow moving forward! It’s an exciting time to
transition to…(Continue reading in feed)
4 Answers
Best
Joshua Day, Currently developing reporting and testing tools for linux
Answered Mar 31, 2019
It is much more complex than that. The CPU is the component that most frequently
accesses RAM however other components have circuits that give them access as well
that are called Direct Memory Access channels or DMA.
Also you must understand that some physical components on your computer have
software instructions that are actually hardwired into the chip like CMOS. We
affectionally call this “firmware” since it is the gray area between what we consider
hardware and software. This firmware also controls access to RAM by the firmware on
other components attached to your motherboard like your video card.
The OS is actually just a set of instructions that is loaded into RAM when your
firmware initializes from the power being turned on. The OS then controls the
components of the system by sending instructions to the firmware. The firmware
basically converts these 0s and 1s into physical action by the hardware including the
CPU.
So you could say that RAM is controlled by the whole system in unison. With bottom
level control belonging to the firmware that is hardwired into your motherboards
chipset.
Try Quora+
Add question
9.5K views · View 29 upvotes
1 · View 2 shares
29
4
2
Search Quora
Try Quora+
Add question
Messages
Add a comment...
Add Comment
Sponsored by Chegg Study®
Study time, crunch time, anytime.
Access over 55 million textbook solutions and expert Q&A, plus step-by-step walkthroughs.
No messages
Connect with others on
Quora by beginning a new
conversation.
Learn More
Darryl Gardner
Answered Mar 31, 2019
New message
I never thought about it, but would guess the CPU. Here’s why:
The MB determines what CPU, RAM, and other hardware physically/electrically
attaches/connects to itself and each other. All of that is physical hardware, and
something you can TOUCH.
The OS is the instruction set that (hopefully) makes all the hardware behave and talk
to each other properly. It is software, and NOT something you can touch.
Since the RAM receives/sends signals and information from the CPU, etc. I would say it
receives/sends nothing directly to the OS, although the OS is the traffic cop that
makes the rest of the stuff … (more)
1
Add a comment...
Osmo Ronkanen, lives in Helsinki
Answered Mar 31, 2019
Add Comment
1
4
RAM is just a storage of
information. The CPU uses it depending
on how the code
Search Quora
which can be either the OS or application program decides. The code also resides in
the RAM. It is the task of the OS to give RAM to the application programs. Typically
application asks the OS: give me, say 100 MB, of RAM and the OS then says back: OK,
this is the address. Modern CPUs are complex so the address the application sees is
not necessarily same where the memory actually is. If the application does not need it
for a while and there is shortage of RAM the OS can decide to write the memory to
disk and give the area to another program. If the program then again needs it, it
causes a page fault and the OS steps in and reads the data back from the disk and
then returns the access to the program.
237 views · View 1 upvote
Add question
Messages
No messages
1
Add a comment...
Try Quora+
Add Comment
Connect with others on
Quora by beginning a new
conversation.
New message
Sponsored by DigitalOcean
Get Growing with DigitalOcean.
A simple, scalable cloud platform that makes developers happy. Try for free with a
$100 credit.
Learn More
Related questions
How does RAM memory work with OS?
What is the difference between a CPU and an OS?
What is RAM, CPU, and ROM?
Nick Maag, Electrical Engineer
Answered Apr 5, 2019
More answers below
Ram is for the CPU. The1 OS communicated with the CPU to4then utilize memory
Search Quora
between it and the hard drive and page files etc.
9 views
Try Quora+
Add question
Messages
Add a comment...
Add Comment
Related answers
Related Answer
Robert Love, I hack on Linux & worked on Android.
Updated Feb 19, 2013
No messages
Connect with others on
Quora by beginning a new
conversation.
What is the difference between a CPU and an OS?
Originally Answered: What is the difference between CPU and operating system?
Everything. One is hardware, one is software.
The CPU (central processing unit) is a programmable device capable of general
purpose computation. It is composed of many integrated circuits on a single silicon
package called a microprocessor. You can think of it as the core piece of hardware in a
computer. Some analogize it to the computer's brain. That's imperfect but close: The
CPU can't think on its own (software is needed for that) and it doesn't have long-term
memory (storage media provides that), but it is the engine of logic, as with a brain.
The OS (operating system) is the software that is responsible for booting and
managing your computer, both its hardware and other software. If the processor is the
brain, the OS is the conscience.
The CPU is capable of arithmetic operations such as add and divide and flow control
operations such as conditionals and loops. With only these fundamentals, the OS (and
the rest of your software) provide the powerful capabilities and amazing possibilities
of today's computing devices.
41.2K views · View 98 upvotes
98
New message
1
4
Add a comment...
Add
Comment
Search
Quora
Try Quora+
Add question
Messages
Related Answer
Michael Kestner, Been fixing computers for over half my life.
Answered Jun 14, 2016
What is the relationship between RAM and the CPU?
Conceptually, you can think of the relationship between RAM and CPU as similar to
the relationship between a desk and the person using it. The desk (RAM) is a
workspace where the person (CPU) lays paperwork and other things he/she needs to
have immediately within reach to do their work efficiently. Increasing the amount of
RAM is analogous to buying a bigger desk : You have more space to spread out that
important paperwork you need to look at, or whatever the case may be.
Just like buying a bigger desk, there’s a limit to the benefit as well. You don’t need to
have an entire filing cabinet’s worth of documents spread out on your desk to get
your days work done, so there’s not really a benefit to having a desk big enough to do
so. It’s the same with RAM. At some point adding more RAM to a system won’t
increase performance any more, because the work your CPU is doing doesn’t require
it.
There’s also several layers of cache on the CPU that serve the same function, but are
even faster than RAM, though they can hold only a tiny fraction of the information. So
only the absolute highest priority information is stored there instead of RAM. I tend to
think of the cache on the CPU as analogous to the piece of paper you’re reading right
that instant on your desk. Maybe the analogy isn’t perfect, but I think it makes the
relationship easier to visualize.
12.5K views · View 24 upvotes · View 1 share
24
1
3
3 comments from Marwah Ahmad and more
Related Answer
No messages
Connect with others on
Quora by beginning a new
conversation.
New message
Peter Hand, lives
1 in Las Vegas
Updated Mar 10, 2021
4
Search Quora
How does RAM load an OS into its memory?
Try Quora+
Add question
Messages
It uses a boot loader.
As part of the specifications for disk formats, a particular disk sector (512 bytes) is
reserved for a program that will run at power up and is capable of reading and loading
other disk sectors. This is called the boot loader. If the sector contains no such
program, it will at least contain a simple program that prints a message along the lines
of “Non system disk”.
When the computer starts up, its BIOS finds the boot loader sector, loads it into RAM
and executes it. The boot loader then loads a more sophisticated version of itself - it
knows where to find it on disk - and passes control to it, and this secondary loader
fetches the rest of the operating system.
Below: a dump of the boot sector of a USB stick. This stick is non bootable and if you
try and boot it, it prints a message telling you to take it out and restart. The 55-AA
bytes at the end are always present and an indication that this is a boot sector.
No messages
Connect with others on
Quora by beginning a new
conversation.
New message
1
4
Search Quora
Try Quora+
Add question
Messages
No messages
Connect with others on
Quora by beginning a new
conversation.
New message
3.4K views · View 7 upvotes
7
1
Add a comment...
4
Add Comment
Search Quora
Try Quora+
Add question
Messages
Related Answer
Luc Boulesteix
Answered Oct 20, 2018
What is the difference between a compiler and a CPU?
A CPU is just a bunch of transistors embedded into a slab of silicon. The intended
purpose of such a device is to carry out calculations , usually forming a cohesive
program. As much as the whole thing seems like magic from a high level , you still
need to remember that it’s basically just a very complex electrical circuit. Last time i
tried conversing with an inanimate object , i didn’t feel like it had much to say.
Upgrade to Quora+ to access this answer
If we want to “talk” to this CPU , we need to speak it’s language : electrica...
No messages
Connect with others on
Quora by beginning a new
conversation.
Access millions more answers like this
Browse ad‑free
Support the writers you like to hear from
Start free trial
1.2K views · View 4 upvotes
4
Related Answer
Jiten Patel, studied at Shah and Anchor Kutchhi Engineering College,
Chembur, Mumbai
Answered Jul 1, 2018
What is the difference between a processor and an operating system?
Operating system provides you a Graphical User interface. The meaning of OS is that
“It is a interface between user and hardware”.
Processor,
New message
A processor is the heart1 of the computer. A processor is the4 logic circuitry that
Quora
responds to and processes the basic instruction that drive a computer. Search
The four
primary function of a processor are Fetch, decode, execute and writeback.
Try Quora+
Add question
Messages
OS is use by the User, while a user request some services, the OS will interact with the
processor and then your request will be executed.
Example,
If you execute any program you will need the OS, You might save your program,
delete it or do execution of it. When you save it or delete it, the OS will doesn’t
interact with processor, saving and deleting of program is done by the user and OS,
but when you executes your Program the OS will help program to interact with
processor through the main memory, and processor will manipulate it, hence forth it
executes it.
I hope you get your answer.
4.5K views · View 10 upvotes
Connect with others on
Quora by beginning a new
conversation.
New message
10
Add a comment...
No messages
Add Comment
Related Answer
Richard Conto
Answered Jun 21, 2015
How does an OS know how much RAM it has and where it is?
Originally Answered: How does OS know how much RAM it has and where it is?
It depends on the hardware. Without modern memory controllers, the OS would have
to be configured to know about it's memory or would have to make assumptions
about how the system was laid out (i.e.: IBM-PC compatible 8086) and probe the
memory, hoping that a memory mapped device didn't respond in some unfortunate
way. The BIOS (the mini operating system in ROM that loads the operating system
loader that loads the rest of the operating system) is tailored for the specific hardware
and can probe the memory
and make it's findings available4to the OS (for computers
1
Search Quora
coming from the IBM-PC family.)
On systems with more modern hardware than the original IBM-PC (or Apple ][, etc.)
probing the device controllers and having a MMU will help the OS determine the
memory size (and layout.) Of coure, this assumes that the OS has sufficient memory
for code, stack, and heap in the right places to do so.
Try Quora+
Add question
Messages
763 views · View 2 upvotes
2
Add a comment...
Add Comment
No messages
Connect with others on
Quora by beginning a new
conversation.
Related Answer
Joseph Newcomer, former Chief Software Architect (1987-2010)
New message
Answered Apr 28, 2021
How does CPU differ from RAM?
How does your brain differ from a sheet of paper?
Seriously. The CPU provides the ability to compute, to combine information in various
ways, to make decisions based on the results, and so on. Just like your brain.
A sheet of paper holds information. From time to time, you may erase something you
wrote and write something new. That’s RAM.
133 views · View 3 upvotes
3
Add a comment...
Add Comment
Related Answer
Joseph o'Loughlin, BA Hons Human Relations, National College of
Ireland (2011)
Answered Jun 17, 2018
1
4
How do the CPU and the OS in RAM communicate?
Search Quora
The CPU has a program counter, a place marker to the next piece of machine code /
assembly code to run. The CPU fetches the instructions from memory RAM or ROM ,
runs the code (and if not a branch jump or similar instruction) increments the program
counter, and the CPU continues this process until the computer is turned off.
Try Quora+
Add question
Messages
The operating system takes over from the BIOS, preparing the system to run
applications. All of which from the perspective of the CPU is machine code and data.
There is both hardware to assist the CPU in the form of a Memory Management Unit
(MMU) and the Operating System implements multiple levels of redirection to blocks
of memory and virtual memory. This setup is quite complex on Intel x86 CPUs. Details
vary between operating systems and systems architecture.
868 views · View 2 upvotes
No messages
Connect with others on
Quora by beginning a new
conversation.
2
New message
Add a comment...
Add Comment
Related Answer
Sudarshan SK, I don't have a clue.
Answered Mar 24, 2017
How does RAM memory work with OS?
RAM is basically a faster form of your computer’s internal hard drive. Whenever your
CPU requires information for processing, if it had to go to your internal hard drive
every single time it would be excruciatingly slow. This is where RAM comes in. It’s a
temporary place for your OS to store information so that in can be accessed faster and
easier than your traditional memory making it work significantly faster. When you
Upgrade
to Quora+
to access
answer
open an application, any
files that
are opened
for usethis
in that
applicati...
Access millions more answers like this
Browse ad‑free
Support the writers you like to hear from
Start free trial
1
4
Search Quora
Try Quora+
Add question
Messages
1.6K views · View 2 upvotes
2
Related Answer
Saurav Mukherjee, Computer is my life
Answered Jun 11, 2017
Which OS will be better for a system with 1GB of RAM and a 2GHz
processor?
Windows XP will be best but as the support for Windows XP has ended so it's useless
to install XP as most of the softwares are not compatible with XP,I mean the support
for the software has ended and so you are left with the option of installing Windows 7
but remember install Windows 7 32 bit only as 64 bit will not run well because you
have 1 GB RAM.
9.8K views · View 3 upvotes · View 1 share
3
1
Add a comment...
Add Comment
Related Answer
Paul, Programmer by heart, engineer by title
Answered Jun 18, 2015
How does OS use Multi–CPU system?
The RAM is common. The threads go to the CPUS as they are available. And a thread
can execute in many CPUs, just not one thread in 2 CPUs at a time. The CPUs work
rather independently in picking the threads to execute. Please note that at one point
two threads in the same process might be executing on different CPUs.
But, the RAM is shared.
No messages
Connect with others on
Quora by beginning a new
conversation.
New message
1K views · View 2 upvotes 1
2
4
4
Search Quora
Try Quora+
Add question
Messages
4 comments from Cuma Özavcı and more
Related Answer
Dave Haynie, Hardware Systems Engineer (Rajant + Commodore-Amiga
+ 20 years in startups)
Answered Jun 24, 2016
What is RAM, CPU, and ROM?
To use a human analogy, the CPU is your brain, the RAM is your short-term memory,
and the ROM is your long-term memory. That more or less works, anyway.
No messages
Connect with others on
Quora by beginning a new
conversation.
New message
CPU is large and in-charge.
The CPU (Central Processing Unit) is, in fact, the logical center of a computer. It reads
and processes instructions, which do simple things like adding two numbers together,
testing for a result, making a jump to a different part of memory, etc.
A CPU has at least one1register, usually several, and it’s connected
to some RAM in
4
Search Quora
order to function. When it starts up, it will have some convention for fetching
the first
instruction. This is done via address and data buses. An address specifies a memory
location, by number. The CPU will ask to read that location, meaning that the data
from that location will be put on the data bus by the memory chip, read from the data
bus by the CPU. They all work this way, though the details vary.
Try Quora+
Add question
Messages
For a long time, the CPU was the most complex part of a computer. They’ve grown less
fast than our technology, however, so higher-end embedded processors, application
processors (your phone), PC processors, etc. have more than one CPU in them. Which
one’s “central”? That’s really a software question. In Windows, they all kind of are.
No messages
Connect with others on
Quora by beginning a new
conversation.
New message
RAM is all about the now.
RAM (Random Access Memory) is directly connected to the CPU. In the old days, this
was usually in a few chips on a circuit board next to a CPU, but these days, there’s
usually some RAM inside a CPU. Small embedded CPUs may have all the RAM they
need inside, while large PC-type CPUs will usually have a specialized kind of RAM
called cache, which is used to store recently used information in RAM that’s extremely
fast, trading back and forth with the main system RAM — the stuff in the DIMM
modules in your PC.
RAM is fast, and the “random” part is the idea that most CPUs can read or write just
about any part of the memory at any time. That aforementioned address from the
CPU will be fed to a RAM
chip, and in some specific time, based
on the design of the
1
4
Search Quora
RAM chip, it will present data at the data pins of the chip. If the CPU signals
a write
cycle, it will put address and data out on their respective buses, and the RAM chip will
record that value.
Try Quora+
Add question
Messages
RAM is fast, but it’s not forever. If a computer powers down, or sometimes in the event
of a program error, the RAM will lose its contents. That brings up the need for the next
kind, ROM.
ROM is Forever… well, sorta.
ROM (Read-Only Memory) is quite a bit like a RAM, but it’s a permanent memory, it
can’t be easily changed. In the old days, there was a thing called a “masked ROM”,
which was a semi-standard chip design that had data actually created as a metal mask
during the chip-making process. Make a mistake in the contents of a masked ROM,
and you have to start over with a new chip.
There were also EPROM — eraseable, programmable, read-only memory. The early
versions of these had a window on top. You would program them in a special device
See or
new
answers into that EPROM. If you wanted
programmer, burning your code or data
whatever
to change that data, you would have to erase the whole chip under ultraviolet light.
Later on, we got EEPROMs, which were electrically erasable. That was good, but they
were pretty small in size and they only lasted through a few program/erase cycles.
And then we got Flash memory. In a flash memory, rather than connecting a wire, a
memory location is sent an electrical charge via quantum tunnelling in a “floating
gate” transistor. Once that charge is in place, the value of that charge can be read
without removing the charge… and it remains there even when the device is turned
off. Flash is relatively slow, and you don’t write single “random” locations in most kinds
of flash memory, but a whole chip-defined “block” at a time. It’s because of that that
flash memory is often configured as a storage device, often an SD card, for example.
Most devices these days boot (eg, start the processor) from programs stored in flash
memory. That was a big improvement over masked ROM, because the flash can be
carefully updated with bug fixes or whole new code. I do mean carefully, because, if
the CPU crashes during that process, there may not be anything in the Flash memory
to re-start the CPU. You end up “bricking” the device.
The Future
No messages
Connect with others on
Quora by beginning a new
conversation.
New message
Related questions
How does RAM memory work with OS?
What is the difference between a CPU and an
OS?
What is RAM, CPU, and ROM?
How do the CPU and the OS in RAM
communicate?
How many processes can a CPU run?
What is CPU-OS Simulator?
Add question
We have gone from one
my phone), 8 (my
1 CPU to 2, 4 (my laptop), 6 (my PC and
4
Search Quora
tablet) and more. We have gone from a fairly slow single kind of RAM to
many tiers of
cache RAM and many kinds of main RAM. We have used ROM, floppy disc, hard
drives, CD-ROMs, DVD-ROMs, BD-ROMs, and Flash memory for various kinds of mass
storage.
Try Quora+
Add question
Messages
It gets complex to effectively use more CPUs, but in specialized operations, some
places it’s useful to use thousands, such as in GPUs. There are many different kinds of
memory coming “Real Soon Now” that intend to overthrow the reign of flash memory.
Some of these are fast enough and random-access, so they might take over from RAM
in a decade or even less.
No messages
52.6K views · View 19 upvotes
19
Add a comment...
Add Comment
Connect with others on
Quora by beginning a new
conversation.
New message
Related Answer
Ken Gregg, Software Engineering and Management Positions for decades
Updated Aug 25, 2021
Are opened programs stored in the RAM or CPU?
The CPU is not a storage device. RAM is a storage device. When a program is started,
it is loaded into RAM. The CPU then fetches machine language instructions from RAM
and executes them. (Those instructions might also read data from RAM into CPU
registers and/or write data to RAM from CPU registers.)
That said, there are always realities that can muddy the water:
Some CPU architectures very briefly “store” the machine language
instruction(s) currently in the process being executed. Modern CPUs may be
executing various stages of multiple machine language instructions in
parallel.
While the CPU fet
… (more)
5
1
1
4
Search Quora
Adding comments disabled
Try Quora+
Add question
Messages
Related questions
How does RAM memory work with OS?
What is the difference between a CPU and an OS?
What is RAM, CPU, and ROM?
How do the CPU and the OS in RAM communicate?
How many processes can a CPU run?
No messages
Connect with others on
Quora by beginning a new
conversation.
What is CPU-OS Simulator?
How does an OS know how much RAM it has and where it is?
How does RAM load an OS into its memory?
What is a running CPU?
What is meant by RAM, OS, and processor speed?
What are the CPU and RAM?
What is the relationship between RAM and the CPU?
How does OS use Multi–CPU system?
What is the difference between CPU thread and OS thread?
If a computer has a very high amount of RAM, can we directly install OS in RAM?
New message
Download