Thread: Question on Vi Editor

  1. #1
    Registered User
    Join Date
    Oct 2001

    Question on Vi Editor

    Hi !!,
    This is a basic question i hve regarding Vi. I had joined classes for Linux where the basic commands and stuff about Linux were taught.
    It was a set up where Linux (Red Hat Version 6.2) was installed on a server and the studentsl had to access it using telnet from other PCs.

    During one such session i found out that at any given instance, it is possible for all the dumb terminals ( thats what the other systems attached to the server are called but i dont know why)
    to access vi and do various taks like say writing a text file or a C program or write a shell script using Vi and save it .

    I wanted to know how is it possibe for 6 PCs to access the same application simultaniously, Is it that there are 6 copies of linux installed in the system or is it that 6 copies of Vi are generated on the fly, can more copies be generated in a similar manner depending upon how many PCs are connected or asking to access that application ?

    I had the same question about accessing a webpage. When there is only one webpage there on the server, what makes it possible for so many systems to access the page simultaniously? Is there any limit on how many webpages or- incase of the Vi question-How many copies of Vi can be accessed.

    I would be etremely thankful if anyone could answer this.

  2. #2
    Registered User
    Join Date
    Aug 2001
    Vi is duplicated in memory for each user. Webpages are served, not accessed. Only one program, the webserver, has is actually accessing the page, but it is copied and sent over the network for each request. If it were direct access to the harddrive, things like CGI and PHP would be impossible.
    All generalizations are false

  3. #3
    Join Date
    Aug 2001
    Basically, from what I've read, there's a difference between a task and a process. All the vi users are able to share the same code segment but of course the data has to be different.

  4. #4
    Registered User
    Join Date
    Dec 2001
    There is also a chance that vi makes a "swap file".

    When running vi check for filename~ on you hard drive.
    vi could be copying the file from the computer accessed to your hard drive. They usually disappear when vi closes.

  5. #5
    When you start up 'vi' or any other program, Linux copies it in to RAM.

    When you download a HTML page, you just download it.

    Ever heard of multi-tasking?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. Question...
    By TechWins in forum A Brief History of
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  3. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM
  4. Line Numbers in VI and/or Visual C++ :: C++
    By kuphryn in forum C++ Programming
    Replies: 2
    Last Post: 02-10-2002, 10:54 PM
  5. vi editor
    By westm2000 in forum C Programming
    Replies: 2
    Last Post: 10-07-2001, 05:07 AM