Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [memory-management]

The tag has no usage guidance.

0
votes
0answers
10 views

Operating system - physical address protection [duplicate]

Considering a system with no logical address ( that is all memory addresses used are direct physical address), can we have a memory scheme which can prevent one process from over writing the code/data ...
1
vote
0answers
23 views

Recurrence Relation for Column Major Form of multidimensional array

A two dimensional array is stored in column major form in memory if the elements are stored in the following sequence $$A[0][0] A[1][0] A[2][0]...A[n_1-1][0] ... A[0][1] A[1][1] ... A[n_1-1][1] .... A[...
1
vote
0answers
12 views

What happens when a file is being moved/copied to another location at the same hard drive?

I've got a few questions about how hard-drives works with information that I haven't been able to find the answers to anywhere, so I figured I'd give this a shot instead. I know the basics on how ...
0
votes
0answers
13 views

Number of memory cycles stolen for transferring one word

The storage area of a disk has the innermost diameter of 10 cm and outermost diameter of 20 cm. The maximum storage density of the disk is 1400 bits/cm. The disk rotates at a speed of 4200 RPM. The ...
2
votes
1answer
55 views

How does hashed inverted page table work?

I understand hash function and inverted page table, but then the book I read describes something called hashed inverted page table (use hash to accelerate the finding because IPT is large), with TLB ...
0
votes
0answers
10 views

If the number of pages exceeds the number of frames, how can the process finish using Virtual Memory?

Mapping is not for paging, is it? For instance if we have 12 pages and 8 frames. If 7 out of these 12 pages are loaded into the main memory, how can the process terminate?
1
vote
0answers
30 views

pool of free page frames OS

I read that in a paging scheme memory management, some os's have a paging daemon that wakes up periodically to inspect the memory of the RAM. This is to ensure that modified pages can be scheduled to ...
-1
votes
0answers
83 views

Compile time and load time address binding vs Execution time address binding

The address generated by CPU is called logical address and the address seen by the memory unit is called virtual address. The compile and load time address binding scheme results in an environment ...
0
votes
1answer
28 views

How can a user process even try to access a memory location its not allowed to when it doesn't have access to page table?

So is it even possible for a user process to even try to access a physical memory location that does not belong to it and therefore getting an error by operating system? because for example with a 32 ...
0
votes
1answer
212 views

How pictures and videos are usually loaded in Memory? [closed]

Lets assume I'm talking about Jpeg and Mp4 and a general video player(not sure if different ones load it differently, if they do please tell) So do video players (process) usually load the entire ...
1
vote
1answer
32 views

What is the mathematical principle of buddy algorithm?

The buddy algorithm is: The buddy for any block of size $2^k$ is another block of the same size, and with the same page frame number except that the kth bit is ...
2
votes
1answer
31 views

Page cache and its relationship to page table

I was reading about the page cache Page cache - the cache in memory for files, but I couldn't find the answer to my question. Does the page table have anything to do with, or maintain any entries, for ...
1
vote
1answer
38 views

Can a process run if there's not enough space for minimum pages?

I'm studying OS and I came up with this scenario where the OS works with a paging scheme and virtual memory, and a process wants to start running, but in memory, there's not enough space to allocate ...
1
vote
3answers
93 views

Can computers lose information?

I've heard that computers cannot forget anything, but yesterday my teacher told me that a computer can lose its memory from getting very hot. Is that true that computers can lose information? How and ...
0
votes
1answer
58 views

How does the TLB identify a particular process?

I have read that the translation lookaside buffer (TLB) is implemented in hardware and stores the page numbers and the corresponding frame numbers for faster lookups. Now suppose there are two ...
0
votes
0answers
48 views

Cache mapping problem

Okay.I have problem about cache mapping. Here is the problem . Memory size is 1 MB Byte addresable Cache block size is 16 Bytes. Cache size is 64kb Since memory is 1 mb=2**20 Bytes. So we need ...
4
votes
1answer
26 views

How does cache partitioning prevent covert/side-channel attacks?

In a report on an open-source separation kernel (Muen kernel) I was reading, in the future work section, it says that cache coloring can be implemented to prevent covert/side-channel attacks. It is ...
1
vote
0answers
198 views

Cache Hit or miss

Asume 512 Bytes direct-mapped cache with 64 Byte cache blocks (cache line size), is empty at the beginning and below given set of physical addresses are referred by CPU in the given order. At each ...
0
votes
1answer
198 views

What does “higher order address bits” and “lower order address bits” mean?

"Assume a system with 4 GB virtual memory and 1 GB physical memory with 32 bit addresses. if the page size is 4 KB, How many bits will be allocated as the Higher Order Address bits and Lower Order ...
0
votes
0answers
155 views

Determine the main memory size using cache line and cache size

Assume a computer architecture with 32 bit address.The system has been designed with 1MB cache which comes with 64KB cache line(cache block size). 1.What is the maximum main memory capacity this ...
0
votes
0answers
11 views

Populating Page-Table Maps

I'm working on a coursework that requires making a model showing address translation of a RAM that operates on the basis of a segment-page scheme. So my confusion stems from the fact that every ...
0
votes
1answer
35 views

How to keep track of changes done to concurrent stacks?

I am writing a small RPN calculator that works on some stacks concurrently. For example, if I have two functions: ...
0
votes
1answer
69 views

Virtual Memory and processes

In a Operating System, who decides which parts of a program (or task) has to be stored in the virtual memory and which in the RAM ?
4
votes
0answers
52 views

Alternatives to the stack and heap-based memory models

The stack seems to be an optimization of memory use for a specific application. Whereas the heap is a general model that works in all cases. Wondering if there are any other types of models of ...
0
votes
1answer
220 views

Why can't OSes swap out processes that are waiting for I/O?

In the book, Operating System Concepts, 9th Edition, there is this paragraph that I don't quite wrap my head around. Swapping is constrained by other factors as well. If we want to swap a process,...
2
votes
0answers
18 views

Sweeping integrated into memory allocation: Why only fixed size objects?

In our language design book, it is mentioned that GC sweep can be integrated into allocation, such that when you call malloc for example, you sweep until you find a ...
5
votes
1answer
176 views

Is there any mechanism where the kernel portion of an OS in memory may also be swapped?

I'm recently learning the part of I/O buffering of operating system and according to the book I use, When a user process issues an I/O request, the OS assigns a buffer in the system portion of ...
1
vote
1answer
93 views

Coalescing by register allocation

I have a rough idea of what coalescing in terms of memory access by threads is, but now, when learning about compilers, the term coalescing also appears when talking about register allocation. In my ...
0
votes
0answers
68 views

Why does LOAD time address binding methods generate identical Logical and Physical Address

I have recently started learning OS and in memory management chapter from silberschatz I got confused between identical and different addresses(Logical and Physical) of load time and run time binding ...
1
vote
2answers
44 views

What is the difference between a page and thread?

"Each process that is executed is divided into blocks of same size, called pages." "Thread is a part of process being executed." Are pages and threads both part(s) of process? Whats the difference ...
0
votes
0answers
51 views

difference between address and data bus [duplicate]

I'm interested in how does cpu read 32 bit word from memory .If the processor has 32 bits of address space then it can address 4,294,967,295 locations (or 4 gb) Does this mean that each location has ...
0
votes
1answer
43 views

How does a buffer overrun corrupt the return address?

I got stuck on the following note while reading a paper about computer security: The stack mixes program data and control data – by overrunning buffers on the stack we can corrupt the return ...
0
votes
1answer
77 views

Virtual Memory: “Page Table or Page Tables?”

I am having a bit of a tough time grasping whether a computer system contains several page tables or just one page table. Some sources speak of page tables in plural others in singular. ...
1
vote
1answer
2k views

What does 'relocation' mean?

I am reading about Base & Bounds memory protection mechanism, and I noticed the use of the term 'relocation' in the context of ...
0
votes
2answers
475 views

Does MMU contain and manage CPU caches?

I read about Virtual Memory in various CS references, however I'm still not sure whether CPU caches such as TLB, L1 and L2 are ...
0
votes
1answer
29 views

Does having more bus in the computer increasing speed? [closed]

Whát i mention here is for having 2x bus will increasing 2x memory access speed like 3x will have 3x memory access speed like that !
2
votes
1answer
291 views

Where are 'Base & Bounds' registers located?

I read about virtual memory from L08/CS152 of U.C Berkeley and used to deep dive into the details of VM hardware implementation, yet didn't find any document or figure on the course specifying where ...
10
votes
3answers
2k views

What does “map” mean?

I have encountered the term many times, in various CS education materials: L2 CS162 (UC Berkeley): Memory-mapped I/O L4 CS162 (UC Berkeley): Memory mapped files L24 CS61 (UC Berkeley): “...
0
votes
1answer
175 views

How memory remapping of physical address space that is above 4GB RAM works? [closed]

I have a query regarding the below information in http://duartes.org/gustavo/blog/post/motherboard-chipsets-memory-map/ "In 64-bit mode it is possible to use physical addresses above the total RAM in ...
0
votes
1answer
293 views

Virtual Memory - Non-contiguous Memory Allocation

I'm studying for my operating systems final, and one question that my professor asked that I can't seem to find the answer to is the following: "Why does virtual memory use non-contiguous memory ...
13
votes
1answer
3k views

If the virtual address space can be larger than the physical address space, how are the address mappings stored in memory?

Let's say we are working with a system that has 40 physical address bits. The total physical address space (assuming byte-addressable memory) is $2^{40}$ bytes, or 1 TiB. And if virtual addresses are ...
1
vote
0answers
252 views

Difference between inverted page table and a standard one?

I know that for standard page tables each process would have its own page table and for inverted the OS would have it. But other than this what are the main differences between a standard page table ...
0
votes
1answer
264 views

Effectiveness of TLB

This is a book question: Suppose that a machine has 48-bit virtual addresses and 32-bit physical addresses. Suppose this same system has a TLB (Translation Lookaside Buffer) with 32 ...
1
vote
2answers
89 views

Why are programs executed in main memory?

Why are programs kept in main memory for execution? As per my understanding, we need a memory management scheme to manage several processes in the main memory. These things can be done in secondary ...
1
vote
1answer
291 views

External fragmentation in fixed size partitioning

Can external fragmentation occur in fixed size partitioning ? I searched everywhere but couldn't find a sentence which says external fragmentation is not possible in fixed size partitioning. Please ...
-1
votes
1answer
123 views

How does computer keep track of Empty and used memory space?

Where does computer store used and unused memory address to access it ?Are base address and length or ending address stored side by side?
-1
votes
1answer
599 views

Advantages of segmented paging over pure paging

As we know segmented paging is an improvement over segmentation and paging but I am having some doubts regarding the memory overhead of these three system.It is clear that segmentation need less ...
1
vote
0answers
65 views

Design considerations for a language to support automatic parallelization [closed]

Automatic parallelization isn't a new thing by any means, and lots of questions have been asked about whether Java or C or C++ or a host of other languages or specific compilers (gcc 5 v 6, clang, ...
1
vote
3answers
91 views

Why do modern processors need a runtime stack?

Professor said that modern processor needs runtime stack. But he didn't explain the reason. Why is the runtime stack required in the modern processors?
1
vote
2answers
38 views

If you increase the address space for an OS, does the Phys Mem used by the program increase?

I am learning about the OS. I know: that Address Space Size = # of pages x page size So if I increase Address Space Size, then the number of pages increases:(not the page size). However, isn't the ...