The document discusses various topics related to operating systems:
1. Contiguous memory allocation assigns consecutive memory blocks to processes. It uses base and limit registers to store the starting address and size of a process's memory.
2. Address binding maps logical addresses to physical addresses. It can occur at compile time, load time, or execution time depending on when memory is allocated.
3. 32-bit processors support up to 4GB of RAM while 64-bit processors support over 4GB. 64-bit CPUs can perform more calculations per second and are becoming more common.
2. Q1: Contiguous Memory Allocation
Contiguous memory allocation is a classicalmemory allocation model that assigns a process
consecutive memory blocks (that is, memory blocks having consecutive addresses).Contiguous
memory allocation is one of the oldest memory allocation schemes.
When a process needs to execute, memory is requested by the process. The size of the process
is compared with the amount of contiguous main memory available to execute the process.
The contiguous memory allocation scheme can be implemented in operating systems with the
help of two registers, known as the base and limit registers.When a process is executing in main
memory, its base register contains the starting address of the memory location where the
process is executing, while the amount of bytes consumed by the process is stored in the limit
register. A process does not directly refer to the actual address for a corresponding memory
location. Instead, it uses a relative address with respect to its base register. All addresses
referred by a program are considered as virtual addresses.
The base address register is used for address translation by the MMU. Thus, a physical address
is calculated as follows:
Physical Address = Base register address + Logical address/Virtual address
The address of any memory location referenced by a process is checked to ensure that it does
not refer to an address of a neighboring process. This processing security is handled by the
underlying operating system.
One disadvantage of contiguous memory allocation is that the degree of multiprogramming is
reduced due to processes waiting for free memory.
Q2: Address Binding
Computer memory uses both logical addresses and physical addresses.
Address binding allocates a physical memory location to a logical pointer by associating a
physical address to a logical address, which is also known as a virtual address. Addresses in
source program are as a symbolic constant. A compiler will bind these symbolic addresses in
3. relocatable addresses or code. Address binding is part of computer memory management and it
is performed by the operating system on behalf of the applications that need access to
memory.
Each binding is a mapping from one address space to another address space.
Address Binding Schemes:
Compile Time
This allocates a space in memory to the machine code of a computer when the program is
compiled to an executable binary file. The address binding allocates a logical address to the
starting point of the segment in memory where the object code is stored. The memory
allocation is long term and can be altered only by recompiling the program.
Load Time
If memory allocation is designated at the time the program is allocated, then no program can
ever transfer from one computer to another in its compiled state.
This is because the executable code will contain memory allocations that may already be in use
by other programs on the new computer.
In this instance, the program's logical addresses are not bound to physical addresses until the
program is invoked and loaded into memory.
Execution Time
Execution time address binding usually applies only to variables in programs and is the most
common form of binding for scripts, which don't get compiled.
the program requests memory space for a variable in a program the first time that variable is
encountered during the processing of instructions in the script.
The memory will allocate space to that variable until the program sequence ends,
or unless a specific instruction within the script releases the memory address bound to a
variable.
4. Q3: Intel 32 bit and 64 bit Architectures
The two main categories of processors are 32-bit and 64-bit. The type of processor a computer
has not only affects its overall performance, but it can also dictate what type of software it
uses.
5. 32-bit processor
The 32-bit processor was the primary processor used in all computers until the
early 1990s. Intel Pentium processors and early AMD processors were 32-bit, which means the
operating systemand software work with data units that are 32 bits wide. Windows 95, 98, and
XP are all 32-bit operating systems.
A computer with a 32-bit processor cannot have a 64-bit version of an operating
system installed. It can only have a 32-bit version of an operating systeminstalled.
64-bit processor
The 64-bit computer has been around since 1961 when IBM created the IBM 7030 Stretch
supercomputer. However, it was not put into use in home computers until the early 2000s.
Microsoft released a 64-bit version of Windows XP to be used on computers with a 64-bit
processor. Windows Vista, Windows 7, and Windows 8 also come in 64-bit versions. Other
software has been developed that is designed to run on a 64-bit computer, which are 64-bit
based as well, in that they work with data units that are 64 bits wide.
A computer with a 64-bit processor can have a 64-bit or 32-bit version of an operating
system installed. However, with a 32-bit operating system, the 64-bit processor would
not run at its full capability.
On a computer with a 64-bit processor, you cannot run a 16-bit legacyprogram. Many
32-bit programs will work with a 64-bit processor and operating system, but some
older 32-bit programs may not function properly, or at all, due to limited or no
compatibility.
6. Differences betweena32-bit and64-bit CPU
A big difference between 32-bit processors and 64-bit processors is the number of calculations
per second they can perform, which affects the speed at which they can complete tasks. 64-bit
processors can come in dual core, quad core, six core, and eight core versions for home
computing.
Another big difference between 32-bit processors and 64-bit processors is the maximum
amount of memory (RAM) that is supported. 32-bit computers support a maximum of 3-4GB of
memory, whereas a 64-bit computer can support memory amounts over 4 GB. This feature is
important for software programs used in graphic design, engineering, and video editing as
these programs have to perform many calculations to render their images.
One thing to note is that 3D graphic programs and games do not benefit much, if at all, from
switching to a 64-bit computer, unless the program is a 64-bit program. A 32-bit processor is
adequate for any program written for a 32-bit processor. In the case of computer games, you'll
get a lot more performance by upgrading the video card instead of getting a 64-bit processor.
In the end, 64-bit processors are becoming more and more commonplace in home computers.
Most manufacturers build computers with 64-bit processors due to cheaper prices and because
more users are now using 64-bit operating systems and programs. Computer parts retailers are
offering fewer and fewer 32-bit processors and soon may not offer any at all.