Compare and contrast dynamic memory allocation and the allocation of files in secondary storage

 Dynamic Memory Allocation:

Memory allocation done at the time of execution(run time) is known as dynamic memory allocation. Functions calloc() and malloc() support allocating dynamic memory. The Dynamic allocation of memory space is allocated by using these functions when the value is returned by functions and assigned to pointer variables. In the Dynamic memory allocation, variables get allocated only if your program unit gets active. It is more efficient and it also uses heap for managing the dynamic allocation of memory. Memory size can be changed after allocation.

A file is a named collection of related information, usually as a sequence of bytes, with two views:

  • Logical (programmer’s) view, as the users see it.
  • Physical (operating system) view, as it actually resides on secondary storage.

As (integral or separate) part of an operating system, the file system manages this information on secondary storage. Uses of secondary storage include storing various forms of programs (source, object, executable) and temporary storage of virtual memory pages (paging device or swap space). Information in secondary storage may be in a variety of forms, including readable text and raw data (e.g., binary).

Each file is associated with a collection of information, known as attributes:

  • NAME, owner, creator
  • type (e.g., source, data, binary)
  • location (e.g., I­node or disk address)
  • organization (e.g., sequential)
  • access permissions
  • time and date (creation, modification, and last accessed)
  • size
  • variety of other (e.g., maintenance) information.

Comments

Popular posts from this blog

A recursive function in C++ must always have a void return type.

What do “Feasibility” and “Desirability” mean in the context of software design. Specify one question for each that leads to a design type.The main goal of a software design thinking work process is to create a solution that is desirable, feasible, and viable. This means our solution should not only provides a solution but also needs to implement easily and have a proper commercial model. Desirability is at the forefront as it is mainly concerned with our ideas and validating things about taking users in mind and also to do testing again and again. A test for desirability focuses on whether your solution is a nice to have or a must-have for your customer. Ask yourself, what task am I helping my customer complete? What does successful completion of that task look like for them? Looking at what they are trying to do and why it is important to them puts yourself in their shoes, lets you look at your solution from their eyes. If you are solving the key pain points they encounter when trying to complete this task, your solution has met the test for desirability. If not, and there are other pain points that you haven’t addressed, then pivoting your solution might put you on a better path. Feasibility in software design is a validation process that looks at how design delivers to requirements, objectives, and goals. The common Software design feasibility is: Technical Financial Usability Risk Experience Quality Feasibility is a way to evaluate the desirability of a project or a design. Any company before any project invests their time and money in any project they want to know how successful the project will be before investing. As the company wants to know how much amount of research is needed to be done and also to know the market value of a project.

Which of the following is not a challenge of Cloud Computing.