Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I started learning UNIX/LINUX and need some clarity at Multi-Users Process. How multiple users can access at the same time..?
Do they have only one CPU or Common Server or any other thing..?
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
Quote:
Originally Posted by Happy.Arava
I started learning UNIX/LINUX and need some clarity at Multi-Users Process. How multiple users can access at the same time..?
Do they have only one CPU or Common Server or any other thing..?
Hi Happy.Arava - welcome to LQ.
I'm not sure how to answer your question. Firstly, many operating systems are multi-user, so an understanding of how that works is mostly unrelated to linux/UNIX. You would be advised to start by reading up on operating system technology in general.
Essentially, the multiple user sessions are "sandboxed" (separated and protected from each other) while sharing the host machine's physical resources (disk, cpu, memory). That's a simplistic way of explaining it, but is the jist of it.
Perhaps others will chime in with more enlightening explanations, but I would still encourage you to read up on computer technology and operating systems in general.
Cheers - please feel free to return with any linux-related questions.
UNIX started as a mainframe system. From the very start, UNIX standards, on which Linux is based, envisioned multiple users of the same computer/OS. Note: Linux is based on UNIX standards, which were public, not on UNIX code, which was proprietary.
There are many ways this can be done.
Not common to dedicate hardware such as one cpu per user. The software takes requests for action by inputs and outputs back to one or more users. You could dedicate hard drives to users or even as you say cpu's in a round about way.
The origins go back quite far on other OS's. One of the ones I studied a long time ago was CICS where for example many airline reservation desks could access ticket sales. The tricky part is how they handle concurrent transactions. So even way back in the 60's or so airline terminals would be part of a massive world wide transactor. They were all multi user.
Do you mean multiple processes for just one user or multiple processes for multiple users?
There isn't much difference, except that for multiple users you have to schedule things so that each user gets to use the processor reasonably equitably.
Hi Happy.Arava and welcome!
I suggest you read https://www.linuxquestions.org/linux...Ask_a_Question, especially the section "Your Thread Title"
Indeed, it's important to phrase the most specific thread title you can in order to get as many accurate answers as possible. You might not attract attention on your post with a too vague title, and even if you can (by chance so) it's very difficult/longer for other members to search your thread if they have a similar question.
In the case of pulseaudio, sharing is done by treating data like a client / server network. For the local machine the interface is lo aka localhost aka 127.0.0.1. Although by default it does NOT share (in debian), you have to change the configuration, otherwise the soundcard is locked by the user who started pulseaudio. Without pulseaudio, alsa shares across multiple users by default with it's built in dmix ability. Long long ago that didn't exist and it didn't share, but alsa wasn't even part of a standard kernel in those days.
It's not a problem. Each program is run by a separate process. Each process has a user. Some processes have the same user. The kernel creates processes on demand and tidies up after them when they exit.
Processes queue up for the attention of the cpu(s). A cpu doesn't care which user a process belongs to. It services the queue, mostly on a "first come first served" basis (although that can be overridden). Processes that make a request to access hardware (which is a slow business) get kicked out of core and put at the end of the queue until the kernel has carried out the access for them and returned the result. Then they work their way back up. They can also be kicked to the back of the queue when they have exceeded their current cpu time.
Folks, I feel that l0f4r0 has hit it pretty well. Especially for someone who entered the LQ forums a month ago.
It is an incomplete question, a bad thread title. Continued conjecture on everyone's part as to the details of the question should probably wait until Happy.Arava decides to offer the forum an update.
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,676
Rep:
Hi Happy.Arave, welcome to LinuxQuestions!
Quote:
How multiple users can access at the same time..?
As I understand it multiple users can use separate iterations of the same application. If they are accessing the same file, say a common database, only one user will be allowed to change/update it at a time via the process scheduler, others being locked out till their access slot comes round. (I'm now waiting for a DBA (Data Base Analyst) to correct me! )
Quote:
Do they have only one CPU or Common Server or any other thing..?
No. If the system has only one processor then there's usually a round-Robin time slice procedure where processes are allowed to run for a specified time. Processes are allocated a priority (which can change). Users are assigned into groups which again, have a priority assigned, which will affect the running of their applications and time allocated.
Multiple processors? There's usually another level of system administration which, in some cases, sits below the operating system where processors or fractions of processors can be allocated, along with memory, storage and peripheral access can be assigned (I'm thinking IBM P series systems here back about ten years ago, goodness knows what's out there now!) The OS process scheduler is over and above this further complication.
The Linux kernel has been able to handle multiple processors (SMP) or cores for quite a while and did so before Windows did. Providing the application has been written to use them, it will.
So that's my worth Happy.Arava. The answer to your seemingly simple question is it's a lot more complicated than it may outwardly seem and the Operating System is only one part of the answer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.