The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help me to answer this lo-lp-kl Shell Programming and Scripting 0 05-25-2008 10:45 PM
Answer them if u can... dreambig UNIX for Dummies Questions & Answers 5 12-07-2007 11:14 AM
quick answer DarkestEvil UNIX for Dummies Questions & Answers 9 10-30-2007 06:42 PM
Is sed the answer? LaLonde Shell Programming and Scripting 7 08-29-2007 07:45 PM
Can anybody answer this..... shivamasam SUN Solaris 3 07-06-2007 01:50 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-30-2006
mobile01 mobile01 is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 24
diffrence between terminal and pseudo-terminal

Q.1 Diffrence between terminal and pseudo-terminal ?

Q.2 What is terminal login ? What is a netwok Login ?

Q.3 What is meant by baud rate of a terminal ?

Q.4 which structure is used for job control in Unix/Linux ?and where these structure are means in which directory ?

Last edited by mobile01; 11-30-2006 at 11:37 AM..
  #2 (permalink)  
Old 11-30-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
All questions are homework. Our rules clearly state that no homework questions are allowed.
  #3 (permalink)  
Old 11-30-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
I am not sure that these are homework questions. Assigning homework involving real terminals seems unlikely today because real terminals are disappearing fast. On the other hand, all of mobile01's posts seem to relate to writing a shell. This does sound like a large project for some class and I becoming concerned that all of his or her posts represent a rule violation. But these particular questions sound like it came from some older info. Real terminals are very old devices and it is not easy to find info about them, so I will post a few answers. But I will leave the thread closed.

Q1. A terminal is a device that can display characters to a user and almost always has a keyboard which the user can use to input characters. On this page is a photo of a VT-320 which is a member of DEC's VT-100 family. Not all terminals use a CRT. Some terminal use a printer to print the characters. This page shows an ASR-33 which is the first terminal that I ever used. A terminal can be directly connected to an RS-232 port on a computer and you can use it to login. Many computers expect such a connection to be used for a system console. Terminals are starting to be a rare device. They cost almost as much as a low end PC. So most people will buy a low end PC and use hyper-terminal or some other terminal emulator.

But let's say that you are using a terminal and you are logged in to a Unix system. The tty device driver is used to communicate to the terminal. The tty device driver can do stuff like turn the echoing of characters on and off. A program like passwd uses this to hide the password as it is typed. So the passwd program needs to be able to talk to a terminal device driver. But now you telnet to another system. How can you run passwd now since you are not connected to terminal? Well the telnetd program will allocate a psuedo-termiinal for you. The psuedo-terminal has a device driver that can do many of the things that a real terminal device driver can do. So the remote passwd program can still hide the password as it is typed.

Q2 A terminal login is accomplished via a real terminal using a serial port. A network login is accomplished via a network using a program like telnet. In the old days, Unix was licensed by user and the theory was that every user would have a terminal. The user's terminal would connect before the user could start doing anything. This first connection would be a terminal login and you count it toward the license. But then the user might telnet to another box. This would not be counted since the user already had consumed a per-user license on the first box. There is no way to enforce this type of licensing today since most people connect via a network from a desktop workstation.

Q3 The baud rate only applies to real terminals and it is the rate at which data travels between the computer and the terminal 9600 is a common baud rate for terminals and since 10 bits are needed for each character, this means 960 characters per second. You can set the baud rate on a psuedo-tty buy it has no effect.

Q4 I do not understand this question. But tty drivers (both real and psuedo) have some structures allocated to control the terminal and some of these are used for job control. The structure is allocated in kernal memory. You can do a command:
stty -a
to display this data. For a hint on how to access these structures via C see this thread.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0