Latest Updates

CS201 GDB Solution Spring 2021 Download PDF Dynamic VS Static memory

 This is to inform that Graded Discussion Board (GDB) will be opened on 13th August, 2021 for discussion and last date of discussion will be 16th August, 2021.


Suppose you are working as a software engineer for automobile industry. Automobile industry is about to build some new automated machines for its assembly line. These machines will be using an OS without any file system. These machines will be doing fixed number of movements in loop at assembly line and there will be no other use of these machines. Execution of every move should be as fast as hardware limitation allows.

Considering the requirements given in above scenario, which memory allocation approach will you choose? Static memory allocation or dynamic memory allocation?

Justify your answer with the proper reasoning.

You need to provide precise and to the point answer, avoid irrelevant detail

Static Memory Allocation

Dynamic Allocation

static Memory is allocated for declared variables by the compiler. The memory is allocated during compile time

During run of Program its cannot change (Increase/Delete etc)

Memory allocation done at the time of execution (run time) is known as dynamic memory allocation

During run of program, it can change (Increase/delete etc)




اب ہم جی ڈی بی کے مطابق سمجھتے ہیں تا کہ ہم اس کو بہتر حل کر سکیں


فرض کریں آپ نے ایک گاڑی میں آٹو میٹک اےسی لگانا ہے۔ اس کو مکمل فٹ کرنے میں جو بھی کام کرنا ہوتا ہے وہ آٹو میٹک طریقے سے مکمل ہوگا۔

اور یہ کام ایک خاص  اقدامات کے بعد خودبخود ختم ہو جائے گا۔

This discussion tells us:

Static memory Allocation is best for a given scenario because:

1.    We have limited resources and wants accurate resources

2.    We fixed memory location to every step for making a new product.

3.    We never want any changes of memory during program execution.

4.    When we fixed memory then we can run our limited resources efficiently.

5.    Our automobile industry is fully auto. So, we never want any memory allocation changes during program execution.

6.    Data cannot increase or delete 

Download CS201 GDB Solution PDF Spring 2021

Download File Now 

Watch the video for concept and how to change



Disclaimer: Please don't copy-paste. Please submit your Assignment in your own writing. Abdul Hadi E-Services will not accept any loss made by you.

Feel free to comment with any suggestions. We welcome everyone.

Post a Comment