# Definitions of: virtual address space, page size

(I can't seem to find actual definitions of these terms anywhere, only hints and guesses).

Is it fair to say, that:

• Virtual address space is the amount of bytes that can fit into RAM cells of all virtual addresses belonging to this virtual address space (virtual address space HAS MANY pages HAS MANY virtual addresses).
• Page is a set of virtual addresses (and it maps to the frame - a set of actual physical RAM addresses). Size of a page = amount of bits that can fit into this page. So, if the system is byte-addressable (meaning one RAM cell can hold 8 bits), page size is 8 * number of RAM addresses in a page.

Wikipedia defines a virtual address space as follows:

In computing, a virtual address space (VAS) or address space is the set of ranges of virtual addresses that an operating system makes available to a process.

This definition is OK. However, I'll define the term "virtual address space" one word at a time.

space

space is a mathematical term that generally means a set of things, where these things are potentially related in one or more ways.

An address is generally an identifier for a thing, which is distinct from the thing itself. In this context, an address is a value that potentially identifies a physical device in the computer system. Typically, addresses are non-negative integers that identify memory locations that can hold data, and each address is represented as a constant number of binary digits.

virtual

Virtualization means to create an interface for something that is different from its actual interface that is built with the thing. This is useful for many reasons such as managing a resource for multiple users or providing protection for a resource from being misused or corrupted.

Now let's put it all together. A virtual address space is a set of addresses created by the virtualization system (the OS) to allow an application to access system resources indirectly so that the system can control access to its resources.

Virtual address space is the amount of bytes that can fit into RAM cells of all virtual addresses belonging to this virtual address space (virtual address space HAS MANY pages HAS MANY virtual addresses).

A VAS is not a single number (although it can be a set that contains a single address). Also a VAS is not memory itself; it does not store anything because it can't. Moreover, given only a VAS, you can only determine how many virtual addresses you have, but not how much memory you can use. you can have a 4 GB VAS, but zero physical memory locations. That's because of virtualization. That's what makes it virtual. It's up to the OS that creates it. Also the term "page" is independent from the term "virtual address space" in general. Although the OS can choose to partition the VAS into virtual pages, where each virtual page is a sub-set of the VAS.

Page is a set of virtual addresses (and it maps to the frame - a set of actual physical RAM addresses).

Yes. Although a virtual page may not map to anything (invalid).

Size of a page = amount of bits that can fit into this page. So, if the system is byte-addressable (meaning one RAM cell can hold 8 bits), page size is 8 * number of RAM addresses in a page.

Yes. When a virtual address space is said to be byte-addressable it means that each virtual address (an identifier) can identify an 8-bit resource (typically, physical memory cells). When a physical address space is said to be byte-addressable it means that each (valid) physical address (an identifier) does identify an 8-bit physical resource (typically memory cells).

• > A VAS is not a single number - it's used differently all the time! Two problems: 1. Virtual address space: 2^32 bytes (supposedly meaning the amount of bytes that can be stored in this set of virtual addresses), 2. Consider a machine with 64 MB physical memory and a 32-bit virtual address space (supposedly meaning that each virtual address is expressed in 32 bits). – lakesare Apr 19 '18 at 0:34
• @lakesare When people say 4GB address space it implies that the address space ranges from 0 to 4GB-1. So the set of addresses is "summarized" by a single number. Similarly, "32-bit virtual address space" often implies that it ranges from 0 to 4GB-1. It's just convenient to say "32-bit address space" than "an address space that ranges from 0 to 4GB-1". – Hadi Brais Apr 19 '18 at 0:41