C语言的磁盘调度算法
我正在尝试用 C 语言学习磁盘调度算法(SCAN 和 C-SCAN)的实现,有人可以参考这些用 C 语言实现的良好来源吗?或者建议我用 C 语言对其进行编程?
进一步深入:- *目标是编写一个程序来优化磁盘访问,将磁盘上的一组不连续的页面读取到内存,为此,我正在执行磁盘调度。
*我想指示磁盘读取页面的顺序
I am trying to learn implementation of Disk Scheduling Algorithms (SCAN and C-SCAN) in the C language, can somebody please refer to good sources of implementations of these in the C Language or advise me on programming them on C?
Further Into:-
*Objective is to write a program to optimize disk access to read a non contiguous set of pages on disk to memory, for this, I am performing disk scheduling.
*I would want to instruct the disk on read sequence of the pages
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以有效方式调度磁盘请求的逻辑应该在磁盘本身的域中考虑!优化从磁盘扇区读取数据的顺序不太可能是可移植的或高效的。
但是,如果您有一个
npages * PAGE_SIZE
的文件,则在为您自己的磁盘内部读取提供服务时,您可以尝试提高应用程序性能。给定:您可以在内部按
page
对请求进行排序(并且可以选择合并相邻页面):The logic for scheduling disk requests in an efficient fashion should be considered in the domain of the disk itself! Optimizing the order you read data from disk sectors is not likely to be portable or efficient.
However, if you have a file of
npages * PAGE_SIZE
, you could attempt to improve your applications performance when servicing your own internal reads from disk. Given:You could internally sort the requests by
page
(and optionally coalesce neighbor pages):