(This is the older material - click here - for current specification content)

2. What is a process?

Before we go into scheduling itself, you need to know a bit about a process.

A 'process' is a program loaded into memory that can potentially be executed by the CPU. They are also known as 'jobs'.

A process / job can be in one of three states:

  1. Its code is running within the CPU
  2. It is waiting for a resource to become available such as a disk file or user input
  3. It is ready to run but is not currently active in the CPU

You could view these states as two process queues as shown below.

Note: in everyday life the term 'WAITING' state is used, however, the official OCR book calls this 'BLOCKED'

process queues

Three states of a process / job

In a multi-programming environment, i.e. one where many application run on the computer, there will be many processes in memory.

The scheduler is split into three parts. The 'Low Level scheduler (LLS)' moves the process at the front of the ready queue into the CPU so it can start running. The 'High Level scheduler (HLS)' loads jobs into the ready queue. The 'Medium Level Scheduler (MLS)' moves jobs between primary and secondary memory.

Simple Exercise: If you are using a Windows computer, try opening the Windows Task Manager to see what processes are running on your machine right now (whether you can open this will depend on your network permissions, but you can always try it at home). Click twice slowly on the CPU field to get the most used process at the top. Now you should see the process list flick back and forth as each process takes a chunk of CPU time.

Windows Task Manager showing processes

 

You can see that some large processes such as Photoshop, Firefox and Dreamweaver are running simultaneously on this computer and the person is also listening to some music (iPod process) and yet 98% of the time the CPU is actually idle! Doing nothing but waiting. This demonstrates just how powerful todays' personal computers are. Even ten years ago, running these processes together would have brought a personal computer down to a crawl.

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Computer Process

 

 

 

 

Copyright © www.teach-ict.com