Virtual address translation I'm in an OS class now. I've been wrestling this problem for a while and can't convince myself of a solution. My professor is very busy and hasn't made time to help. Also, this question is from an example exam, not something I would be graded on.
In this question, we're given a virtual address to translate: 0xFEC. We're also told to use segmentation in accordance with the table and a 14-bit address. Looking at our address in binary, we have 0000 1111 1110 1100. We'll disregard the two most significant bits, as instructed giving 00 1111 1110 1100.
Taking the two leading bits as our segment tells us to use the base for the Code section, which is given to be 12. Then, we go to decimal and add.
dec(00 1111 1110 1100) + dec(12K) = ...
7018 + 12,288 = 19306
The thing that tells me this is incorrect, is that the number 7018 which is approximately 7K is much greater than 3.6K (the given size of the code section). :/
I'm really lost here, and I haven't found any examples of people moving addresses with segmentation or with decimal end numbers.
I think I'm wrong when interpreting the addition, but I'm not sure how.
I suspect that the problem may lie in your title. 

There's a whole lot of real-world variety imaginable in memory architectures, and your book will describe them in the abstract. Importantly, in the real world the particular combination of segmentation and virtual addresses is not used. Intel's x86 architecture supports it, but most Operating Systems don't bother and just set all segments to be identical.

This question therefore does assume something non-standard, which means there needs to be some specification of how the hypothetical mechanism works. Importantly, does segmentation happen before or after virtual address translation?

In the model where segmentation checks happen first, 0x0FEC is not in the code segment. The top bits suggest it is, but the code segment is only 3686 bytes, not 4077 bytes.

Since the virtual address does not lie in any segment, using it would fail even before a virtual-to-physical translation happens.

Now in the model where segment bounds are checked later, you'd first create a physical address, which would use the 12K base address and the 4076 offset. This produces an physical address of almost 16K, past the 15.6K end of the code segment.