Section 1.5. Sharing Resources


[Page 5 (continued)]

1.5. Sharing Resources

Another operating system function that Linux provides is the sharing of limited resources among competing processes. Limited resources in a typical computer system include CPUs, memory, disk space, and peripherals such as printers. Here is a brief outline of how these resources are shared:


    [Page 6]
  • Linux shares CPUs among processes by dividing each second of CPU time into equal-sized "slices" and then allocating them to processes based on a priority scheme. Important processes are allocated more slices than others.

  • Linux shares memory among processes by dividing RAM up into thousands of equal-sized "pages" of memory, and then allocating them to processes based on a priority scheme. Only those portions of a process that actually need to be in RAM are ever loaded from disk. Pages of RAM that are not accessed for a while are saved back to disk so that the memory may be reallocated to other processes.

  • Linux shares disk space among users by dividing the disks into thousands of equal-sized "blocks" and then allocating them to users as necessary. A single file is built out of one or more blocks.

Chapter 13, "Linux Internals," contains more details on how these sharing mechanisms are implemented. We've now looked at every major role that Linux plays as an operating system except oneas a medium for communication.




Linux for Programmers and Users
Linux for Programmers and Users
ISBN: 0131857487
EAN: 2147483647
Year: 2007
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net