操作系统编程:SR编程语言[书评]

G. Lippman
{"title":"操作系统编程:SR编程语言[书评]","authors":"G. Lippman","doi":"10.1109/M-PDT.1996.532145","DOIUrl":null,"url":null,"abstract":"Operating Systems Programming is a selfcontained guide to classic operating system problems, concurrent programming, and the Synchronizing Resources language. SR, based on C and Pascal, is very understandable to readers with programming knowledge. So, I recommend this book to students studying operating systems and to programmers interested in learning concurrent programming and studying these problems and their solutions in a readily accessible working language. (SR, developed a t the University of Arizona, is fully described in The SR Language, C o m ~ remy in Practice, by Gregory R. Andrews and Ronald A. Olsson [BenjamidCmmings]. For more information on SR, access http:// www.cs.arizona.edu/sr. The compiler and utilities, available by anonymous ftp at ftp:// ftp.cs.arizona.edu/sr, are readily installed on computer systems running Unix, such as a networked Sun system, or on PCs running Linux. Linux is also available by anonymous ftp, at ftp://sunsite.unc.edu/pub/Linux, or on C D ROM. For more information on Linux, access http://www.linux.org.) Stephen Hartley has skillfully woven together a description of the SR language and SR solutions of several classic OS problems, with emphasis on the mutual exclusion of concurrent processes, race conditions, critical sections, process synchronization, interprocess communication, and parallel computing. These solutions use semaphores, monitors, and message-passing techniques on singleand multiple-CPU computer systems. (The solutions are also available by anonymous ftp, to be compiled and run by the reader.) The book has seven chapters, followed by a list of the example programs and a bibliography. Each chapter contains descriptive information, SR programs for solving the OS problems, and laboratory exercises designed to extend these solutions. Chapter 1 reviews OS programming, hardware and software interrupts, hardware protection, and CPU scheduling. Chapter 2 presents SRs sequential features first, so that readers who have not previously written concurrent or parallel programs can see how closely SR resembles the languages they already know. Elementary programs for computing factorial, sorting, and string manipulation make the presentation very concrete. Hartley demonstrates how to use Unix command-line arguments in an SR program, and describes and uses the SR resource, which is effectively equivalent to the object or module in other languages. He then shows how to animate SR programs with the Xtango software system developed by John T. Stasko and Doug Hayes. Xtango has been implemented effcctively on Unixand Linux-based computers. (Xtango is available by anonymous ftp from Georgia Tech University at ftp.cc.gatech.edu/pub/people/stasko.) Chapter 3 introduces concurrent programming in which multiple processes manipulate shared data. T o preserve data integrity, solution of the critical section problem enforces mutual exclusion of the processes relative to this data. Hartley shows how several processes can be launched from a single SR resource or from multiple resources ninning on different virtual or actual CPUs. This chapter provides a concise SR solution to the bounded sharedbuffer producer-consumer problem. It takes the reader through beginning attempts to solve the two-process critical section problem before presenting both T. Dekker’s and Gary Peterson’s solutions, and a solution to the multipleconcurrent-process critical section problem. Chapter 4 introduces the SR implementation of the semaphore ori,ginally designed by Edsger Djikstra to solve the multiple-process critical section problem with the elimination of busy waiting. In SR, semaphores are fully implemented as objects, accessible with the traditional P and V operations. This implementation alleviates the need for Unix system calls in algorithms implementing semaphores. The chapter presents semaphore-based solutions to the producer-consumer, sleepy barber, and readers-writers problems. Hartley uses the binary seinaphort., which can be constructed from tcst-and-set or an equivalent uninterruptible assembly language instruction, to construct the general semaphore. He carefully presents this ccinstruction in four graduated examples, greatly facilitating understanding. ’This chapter also presents an Xtango animation of a solution to the dining philosophers problem. Chapter 5 describes the: monitor, an application of the class found in object-oriented languages. The SR monitor is a more structured tool for protecting shared data or shared hardware such as a disk drive or a printer. The chapter gives monitor-based SR solutions for several problems, including the dining philosophers problem and the balmy problem. Chapter 6 is a tour de hrce of applications of different forins of message passing in SR.","PeriodicalId":325213,"journal":{"name":"IEEE Parallel & Distributed Technology: Systems & Applications","volume":"23 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1996-01-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Operating systems programming: the SR programming language [Book Reviews]\",\"authors\":\"G. Lippman\",\"doi\":\"10.1109/M-PDT.1996.532145\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Operating Systems Programming is a selfcontained guide to classic operating system problems, concurrent programming, and the Synchronizing Resources language. SR, based on C and Pascal, is very understandable to readers with programming knowledge. So, I recommend this book to students studying operating systems and to programmers interested in learning concurrent programming and studying these problems and their solutions in a readily accessible working language. (SR, developed a t the University of Arizona, is fully described in The SR Language, C o m ~ remy in Practice, by Gregory R. Andrews and Ronald A. Olsson [BenjamidCmmings]. For more information on SR, access http:// www.cs.arizona.edu/sr. The compiler and utilities, available by anonymous ftp at ftp:// ftp.cs.arizona.edu/sr, are readily installed on computer systems running Unix, such as a networked Sun system, or on PCs running Linux. Linux is also available by anonymous ftp, at ftp://sunsite.unc.edu/pub/Linux, or on C D ROM. For more information on Linux, access http://www.linux.org.) Stephen Hartley has skillfully woven together a description of the SR language and SR solutions of several classic OS problems, with emphasis on the mutual exclusion of concurrent processes, race conditions, critical sections, process synchronization, interprocess communication, and parallel computing. These solutions use semaphores, monitors, and message-passing techniques on singleand multiple-CPU computer systems. (The solutions are also available by anonymous ftp, to be compiled and run by the reader.) The book has seven chapters, followed by a list of the example programs and a bibliography. Each chapter contains descriptive information, SR programs for solving the OS problems, and laboratory exercises designed to extend these solutions. Chapter 1 reviews OS programming, hardware and software interrupts, hardware protection, and CPU scheduling. Chapter 2 presents SRs sequential features first, so that readers who have not previously written concurrent or parallel programs can see how closely SR resembles the languages they already know. Elementary programs for computing factorial, sorting, and string manipulation make the presentation very concrete. Hartley demonstrates how to use Unix command-line arguments in an SR program, and describes and uses the SR resource, which is effectively equivalent to the object or module in other languages. He then shows how to animate SR programs with the Xtango software system developed by John T. Stasko and Doug Hayes. Xtango has been implemented effcctively on Unixand Linux-based computers. (Xtango is available by anonymous ftp from Georgia Tech University at ftp.cc.gatech.edu/pub/people/stasko.) Chapter 3 introduces concurrent programming in which multiple processes manipulate shared data. T o preserve data integrity, solution of the critical section problem enforces mutual exclusion of the processes relative to this data. Hartley shows how several processes can be launched from a single SR resource or from multiple resources ninning on different virtual or actual CPUs. This chapter provides a concise SR solution to the bounded sharedbuffer producer-consumer problem. It takes the reader through beginning attempts to solve the two-process critical section problem before presenting both T. Dekker’s and Gary Peterson’s solutions, and a solution to the multipleconcurrent-process critical section problem. Chapter 4 introduces the SR implementation of the semaphore ori,ginally designed by Edsger Djikstra to solve the multiple-process critical section problem with the elimination of busy waiting. In SR, semaphores are fully implemented as objects, accessible with the traditional P and V operations. This implementation alleviates the need for Unix system calls in algorithms implementing semaphores. The chapter presents semaphore-based solutions to the producer-consumer, sleepy barber, and readers-writers problems. Hartley uses the binary seinaphort., which can be constructed from tcst-and-set or an equivalent uninterruptible assembly language instruction, to construct the general semaphore. He carefully presents this ccinstruction in four graduated examples, greatly facilitating understanding. ’This chapter also presents an Xtango animation of a solution to the dining philosophers problem. Chapter 5 describes the: monitor, an application of the class found in object-oriented languages. The SR monitor is a more structured tool for protecting shared data or shared hardware such as a disk drive or a printer. The chapter gives monitor-based SR solutions for several problems, including the dining philosophers problem and the balmy problem. Chapter 6 is a tour de hrce of applications of different forins of message passing in SR.\",\"PeriodicalId\":325213,\"journal\":{\"name\":\"IEEE Parallel & Distributed Technology: Systems & Applications\",\"volume\":\"23 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1996-01-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"IEEE Parallel & Distributed Technology: Systems & Applications\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/M-PDT.1996.532145\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Parallel & Distributed Technology: Systems & Applications","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/M-PDT.1996.532145","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

《操作系统编程》是一本关于经典操作系统问题、并发编程和同步资源语言的完整指南。基于C和Pascal的SR,对于有编程知识的读者来说是非常容易理解的。因此,我向学习操作系统的学生和有兴趣学习并发编程的程序员推荐这本书,并以易于访问的工作语言研究这些问题及其解决方案。SR是由亚利桑那大学开发的,在Gregory R. Andrews和Ronald a . Olsson [BenjamidCmmings]所著的《SR语言,C - m - remy in Practice》中有详细描述。有关SR的更多信息,请访问http:// www.cs.arizona.edu/sr。编译器和实用程序可以通过匿名ftp在ftp:// ftp.cs.arizona.edu/sr上获得,可以很容易地安装在运行Unix的计算机系统上,例如联网的Sun系统,或者安装在运行Linux的个人电脑上。Linux也可以通过匿名ftp、ftp://sunsite.unc.edu/pub/Linux或cd ROM获取。更多Linux信息,请访问http://www.linux.org。)Stephen Hartley巧妙地将SR语言和几个经典操作系统问题的SR解决方案的描述结合在一起,重点是并发进程的互斥、竞争条件、临界区、进程同步、进程间通信和并行计算。这些解决方案在单cpu和多cpu计算机系统上使用信号量、监视器和消息传递技术。(解决方案也可以通过匿名ftp获得,由读者编译和运行。)本书有七章,后面是示例程序列表和参考书目。每章包含描述性信息、用于解决操作系统问题的SR程序,以及旨在扩展这些解决方案的实验室练习。第1章回顾了操作系统编程、硬件和软件中断、硬件保护和CPU调度。第2章首先介绍了SR的顺序特性,以便以前没有编写过并发或并行程序的读者可以看到SR与他们已经知道的语言有多么相似。用于计算阶乘、排序和字符串操作的基本程序使表示非常具体。Hartley演示了如何在SR程序中使用Unix命令行参数,并描述和使用SR资源,这实际上相当于其他语言中的对象或模块。然后,他展示了如何用约翰·t·斯塔斯科和道格·海耶斯开发的Xtango软件系统动画SR程序。Xtango已经在基于unix和linux的计算机上有效地实现了。(Xtango可以通过匿名ftp从佐治亚理工大学(Georgia Tech University)获得,网址为ftp.cc.gatech.edu/pub/people/stasko。)第3章介绍了并发编程,其中多个进程操作共享数据。为了保持数据的完整性,临界区问题的解决方案强制了与该数据相关的进程的互斥。Hartley展示了如何从单个SR资源启动多个进程,或者从运行在不同虚拟或实际cpu上的多个资源启动多个进程。本章提供了一个简洁的SR解决方案来解决有界共享缓冲区的生产者-消费者问题。在介绍T. Dekker和Gary Peterson的解决方案以及多并发进程临界部分问题的解决方案之前,读者将首先尝试解决双进程临界部分问题。第4章介绍了信号量ori的SR实现,该信号量ori最初是由Edsger Djikstra设计的,用于解决多进程临界段问题,消除了繁忙等待。在SR中,信号量完全实现为对象,可以通过传统的P和V操作访问。这种实现减轻了在实现信号量的算法中对Unix系统调用的需求。本章提出了基于信号量的解决方案,以解决生产者-消费者、昏昏欲睡的理发师和读者-作者的问题。哈特利使用二进制信号。,它可以由tst -and-set或等效的不可中断汇编语言指令构造,以构造通用信号量。他用四个分门别类的例子详细地阐述了这一原则,极大地促进了理解。这一章还展示了一个Xtango动画,解决了用餐哲学家的问题。第5章描述了:monitor,一个在面向对象语言中发现的类的应用。SR监视器是一种更结构化的工具,用于保护共享数据或共享硬件(如磁盘驱动器或打印机)。本章给出了几个问题的基于监视器的SR解决方案,包括用餐哲学家问题和芳香问题。第六章介绍了SR中不同形式的消息传递的应用。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Operating systems programming: the SR programming language [Book Reviews]
Operating Systems Programming is a selfcontained guide to classic operating system problems, concurrent programming, and the Synchronizing Resources language. SR, based on C and Pascal, is very understandable to readers with programming knowledge. So, I recommend this book to students studying operating systems and to programmers interested in learning concurrent programming and studying these problems and their solutions in a readily accessible working language. (SR, developed a t the University of Arizona, is fully described in The SR Language, C o m ~ remy in Practice, by Gregory R. Andrews and Ronald A. Olsson [BenjamidCmmings]. For more information on SR, access http:// www.cs.arizona.edu/sr. The compiler and utilities, available by anonymous ftp at ftp:// ftp.cs.arizona.edu/sr, are readily installed on computer systems running Unix, such as a networked Sun system, or on PCs running Linux. Linux is also available by anonymous ftp, at ftp://sunsite.unc.edu/pub/Linux, or on C D ROM. For more information on Linux, access http://www.linux.org.) Stephen Hartley has skillfully woven together a description of the SR language and SR solutions of several classic OS problems, with emphasis on the mutual exclusion of concurrent processes, race conditions, critical sections, process synchronization, interprocess communication, and parallel computing. These solutions use semaphores, monitors, and message-passing techniques on singleand multiple-CPU computer systems. (The solutions are also available by anonymous ftp, to be compiled and run by the reader.) The book has seven chapters, followed by a list of the example programs and a bibliography. Each chapter contains descriptive information, SR programs for solving the OS problems, and laboratory exercises designed to extend these solutions. Chapter 1 reviews OS programming, hardware and software interrupts, hardware protection, and CPU scheduling. Chapter 2 presents SRs sequential features first, so that readers who have not previously written concurrent or parallel programs can see how closely SR resembles the languages they already know. Elementary programs for computing factorial, sorting, and string manipulation make the presentation very concrete. Hartley demonstrates how to use Unix command-line arguments in an SR program, and describes and uses the SR resource, which is effectively equivalent to the object or module in other languages. He then shows how to animate SR programs with the Xtango software system developed by John T. Stasko and Doug Hayes. Xtango has been implemented effcctively on Unixand Linux-based computers. (Xtango is available by anonymous ftp from Georgia Tech University at ftp.cc.gatech.edu/pub/people/stasko.) Chapter 3 introduces concurrent programming in which multiple processes manipulate shared data. T o preserve data integrity, solution of the critical section problem enforces mutual exclusion of the processes relative to this data. Hartley shows how several processes can be launched from a single SR resource or from multiple resources ninning on different virtual or actual CPUs. This chapter provides a concise SR solution to the bounded sharedbuffer producer-consumer problem. It takes the reader through beginning attempts to solve the two-process critical section problem before presenting both T. Dekker’s and Gary Peterson’s solutions, and a solution to the multipleconcurrent-process critical section problem. Chapter 4 introduces the SR implementation of the semaphore ori,ginally designed by Edsger Djikstra to solve the multiple-process critical section problem with the elimination of busy waiting. In SR, semaphores are fully implemented as objects, accessible with the traditional P and V operations. This implementation alleviates the need for Unix system calls in algorithms implementing semaphores. The chapter presents semaphore-based solutions to the producer-consumer, sleepy barber, and readers-writers problems. Hartley uses the binary seinaphort., which can be constructed from tcst-and-set or an equivalent uninterruptible assembly language instruction, to construct the general semaphore. He carefully presents this ccinstruction in four graduated examples, greatly facilitating understanding. ’This chapter also presents an Xtango animation of a solution to the dining philosophers problem. Chapter 5 describes the: monitor, an application of the class found in object-oriented languages. The SR monitor is a more structured tool for protecting shared data or shared hardware such as a disk drive or a printer. The chapter gives monitor-based SR solutions for several problems, including the dining philosophers problem and the balmy problem. Chapter 6 is a tour de hrce of applications of different forins of message passing in SR.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信