Closed v-olin closed 1 year ago
Citations should appear before the dot not after.
It is quite hard to get a good flow while reading through the sections. I think this because some of the sentences are composed a bit backwards. Example: "For a program to be executed it has to be compiled and then loaded into memory by the operating system." (First sentence section 2.4.1) Instead. "A program has to be compiled and loaded in to memory before being executed."
Some things are hard to understand. Example:
"Memory is a fundamental and finite resource that allows computers to store data which leads to the possibility of executing programs that have to be loaded into memory." (First sentence section 2.4)
Are there programs that don't have to be loaded in to memory? The point I think you should make is that memory management allows programs to store information bigger than the stack. I also think some examples of code would make it fun and easier to understand.
EDIT: Efter mer tänkade kanske detta inte borde ligga under teori.
Jag kommer utgå från principerna presenterade i How to write papers to people can read them
Paragraferna följer "one paragraph, one point" väl tycker jag! Vissa meningar läser lite konstigt och kanske inte alltid helt korrekt, t.ex första mening som Martin påpekade.
Överväg att klämma in ett kort exempel här någonstans?
Since a computer’s memory
is shared across multiple programs executing concurrently, it is important that one
single program does not try to allocate or use all of the available memory, resulting
in limitations on the rest of the system and executing programs
Denna mening introduceras som att det är välkänt, kanske först förklara att detta är fallet?
Order runtime defineras aldrig helt, personligen skulle jag gilla att man skriver lite om det. 2-3 meningar kanske?
Tycker vi först borde förklara hur minnet ser ut i en datorn innan vi går in i detaljer som bss, text m.m. (Vet själv inte vad just de två innebär). Går nog att förbättra "flow" (kika videon, vädligt bra imo!)
Lite osäker vilken poäng stycket försöker presentera. Nackdelar med malloc?
Om ovanstående text kan förklara vad problemet med manuell minneshantering är så kanske man kan presentera mark and sweep-algoritmen som en lösning (gå även in lite på detalj här), och sedan säga att den är "stop the world" och varför det inte är optimalt, här skulle man kunna ta upp förbättringar / alternativ
The collector is triggered when an allocation is requested but there is not enough memory
available on the heap to satisfy the request
...
Since the heap contains all
the objects ever created by the executing program, the dead objects are merely a
subset of the heap and can be easily swept by the sweep phase, where the memory
that the dead objects occupy are freed.
Algoritmen är inte förklarad än så läsaren lär nog inte veta vad "collector", "mark" och "sweep" är än.
Thanks, I'll adjust it when we've got a fuller report.
I have decided to make major changes to this section after reminding myself of the writing instructions. I will rewrite it with these comments in mind and make a new issue later.
Read section 2.1 Memory management plz