Write a C/C++ program, vt, that will enable a user to simultaneously execute two interactive sessions. The

Question:

Write a C/C++ program, vt, that will enable a user to simultaneously execute two interactive sessions. The vt program should support the two sessions by “filtering” all keyboard input before passing it to the subject programs and keeping a virtual screen for each program to be written to the physical screen whenever the user is interacting with a particular program. You will have to implement a time multiplexed display of the virtual screens on the physical screen. Thus, the user will always have one or the other virtual screen visible at any given time, but never both. The visible screen represents the active program, and the invisible screen represents a dormant program. If the user types input, your keyboard routine should route the input to the active program. When the user types “ESCAPE” followed by “C,” your program should make the active program dormant and the dormant program active. This toggle should change the physical screen so that it shows the virtual screen for the newly activated program. You also will need the sequence “ESCAPE followed by Q” to terminate your program. You may assume that you do not have to pass “ESCAPE sequence” to any shell. When vt starts executing, run a shell on each virtual terminal. If you have solved Lab Exercise 2.1, the shell from that program will be easier to use than production-level shells such as sh.  

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Operating Systems

ISBN: 978-0201773446

3rd edition

Authors: Gary Nutt

Question Posted: