Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Active Tutors
Asked Questions
Answered Questions
processes have valid and invalid entries on their page tables the valid entries all point to some where real eg a physical page or some portion of
as we have discussed page tables map virtual page addresses to physical page addresses one of the advantages of using virtual addresses is that we
suppose your process starts up and allocates some memory with malloc the allocator will then give part of a memory page to your process the os then
when do we write a page from physical memory back to the diskin general caches have two broad types of writing policies one approach is a
for reading most operating systems use demand paging this means that pages are only read from the disk into physical memory when they are needed in
we will briey introduce paging to nish off this lecture when a process is loaded not all of the pages are immediately loaded since its possible that
how exactly is a page table used to look up an addressthe cpu has a page table base register ptbrwhich points to the base entry 0 of the level-0 page
multi-level page tables are tree-like structures to hold page tables as an example consider a two- level page table again on a 32-bit architecture
as mentioned above page tables are lookup tables mapping a process virtual pages to physical pages in ram how would one implement these page
virtual addresses are made up of two parts the rst part is the page number and the second part is an offset inside that page suppose our pages are
when a program issues a memory load or store operation the virtual addresses vas used in those operations have to be translated into real physical
using pages makes it easier to manage the whole memory avoiding excessive fragmentation and waste as an analogy think of tetris but with only square
applications allocate memory in terms of the number of bytes that they need but this level of granularity is too ne-grained for the operating system
in modern operating systems applications do not directly access the physical memory instead they use so-called virtual memory where each virtual
while it is hard to resolve a deadlock which has been detected fortunately it is fairly easy to prevent deadlocks from ever happening the key is that
deadlocks can be detected while the program is running by running cycle detection algorithms on the graph that denes the current use of resourcesdene
here are the conditions necessary for a deadlock to occur note that all of them are necessary and none is sufcient1 nite resources the resources are
at the end of this lecture and into the next lecture we will discuss the last major type of logical error that can occurwhen programming with threads
consider a large web-based database in some sense google is sort of like this there might be many users who want to read from the database but only a
when programming with threads there are three very common mistakes that programmers oftenmake1 locking twice depending on the system and type of lock
we have talked about blocking locks which voluntarily yield and spinlocks which just spin until they acquire the lock at rst it seems like spinlocks
now lets implement bounded producer-consumer with semaphores a coke machine which is initially emptysemaphore semmutex 1 binary semaphore for
for example by initializing a semaphore to 0 threads can wait for an event to occur and impose an ordering constraint similar to a monitor using
synchronization can be achieved by means other than locks and condition variables one alternative is semaphores a semaphore is used to regulate trafc
there is a very small amount of networking background required for project 2 in project 2 we want our computer or our host to request information