Operating System Fundamentals
25
Unit 3: Processes Processes and Multitasking Many people like to try to speedup several tasks by performing
them at the same time, such as using a mobile phone while driving. While this seems like you are accomplishing two things at the same time, the truth is that your brain specifically focuses on just a single task at any specific time. The act of talking only occurs while you are not actively making decisions about the task of driving. To put this into perspective, if you know you are about to have an accident, you will stop talking. To further illustrate the idea of performing simultaneous actions consider the problem of reading a text message while watching TV. Your eyes can only look atone device at a time. You must switchback and
forth between the two devices, or look at the mobile phone only while unimportant things are happening on the TVA CPU inside a computer is simply a high speed calculator that can perform relatively simple operations on a set of data. If we ignore for the moment the idea of
dual and
quad core CPUs, the CPU can only process a single instruction at any given time from a program. If we would like to have more than one program executing on the processor at the same time, the programs will need to take turns using the CPU. Since the computer switches back and forth between
the two programs often enough, then it will look like both applications are running at the same time. This unit takes a detailed look at the definitions of
processes and
threads, and how the operating system manages processes and threads in
multitasking environments. The first section deals with the definition of a process,
and the concept of process states. We then take a look at
state changing, process creation and stopping processes. From there, we compare processes to threads, and take a look at why threads are important. This is followed
with a detailed look at inter process (and
inter thread)
communication, including
process synchronization, memory sharing, the use of
signals (or
semaphores),
critical sections, and the use of
message queues. We conclude by looking at how an operating
system actually handles process scheduling. This will include topics like completion scheduling,
round robin scheduling,
priority-based scheduling, and scheduling in multi-core/multi-processor environments. Process
Share with your friends: