Вы находитесь на странице: 1из 3

What is Spooling

Category: Operating System

Spooling - simultaneous peripheral operations on-line, spooling refers to as a process that putting
jobs in a buffer or say spool, or temporary storage area, a special area in memory or on a disk
where a device can access them when it is ready. Spooling is useful because devices access data
at different rates.

The buffer provides a waiting station where data can rest while the slower device catches
up.However, unlike a spool of thread, the first jobs sent to the spool are the first ones to be
processed (FIFO, not LIFO).

The most common spooling application is print spooling. In print spooling, documents are
loaded into a buffer (usually an area on a disk), and then the printer pulls them off the buffer at
its own rate. Because the documents are in a buffer where they can be accessed by the printer,
you can perform other operations on the computer while the printing takes place in the
background.

Spooling also lets you place a number of print jobs on a queue instead of waiting for each one to
finish before specifying the next one.

Spooling: It is referred as Simultaneous Peripheral Operation Online. It means to put jobs in a


buffer, a special area in memory or on a disk where a device can access them when it is ready.
Spooling is useful because devices access data at different rates. The spooling technique is used
in multiprogramming environment to offer first chance to the program of higher priority and
reduce processor idle time. Each application output files are spooled to separate disk file called
spool files and spooling system make queue for output process. The most common spooling
application is print spooling.

Buffering: Buffering is the name given to the technique of transferring data into temporary
storage prior to processing or output, thus enabling the simultaneous operation of devices.

Swapping: The swapping is a memory management technique applied by Operating systems.


Swapping is a technique in which high priority process is swap in main memory and low priority
process from main memory to swap out. When high priority process is completed, low priority
process is swap in again
1
Software Caching
 Temporary location to store data for fast access.
 Same reasons as Hardware Caching
1. Improves performance
2. Data is physically closer to execution
 This is especially useful when data is distant, large, used frequently, or especially if it fulfills
some combination of these criteria

Jargon & Terms

 Cache consists of a pool of entries which are copies of actual data


 entries are tagged for retrieval later
 A Cache Hit is when data is matched by tag to an entry in the cache

A Cache Miss is when data is NOT matched by tag entry in the cache, and is instead fetched from
backed store and placed in cache. If there is not enough free space, we remove something according to
our replacement policy; a "caching algorithm" strategy for evicting cached data

 Hit rate is the percentage of accesses that result in hits


 Storage & Retrieval Cost is the cost of placing and retrieving data in cache
 Invalidation is How an entry in cache is "invalidated", stale data that requires an update

Replacement Policies

 Optimal data replacement (Belady's Algorithm) is to replace data that will not be used for the
longest period of time in the future
 Problem here is that we need to predict the future use of data, which is not possible. however
we can use this to measure effectiveness of our caching algorithms
 We must use heuristics as a result

Actual Caching Algorithms

 Least Freuently Used (LFU)


o Count how often an entry is needed by incrementing a counter associated with each
entry in cache.
o Remove the entry with least frequently used counter first.
o Request Pattern -> discard entries that are not needed over the longest period of time
 Least Recently Used (LRU)
o count how often an entry is needed by incrementing a counter associated with each
entry in cache
o Remove entry with least frequntly used counter first.
o Request Pattern -> discard entries that are not needed over the longest period

2
3

Вам также может понравиться