Monday, August 26, 2019
Database Systems Concepts Essay Example | Topics and Well Written Essays - 750 words - 2
Database Systems Concepts - Essay Example In addition, RAM is usually much smaller in size, about two to three orders of magnitude being frequent. (A rig that I know of has 8 Gigs of RAM and 2 terabytes of hard drive space, and the owner has room to expand to over 5 terabytes, which is roughly a three order of magnitude difference). Scheduling is almost entirely unnecessary. There is a need to compare the RAM disk and the main memory disk-cache, but this doesn't affect the choice of a scheduling algorithm for the hard drive because they are totally different systems and because scheduling on the RAM disk is only looking for buffer cache misses not main memory requests. Hard-disk scheduling considerations are totally different. Hard disks are much larger and they are not read constantly, and the head positioning must jump in order to handle different reads. The file system does store recently used blocks in a buffer cache in main memory, but this is only a partial time-saving maneuver. Caches have finite sizes and need to be purged constantly; in any respect, no one sticks to only a few things in cache. They are constantly opening up new pages, documents and programs, which requires accessing different parts of the disk. This means that scheduling for hard-disk use is at a premium: Indeed, one of the main slowing forces in Moore's Law exponentiation is the relatively anemic growth of hard-drive scanning speeds versus the memory size of hard drives. Different hard disk scheduling regimes have different benefits. When designing a scheduling algorithm, it is important to bear in mind parameters of functionality. These include power consumption, throughput, response time, flexibility for the end-user, and other factors. Again, the cache can only do so much in mitigating these problems, so the choice of how to approach hard disk scheduling has many inherent tradeoffs. One approach is FCFS, or First Come First Served. In this algorithm, operations are conducted in the order requested. This is very simple and elegant in many ways. However, the problem is that not all functions are made equal: Some functions, like Ctrl-Alt-Delete on a Windows computer or dealing with security threats, need to be scanned first. FCFS therefore doesn't have the costs of reordering the work queue, but it doesn't have the benefits either. FCFS cannot have starvation: Every request is serviced. But the performance is poor: It doesn't distinguish between the importance of needs, nor does it have any smart geography. If a end user wants to run six programs from every different side of the disk, FCFS will go in order, crossing immense redundant space and thus leading to slowdown. SSTF, on the other hand, prioritizes geography of the desk. It goes to the closest location on the disk first, no matter what. Again, this has the problem that there is no discrimination for important tasks. Scan time is reduced, but starvation is possible: The head could stay in one sector of the disk for too long if too many requests co me in. Direction switches also slow things down. SCAN goes from the outside to inside then the inside to outside. This has the advantage of being a uniform pattern and reducing variance, but it does lead to a lot of unnecessary scans (though not more scan time) which can be a power consumption issue. LOOK is a bit smarter: It stops going a direction where no requests exist. C-SCAN and C-LOOK use cylinders instead of a simple directional approach. This has the adv
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.