9
Operating Systems •The kernel is a program that constitutes the central core of a computer operating system. It has complete control over everything that occurs in the system. •The kernel is the first part of the operating system to load into the main memory (DRAM) during booting, and it remains in the memory for the entire duration of the computer session. •The kernel is usually loaded into a protected area of memory, which prevents it from being overwritten by other programs. •The kernel performs its tasks (e.g. executing processes and handling interrupts) in kernel space, whereas everything a user normally does is done in user space. •the processor usually provides two modes of execution to separate normal user modes from the special supervisor privileges e.g. when a process executes a system call, the execution mode of the process changes from user mode to kernel mode. •When a computer crashes, it actually means the kernel has crashed.

Operating Systems

Embed Size (px)

DESCRIPTION

Operating Systems •The kernel is a program that constitutes the central core of a computer operating system. It has complete control over everything that occurs in the system. - PowerPoint PPT Presentation

Citation preview

Page 1: Operating Systems

Operating Systems

bullThe kernel is a program that constitutes the central core of a computer operating system It has complete control over everything that occurs in the system

bullThe kernel is the first part of the operating system to load into the main memory (DRAM) during booting and it remains in the memory for the entire duration of the computer session

bullThe kernel is usually loaded into a protected area of memory which prevents it from being overwritten by other programs

bullThe kernel performs its tasks (eg executing processes and handling interrupts) in kernel space whereas everything a user normally does is done in user space

bullthe processor usually provides two modes of execution to separate normal user modes from the special supervisor privileges eg when a process executes a system call the execution mode of the process changes from user mode to kernel mode

bullWhen a computer crashes it actually means the kernel has crashed

bullThe kernel provides basic services for all other parts of the operating system typically including memory management process management file management and IO (inputoutput) management (ie accessing the peripheral devices)

bullA typical kernel containsbullMemory managementAllocates the systems address spaces among all users of the kernels services

bullTimers Kernel timers

bullSystem Calls System calls interface Interrupts and Exceptions Interrupts and exceptions handling

bullProcesses Process management Scheduling Process scheduling

bullIO Low levelbullThe kernel should not be confused with the BIOS(Basic InputOutput System) which is an independent program stored in a chip on the motherboard that is used during the booting (ie startup) process for such tasks as initializing the hardware and loading the kernel into memory (RAM) Whereas the BIOS always remains in the computer and is specific to its particular hardware the kernel is different for every operating system or version

bullKernels can be classified into three broad categoriesbullmonolithic kernelsbullmicrokernels1048766bullHybrid kernels

Monolithic kernels which have traditionally been used by Unix and Linux contain all the operating system core functions and the device drivers

A microkernel usually provides only minimal services such as defining memory address spaces interprocess communication (IPC) and process management All other functions such as hardware management are implemented as processes running independently of the kernel

Hybrid kernels are similar to microkernels except that they include additional code in kernel space so that such code can run more swiftly than it would were it in user space These kernels represent a compromise

The Monolithic Versus Micro Controversy

bullWith a monolithic kernel an error in the kernel can cause the entire system to crash

bullWith a microkernel if a kernel process crashes it is still possible to prevent a crash of the system as a whole by merely restarting the service that caused the error

bullHowever operating systems with monolithic kernels such as Linux have become extremely stable and can run for years without crashing

bullAnother disadvantage cited for monolithic kernels is that they are not portable that is they must be rewritten for each new architecture that the operating system is to be ported to However in practice this has not appeared to be a major disadvantage and it has not stopped Linux from being ported to numerous processors

bullMonolithic kernels also appear to have the disadvantage that their source code can become extremely large

bullHowever the advocates of monolithic kernels claim that in spite of their size such kernels are easier to design correctly

bullThe size of the compiled kernel is only a tiny fraction of that of the source code

bullContributing to the small size of the Linux kernel is its ability to dynamically load modules at runtime

bullLinux kernel can be made extremely small not only because of its ability to dynamically load modules but also because of its ease of customisationndasheg embedded linux

bullAlthough microkernels are very small by themselves in combination with all their required auxiliary code they are in fact often larger than monolithic kernels

bullThere are extremely few widely used operating systems today that utilise microkernels--mainly just AIX and QNX

Shells

bullThe shell is the outermost part of the operating system It is the part that interacts with the user

bullIn modern operating systems most users interact with the operating system through a Graphical User Interface(GUI)

bullThe basic unit of software that the operating system deals with in scheduling the work done by the processor is either a processor a thread depending on the operating system

bullA process is a program which is running ie the operating system has assigned the process memory it can use a stack priority status etc

bullThere are also numerous processes that run without giving you direct evidence that they ever exist For example Windows XP and UNIX can have dozens of background processes running to handle the network memory management disk management etc

bullThe operating system allows the application to begin running suspending the execution only long enough to deal with interrupts and user input

bullInterrupts are special signals sent by hardware or software to the CPU

bullSome interrupts are masked--that is the operating system will ignore the interrupts from some sources so that a particular job can be finished as quickly as possible

bullSome interrupts are so important that they cant be ignored These non-maskable interrupts(NMIs) must be dealt with immediately regardless of the other tasks at hand

bullMulti-tasking allows several processes to be active at one time by switching between them using timer interrupts

bullAll of the information needed to keep track of a process when switching is kept in a data package called a process control block The process control block(PCB) typically contains

An ID number that identifies the process

Pointers to the locations in the program and its data where processing last occurred

Register contents States of various flags and switches

Pointers to the upper and lower bounds of the memory required for the process

A list of files opened by the process The priority of the process

The status of all IO devices needed bythe process

bullProcesses that are running often require an input from the user and whilst waiting is stopped ndashthis state is known as blocked or suspended

bullProblems can occur if the user tries to have too many processes functioning at the same time The operating system itself requires some CPU cycles to perform the saving and swapping of all the registers queues and stacks of the application processes

bullWhen too many processes are active the vast majority of its available CPU cycles are used to swap between processes rather than run processes ndashthrashing

bullOne way that operating-system designers reduce the chance of thrashing is by reducing the need for new processes to perform various tasks

bullSome operating systems allow for a process-lite called a thread that can deal with all the CPU-intensive work of a normal process but generally does not deal with the various types of IO and does not establish structures requiring the extensive process control block of a regular process

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
Page 2: Operating Systems

bullThe kernel provides basic services for all other parts of the operating system typically including memory management process management file management and IO (inputoutput) management (ie accessing the peripheral devices)

bullA typical kernel containsbullMemory managementAllocates the systems address spaces among all users of the kernels services

bullTimers Kernel timers

bullSystem Calls System calls interface Interrupts and Exceptions Interrupts and exceptions handling

bullProcesses Process management Scheduling Process scheduling

bullIO Low levelbullThe kernel should not be confused with the BIOS(Basic InputOutput System) which is an independent program stored in a chip on the motherboard that is used during the booting (ie startup) process for such tasks as initializing the hardware and loading the kernel into memory (RAM) Whereas the BIOS always remains in the computer and is specific to its particular hardware the kernel is different for every operating system or version

bullKernels can be classified into three broad categoriesbullmonolithic kernelsbullmicrokernels1048766bullHybrid kernels

Monolithic kernels which have traditionally been used by Unix and Linux contain all the operating system core functions and the device drivers

A microkernel usually provides only minimal services such as defining memory address spaces interprocess communication (IPC) and process management All other functions such as hardware management are implemented as processes running independently of the kernel

Hybrid kernels are similar to microkernels except that they include additional code in kernel space so that such code can run more swiftly than it would were it in user space These kernels represent a compromise

The Monolithic Versus Micro Controversy

bullWith a monolithic kernel an error in the kernel can cause the entire system to crash

bullWith a microkernel if a kernel process crashes it is still possible to prevent a crash of the system as a whole by merely restarting the service that caused the error

bullHowever operating systems with monolithic kernels such as Linux have become extremely stable and can run for years without crashing

bullAnother disadvantage cited for monolithic kernels is that they are not portable that is they must be rewritten for each new architecture that the operating system is to be ported to However in practice this has not appeared to be a major disadvantage and it has not stopped Linux from being ported to numerous processors

bullMonolithic kernels also appear to have the disadvantage that their source code can become extremely large

bullHowever the advocates of monolithic kernels claim that in spite of their size such kernels are easier to design correctly

bullThe size of the compiled kernel is only a tiny fraction of that of the source code

bullContributing to the small size of the Linux kernel is its ability to dynamically load modules at runtime

bullLinux kernel can be made extremely small not only because of its ability to dynamically load modules but also because of its ease of customisationndasheg embedded linux

bullAlthough microkernels are very small by themselves in combination with all their required auxiliary code they are in fact often larger than monolithic kernels

bullThere are extremely few widely used operating systems today that utilise microkernels--mainly just AIX and QNX

Shells

bullThe shell is the outermost part of the operating system It is the part that interacts with the user

bullIn modern operating systems most users interact with the operating system through a Graphical User Interface(GUI)

bullThe basic unit of software that the operating system deals with in scheduling the work done by the processor is either a processor a thread depending on the operating system

bullA process is a program which is running ie the operating system has assigned the process memory it can use a stack priority status etc

bullThere are also numerous processes that run without giving you direct evidence that they ever exist For example Windows XP and UNIX can have dozens of background processes running to handle the network memory management disk management etc

bullThe operating system allows the application to begin running suspending the execution only long enough to deal with interrupts and user input

bullInterrupts are special signals sent by hardware or software to the CPU

bullSome interrupts are masked--that is the operating system will ignore the interrupts from some sources so that a particular job can be finished as quickly as possible

bullSome interrupts are so important that they cant be ignored These non-maskable interrupts(NMIs) must be dealt with immediately regardless of the other tasks at hand

bullMulti-tasking allows several processes to be active at one time by switching between them using timer interrupts

bullAll of the information needed to keep track of a process when switching is kept in a data package called a process control block The process control block(PCB) typically contains

An ID number that identifies the process

Pointers to the locations in the program and its data where processing last occurred

Register contents States of various flags and switches

Pointers to the upper and lower bounds of the memory required for the process

A list of files opened by the process The priority of the process

The status of all IO devices needed bythe process

bullProcesses that are running often require an input from the user and whilst waiting is stopped ndashthis state is known as blocked or suspended

bullProblems can occur if the user tries to have too many processes functioning at the same time The operating system itself requires some CPU cycles to perform the saving and swapping of all the registers queues and stacks of the application processes

bullWhen too many processes are active the vast majority of its available CPU cycles are used to swap between processes rather than run processes ndashthrashing

bullOne way that operating-system designers reduce the chance of thrashing is by reducing the need for new processes to perform various tasks

bullSome operating systems allow for a process-lite called a thread that can deal with all the CPU-intensive work of a normal process but generally does not deal with the various types of IO and does not establish structures requiring the extensive process control block of a regular process

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
Page 3: Operating Systems

bullKernels can be classified into three broad categoriesbullmonolithic kernelsbullmicrokernels1048766bullHybrid kernels

Monolithic kernels which have traditionally been used by Unix and Linux contain all the operating system core functions and the device drivers

A microkernel usually provides only minimal services such as defining memory address spaces interprocess communication (IPC) and process management All other functions such as hardware management are implemented as processes running independently of the kernel

Hybrid kernels are similar to microkernels except that they include additional code in kernel space so that such code can run more swiftly than it would were it in user space These kernels represent a compromise

The Monolithic Versus Micro Controversy

bullWith a monolithic kernel an error in the kernel can cause the entire system to crash

bullWith a microkernel if a kernel process crashes it is still possible to prevent a crash of the system as a whole by merely restarting the service that caused the error

bullHowever operating systems with monolithic kernels such as Linux have become extremely stable and can run for years without crashing

bullAnother disadvantage cited for monolithic kernels is that they are not portable that is they must be rewritten for each new architecture that the operating system is to be ported to However in practice this has not appeared to be a major disadvantage and it has not stopped Linux from being ported to numerous processors

bullMonolithic kernels also appear to have the disadvantage that their source code can become extremely large

bullHowever the advocates of monolithic kernels claim that in spite of their size such kernels are easier to design correctly

bullThe size of the compiled kernel is only a tiny fraction of that of the source code

bullContributing to the small size of the Linux kernel is its ability to dynamically load modules at runtime

bullLinux kernel can be made extremely small not only because of its ability to dynamically load modules but also because of its ease of customisationndasheg embedded linux

bullAlthough microkernels are very small by themselves in combination with all their required auxiliary code they are in fact often larger than monolithic kernels

bullThere are extremely few widely used operating systems today that utilise microkernels--mainly just AIX and QNX

Shells

bullThe shell is the outermost part of the operating system It is the part that interacts with the user

bullIn modern operating systems most users interact with the operating system through a Graphical User Interface(GUI)

bullThe basic unit of software that the operating system deals with in scheduling the work done by the processor is either a processor a thread depending on the operating system

bullA process is a program which is running ie the operating system has assigned the process memory it can use a stack priority status etc

bullThere are also numerous processes that run without giving you direct evidence that they ever exist For example Windows XP and UNIX can have dozens of background processes running to handle the network memory management disk management etc

bullThe operating system allows the application to begin running suspending the execution only long enough to deal with interrupts and user input

bullInterrupts are special signals sent by hardware or software to the CPU

bullSome interrupts are masked--that is the operating system will ignore the interrupts from some sources so that a particular job can be finished as quickly as possible

bullSome interrupts are so important that they cant be ignored These non-maskable interrupts(NMIs) must be dealt with immediately regardless of the other tasks at hand

bullMulti-tasking allows several processes to be active at one time by switching between them using timer interrupts

bullAll of the information needed to keep track of a process when switching is kept in a data package called a process control block The process control block(PCB) typically contains

An ID number that identifies the process

Pointers to the locations in the program and its data where processing last occurred

Register contents States of various flags and switches

Pointers to the upper and lower bounds of the memory required for the process

A list of files opened by the process The priority of the process

The status of all IO devices needed bythe process

bullProcesses that are running often require an input from the user and whilst waiting is stopped ndashthis state is known as blocked or suspended

bullProblems can occur if the user tries to have too many processes functioning at the same time The operating system itself requires some CPU cycles to perform the saving and swapping of all the registers queues and stacks of the application processes

bullWhen too many processes are active the vast majority of its available CPU cycles are used to swap between processes rather than run processes ndashthrashing

bullOne way that operating-system designers reduce the chance of thrashing is by reducing the need for new processes to perform various tasks

bullSome operating systems allow for a process-lite called a thread that can deal with all the CPU-intensive work of a normal process but generally does not deal with the various types of IO and does not establish structures requiring the extensive process control block of a regular process

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
Page 4: Operating Systems

A microkernel usually provides only minimal services such as defining memory address spaces interprocess communication (IPC) and process management All other functions such as hardware management are implemented as processes running independently of the kernel

Hybrid kernels are similar to microkernels except that they include additional code in kernel space so that such code can run more swiftly than it would were it in user space These kernels represent a compromise

The Monolithic Versus Micro Controversy

bullWith a monolithic kernel an error in the kernel can cause the entire system to crash

bullWith a microkernel if a kernel process crashes it is still possible to prevent a crash of the system as a whole by merely restarting the service that caused the error

bullHowever operating systems with monolithic kernels such as Linux have become extremely stable and can run for years without crashing

bullAnother disadvantage cited for monolithic kernels is that they are not portable that is they must be rewritten for each new architecture that the operating system is to be ported to However in practice this has not appeared to be a major disadvantage and it has not stopped Linux from being ported to numerous processors

bullMonolithic kernels also appear to have the disadvantage that their source code can become extremely large

bullHowever the advocates of monolithic kernels claim that in spite of their size such kernels are easier to design correctly

bullThe size of the compiled kernel is only a tiny fraction of that of the source code

bullContributing to the small size of the Linux kernel is its ability to dynamically load modules at runtime

bullLinux kernel can be made extremely small not only because of its ability to dynamically load modules but also because of its ease of customisationndasheg embedded linux

bullAlthough microkernels are very small by themselves in combination with all their required auxiliary code they are in fact often larger than monolithic kernels

bullThere are extremely few widely used operating systems today that utilise microkernels--mainly just AIX and QNX

Shells

bullThe shell is the outermost part of the operating system It is the part that interacts with the user

bullIn modern operating systems most users interact with the operating system through a Graphical User Interface(GUI)

bullThe basic unit of software that the operating system deals with in scheduling the work done by the processor is either a processor a thread depending on the operating system

bullA process is a program which is running ie the operating system has assigned the process memory it can use a stack priority status etc

bullThere are also numerous processes that run without giving you direct evidence that they ever exist For example Windows XP and UNIX can have dozens of background processes running to handle the network memory management disk management etc

bullThe operating system allows the application to begin running suspending the execution only long enough to deal with interrupts and user input

bullInterrupts are special signals sent by hardware or software to the CPU

bullSome interrupts are masked--that is the operating system will ignore the interrupts from some sources so that a particular job can be finished as quickly as possible

bullSome interrupts are so important that they cant be ignored These non-maskable interrupts(NMIs) must be dealt with immediately regardless of the other tasks at hand

bullMulti-tasking allows several processes to be active at one time by switching between them using timer interrupts

bullAll of the information needed to keep track of a process when switching is kept in a data package called a process control block The process control block(PCB) typically contains

An ID number that identifies the process

Pointers to the locations in the program and its data where processing last occurred

Register contents States of various flags and switches

Pointers to the upper and lower bounds of the memory required for the process

A list of files opened by the process The priority of the process

The status of all IO devices needed bythe process

bullProcesses that are running often require an input from the user and whilst waiting is stopped ndashthis state is known as blocked or suspended

bullProblems can occur if the user tries to have too many processes functioning at the same time The operating system itself requires some CPU cycles to perform the saving and swapping of all the registers queues and stacks of the application processes

bullWhen too many processes are active the vast majority of its available CPU cycles are used to swap between processes rather than run processes ndashthrashing

bullOne way that operating-system designers reduce the chance of thrashing is by reducing the need for new processes to perform various tasks

bullSome operating systems allow for a process-lite called a thread that can deal with all the CPU-intensive work of a normal process but generally does not deal with the various types of IO and does not establish structures requiring the extensive process control block of a regular process

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
Page 5: Operating Systems

The Monolithic Versus Micro Controversy

bullWith a monolithic kernel an error in the kernel can cause the entire system to crash

bullWith a microkernel if a kernel process crashes it is still possible to prevent a crash of the system as a whole by merely restarting the service that caused the error

bullHowever operating systems with monolithic kernels such as Linux have become extremely stable and can run for years without crashing

bullAnother disadvantage cited for monolithic kernels is that they are not portable that is they must be rewritten for each new architecture that the operating system is to be ported to However in practice this has not appeared to be a major disadvantage and it has not stopped Linux from being ported to numerous processors

bullMonolithic kernels also appear to have the disadvantage that their source code can become extremely large

bullHowever the advocates of monolithic kernels claim that in spite of their size such kernels are easier to design correctly

bullThe size of the compiled kernel is only a tiny fraction of that of the source code

bullContributing to the small size of the Linux kernel is its ability to dynamically load modules at runtime

bullLinux kernel can be made extremely small not only because of its ability to dynamically load modules but also because of its ease of customisationndasheg embedded linux

bullAlthough microkernels are very small by themselves in combination with all their required auxiliary code they are in fact often larger than monolithic kernels

bullThere are extremely few widely used operating systems today that utilise microkernels--mainly just AIX and QNX

Shells

bullThe shell is the outermost part of the operating system It is the part that interacts with the user

bullIn modern operating systems most users interact with the operating system through a Graphical User Interface(GUI)

bullThe basic unit of software that the operating system deals with in scheduling the work done by the processor is either a processor a thread depending on the operating system

bullA process is a program which is running ie the operating system has assigned the process memory it can use a stack priority status etc

bullThere are also numerous processes that run without giving you direct evidence that they ever exist For example Windows XP and UNIX can have dozens of background processes running to handle the network memory management disk management etc

bullThe operating system allows the application to begin running suspending the execution only long enough to deal with interrupts and user input

bullInterrupts are special signals sent by hardware or software to the CPU

bullSome interrupts are masked--that is the operating system will ignore the interrupts from some sources so that a particular job can be finished as quickly as possible

bullSome interrupts are so important that they cant be ignored These non-maskable interrupts(NMIs) must be dealt with immediately regardless of the other tasks at hand

bullMulti-tasking allows several processes to be active at one time by switching between them using timer interrupts

bullAll of the information needed to keep track of a process when switching is kept in a data package called a process control block The process control block(PCB) typically contains

An ID number that identifies the process

Pointers to the locations in the program and its data where processing last occurred

Register contents States of various flags and switches

Pointers to the upper and lower bounds of the memory required for the process

A list of files opened by the process The priority of the process

The status of all IO devices needed bythe process

bullProcesses that are running often require an input from the user and whilst waiting is stopped ndashthis state is known as blocked or suspended

bullProblems can occur if the user tries to have too many processes functioning at the same time The operating system itself requires some CPU cycles to perform the saving and swapping of all the registers queues and stacks of the application processes

bullWhen too many processes are active the vast majority of its available CPU cycles are used to swap between processes rather than run processes ndashthrashing

bullOne way that operating-system designers reduce the chance of thrashing is by reducing the need for new processes to perform various tasks

bullSome operating systems allow for a process-lite called a thread that can deal with all the CPU-intensive work of a normal process but generally does not deal with the various types of IO and does not establish structures requiring the extensive process control block of a regular process

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
Page 6: Operating Systems

bullHowever the advocates of monolithic kernels claim that in spite of their size such kernels are easier to design correctly

bullThe size of the compiled kernel is only a tiny fraction of that of the source code

bullContributing to the small size of the Linux kernel is its ability to dynamically load modules at runtime

bullLinux kernel can be made extremely small not only because of its ability to dynamically load modules but also because of its ease of customisationndasheg embedded linux

bullAlthough microkernels are very small by themselves in combination with all their required auxiliary code they are in fact often larger than monolithic kernels

bullThere are extremely few widely used operating systems today that utilise microkernels--mainly just AIX and QNX

Shells

bullThe shell is the outermost part of the operating system It is the part that interacts with the user

bullIn modern operating systems most users interact with the operating system through a Graphical User Interface(GUI)

bullThe basic unit of software that the operating system deals with in scheduling the work done by the processor is either a processor a thread depending on the operating system

bullA process is a program which is running ie the operating system has assigned the process memory it can use a stack priority status etc

bullThere are also numerous processes that run without giving you direct evidence that they ever exist For example Windows XP and UNIX can have dozens of background processes running to handle the network memory management disk management etc

bullThe operating system allows the application to begin running suspending the execution only long enough to deal with interrupts and user input

bullInterrupts are special signals sent by hardware or software to the CPU

bullSome interrupts are masked--that is the operating system will ignore the interrupts from some sources so that a particular job can be finished as quickly as possible

bullSome interrupts are so important that they cant be ignored These non-maskable interrupts(NMIs) must be dealt with immediately regardless of the other tasks at hand

bullMulti-tasking allows several processes to be active at one time by switching between them using timer interrupts

bullAll of the information needed to keep track of a process when switching is kept in a data package called a process control block The process control block(PCB) typically contains

An ID number that identifies the process

Pointers to the locations in the program and its data where processing last occurred

Register contents States of various flags and switches

Pointers to the upper and lower bounds of the memory required for the process

A list of files opened by the process The priority of the process

The status of all IO devices needed bythe process

bullProcesses that are running often require an input from the user and whilst waiting is stopped ndashthis state is known as blocked or suspended

bullProblems can occur if the user tries to have too many processes functioning at the same time The operating system itself requires some CPU cycles to perform the saving and swapping of all the registers queues and stacks of the application processes

bullWhen too many processes are active the vast majority of its available CPU cycles are used to swap between processes rather than run processes ndashthrashing

bullOne way that operating-system designers reduce the chance of thrashing is by reducing the need for new processes to perform various tasks

bullSome operating systems allow for a process-lite called a thread that can deal with all the CPU-intensive work of a normal process but generally does not deal with the various types of IO and does not establish structures requiring the extensive process control block of a regular process

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
Page 7: Operating Systems

Shells

bullThe shell is the outermost part of the operating system It is the part that interacts with the user

bullIn modern operating systems most users interact with the operating system through a Graphical User Interface(GUI)

bullThe basic unit of software that the operating system deals with in scheduling the work done by the processor is either a processor a thread depending on the operating system

bullA process is a program which is running ie the operating system has assigned the process memory it can use a stack priority status etc

bullThere are also numerous processes that run without giving you direct evidence that they ever exist For example Windows XP and UNIX can have dozens of background processes running to handle the network memory management disk management etc

bullThe operating system allows the application to begin running suspending the execution only long enough to deal with interrupts and user input

bullInterrupts are special signals sent by hardware or software to the CPU

bullSome interrupts are masked--that is the operating system will ignore the interrupts from some sources so that a particular job can be finished as quickly as possible

bullSome interrupts are so important that they cant be ignored These non-maskable interrupts(NMIs) must be dealt with immediately regardless of the other tasks at hand

bullMulti-tasking allows several processes to be active at one time by switching between them using timer interrupts

bullAll of the information needed to keep track of a process when switching is kept in a data package called a process control block The process control block(PCB) typically contains

An ID number that identifies the process

Pointers to the locations in the program and its data where processing last occurred

Register contents States of various flags and switches

Pointers to the upper and lower bounds of the memory required for the process

A list of files opened by the process The priority of the process

The status of all IO devices needed bythe process

bullProcesses that are running often require an input from the user and whilst waiting is stopped ndashthis state is known as blocked or suspended

bullProblems can occur if the user tries to have too many processes functioning at the same time The operating system itself requires some CPU cycles to perform the saving and swapping of all the registers queues and stacks of the application processes

bullWhen too many processes are active the vast majority of its available CPU cycles are used to swap between processes rather than run processes ndashthrashing

bullOne way that operating-system designers reduce the chance of thrashing is by reducing the need for new processes to perform various tasks

bullSome operating systems allow for a process-lite called a thread that can deal with all the CPU-intensive work of a normal process but generally does not deal with the various types of IO and does not establish structures requiring the extensive process control block of a regular process

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
Page 8: Operating Systems

bullSome interrupts are so important that they cant be ignored These non-maskable interrupts(NMIs) must be dealt with immediately regardless of the other tasks at hand

bullMulti-tasking allows several processes to be active at one time by switching between them using timer interrupts

bullAll of the information needed to keep track of a process when switching is kept in a data package called a process control block The process control block(PCB) typically contains

An ID number that identifies the process

Pointers to the locations in the program and its data where processing last occurred

Register contents States of various flags and switches

Pointers to the upper and lower bounds of the memory required for the process

A list of files opened by the process The priority of the process

The status of all IO devices needed bythe process

bullProcesses that are running often require an input from the user and whilst waiting is stopped ndashthis state is known as blocked or suspended

bullProblems can occur if the user tries to have too many processes functioning at the same time The operating system itself requires some CPU cycles to perform the saving and swapping of all the registers queues and stacks of the application processes

bullWhen too many processes are active the vast majority of its available CPU cycles are used to swap between processes rather than run processes ndashthrashing

bullOne way that operating-system designers reduce the chance of thrashing is by reducing the need for new processes to perform various tasks

bullSome operating systems allow for a process-lite called a thread that can deal with all the CPU-intensive work of a normal process but generally does not deal with the various types of IO and does not establish structures requiring the extensive process control block of a regular process

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
Page 9: Operating Systems

bullProcesses that are running often require an input from the user and whilst waiting is stopped ndashthis state is known as blocked or suspended

bullProblems can occur if the user tries to have too many processes functioning at the same time The operating system itself requires some CPU cycles to perform the saving and swapping of all the registers queues and stacks of the application processes

bullWhen too many processes are active the vast majority of its available CPU cycles are used to swap between processes rather than run processes ndashthrashing

bullOne way that operating-system designers reduce the chance of thrashing is by reducing the need for new processes to perform various tasks

bullSome operating systems allow for a process-lite called a thread that can deal with all the CPU-intensive work of a normal process but generally does not deal with the various types of IO and does not establish structures requiring the extensive process control block of a regular process

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9