Operating Systems Definition n An operating system is

  • Slides: 25
Download presentation
Operating Systems

Operating Systems

Definition n An operating system is a collection of programs that manage the resources

Definition n An operating system is a collection of programs that manage the resources of the system, and provides a interface between the user, the hardware, and the applications.

Types of Operating Systems n Simple n n n device control embedded on a

Types of Operating Systems n Simple n n n device control embedded on a ROM chip Complex n n n Windows NT Unix, Etc.

Complex Operating Systems n Consist of multiple programs n The Kernel is the core

Complex Operating Systems n Consist of multiple programs n The Kernel is the core of the operating systems.

Kernel n The kernel is responsible for: n n n Device control Memory management

Kernel n The kernel is responsible for: n n n Device control Memory management Scheduling Inter-process communication Processing of interrupts and exceptions.

Single vs. Multiple Processor n Single Processor can only run one instruction at a

Single vs. Multiple Processor n Single Processor can only run one instruction at a time. n It gives the appearance of multitasking with switching.

2 Types of Switching n Co-Operative Switching n Pre-Emptive Switching

2 Types of Switching n Co-Operative Switching n Pre-Emptive Switching

Co-Operative Switching n In co-operative switching the task which is currently running must voluntarily

Co-Operative Switching n In co-operative switching the task which is currently running must voluntarily give up the processor for the next process to run.

Problem with Co-Operative Switching n If first process “hangs up” and does not give

Problem with Co-Operative Switching n If first process “hangs up” and does not give up control the computer freezes. No other task can run.

Pre-Emptive Switching n In pre-emptive switching the task that is currently running is forced

Pre-Emptive Switching n In pre-emptive switching the task that is currently running is forced to give up control after a certain period of time. If a task “hangs” it does not stop subsequent task from running.

n Pre-Emptive Switching is “Better” than Co-Operative Switching

n Pre-Emptive Switching is “Better” than Co-Operative Switching

16 -Bit vs. 32 -bit n 32 -bit programs use pre-emptive switching. n 16

16 -Bit vs. 32 -bit n 32 -bit programs use pre-emptive switching. n 16 -bit program use co-operative switching and are more susceptible to “freezing”.

Context Switching n The process of switching from one task to another is called

Context Switching n The process of switching from one task to another is called “Context Switching”.

Scheduling n Scheduling is the process of deciding which task should run next.

Scheduling n Scheduling is the process of deciding which task should run next.

Time Slice n The amount of time that a process runs before giving up

Time Slice n The amount of time that a process runs before giving up control is called time slice or quantum period.

Co-Operative Processing n In co-operative processing the processes are generally arranged such that as

Co-Operative Processing n In co-operative processing the processes are generally arranged such that as the top process is completed each task moves up one place.

Pre-Emptive Scheduling Pre-emptive scheduling uses a realtime clock, which generates interrupts at regular intervals.

Pre-Emptive Scheduling Pre-emptive scheduling uses a realtime clock, which generates interrupts at regular intervals. Each time an interrupt occurs the processor is switched to another task. n Generally tasked are assigned a priority in pre-emptive scheduling. n

Multiprocessor vs. Multiprocessing n A multi-processor computer is a computer with more than one

Multiprocessor vs. Multiprocessing n A multi-processor computer is a computer with more than one processor.

Categories of Multi. Processor Computers n Shared memory multi-processor n Distributed memory multi-processor

Categories of Multi. Processor Computers n Shared memory multi-processor n Distributed memory multi-processor

Shared Memory Multiprocessor Shared memory multi-processors have multiply CPUs, and they all share the

Shared Memory Multiprocessor Shared memory multi-processors have multiply CPUs, and they all share the same memory. n Communication between the processors is easy to implement, but care must be taken to synchronize memory access. n

Distributed Memory Multi. Processors Also has multiple CPUs, but each CPU has its own

Distributed Memory Multi. Processors Also has multiple CPUs, but each CPU has its own memory. n In distributed memory multiprocessor memory synchronization is not a problem, n but communication between the processors is often slow and complicated. n

Related to Multi-Processors n Networked Systems n Distributed Systems

Related to Multi-Processors n Networked Systems n Distributed Systems

Networked Systems n Networked systems consist of multiple computers, networked together. Users are aware

Networked Systems n Networked systems consist of multiple computers, networked together. Users are aware of the different computers that make up the system.

Distributed Systems n Distributed systems also consist of multiple computer but unlike the networked

Distributed Systems n Distributed systems also consist of multiple computer but unlike the networked system the various computers are transparent to the user.

Operating System A computer is a set of resources for the movement, storage, and

Operating System A computer is a set of resources for the movement, storage, and processing of data. n The operating system is responsible for n managing these resources n scheduling the other programs n and providing the user interface. n