Archive for November 2007

from New Mexico Tech.
No tags
| Person A | Person B | |
3:00 3:05 3:10 3:15 3:20 3:25 3:30 |
Look in fridge. Out of milk. Leave for store. Arrive at store. Leave store. Arrive home, put milk away. |
Look in fridge. Out of milk. Leave for store. Arrive at store. Leave store. Arrive home. OH NO! |
Mutual exclusion: Mechanisms that ensure that only one person or process is doing certain things at one time (others are excluded). E.g. only one person goes shopping at a time.
Critical section: A section of code, or collection of operations, in which only one process may be executing at a given time. E.g. shopping. It is a large operation that we want to make “sort of” atomic.
Solutions?
No tags
.
No tags
A thread in computer science is short for a thread of execution. Threads are a way for a program to fork (or split) itself into two or more simultaneously (or pseudo-simultaneously) running tasks. Threads and processes differ from one operating system to another but, in general, a thread is contained inside a process and different threads of the same process share some resources while different processes do not.
No tags
If and only if there are no lambda (nothing) or unit productions. Then introduce new symbols.
Every grammar in Chomsky normal form is context-free, and conversely, every context-free grammar can be efficiently transformed into an equivalent one which is in Chomsky normal form.
No tags
No tags
In computer storage technology, a page is a fixed length block of memory that is used as a unit of transfer between physical memory and external storage like a disk, and a page fault is an interrupt (or exception) to the software raised by the hardware, when a program accesses a page that is mapped in address space, but not loaded in physical memory.
The hardware that detects this situation is the memory management unit in a processor. The exception handling software that handles the page fault is generally part of an operating system. The operating system tries to handle the page fault by making the required page accessible at a location in physical memory or kills the program in case it is an illegal access.
Page faults, by their very nature, degrade the performance of a program or operating system and in the degenerate case can cause thrashing. Optimizations to programs and the operating system that reduce the number of page faults that occur improve the performance of the program or even the entire system. The two primary focuses of the optimization effort focus on reducing overall memory usage and improving memory locality. Generally, making more physical memory available also reduces page faults. Many page replacement algorithms have been proposed, implementing a heuristic to reduce the incidence of page faults.
No tags
Demand paging is an application of virtual memory. In a system that uses demand paging, the operating system copies a disk page into physical memory only if an attempt is made to access it (i.e., if a page fault occurs). It follows that a process begins execution with none of its pages in physical memory, and many page faults will occur until most of a process’s working set of pages is located in physical memory. This is an example of lazy loading techniques.
No tags
A page, memory page, or virtual page is a fixed-length block of main memory, that is contiguous in both physical memory addressing and virtual memory addressing. A page is usually a smallest unit of data for:
- memory allocation performed by operating system for a program,
- transfer between main memory and any other auxiliary store, such as hard disk drive.
Virtual memory abstraction allows a page that does not currently reside in main memory to be addressed and used. If a program tries to access a location in such page, it generates an exception called page fault. The hardware or operating system is notified and loads the required page from auxiliary store automatically. A program addressing the memory has no knowledge of a page fault or a process following it. In consequence a program may be easily allowed to address more RAM than actually exists in the computer.
No tags

Social Links