# Tag Info

## New answers tagged operating-systems

0

The number of entries in the TLB is limited and keep in mind that there are multiple levels of TLBs. So the higher the level, the more entries they typically have. For more detailed information have a look at the following page for Skylake. Wat you are referring to is a minor page fault; so there is no matching entry for a page in the TLB, but the page is in ...

0

Modern multi-core processors are parallel. First I want to explain why a single core processor (no hyper threading) offers instruction-level parallelism. First they have pipelined-parallelism, so they have multiple instructions from a single instruction stream at various stages in the pipeline. So in the typical cs literature you will see the 5 stages of a ...

0

You got it a little mix up and wrong Page number = logical address / page size in this case is $\frac{21205}{1024} = 20$ Offset = logical address mod page size in this case is $21205 \mod 1024 = 725$ Sources: http://www.yorku.ca/pkashiya/cse1520/Paged%20memory%20technique.htm http://www2.cs.uregina.ca/~hamilton/courses/330/notes/memory/paging.html

0

That depends on your definition of "operating system". Some authors define that as the kernel (i.e., Linux, providing process control, a filesystem and simple/controlled access to devices), others add in all sorts of userland applications (i.e., "go to your vendor, ask for an operating system; whatever they give you is an operating system"...

0

Internal fragmentation occurs because the OS cannot allocate less than one page to a certain process. This implies that the last chunk of code/data for a process will take one page no matter its size. The worst case scenario is when the code/data use several pages + 1 byte. You thus end up with a whole page lost to internal fragmentation. Now you are right ...

1

I'm going to refer you to my previous answer on this topic. I went through a number of situations where even if a page table entry (PTE) correctly refers to a page frame in memory, marking the PTE as invalid still makes sense. There are two views of a virtual address space: the CPU's view (which is implemented by the page table mechanism), and the operating ...

0

As to terminology, page frame and page is normally two terms which refer to the same thing (a physical page/frame). Demand paging doesn't mean that the page tables are not present in memory. Demand paging means that the actual pages/frames are not present in memory. More often than anything, the page tables of a process should be filled according to how much ...

6

Suppose you have a virtual address space of say $32$ bits. Then the virtual address space for each and every process is fixed and it ranges from the byte $0$ to $2^{32}-1$. Now the for the ease of memory management the main memory is divided into frames of certain size say $2^k$ bytes. Also, our virtual address space of the process is divided into chunks or ...

2

The page table isn't a fixed size. Assuming all memory of the system is in use, and no clever tricks to group pages are used, the page table has a size equal to the amount of memory divided by the page size.

1

I agree with you that Tanenbaum kind of biffed it here. Arguably if your goal was to minimize worst case wait time for the short jobs at the end of the queue, Tanenbaum's example would sort-of make sense. If there are 49 long jobs and 1 1msec job, the worst case wait time for the 1ms job with 100ms time slices would be 4901ms, while the worst case wait ...

2

Try to think in practical terms what would actually happen if your computer used a big quantum: Lets say our quantum is 1 second. Now, say you browse in a browser (for example, CS stack exchange), and want to ask a question in the CS stack exchange. Lets say, that you also got from your instructors some really annoying homework that made you need to run 20 ...

2

It is quite complex because USB is quite a beast. I don't know much about ARM and how it interfaces to USB. I've been in the process of writing an x86 kernel which interacts with USB keyboards so I'll answer for x86. By the way, x86-64 is the CPU architecture you find in most desktop computers today. x86-64 CPUs can't interact with USB directly. They need a ...

0

Every time that the computer wants to interact with the peripheral device. "every time the user presses a key" sounds about right, but I don't know enough about keyboards specifically to vouch that this is exactly how it works.

3

The Linux kernel uses a (very rough) approximation of LRU, which is the reason why you find mention of LRU, even though it is not the true LRU algorithm. Here is a description taken from the source: Per node, two clock lists are maintained for file pages: the inactive and the active list. Freshly faulted pages start out at the head of the inactive list and ...

Top 50 recent answers are included