Describe and explain how the operating system abstracts memory management away from a systems programmer.

First Lets define the terms:Operating System - System software that manages computer hardware, userspace programs and essential kernel space programsMemory Management - A system that can dynamically allocate hardware resources specifically RAM (random access memory) to specific user/kernel-mode programs.Systems Programmer - A programmer that develops programs to be run in a software system but are not user-facing ie backends. This includes web servers, reverse proxies etc.Now for the answer:It is essential that only the operating system can manipulate the memory of a program.The operating system provides an API to allocate and deallocate memory for a program this is the Interrupt Service Routine. The programmer simply makes a call to this in their code.In a high level language such as C this would be:```#include <stdlib.h>#define SIZE_OF_ARRAY 10int main(){   // ALLOCATE AN ARRAY OF INTEGERS USING DYNAMIC ALLOCATION   int array = (int) malloc(SIZE_OF_ARRAY * sizeof(int)); }```Reasons this has been abstracted:- Massively simplifies the use of dynamic memory- Makes the code more portable across different platforms and ISA- The lower level allocation can be better optimised and tested- You need a higher level of access than the userspace has so it would not be possible to do in user space only code.This is only a brief answer a whiteboard and auditory description would be considerably more helpful.

Answered by Kyle C. Computing tutor

1158 Views

See similar Computing GCSE tutors

Related Computing GCSE answers

All answers ▸

How would you convert the Binary number 01001101 into both Hexadecimal and Decimal?


Computers use virtual memory, can you explain what this is and how it is used?


how do you convert binary to a form in which you can perform subtraction?


How to convert any binary number to decimal?


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo
Cookie Preferences