MAMEWorld >> The Loony Bin
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

URherenow
Reged: 09/21/03
Posts: 4260
Loc: Japan
Send PM


CS help please
#338170 - 03/26/15 06:14 PM


Homework question


Code:


In a system using the relocatable dynamic partitions scheme, given the
following situation (and using decimal form): Job Q is loaded into memory starting at memory location 42K.

a. Calculate the exact starting address for job Q in bytes.
b. If the memory block has 3K in fragmentation, calculate the size of the
memory block
c. Is the resulting fragmentation internal or external? Explain your reasoning.



Ok, "A" is simple. Address 43008.

How the hell could you possibly get an answer for B without knowing either the next higher starting address, or the total size of memory (assuming that no other jobs are higher in memory...)? The only logical answer is the size of the memory block is the size of the program. Whatever it is... and the 3K of fragmentation is its own free block.

c: In this type of scheme, it is all external fragmentation because it can be used for other jobs, and if too small, the existing jobs can be moved around as the system performs compaction of memory.

Edit: or... is that the answer they are looking for? The size of the fragmentation? 3072 bytes. I'm going to have to slap somebody if that's what they want me to say...



Just broke my personal record for number of consecutive days without dying!



URherenow
Reged: 09/21/03
Posts: 4260
Loc: Japan
Send PM


Is the lack of response... new [Re: URherenow]
#338243 - 03/27/15 05:48 PM


Because the question is as retarded as I think it is, or am I really that stupid and not worth helping?



Just broke my personal record for number of consecutive days without dying!



TriggerFin
Gnu Truth
Reged: 09/21/03
Posts: 5266
Loc: Stuck in a hole
Send PM


I doubt it's the second. Someone here should know, but not me. (nt) new [Re: URherenow]
#338244 - 03/27/15 06:34 PM


> Because the question is as retarded as I think it is, or am I really that stupid and
> not worth helping?



lharms
MAME Fan
Reged: 01/07/06
Posts: 908
Send PM


Re: CS help please new [Re: URherenow]
#338246 - 03/27/15 07:00 PM


Pretty much only C is worded well. The assumptions and A and B need a bit of clarification.

As there are about several different ways to measure it. I am sure there are more than the 3 I have

1) Size of the fragmentation (like you pointed out). Because that would be the biggest you could get in there. As everything would compact. This is probably the right answer given the context.
2) avg/mean size of blocks that are enough to hold the program. This would be more akin to system with virtual memory and relocation.
3) size of the block from start to end including fragmentation and the program (if the program can be fragmented, which in this case I doubt). In which case you need more data which it did not give you.

With a relocatable dynamic partitions scheme the size of the block should be equal to the size of the program assuming they are not doing a virtual memory system (in which case its more like 3). Does it tell you the size of the program?

My 'guess' is they meant to ask 'calculate the max size of the memory block that can fit'. As remember like you pointed out it will compact. You will just have to ask them to clarify it. In which case you have the answer. They are trying to teach that the remaining memory is the space left I guess?

Also he specified 'decimal form' so for 'a' the answer could be either 42000 or 43008 depending if 1024 is the right multiplier you are supposed to guess. This needs to be clarified as well. As it will affect the first two answers.



URherenow
Reged: 09/21/03
Posts: 4260
Loc: Japan
Send PM


Re: CS help please new [Re: lharms]
#338290 - 03/28/15 07:28 PM


Thanks for the insight, but I wrote exactly what is in the book. Word for word. There is simply not enough information to get a valid answer for B. I am sure that A is 43008. They specified decimal because this is the beginning of the class and there has been no mention of hex (so they want 43008 as opposed to 0xA800).



Just broke my personal record for number of consecutive days without dying!



krick
Get Fuzzy
Reged: 02/09/04
Posts: 4235
Send PM


Re: CS help please new [Re: URherenow]
#338296 - 03/29/15 12:38 AM


This question has to be referencing something they described in greater detail earlier in the book (or possibly in an earlier homework question). i.e. "the relocatable dynamic partitions scheme". There's not enough information to answer the question in isolation.



GroovyMAME support forum on BYOAC



Scurscurt
MAME Fan
Reged: 07/15/18
Posts: 1
Send PM


Re: CS help please new [Re: URherenow]
#377619 - 07/15/18 07:03 PM


I think you're supposed to assume the job size is equivalent to the starting address of the memory block.



URherenow
Reged: 09/21/03
Posts: 4260
Loc: Japan
Send PM


Holy necromancy! new [Re: Scurscurt]
#377654 - 07/17/18 05:50 AM


Do you realize this question is from 2015? I don't recall what the answer was or if I got it right. I only know I aced it, as I've aced every class. Maybe someday I might bother to finish a degree... but I simply don't NEED to. The job market is wide open, and it seems experience + certs is far more valuable than the shit colleges in the States, and having an active clearance on top of that makes head hunters get all twinkly-eyed



Just broke my personal record for number of consecutive days without dying!


Pages: 1

MAMEWorld >> The Loony Bin
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  GatKong 
0 registered and 156 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 5993