Question on Vi Editor
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.
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.
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.
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.
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?