Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3 Operating Systems. Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems 3.1 The Evolution of Operating Systems 3.2 Operating System.

Similar presentations


Presentation on theme: "Chapter 3 Operating Systems. Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems 3.1 The Evolution of Operating Systems 3.2 Operating System."— Presentation transcript:

1 Chapter 3 Operating Systems

2 Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems 3.1 The Evolution of Operating Systems 3.2 Operating System Architecture 3.2 Operating System Architecture 3.3 Coordinating the Machine’s Activities 3.3 Coordinating the Machine’s Activities 3.4 Handling Competition Among Processes 3.4 Handling Competition Among Processes 3.5 Security 3.5 Security

3 Some functions of an operating system Oversee operation of computer Oversee operation of computer Store and retrieve files Store and retrieve files Schedule programs for execution Schedule programs for execution Execute programs Execute programs

4 Some functions of an operating system “An operating system is the software that controls the overall operation of a computer. It provides the means by which a user can store and retrieve files, provides the interface by which a user can request the execution of programs, and provides the environment necessary to execute the program” “An operating system is the software that controls the overall operation of a computer. It provides the means by which a user can store and retrieve files, provides the interface by which a user can request the execution of programs, and provides the environment necessary to execute the program”

5 Evolution of shared computing Batch processing Batch processing Job queue Job queue Time-sharing Time-sharing Multi-tasking: multiple tasks for a single user Multi-tasking: multiple tasks for a single user Interactive processing Interactive processing Real-time processing Real-time processing Scheduling multiprocessor machines Scheduling multiprocessor machines

6 Evolution of shared computing Batch processing Batch processing The execution of jobs by collecting them in a single batch, then executing them without further interaction with the user The execution of jobs by collecting them in a single batch, then executing them without further interaction with the user

7 Figure 3.1 Batch processing

8 Batch processing Job queue Job queue In batch processing systems, the jobs which are waiting for execution are store in a job queue. In batch processing systems, the jobs which are waiting for execution are store in a job queue.

9 Job queues The order of the queue can be The order of the queue can be First-in, first-out (FIFO) First-in, first-out (FIFO) The main advantage of the FIFO policy is simplicity. The FIFO policy also provides a certain degree of fairness, since requests are served in order. However, the main disadvantage is that short jobs can get stuck behind long running jobs The main advantage of the FIFO policy is simplicity. The FIFO policy also provides a certain degree of fairness, since requests are served in order. However, the main disadvantage is that short jobs can get stuck behind long running jobs Others, such as Others, such as Round Robin (RR) Round Robin (RR)

10 RR To overcome the FIFO problem, the round-robin policy releases the CPU from long-running jobs periodically (based on timer interrupts), so short jobs also can get a fair share of CPU. Therefore, round robin is a preemptive policy. Just about every real operating system does something of this flavor To overcome the FIFO problem, the round-robin policy releases the CPU from long-running jobs periodically (based on timer interrupts), so short jobs also can get a fair share of CPU. Therefore, round robin is a preemptive policy. Just about every real operating system does something of this flavor

11 RR The interval between timer interrupts is referred to as the time slice. After each time slice, the scheduler moves the process to the back of the queue. Choosing the size of time slice is tricky. If the time slice is too big, the wait time suffers. If the size is too small, throughput suffers, since the CPU spends a lot of time doing context switching. The interval between timer interrupts is referred to as the time slice. After each time slice, the scheduler moves the process to the back of the queue. Choosing the size of time slice is tricky. If the time slice is too big, the wait time suffers. If the size is too small, throughput suffers, since the CPU spends a lot of time doing context switching.

12 Evolution of shared computing Continued Time-sharing Time-sharing Multi-tasking: multiple tasks for a single user Multi-tasking: multiple tasks for a single user Interactive processing Interactive processing Real-time processing Real-time processing

13 Interactive processing Interactive processing Interactive processing The major drawback to traditional batch processing is that the user has no interaction with the program once it is submitted to the job queue. The major drawback to traditional batch processing is that the user has no interaction with the program once it is submitted to the job queue. New operating systems were developed that allowed the execution of programs that carried on a dialogue with the user through remote terminals or workstations, which is known as interactive processing New operating systems were developed that allowed the execution of programs that carried on a dialogue with the user through remote terminals or workstations, which is known as interactive processing

14 Figure 3.2 Interactive processing

15 Real-time processing The interactive systems required that the actions of the computer be coordinated with the actions of the user. The interactive systems required that the actions of the computer be coordinated with the actions of the user. Providing computer services in such a timely manner became known as real- time processing. Providing computer services in such a timely manner became known as real- time processing.

16 Evolution of shared computing Continued Multi-tasking Multi-tasking The operating system rotates the various jobs in and out of execution, which is called time- sharing The operating system rotates the various jobs in and out of execution, which is called time- sharing Time-sharing using in single-user as well as multi-user system, called multitasking. Time-sharing using in single-user as well as multi-user system, called multitasking. Scheduling multiprocessor machines Scheduling multiprocessor machines

17 Evolution of shared computing Continued Scheduling multiprocessor machines Scheduling multiprocessor machines In a multiprocessor machine, different tasks can be assigned to different processors rather than share the time of a single processor. In a multiprocessor machine, different tasks can be assigned to different processors rather than share the time of a single processor. Problem it may involve: Problem it may involve: Load balancing Load balancing scaling scaling

18 Recap of Chapter 3.1 Batch processing Batch processing Job queue Job queue FIFO, RR FIFO, RR Time-sharing Time-sharing Multi-tasking: multiple tasks for a single user Multi-tasking: multiple tasks for a single user Interactive processing Interactive processing Real-time processing Real-time processing Scheduling multiprocessor machines Scheduling multiprocessor machines


Download ppt "Chapter 3 Operating Systems. Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems 3.1 The Evolution of Operating Systems 3.2 Operating System."

Similar presentations


Ads by Google