Question

In: Computer Science

Q1. If we decide to use two pairs of base-limit registers (one for Instructions, one for...

Q1. If we decide to use two pairs of base-limit registers (one for Instructions, one for
data), what will be its advantages and disadvantages.
Q2. Describe the mechanism where a segment could belong to the address spaces of
two different processes.
Q3. Consider a logical address space of 64 pages of 1,024 bytes each, mapped onto a
physical memory of 32 frames.
a. How many bits are there in the logical address?
b. How many bits are there in the physical address?
Q4. Most systems allow a program to allocate more memory to its address space during
execution. Allocation of data in the heap segments of programs is an example of such
allocated memory. What is required to support dynamic memory allocation in the
following schemes?
a. Contiguous memory allocation
b. Segmentation
c. Paging

Solutions

Expert Solution

Q1. If we decide to use two pairs of base-limit registers (one for Instructions, one for
data), what will be its advantages and disadvantages.

Answer: The main advantage of this scheme is that -

(i)it is an effective mechanism for code and data sharing. For example, only one copy of an editor or a compiler needs to be kept in memory, and this code can be shared by all processes needing access to the editor or compiler code. (ii)Another advantage is protection of code against erroneous modification.

The only disadvantage is that -

the code and data must be separated, which is usually adhered to in a compiler-generated code.

Q2. Describe the mechanism where a segment could belong to the address spaces of
two different processes.

Answer: Since segment tables are a collection of base–limit registers, segments can be shared when entries in the segment table of two different jobs point to the same physical location. The two segment tables must have identical base pointers, and the shared segment number must be the same in the two processes.

Q3. Consider a logical address space of 64 pages of 1,024 bytes each, mapped onto a
physical memory of 32 frames.
a. How many bits are there in the logical address?
b. How many bits are there in the physical address?

Answer:

  1. Addressing within a 1024-word page requires 10 bits because 1024 = 210. Since the logical address space consists of 8 = 23 pages, the logical addresses must be 10+3 = 13 bits. Similarly, since there are 32 = 25 physical pages, phyiscal addresses are 5 + 10 = 15 bits long.

    Physical Address (P = page number bits)
P P P P P - - - - - - - - - -


Logical Address (P = page number bits)

P P P - - - - - - - - - -

Q4. Most systems allow a program to allocate more memory to its address space during
execution. Allocation of data in the heap segments of programs is an example of such
allocated memory. What is required to support dynamic memory allocation in the
following schemes?

a. Contiguous memory allocation
b. Segmentation
c. Paging

Answer: Dynamic memory allocation deals with managing memory at run time ,it can be handeled in the following schemes -

a.Contiguous memory allocation: Due to the absence of the enough space for the program to grow it allocated memory space then relocation of the entire program might be required.

b. Segmentation: Due to the absence of the enough space for the segment to extended its allocated memory space ,then the segment might required relocation .

c. Paging: In this scheme ,increasing the allocation of new pages is potential without requiring relocation of the program address space .


Related Solutions

a) How can we decide if we need to use a one-tailed or two-tailed test when...
a) How can we decide if we need to use a one-tailed or two-tailed test when conducting our analyses? b) What are the differences between the two? c) Why do we need to make the choice between a one-tailed or a two-tailed test? Discuss types of research where using the t statistic may be an appropriate alternative to using a z-score
2. Draw a molecule of DNA in the proper configuration. Include two base-pairs (show one of...
2. Draw a molecule of DNA in the proper configuration. Include two base-pairs (show one of each nucleotide type). You can substitute squares for the nitrogenous bases but the rest of the nucleotides must be represented correctly (leave off the hydrogens). LABEL all 3’ and 5’ ends, show correct basepairing, indicate hydrogen bonds by dashed lines and number the carbons on the sugar of one nucleotide. 3. Describe why one DNA strand of a replication fork has to be replicated...
Exercise 5: Let's Build a Moon Base Prompt: One day in the future we will decide...
Exercise 5: Let's Build a Moon Base Prompt: One day in the future we will decide to establish a colony on the Moon. Where should we put it? Analysis Directions: Make a list of the advantages and disadvantages of locating such a human habitat on poles. Should it be in a crater the near side, the far side, or at the? Highland? Maria? Also, what site would be best for doing visible-light and radio astronomy from observatories on the Moon?...
explain why a computer needs to use memory (registers, stacks, heaps) when executing assembly language instructions...
explain why a computer needs to use memory (registers, stacks, heaps) when executing assembly language instructions using the computer's architecture?
Why we need to use elastic limit state?
Why we need to use elastic limit state?
For statistics we use the central limit theorem rule for n>30. But what do we use...
For statistics we use the central limit theorem rule for n>30. But what do we use is n<30?? Please fully explain with examples
If there are functional limit to the size of primes we can use, but how and...
If there are functional limit to the size of primes we can use, but how and why is there a functional limit? more detail on how primes are used in RSA.please type
The number of base pairs/turn of two different DNA is 10 and 12 respectively. The pitch...
The number of base pairs/turn of two different DNA is 10 and 12 respectively. The pitch of the helix is 3.6nm and 2.8nm respectively. what should be vertical rise/base-pair of each DNA?
Amberjack Company is trying to decide on an allocation base to use to assign manufacturing overhead...
Amberjack Company is trying to decide on an allocation base to use to assign manufacturing overhead to jobs. The company has always used direct labor hours to assign manufacturing overhead to products, but it is trying to decide whether it should use a different allocation base such as direct labor dollars or machine hours. Actual and estimated data for manufacturing overhead, direct labor cost, direct labor hours, and machine hours for the most recent fiscal year are summarized here: Estimated...
I have a one strand DNA sequence that I am trying to determine the base pairs...
I have a one strand DNA sequence that I am trying to determine the base pairs for. The gene is CYP1A2 and the primers and sequence are below. Below is the sequence of part of the CYP1A2 gene (you are given only 1 strand, written in the 5’ – 3’ direction). 5’TGGGCTAGGTGTAGGGGTCCTGAGTTCCGGGCTTTGCTACCCAGCTCTTGACTTCTGTTTCCCGATTTTA AATGAGCAGTTTGGACTAAGCCATTTTTAAGGAGAGCGATGGGGAGGGCTTCCCCCTTAGCACAAGGGCA GCCCTGGCCCTGGCTGAAGCCCAACCCCAACCTCCAAGACTGTGAGAGGATGGGGACTCATCCCTGGAGG AGGTGCCCCTCCTGGTATTGATAAAGAATGCCCTGGGGAGGGGGCATCACAGGCTATTTGAACCAGCCCT GGGACCTTGGCCACCTCAGTGTCACTGGGTAGGGGGAACTCCTGGTCCCTTGGGTATATGGAAGGTATCA GCAGAAAGCCAGCACTGGCAGGGACTCTTTGGTACAATACCCAGCATGCATGCTGTGCCAGGGGCTGACA AGGGTGCTGTCCTTGGCTTCCCCATTTTGGAGTGGTCACTTGCCTCTACTCCAGCCCCAGAAGTGGAAAC TGAGATGATGTGTGGAGGAGAGAGCCAGCGTTCATGTTGGGAATCTTGAGGCTCCTTTCCAGCTCTCAGA TTCTGTGATGCTCAAAGGGTGAGCTCTGTGGGCCCAGGACGCATGGTAGATGGAGCTTAGTCTTTCTGGT ATCCAGCTGGGAGCCAAGCACAGAACACGCATCAGTGTTTATCAAATGACTGAGGAAATGAATGAATGAA TGTCTCCATCTCAACCCTCAGCCTGGTCCCTCCTTTTTTCCCTGCAGTTGGTACAGATGGCATTGTCCCA GTCTGTTCCCTTCTCGGCCACAGAGCTTCTCCTGGCCTCTGCCATCTTCTGCCTGGTATTCTGGGTGCTC AAGGGTTTGAGGCCTCGGGTCCCCAAAGGCCTGAAAAGTCCACCAGAGCCATGGGGCTGGCCCTTGCTCG GGCATGTGCTGACCCTGGGGAAGAACCCGCACCTGGCACTGTCAAGGATGAGCCAGCGCTACGGGGACGT CCTGCAGATCCGCATTGGCTCCACGCCCGTGCTGGTGCTGAGCCGCCTGGACACCATCCGGCAGGCCCTG 3’ The sequences of the primers used to amplify part of the CYP1A2 gene...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT