![]() (Clock-less CPUs exist – this discussion is not about them.) The easiest way to represent this signal is shown in Figure 1a. Most CPUs have some sort of circuitry that generates a periodic waveform of alternating ones and zeros. We’ll come back to this after discussing clocks and interrupts. What they have in common is a requirement to determine what should be executing at any given time.Īgain, depending on the OS, a scheduler may run at a fixed interval, when needed, or both. The other three types have schedulers of varying complexity. The process is started, it runs until completion, and while it is running no other processes can be executed. Linux and Windows are examples of multi-process, multi-threaded (MPMT) environments.Ī SPNT OS has no real need of a scheduler. A multi-process, non-threaded (MPNT) OS, such as those used in ModComp mini-computers, may have many processes with a single thread of execution. A single process, multi-threaded (SPMT) OS, such as General Software’s Embedded DOS, runs only one process at a time, but supplies an interface that allows for multiple threads to execute in that process. A single process, non-threaded (SPNT) OS runs one process at a time Microsoft’s DOS is a good example of this type. There are several common types of operating environments in the computer world. Processes have unique address spaces threads within a process share the address space of the process. (A process has at least one thread, but a thread is not necessarily a process.) Processes are sometimes considered ‘heavy-weight’ while threads are considered ‘light-weight’, referring to the amount of resources allocated to each type. A thread is usually a subset of a process, and is the smallest unit of executable code that can be scheduled on its own. A process is a unit of execution that, within the context of its operating system, contains all of the resources to execute as a stand-alone entity. In order to discuss schedulers, I will first define two terms: The concepts scale up or down with the scale of the parameter. That accepts a parameter representing time in milliseconds. Other, operating system variations too numerous to list.įor the purposes of this discussion I’m going to assume a generic version of (with an upper-case ess) takes a parameter that specifies the number of milliseconds to sleep Takes a parameter that specifies the number of nanoseconds to sleep įunction, which accepts an object specialized from theįunction that accepts an object specialized from the Takes a parameter that specifies the number of microseconds to sleep (with a lower-case ess) takes a parameter that specifies the number of seconds to sleep The former two are hardware concepts the latter is a software concept.īut before we get tucked into those details, we should be clear on what Is executed, it helps to know a little about how CPUs work, and that means knowing something about CPU clocks, interrupts, and schedulers. To understand what’s going on ‘under the hood’ when a On many things, so let’s start with first things first. Your stroll has taken you to the entrance of the break room, so you grab your interlocutor, duck inside, grab two cups of your favourite caffeinated beverage, and sit down. ![]() ![]() Stop talking in riddles, grey hair! I’m in real need of help here. The SI rushes to catch up with you, and asks, “Īt this point our young SI is frantic (and in immediate danger of going bald). If I put a line of code in my program that simply reads Suppose you are walking down the hallway of your office, and a Summer Intern (SI) intercepts you and asks, “ Bob Schmidt walks us through the mechanics of why. Instructions to sleep for a second almost never result in precisely one second’s sleep.
0 Comments
Leave a Reply. |