Presentation is loading. Please wait.

Presentation is loading. Please wait.

Last Week Introduced operating systems Discussed the Kernel

Similar presentations


Presentation on theme: "Last Week Introduced operating systems Discussed the Kernel"— Presentation transcript:

1 Last Week Introduced operating systems Discussed the Kernel
Discussed the Shell Discussed single and multi-tasking systems

2

3 Processes Introduce the idea of processes Process states
Communication between processes Process scheduling

4 Just for two minutes-apart from the program code what other information do you think you need to carry out the operation a program in a multitasking operating system?

5 A process consists usually of:
an executable program, the data associated with the program, execution context. The execution context includes the processor context (see last weeks notes), but also information such as the process identifier, priority level, and a process state

6 Process is in one of three states
Running Ready Blocked

7

8 If a timer interrupt occurs (Time-out on previous slide),
When a process is in the running state, the processor is executing the program code. If a timer interrupt occurs (Time-out on previous slide), the running process is moved into ready state another process from the list of processes in the ready state is moved into the running state.

9 If a process in the running state requests an operating system service and it must wait for it, then the process is moved into the blocked state.

10 A process will remain in the blocked state until the event required has taken place, the process can then be moved back into the ready state. If a process is blocked the operating system is free to schedule another process.

11

12 Process Scheduling A simple approach is the Round robin
Each process is forced to release control when its time is up. Sometimes called pre-emptive scheduling.

13 Interprocess communication
A process sometimes needs to communicate with one or more other processes For example, when competing for shared resources or co-operating on joint tasks. The aim for a process to get sole control of a resource (mutual exclusion) when it needs it.

14 Mutual Exclusion Operating systems manages resources.
A resource is pre-emptable if ownership of the resources can be taken away from one process, and pass to another. In other words if taking ownership is not critical to the process

15 Mutual Exclusion If this is not true, resource is critical. Mutual exclusion is concerned with ensuring that at any time, there is not more than one process in its critical section of its program code. Signalling between competing processes is needed.

16 Synchronisation Two processes needing co-ordinating their actions. For example, if two processes share a buffer in which one puts information in and the other removes data. Steps must taken to prevent a process removing data when the buffer is empty, or putting data into a buffer when it is full

17 One approach is to use flags indicating when a resources is available.
A process checks the flag for a resource, if flag is not set, process sets the flag and uses the resource. A second process sees the flag is set and is in effect ‘locked-out’ until the flag is set. When the first process finishes with the resource the flag is reset.

18 What are the key-points
Name at least four points, that you feel summarise the material in this session. Can you summarises some of these points in the form of diagrams?


Download ppt "Last Week Introduced operating systems Discussed the Kernel"

Similar presentations


Ads by Google