0% found this document useful (0 votes)
39 views3 pages

HPAC Assignment: Pg-Dbda

Virtual memory is a technique used by operating systems to allow applications to behave as if they have more memory than what is physically installed on the computer. It uses a portion of the hard disk to simulate additional RAM. When physical memory is full, the virtual memory manager writes unused memory pages to a paging file on the hard disk to free up space in RAM. When those pages are needed again, they are swapped back into RAM from the paging file. This allows the system to effectively have more memory than what is physically installed. Primary keys uniquely identify rows in a table, secondary keys provide alternate ways to look up rows, and foreign keys link data between tables by matching to a primary key in another table.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views3 pages

HPAC Assignment: Pg-Dbda

Virtual memory is a technique used by operating systems to allow applications to behave as if they have more memory than what is physically installed on the computer. It uses a portion of the hard disk to simulate additional RAM. When physical memory is full, the virtual memory manager writes unused memory pages to a paging file on the hard disk to free up space in RAM. When those pages are needed again, they are swapped back into RAM from the paging file. This allows the system to effectively have more memory than what is physically installed. Primary keys uniquely identify rows in a table, secondary keys provide alternate ways to look up rows, and foreign keys link data between tables by matching to a primary key in another table.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

HPAC Assignment

PG-DBDA
Saikat Chakraborty
01/10/2019

Q1. What is virtual memory? How does it work?

Definition:

Real, or physical, memory exists on RAM inside the computer. Virtual memory, as its name suggests,
doesn’t physically exist on a memory chip. It is an optimization technique and is implemented by the
operating system in order to give an application program the impression that it has more memory than
actually exists. Virtual memory is implemented by various operating systems such as Windows, Mac OS X,
and Linux. Virtual memory uses a portion of the secondary storage (hard drive) to act like primary storage
(RAM). It makes your computer act as though it has more RAM. At boot-time, the OS is loaded entirely on
the RAM in order to start-up the system properly. During this time, if the physical RAM has less capacity
than the OS size, it will be impossible for the computer to start. This is where virtual memory
implementation comes into play. It takes a chunk of memory from the hard disk (usually 3.56 times the
capacity of the RAM) and utilizes the extra space to safely load the OS and boot the system.

How does virtual memory work:

Let’s say that an operating system needs X MB of memory in order to hold all the running programs, but
there’s currently only Y MB of available physical memory stored on the RAM chips (Y < X). The operating
system will then set up X MB of virtual memory, and will use a program called the Virtual Memory
Manager (VMM) to manage that extra capacity. The VMM will create a file on the hard disk that is (X-Y)
MB in size to account for the extra memory that’s needed. The OS will now proceed to address memory
as if there were actually X MB of real memory stored on the RAM, even though there’s really only Y MB
physically. So, to the OS, it now appears as if the full X MB actually exists. It is the responsibility of the
VMM to deal with the fact that there is only Y MB of real memory.

Function of Virtual Memory Manager (VMM)


VMM creates a file on the hard disk that holds the extra memory that is needed by the OS, which in our
case is Y MB in size. This file is called a paging file (also known as a swap file), and plays an important role
in virtual memory. The paging file combined with the RAM accounts for all of the memory. Whenever the
OS needs a ‘block’ of memory that’s not in the real (RAM) memory, the VMM takes a block from the real
memory that hasn’t been used recently, writes it to the paging file, and then reads the block of memory
that the OS needs from the paging file. The VMM then takes the block of memory from the paging file,
and moves it into the real memory – in place of the old block. This process is called swapping (also known
as paging), and the blocks of memory that are swapped are called pages. The group of pages that currently
exist in RAM, and that are dedicated to a specific process, is known as the working set for that process.

Q2. Define – Primary key, Secondary key, Foreign key.

Primary key:

The attribute or combination of attributes that uniquely identifies a row or record in a relation is known
as primary key. It needs to be unique and not null.
Secondary key:

A field or combination of fields that is basis for retrieval is known as secondary key. Secondary key is a
non-unique field. One secondary key value may refer to many records.

Foreign key:

A foreign key is an attribute or combination of attribute in a relation whose value matches a primary key
in another relation. The table in which foreign key is created is called as dependent table. The table to
which foreign key is refers is known as parent table.

You might also like