PROCESSES. What is a process, and what does the operating system do with processes? PROCESS: "A program in execution." Generally speaking, a process has its own memory which other processes cannot access or modify. A process that can mess with other processes memory is called a "shared memory process". You usually see this on large mainframe computers with many processors so that you can run a complicated algorithm in parallel. For normal computers, like a laptop, you may not more than two processors. In some systems a process can be further divided into "threads". And all threads in a process have access to the same memory as each other. Threads also never run perfectly simulataneously with each other, and processes, for the most part, do not either. Are there systems that do not allow more than one process to run...or at least limit the number of processes running at any given time? The 1984 Classic Mac. You ran a program, maybe a word processor. Then, you saved the file. Closed the word processor. Started another program, perhaps a Kermit program and then you could send your saved document to another computer. Or perhaps, you would open up a compiler and compile your saved work. It didn't compile, so you close your compiler and open up your word processor again. This not truly a uniprocess system. There were printer drivers also running and other menu options that could run in the background. Smartphone/iPhones, certain other tablet devices, limit what can run in the background. It might not be literally zero things running in the background, background processes might exist, but are frequently blocked. But desktop/laptop computers, Windows/Mac/Linux, all allow multiple processes to run simultaneously. Memory in a process is generally laid out in four categories: stack, heap, data, and text. Stack: contains information on the methods running, including parameters and local variables, and the return pointer. As methods are called new information is added to the stack. As methods end, this information is removed from the stack so that other methods can make use of this later. Heap: Dynamically allocated memory. Memory allocated with "new" commands or the equivalent. This is usually trickier to maintain because dynamically allocated memory persists when methods end. In most systems, the stack and the heap are part of the same block of memory with the stack on one end and the heap on the other, and they grow toward each other. Data: Global variables. Variables that persist throughout the entire program. Text: The program itself. So, what should an operating system control with respect to the processes? What's running at any given time? I could have hundreds of processes on the system, but how many processors do I have? One or two? I may have the illusion of many processors running simultaneously, but what is really happening is the OS is switching rapidly between processes so that each process uses the processor for a brief interval before another process gets to use it. The classic name for this is "time sharing." Some prefer "time slicing." The mechanism that controls this is the "scheduler." How should the scheduler work? Should every process be treated equally and get access to the processor in a "round robin" fashion? Some OS's use a priority system, where some processes get more access to the processors.