Hot answers tagged

3 votes
Accepted

Inline caching in not object oriented languages

As Gilles points out, it's not immediately obvious what the analogue of this would be in a non-object-oriented language. Below is one suggestion. Let's say you have a function ...
Derek Elkins left SE's user avatar
2 votes
Accepted

Whats the point of caching if the minimum single clock cycle time is the prorogation delay of the slowest component (fetching from DRAM)?

You are right that the clock speed is determined by the slowest stage. But on most architectures it is not true that fetching(or any kind of memory access in fact) takes one cycle. This is an illusion ...
Amaury Pouly's user avatar
  • 1,181
1 vote

What is the hit rate of the cache when executing this code?

Your program will most likely crash because you access non-existing array elements.
gnasher729's user avatar
  • 29.4k
1 vote
Accepted

Is reading contiguous pages (let's say 4KB) any faster than reading non-contiguous pages on SSDs?

Short answer: no. On an SSD, non-contiguous access (very slightly) increases the protocol and processing overhead - in theory, contiguous (or rather: longer) transfers could be slightly faster but you'...
Zac67's user avatar
  • 128
1 vote
Accepted

Are Paging and page cache the same in Operating system?

The page cache is, as the name suggests, a cache of pages. Demand paging is the idea that a page (of virtual memory) does not need to be backed by a page frame (of physical memory) until it's ...
Pseudonym's user avatar
  • 22k
1 vote
Accepted

What is the basic idea behind the usage of TLBs?

A TLB is useful for the same reason any other cache is useful: because it's very common to access the same data multiple times in quick succession. Many algorithms use the same value more than once. ...
Gilles 'SO- stop being evil''s user avatar

Only top scored, non community-wiki answers of a minimum length are eligible