Operating System Fundamentals



Download 2.34 Mb.
View original pdf
Page19/66
Date06.03.2023
Size2.34 Mb.
#60834
1   ...   15   16   17   18   19   20   21   22   ...   66
OperatingSystemFundamentals
best answers from c, Lesson 2 C# Windows Forms
Computer Process
We now return to the world of computers and processes again. The fact that a single-core CPU can only process one instruction stream at a time means that two applications must take turns running on the CPU. Although a rather obvious statement, if we consider just one single process we realize that it must be either running or is must not be running. This sounds suspiciously like a set of states. In addition to two states, the next question that should be asked is how does a process go from ‗not-running‘ to the running state We will call the ‗not-running‘ state the ‗Ready‘ state because it indicates that the process would like to run but currently cannot (suggests that some other process is actually running. We will also introduce two new terms
Dispatch – means that the operating system has decided that the process should start running now.
Interrupt – means that the operating system has decided that the process should now stop running so that another process can have a turn. Putting all of this information into a single state diagram produces this version. Running dispatched interrupted
Ready

Figure 3.2
A computer-based simple state machine
Many operating system students see diagrams such as this and easily understand the concept, but many textbooks fail to remind the students that there are in fact probably several processes each with their own state machine) going at the same time. The operating system would normally keep a list of all processes current loaded in a table known simply as the process table. The process table would need to keep the current state value. So if an operating system were running four programs (Word, Internet Explorer, Excel, and Visio) the table might look like this

Operating System Fundamentals
28 Process ID Name State
4
Word.exe Running
6
IExplorer.exe Ready
7
Excel.exe Ready
8
Visio.exe Ready

Download 2.34 Mb.

Share with your friends:
1   ...   15   16   17   18   19   20   21   22   ...   66




The database is protected by copyright ©ininet.org 2024
send message

    Main page