Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Notes and Style must be written in C The prof has provided a working demo on d21 (sample Programs zip, myshell). try running on FCS

image text in transcribed

image text in transcribed

image text in transcribed

Notes and Style must be written in C The prof has provided a working demo on d21 (sample Programs zip, myshell). try running on FCS linux machines/vm image your assignment code must be handed in electronically using the D2L drop box. Try early and re-submit later. Include a Makefile. If "make" doesn't compile and produce an executable, your assignment will not be marked Your program must run. Programs that do not run, or segfault before working at all, will not be marked. Save early and often, and use version control. Submit often, only submit working versions. Your program must compile with Wall, with no warnings showing. You will lose marks for warnings. Include a "listing" file: a single .txt file with all your source files concatenated into it. Good header text in EACH file is imperative here. (e.g., cat *.h*.c > listing.txt) Confusion over D2L at the last minute is your own fault. Use common-sense commenting. Provide function headers, comment regions, etc. No particular format or style is required. Error checking is extremely important in real world OS work, and you must do it rigorously. Error handing, however, is hard in C. Try to handle gracefully when you can, but for hard errors (out of memory, etc.), hard fail (exit) is OK. Your assignment will be tested on FCS linux machines/images myShell - create a Linux shell to interact with the Kernel You will create a new shell (like bash) that uses system calls to enable the user to interact with the kernel to start programs, pause / continue them, catch signals, and to pipe data between programs. Synopsis: Your shell will Implement simple job control. Catch the SIGTSTP signal (generated by ctrl+z in most terminals). If there currently is no program running, tell the user that there is no job to suspend. Remember to re-subscribe to the signal after you catch it! If you had a program running, it would have caught the signal and paused. Tell the user that the job is suspended. Your shell should be back alive now. Internal commands should still work. If the user tries an external command, tell them they can only have one job at a time (it's not hard to enable multiple jobs, but it's busy work, and you learn little..) Implement internal commands . fg (foreground) brings the job back to life and pauses your shell, by sending SIGCONT to all children processes (can be multiple, e.g., with pipes), and waiting again on the children. bg (background) brings the job back to life, by sending SIGCONT, but your shell does not pause now. You will notice interleaved output on screen For testing, run the sample count program, which slowly counts to 30. Try pausing and resuming (fg and bg) to see it work properly. Notes and Style must be written in C The prof has provided a working demo on d21 (sample Programs zip, myshell). try running on FCS linux machines/vm image your assignment code must be handed in electronically using the D2L drop box. Try early and re-submit later. Include a Makefile. If "make" doesn't compile and produce an executable, your assignment will not be marked Your program must run. Programs that do not run, or segfault before working at all, will not be marked. Save early and often, and use version control. Submit often, only submit working versions. Your program must compile with Wall, with no warnings showing. You will lose marks for warnings. Include a "listing" file: a single .txt file with all your source files concatenated into it. Good header text in EACH file is imperative here. (e.g., cat *.h*.c > listing.txt) Confusion over D2L at the last minute is your own fault. Use common-sense commenting. Provide function headers, comment regions, etc. No particular format or style is required. Error checking is extremely important in real world OS work, and you must do it rigorously. Error handing, however, is hard in C. Try to handle gracefully when you can, but for hard errors (out of memory, etc.), hard fail (exit) is OK. Your assignment will be tested on FCS linux machines/images myShell - create a Linux shell to interact with the Kernel You will create a new shell (like bash) that uses system calls to enable the user to interact with the kernel to start programs, pause / continue them, catch signals, and to pipe data between programs. Synopsis: Your shell will Implement simple job control. Catch the SIGTSTP signal (generated by ctrl+z in most terminals). If there currently is no program running, tell the user that there is no job to suspend. Remember to re-subscribe to the signal after you catch it! If you had a program running, it would have caught the signal and paused. Tell the user that the job is suspended. Your shell should be back alive now. Internal commands should still work. If the user tries an external command, tell them they can only have one job at a time (it's not hard to enable multiple jobs, but it's busy work, and you learn little..) Implement internal commands . fg (foreground) brings the job back to life and pauses your shell, by sending SIGCONT to all children processes (can be multiple, e.g., with pipes), and waiting again on the children. bg (background) brings the job back to life, by sending SIGCONT, but your shell does not pause now. You will notice interleaved output on screen For testing, run the sample count program, which slowly counts to 30. Try pausing and resuming (fg and bg) to see it work properly

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Write down the circumstances in which you led.

Answered: 1 week ago