Fall 2022 - CS101 GDB - 01

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

SEMESTER FALL 2022

GRADED DISCUSSION BOARD: COMPUTING (CS101)


STUDENT ID: MUHAMMAD USMAN KHALID (BC220412442)

GDB TOPIC:
In a computer system, all software including the operating system are installed in the
secondary storage disk such as a hard disk or SSD. For the execution purpose, a software is
loaded from secondary storage into the main memory (RAM). However, the installation size of
some of the software is more than the capacity of the RAM and they cannot be loaded into the
RAM completely. In such a case, a solution might be to execute such software directly from
the secondary storage instead of loading it into the RAM for execution.
Do you recommend that such a large software can be executed directly from the
secondary storage, especially if we use relatively fast SSD storage?

ANSWER:
It is generally not recommended to execute large programs directly from secondary storage, such
as an SSD.

There are several reasons why it is not practical to directly execute programs from secondary
storage, such as an SSD, rather than from primary storage, such as RAM. one reason is that the
access times for secondary storage are much slower than for primary storage. Accessing data
from an SSD can take tens or even hundreds of times longer than accessing data from RAM. this
means that it would take a long time for the processor to fetch and execute instructions from an
SSD, which would significantly slow down the execution of the program.

Another reason is that the amount of primary storage (i.e., RAM) is usually much smaller than
the amount of secondary storage (e.g., an SSD). This means that programs must be carefully
designed to fit within the available primary storage. If a program is too large to fit in primary
storage, it must be partially swapped in and out of primary storage as it is being executed, which
also slows down its execution.

Finally, modern operating systems use a technique called virtual memory to allow programs to
use more memory than is physically available in the system. Virtual memory allows the
operating system to temporarily store parts of a program that are not currently in use on the hard
drive or SSD, freeing up space in primary storage for other purposes. This makes it possible to
run large programs on systems with limited amounts of primary storage, but it also adds
overhead to the execution of the program.

In summary, the combination of slower access times, limited capacity, and the overhead of
virtual memory make it impractical to directly execute programs from secondary storage.

You might also like