New answers tagged

0

Let us suppose you have 32 bytes of VAS and the page size is 4 bytes, so the total number of pages is 8. Now suppose that you have allocated 8 frames in PAS, but as of now you don't require all pages simultaneously. Now consider the following case: in the PAS you have only two pages of processes present. You can load all pages in a single frame, but you ...


0

Assume we have 4 processes p[0], p[1],...,p[3] and 4 mutexes m[0],m[1],...m[3]. Now in order to solve the dining philosophers problem, we only need to make one of the philosopher (one of the processes) to take the folk (one of the mutexes) in reverse direction than the other philosophers. Note that by doing this, we are trying to avoid deadlock. So in ...


2

I will be adding to nir shahar's answer. A single-threaded kernel is essentially a kernel that processes only one thread at a time. We can have multiple kernel threads, but only one can get executed at any given point in time. This can be achieved by some scheduling procedure on the kernel threads. But is this the same thing as having only one kernel thread (...


1

It literally means that the kernel runs only on one core. Different threads can be run on multiple cpu cores, and thus a single-threaded kernel is a kernel that runs only in one core


2

There are several advantages of hashed page tables over the standard flat/hierarchal page tables. One of these being size, a hashed page table will use less space in memory than using a flat or hierarchal page table. It will at most have one entry for every physical frame (worst case scenario; unlikely as many page numbers will end up having same hash value)...


1

I'm late to the party but I suppose I can offer my intuition on this. I think of it as a race between threads. The race consists the number of laps = #threads-1. The idea is after each lap, 1 thread is left behind, so at the end of the race, only 1 thread is guaranteed to come out on top. From the perspective of each thread, it looks like below (the comments)...


2

When you put a new process in the ready queue, you are just adding the process, not changing anything to running as a result. With a non-preemptive scheduler this is also the case for waiting to ready. But, when you have a preemptive scheduler, tasks that come from waiting to ready get a higher priority than newly running tasks, so that "scheduler ...


Top 50 recent answers are included