Unit One CSCI423 Introduction to Operating Systems Tobin Maginnis Updated: 23-Sep-07 Proprietary Software versus Public Knowledge Software 1)Contrast, and give examples of, open source software, free software, and Free open source software (FOSS). a)Many times these terms are used interchangeably, but proprietary software vendors use these terms to given the impression their software is FOSS-like. b)Just because the source code can be viewed does not mean that it can be redistributed. Microsoft lets some customers see the source code to Windows and they call it "open source," but the customer must also sign a non-disclosure agreement (NDA) stating that they will not share their new knowledge with others. HP provides "Open VMS" with license agreement that also restricts the software use. c)Just because the software is free does not mean other restrictions on its use do not exist. Internet Explorer and Netscape are free, but you are not allowed to see the source code. d)Thus, the term FOSS specifies the complete software requirement with a capital F for Freedom plus the idea of open source. http://opensource.org/ http://www.microsoft.com/opensource/default.mspx http://h71000.www7.hp.com/ http://en.wikipedia.org/wiki/OpenVMS http://en.wikipedia.org/wiki/Netscape_(web_browser) 2)Define GNU, GPL, and FSF and explain their roles in FOSS. http://www.gnu.org/ http://www.fsf.org/ 3)Contrast the basic FOSS license types: MIT, BSD, Apache, and GPL. And explain how the GPL stands out among the 50 plus FOSS licenses. http://opensource.org/licenses/ http://www.gnu.org/philosophy/free-sw.html FOSS licenses use copyright law to prevent software from being appropriated by private concerns. By definition, FOSS licenses authorized redistribution of the source and binary code. FOSS licenses can be placed in four broad categories: a)MIT License: The MIT license (sometimes referred to as a public domain license) has no restrictions on software usage. Even though you do not own the copyright, you can hide the code inside your own program and sell it as proprietary software. The X-Window System uses the MIT license and vendors sell the X Window System. b)BSD License: Same as MIT except a closed team of developers allow free use and redistribution of the licensed code. Users can modify the code, but the development team does NOT typically take "check-ins" from the public. c)Apache License: Same as BSD, but accepts code check-ins from external parties. d)GPL (General Public License): The GPL (sometimes referred to as copyleft software) takes the open source licenses one critical step farther. Whereas MIT, BSD, and Apache style licenses permit users apply their own license terms to their modified code, the GPL requires that all derivative works, in turn, must also be GPL code. You may modify GPL code and you may copyright your new sections of code, but your modifications must be distributed under the GPL. You may sell the code, but the recipient has the right to sell or give the code to others. (Based on the sourceforge repository, approximately 70% of FOSS is GPL'd.) http://www.gnu.org/philosophy/free-sw.html http://www.gnu.org/licenses/gpl.html 4)Describe the "distribution" concept in the GPL. a)The GPL allows code to be modified and kept in-house (not-distributed) without having to declare the modified code as GPL'd. Simply owning modified GPL'd code does not give anyone the right to request your modifications. Thus a company (an organization) may insert trade secret software into GPL'd code and use the software without distributing it. b)In 2007, a third version of the GPL was released which redefined "distribution" to be "propagate" and "convey." GPL V3 states: "To propagate a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law... Propagation includes copying, distribution (with or without modification), making available to the public... To convey a work means any kind of propagation that enables other parties to make or receive copies." c)Unfortunately, the distribution concept remains open to interpretation. For example, what are the exact boundary lines of a university, company, or the federal or state governments? 5)Explain the rationale of FOSS critics that say the GPL is virus-like and explain the confusion in their thinking. GPL critics say that if you insert a small amount of GPL code into a large proprietary program, then the whole system must be GPL'd. For example, let's say that Microsoft were to include the GNU compiler in service pack three for Windows XP, then the critics argue that Microsoft must GPL Windows. This is false because the GPL only refers to the program itself and not to the supporting environment. For the GPL to require that non-GPL code be converted to GPL'd code, it must be compiled into one program. Critics are also confused about why one would insert a GPL'd code fragment into a large program. It would only be done if the program owner wanted to GPL the whole program, otherwise the programmer would simply create their own version of the code fragment. 6)Summarize the SCO versus Linux GPL legal debate. SCO claims that its copyright Unix code (acquired from Novell who got it from AT&T) is found throughout Linux (millions of lines of appropriated code are claimed). Thus, SCO is asking that each Linux user purchase a SCO Source software license from them for $699 if users want to continue to use Linux. SCO sued IBM, Red Hat, Daimler Chrysler, and Autozone. Since filing its lawsuit in 2003, the discovery phase completed in July 2006. There have been five key turn of events over the last four years: a)The University of California released a previously private settlement agreement between it and AT&T regarding a Unix copyright lawsuit that AT&T brought against BSD. The agreement says that AT&T (or its successors) will NOT file legal action against another version of UNIX. http://www.groklaw.net/article.php?story=20050731195508518 b)A SCO email was made public which outlines SCO's legal strategy, provides a summary of background research, and concludes there is, in fact, no AT&T, Novell, or SCO Unix code in Linux! http://www.groklaw.net/article.php?story=20050731121601277 c)Novell sued SCO claiming it owns the Unix copyrights from AT&T, not SCO. http://www.groklaw.net/article.php?story=20050714144923365 d)Without being able to provide evidence of copyright infringement, Judge Wells dismissed many of the SCO claims against IBM in July 2006. e)In August of 2007 in another lawsuit, SCO vs Novell, Judge Dale Kimball ruled that Novell held the copyright to UNIX not SCO. 7)Explain how IBM has used the GPL to force a liability judgment against SCO. a)IBM has contributed copyright code to Linux. b)SCO claims it owns the copyrights and asks Linux users for $699. c)The GPL says that once the software has been distributed, you cannot control its use through license fees, etc. d)SCO has continued to distribute Linux from its Web site with the GPL terms intact. e)Ipso Facto, SCO is violating IBM's GPL'd copyright. IBM's Memo in Support of PSJ on 8th Counterclaim for Copyright Infringement http://www.groklaw.net/article.php?story=20040820115307246 SCO's Memo in Opposition to IBM's Motion for PSJ on 8th CC for Copyright Infringement http://www.groklaw.net/article.php?story=20041202145056715 Omit)Explain the Linux versus GNU/Linux debate and support or refute the idea that Richard Stallman has the right to change the name of Linux to GNU/Linux. http://news.zdnet.co.uk/software/linuxunix/0,39020390,39215183,00.htm 9)Describe the recent legal agreements among Microsoft and various vendors including Novell, Linspire, Xandros, TurboLinux, Fuji Xerox, and Samsung with regard to FOSS. a)Microsoft claims to own unspecified rights to the intellectual property contained within FOSS, especially Linux. b)This ownership is documented through un-named software patents held by Microsoft. c)The Agreement indemnifies (protects) the vendors from Microsoft initiated patent lawsuits. d)Since the 11/02/06 Novell Agreement, Microsoft's CEO, Steve Ballmer, has announced that he would like to begin discussions with other Linux distributors about reaching a mutual patent coverage agreement. http://blog.seattlepi.nwsource.com/microsoft/archives/108489.asp http://blog.seattlepi.nwsource.com/microsoft/archives/108806.asp http://www.linux-watch.com/news/NS6121484436.html http://www.xandros.com/news/press_releases/xandros_microsoft_collaborate.html http://www.microsoft.com/Presspass/press/2007/mar07/03-21FujiXeroxPR.mspx (backup copies: http://pix.cs.olemiss.edu/csci423/microsoftLinuxPatents) http://www.microsoft.com/Presspass/press/2007/oct07/10-22MSTurbolinuxrdPR.mspx http://www.groklaw.net/article.php?story=20061102175508403 http://www.groklaw.net/article.php?story=20061103073628401 http://www.groklaw.net/article.php?story=20061103201234813 10)Explain the rationale behind the Microsoft patent agreements and the reaction of the computer industry in general. a)Internal Microsoft memos were released (leaked) in 1998 that painted a vision of FOSS public knowledge as a "business competitor" and laid out an attack plan on FOSS. b)One key element in the plan was labeled "embrace and extend" where Microsoft would adopt others' work (commodities), but also extend the protocol, semantics, etc. so that the product would be unique to Microsoft (Java, C#, etc.). c)Since 1998, Microsoft has applied for thousands of obvious and trivial software patents (~7,000 to date). Microsoft patent applications included the "double click," the TCP and IP, as well as virtually every open source Internet-based utility. d)Many in the computer industry have predicted this patent move by Microsoft. To counter this move Sun, IBM, Red Hat, Computer Associates, and others, began the Patent Commons Project and the Open Invention Network in 2005. There goal is to indemnify (protect) their customers from any FOSS-related patent lawsuits filed by Microsoft. e)In addition, there is now an Open-Source-Software-as-Prior-Art Initiative which is working with patent office examiners to assist in the documentation of prior software art. Any documented prior art trumps a pending or approved patent. g)In May 2007 the US Supreme Court ruled that obvious patents can overturned and subsequently courts are now finding in favor of the "infringers." http://www.patent-commons.org/ http://www.openinventionnetwork.com/ http://osapa.org/index.html Ballmer on Novell, Linux and patents http://blog.seattlepi.nwsource.com/microsoft/archives/108806.asp Novell Speaks http://www.groklaw.net/article.php?story=20061120203431766 Microsoft Takes On The Free World http://money.cnn.com/magazines/fortune/fortune_archive/2007/05/28/100033867/ Ooh, Ooh, The Bogeyman Is Gonna Getcha With His Stupid Patents http://www.groklaw.net/article.php?story=20070513234519615 Moglen: SUSE Vouchers Have No Expiration Date! (Unlike MS's Patent Bullying) http://www.groklaw.net/article.php?story=20070518124020691 Two Major Patent Rulings from the US Supreme Court http://www.groklaw.net/article.php?story=20070430121005424 Google Becomes OIN's First End User Licensee "To Help Linux Thrive" http://www.groklaw.net/article.php?story=20070807015043108 11)It's generally thought that Microsoft, via third party proxies, is using SCO and others to cast Fear, Uncertainty, and Doubt (FUD) onto Linux. At the moment, for example, Microsoft is telling it's customers that there are many patent violations in Linux. Explain why, in the long run, these tactics will not be able to stop Linux in particular and FOSS in general. a)FOSS will always be useful to groups of users for economic reasons or for a need-to-control-the-software reasons. b)FOSS uses the same public knowledge model that other professions use where knowledge is public and the professional charges for services. Examples include attorneys, physicians, engineers, architects, etc. c)Only three basic items can be sold in the computer industry: hardware, software, or service. IBM is the most adaptive company in the industry and it relies on hardware and service for its revenue. Microsoft, on the other hand relies only on software. d)FOSS flips the software business model from selling relatively few copies of the software to selling world-wide software support, training, and custom software development services. Microsoft funding connection surfaced between Baystar & SCO http://www.groklaw.net/article.php?story=20061009152706664#c489560 Microsoft's Ballmer Reportedly Threatens Red Hat http://www.groklaw.net/article.php?story=20071008205138925 Patent Infringement Lawsuit Filed Against Red Hat & Novell - Just Like Ballmer Predicted http://www.groklaw.net/article.php?story=20071011205044141 BayStar & Acacia, and A Ruling on Digital Evidence, & Today's YouTube: Xerox's Alto http://www.groklaw.net/article.php?story=20071020193753215 12)Explain why we have to spend time discussing patents and legal actions in an operating systems course. Microsoft, SCO, and others have used their wealth to manipulate the patent and legal systems to further enrich themselves by gathering up public knowledge and declaring ownership. Might makes right. 13)Have yet to formulate the question, but here is the answer... a)Microsoft cannot declare itself exempt from the requirements of GPLv3. b)Microsoft cannot by any act of anticipatory repudiation divest itself of its obligation to respect others' copyrights. c)If Microsoft distributes GPLv3 works, or pays others to distribute them on its behalf, it is bound to do so under the terms of that license. d)Microsoft has said that it expects respect for its so-called "intellectual property," which is a propaganda term designed to mash up and obfuscate patent law, copyright law, as well as other unrelated laws. Meanwhile, Microsoft shows no respect for the GPL copyrights. http://www.eweek.com/article2/0,1895,2155119,00.asp http://www.groklaw.net/article.php?story=20070828105447144 Linux/Unix Concepts 1)Describe the concept of a Unix environment and the bash "env" command. a)The environment contains names for strings of characters in capital letters followed by an equal sign and the literal string (e.g., OSTYPE=linux). The environment is located in the program's stack area. b)By convention, utilities and applications search the environment for string names that will initialize or configure the program. c)When a new process is created, it inherits a duplicate of the parent environment. e)Example names are: PRINTER indicates the default printer name HOME indicates a user's home directory in the file system. TERM specifies the type of computer terminal. MAIL indicates the incoming user's mail directory. f)Shell scripts and batch files use environment variables to store temporary values for later reference, and also to communicate data and preferences to child processes. g)The basic environment variables are normally initialized during system startup by the "init" program and inherited by all other processes in the system. 2)Define the concept of "path" and explain the "PATH" shell variable. Bash shell format to add current directory: PATH=$PATH:. Omit)Contrast vi's concept of "insert" versus "command" modes. Omit)Describe how to use gcc to create an assembly language versus object versus executable program. 5)Contrast the commands "gcc file.c," "gcc file.s," "gcc -c -o file.o file.s," "gcc -S file.c -o file.s," and "as -a file.s > file.lst" 6)Contrast the role of "ld" versus "collect2" (or static versus shared libraries) in terms of foot print and image contents. See "ldd" a)Both programs are forms of a linking editor which combines relocatable object modules and run-time environment modules to make an executable program (a.out). b)The ld (static loader) utility gathers library modules and mergers them with the application to build the executable program. c)The collect2 (dynamic loader) utility mergers a second utility, ld-linux, which waits until the application requests a library module at run-time. The ld-linux utility then checks to see if the library module is already present in memory and, if so, jumps to the module. If it is not in memory, then ld-linux loads the library module in a separate. 7)Describe the design tradeoff of using a static versus dynamic linking editors. a)A static loader merges the library routines directly with the main application program and wastes memory space since library routines are duplicated for each compiled program, but, the programs are also "stand alone" and tend to be immune to corruption. b)A dynamic loader only saves the name of the library routine and checks to see if it is available at run-time which eliminates duplication in memory. But if, for some reason, the library or directory is not accessible, then the program will fail, in fact, all compiled shared library programs will fail to execute. c)Dynamic libraries are also vulnerable to "root kit" take overs. If a malicious program is installed on the system, and it replaces the shared libraries with its own version, then it can access all resources on the system. Omit)Explain the role of the objdump utility. C Language Background http://www.lemis.com/grog/Documentation/Lions/book.pdf Omit)Define "function" and give an example. Omit)Contrast 10, 010, and 0x10. 3)Contrast "int" and "char" and explain the effect of using "short," "long," and "unsigned." 4)Contrast the protected mode LP64, ILP64, ILP32, and Microsoft's LLP64 data models. a)Neither C nor C++ define the length of a pointer, int, or long to be a specific number of bits. But in most programming environments on 32-bit machines pointers, int, and long variables are all 32-bits. b)Many 64-bit compilers, including gcc, use a LP64 data model where int variables are remain 32-bits, but longs and pointers are 64-bits. c)Other C compilers use the ILP64 data model where all three data types are 64-bits. d)The Microsoft LLP64 data model, maintains compatibility with 32-bit code by leaving both int and long as 32-bit. The "LL" in LLP64 refers to the 64-bit "long long" type which is defined by the C99 standard. http://en.wikipedia.org/wiki/ILP64 5)Explain the significance of: "long flag_pole; int i; flag_pole = i; flag_pole = (long) i;". 6)Explain why the char data type is always promoted to int internally, and define "sign extension." List the four steps in: "i = c & 0377;". 7)Contrast "int a[10];" "struct mydata {int i; char c;}" and "union u {int i; char c;} u;". 8)Contrast "int i, *pi, a[10], *b[10], **pi;". 9)Explain "struct table *p;" and "p = &z[4];". 10)Contrast "n = p->i;" and "n = z[4].i;". Omit)Describe the four steps in: "for (i = 0; i are examples of pre-processor directives that indicate source files are to be merged with the program before compilation takes place. The "" sub-directive means use the current working directory to locate the file where the <> sub-directive means use the /usr/include directory to locate the file. b)Macro definition: #define CONSTANT 12345 is an example of a pre- processor directive to replace the string CONSTANT with the string 12345 throughout the source program before compilation takes place. c)Macro expansion: #define RADTODEG(x) ((x) * 57.29578) macro converts radians to degrees with the statement RADTODEG(34); The macro is expanded in-place so that there is only one location in the source file where the multiplication constant is defined. d)Macros are written in uppercase by convention to emphasize that it is a constant defined elsewhere and not a true function call. e)Conditional compilation: #define OSX #ifdef OSX #include #else #include #endif The #ifdef directive tests if OSX is defined. If so, the file is merged, otherwise is merged with the source file. http://en.wikipedia.org/wiki/C_preprocessor Omit)Describe two ways of defining "conditional" compilation. 18)Describe the five steps in; "while (n--) *p++ = *q++;" 19)Contrast "for(i=0; i