Unformatted text preview:

OverviewSpecification4 Parsing User InputThe Other PiecesOther ObjectivesSpecificationInternal Commands vs. External ProgramsForeground vs. Background JobsCommand linesSpecial KeystrokesParsing User Input – Overview, Delimiters and Special CharactersParsing User Input – Internal CommandsParing User Input – I/O RedirectionParsing User Input – Pipes and Cooperating ProgramsParsing User Input – A GrammarA Suggested Plan Of AttackDeliverablesThe Project ReviewAfter you submit your project, a member of the staff will review it. He or she will test your code to determine its completeness and correctness. He or she will also examine your source code to understand how you designed and implemented your solution, as well as the reason for any failures during the testing.MatchmakingSystem Calls15-412: Project # 1Systems Programming Practice: The Yalnix ShellOverview1 Times of Interest 1 Educational Objectives 1 Other Objectives 2 Project Overview Specification2 Form 2 Look-and-feel 3 Internal Commands vs. External Commands3 Foreground vs. Background Jobs3 Command lines 4 Internal Commands 4 Special Keystrokes 4 Parsing User Input4 Overview, Delimiters and Special Characters 5 Internal Commands 5 Executing A Single Program5 I/O Redirection5 Pipes and Cooperating Processes6 Background Jobs6 A GrammarThe Other Pieces7 A Suggested Plan of Attack7 Deliverables8 The Project Review8 Matchmaking8 EnvironmentSome Useful Information (Some of which is a review) 9 System Calls 10 Process Creation12 Fork Example Code12 What If I Don’t Want a Clone?12 I/O Redirection13 I/O Redirection Example 14 Signals14 Signal Example Code15 Pipes 16 Pipe Example Code 18 Process Groups, Sessions, and Job Control 20 Tcsetgrp() and setpgrp() example015-412: Project # 1Systems Programming Practice: The Yalnix ShellTimes of Interest:- Class on Wednesday, August 29, 2001 – Assignment distributed - 11:59PM, Wednesday, September 5, 2001 – Group registration deadline (Checkpoint)- 11:59PM, Tuesday, September 11, 2001 – Assignment submission deadlinePlease note: While the decision is entirely yours, the group registration deadline is probably not a wise use of an extension – please register your group before the deadline. Educational Objectives:Students come to 15-412 with various experiences. For many people this project will be practice and/or a warm-up. For others, it will be a learning exercise. Regardless of your background, by the end of this project, we hope that you will comfortably and confidently be able to do the following:- Develop clear, readable, well-documented and well-designed programs in the C Programming Language.- Develop software in the Andrew/Solaris using tools such as gcc, gdb, and make.- Locate and interpreting “man pages” applicable to application-level system programming. - Use the POSIX/Solaris API to system functions to manage process and sessions as well as use signals and pipes for inter-process communication. - Understanding how synchronization might become problematic in light of concurrency. - Understand how to communicate and cooperate with a project partner.Other ObjectivesWe also hope that the following will occur during the course of this project:- Students will become active participants in the course’s support system including zephyr, bboards, staff-412@cs mailing list, Q&A archive, Web-based resources, office hours, &c. - Any potential difficulties with user accounts, registration scripts, project submission, scheduling project reviews, &c will be corrected. 1Project OverviewIn this project you are asked to implement a simple command-interpreter, a.k.a. “shell,” for Solaris. The shell that you will implement, known as ysh, should be similar to popular shells such as bash, csh, tcsh, zsh, &c, but it is not required to implement as many features as these commercial-grade products. Although we don’t require all of the “bells and whistles” that are incorporated into commercial-grade products, ysh should have much of the important functionality:- Allow the user to execute one or more programs, from executable files on the file-system,as background or foreground jobs.- Provide job-control, including a job list and tools for changing the foreground/background status of currently running jobs and job suspension/continuation/termination.- Allow for the piping of several tasks as well as input and output redirection. With respect to the other programming assignments this semester, and many others in your experience, this is likely to be a small project, but we want you to approach it as if it is a bigger and more complex project so that you are prepared for the remaining projects. Specifically, we’d like you to do the following:- Use the make utility to build your project - Use a debugger instead of print-and-hunt debugging whenever practical. - Produce clean, well-documented, and well-designed solutions. SpecificationFormYour solution should be an application program invoked without command-line parameters or configuration files, &c. If you want to be fancy and support for a resource file similar to those used with commercial-grade shells, e.g. .cshrc, you’re a welcome to do this. But, like csh, your shell should function correctly in absence of this file. Look-and-FeelThe look and feel of ysh should be similar to that of other UNIX shells, such as bash, tcsh, csh, &c. For example, your shell’s work loop should produce a prompt, e.g., ysh>, accept input from the user, and then produce another prompt. Messages should be writtento the screen as necessary, and the prompt should be delayed when user input shouldn’t be accepted, as necessary. Needless to say, your shell should take appropriate action in response to the user’s input. 2Internal Commands vs. External ProgramsIn most cases, the user’s input will be a command to execute programs stored within a file system. We’ll call these external programs. Your shell should allow these programs to execute with stdin and/or stdout reassigned to a file. It should allow programs I/O to bechained together using pipes. For our purposes, a collection of piped processes or a singleprocess executed by itself from the command line is called a job. When executing backgrounds jobs, the shell should not wait for the job to finish before prompting, reading, and processing the next command. When a background job finally terminates a message to that effect must be printed, by the shell, to the terminal. This


View Full Document

FSU CTE 3431 - Project

Download Project
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Project and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Project 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?