INTRODUCTION TO
OPERATING SYSTEM
OBJECTIVES
• To define the different services provided by the OS.
• Describe the purpose and functions of OS.
• Recognize the components and Managers of OS.
• List and compare the common desktop OS in use
today.
Computer-System
Architecture
• A computer system may be organized in a
number of different ways, which we can
categorize roughly according to the number of
general-purpose processors used.
Single-Processor Systems
• A single processor system contains only one processor. So only one process can be
executed at a time and then the process is selected from the ready queue. Most
general purpose computers contain the single processor systems as they are
commonly in use.
• Ex: device-specific processors, such as disk, keyboard, and graphics controllers
Multiprocessor Systems
• Multiprocessor systems (also known as parallel systems or tightly coupled
systems) are growing in importance.
• Such systems have two or more processors in close communication,
sharing the computer bus and sometimes the clock, memory, and
peripheral devices.
• Ex: a modern desktop computer with a "quad-core" or "octa-core"
processor
Multiprocessor systems have
three main advantages:
1. Increased throughput. By increasing the number of
processors, we expect to get more work done in less time.
2. Economy of scale. Multiprocessor systems can cost less
than equivalent multiple single-processor systems,
because they can share peripherals, mass storage, and
power supplies.
3. Increased reliability. If functions can be distributed
properly among several processors, then the failure of one
processor will not halt the system, only slow it down.
Operating System Structure
• Multiprogramming needed for efficiency
 Single user cannot keep CPU and I/O devices busy at all times
 Multiprogramming organizes jobs (code and data) so CPU always has one to
execute
 A subset of total jobs in system is kept in memory
 One job selected and run via job scheduling
 When it has to wait (for I/O for example), OS switches to another job
• Timesharing (multitasking) is logical extension in which CPU switches jobs so
frequently that users can interact with each job while it is running, creating
interactive computing
 Response time should be < 1 second
 Each user has at least one program executing in memory process
 If several jobs ready to run at the same time  CPU scheduling
 If processes don’t fit in memory, swapping moves them in and out to run
 Virtual memory allows execution of processes not completely in memory
Process Management
• A process is a program in execution.
• It is a unit of work within the system.
• Program is a passive entity, process is an active entity.
• Process needs resources to accomplish its task
o CPU, memory, I/O, files
o Initialization data
• Process termination requires reclaim of any reusable resources
• Typically system has many processes, some user, some operating
system running concurrently on one or more CPUs
o Concurrency or run multiple tasks at the same time, by
multiplexing the CPUs among the processes / threads
Process Management
Activities
The operating system is responsible for the following activities in
connection with process management:
1. Creating and deleting both user and system processes
2. Suspending and resuming processes
3. Providing mechanisms for process synchronization
4. Providing mechanisms for process communication
5. Providing mechanisms for deadlock handling.
Note:
A deadlock is a situation where a set of processes is blocked because
each process is holding a resource and waiting for another resource.
Memory Management
• Accounts all data in memory before and after processing.
• Accounts all instructions in memory in order to execute.
• Memory management determines what is in memory when
 Optimizing CPU utilization and computer response to users
Memory management activities
 Keeping track of which parts of memory are currently being
used and by whom.
 Deciding which processes (or parts thereof) and data to move
into and out of memory.
 Allocating and deallocating memory space as needed.
Storage Management
• OS provides uniform, logical view of information storage
 Abstracts physical properties to logical storage unit - file
 Each medium is controlled by device (i.e., disk drive, tape drive)
o Varying properties include access speed, capacity, data-
transfer rate, access method (sequential or random)
• File-System management
 Files usually organized into directories
 Access control on most systems to determine who can access what
 OS activities include
o Creating and deleting files and directories
o Primitives to manipulate files and directories
o Mapping files onto secondary storage
o Backup files onto stable (non-volatile) storage media
I/O Subsystem
• One purpose of OS is to hide peculiarities of hardware devices
from the user
• I/O subsystem responsible for:
 Memory management of I/O including buffering (storing data
temporarily while it is being transferred).
 Caching (storing parts of data in faster storage for
performance).
 Spooling (the overlapping of output of one job with input of
other jobs).
 General device-driver interface.
 Drivers for specific hardware devices.
Protection and Security
• Protection – any mechanism for controlling access of processes or users to
resources defined by the OS.
• Security – defense of the system against internal and external attacks
 Huge range, including denial-of-service, worms, viruses, identity theft,
theft of service
• Systems generally first distinguish among users, to determine who can do
what.
 User identities (user IDs, security IDs) include name and associated
number, one per user
 User ID then associated with all files, processes of that user to determine
access control
 Group identifier (group ID) allows set of users to be defined and controls
managed, then also associated with each process, file
 Privilege escalation allows user to change to effective ID with more rights
Function of Operating System
• Operating systems provide an environment for execution of programs and
services to programs and users
• One set of operating-system services provides functions that are helpful to the
user:
1. User interface - Almost all operating systems have a user interface (UI). Varies
between Command-Line (CLI), Graphics User Interface (GUI), Batch.
2. Program execution - The system must be able to load a program into memory and to
run that program, end execution, either normally or abnormally (indicating error).
3. I/O operations - A running program may require I/O, which may involve a file or an
I/O device.
4. File-system manipulation - The file system is of particular interest. Programs need to
read and write files and directories, create and delete them, search them, list file
Information, permission management.
1. Communications – Processes may exchange information, on the same
computer or between computers over a network.
Communications may be via shared memory or through
message passing (packets moved by the OS)
2. Error detection – OS needs to be constantly aware of possible errors
May occur in the CPU and memory hardware, in I/O devices, in
user program
For each type of error, OS should take the appropriate action to
ensure correct and consistent computing
Debugging facilities can greatly enhance the user’s and
programmer’s abilities to efficiently use the system
Function of Operating
System
Function of Operating
System
• Another set of OS functions exists for ensuring the efficient operation of the system itself via
resource sharing.
1. Resource allocation - When multiple users or multiple jobs running concurrently,
resources must be allocated to each of them.
Many types of resources - Some (such as CPU cycles, main memory, and file storage)
may have special allocation code, others (such as I/O devices) may have general request and
release code.
2. Accounting - To keep track of which users use how much and what kinds of computer
resources.
3. Protection and security - The owners of information stored in a multiuser or networked
computer system may want to control use of that information, concurrent processes
should not interfere with each other
 Protection involves ensuring that all access to system resources is controlled.
 Security of the system from outsiders requires user authentication, extends to
defending external I/O devices from invalid access attempts
 If a system is to be protected and secure, precautions must be instituted throughout
it. A chain is only as strong as its weakest link.
Evolution of Desktop and Mobile
OS
• Software is what brings a computer to life, and an operating system
(OS) is the framework that allows all other software to run.
• A computer is of no use without an OS.
• There are many different operating systems available for computers
of all shapes and sizes, but there are only a few main branches that
dominate the consumer market: Windows, OS X and its sibling iOS,
and Linux which forms the basis for Android.
• The systems are very different but have borrowed and learned from
each other over time.
THE PAST
The first operating systems were entirely text based.
Users would type archaic commands into the terminal, and the
computer would type something back.
Before Windows, there was MS-DOS. Before Mac OS,
there was the Apple DOS. Before Android, there was Unix.
Each system accepted input from the keyboard and
produced output to the screen. The major difference between
the three was the hardware each operating system would run
on.
Evolution of Desktop and Mobile
OS
THE PRESENT
All that changed in 1984 when Apple released the first
Macintosh computer. The Mac’s operating system was graphical, and was
the first of its kind to be available in a mass market product to the
general public.
The Mac was followed by the first version of Windows in 1985
which also featured a point-and-click graphical interface.
Microsoft’s Windows went on to dominate the computer
industry for the next twenty years, but both operating systems continued
to evolve.
Evolution of Desktop and Mobile
OS
THE PRESENT
The next major leap forward in operating systems happened in
2007 when Apple released the iPhone, followed quickly by Google
releasing Android.
While the first major shift in operating systems was from
command line to graphics, the second was from keyboard and mouse to
touch.
Evolution of Desktop and Mobile
OS
THE FUTURE
Given the historical trend of operating systems to become
faster, more capable, and more personal, it’s not hard to predict a
future where personal computers are reduced down to your phone.
Eventually, your phone will be the only device you need, and
the operating system will adapt itself to suit your style of work for
whatever environment you are in.
A keyboard and mouse at your desk on a big screen, and a
quick- touch interface on the go.
Evolution of Desktop and Mobile
OS
THE FUTURE
Some Android phones have already tried this, but Microsoft
has been morphing Windows into the only operating system for all
computing devices.
The technology field thrives on innovation, competitiveness,
and standing on the shoulders of the giants who came before.
The evolution of operating systems has always been about
making computers easier to use. No matter which operating system you
prefer, the future looks bright for consumers.
Evolution of Desktop and Mobile
OS
Questions????
Week1_Introduction to_Operating System - Part 2.pptx

Week1_Introduction to_Operating System - Part 2.pptx

  • 1.
  • 2.
    OBJECTIVES • To definethe different services provided by the OS. • Describe the purpose and functions of OS. • Recognize the components and Managers of OS. • List and compare the common desktop OS in use today.
  • 3.
    Computer-System Architecture • A computersystem may be organized in a number of different ways, which we can categorize roughly according to the number of general-purpose processors used.
  • 4.
    Single-Processor Systems • Asingle processor system contains only one processor. So only one process can be executed at a time and then the process is selected from the ready queue. Most general purpose computers contain the single processor systems as they are commonly in use. • Ex: device-specific processors, such as disk, keyboard, and graphics controllers
  • 5.
    Multiprocessor Systems • Multiprocessorsystems (also known as parallel systems or tightly coupled systems) are growing in importance. • Such systems have two or more processors in close communication, sharing the computer bus and sometimes the clock, memory, and peripheral devices. • Ex: a modern desktop computer with a "quad-core" or "octa-core" processor
  • 6.
    Multiprocessor systems have threemain advantages: 1. Increased throughput. By increasing the number of processors, we expect to get more work done in less time. 2. Economy of scale. Multiprocessor systems can cost less than equivalent multiple single-processor systems, because they can share peripherals, mass storage, and power supplies. 3. Increased reliability. If functions can be distributed properly among several processors, then the failure of one processor will not halt the system, only slow it down.
  • 7.
    Operating System Structure •Multiprogramming needed for efficiency  Single user cannot keep CPU and I/O devices busy at all times  Multiprogramming organizes jobs (code and data) so CPU always has one to execute  A subset of total jobs in system is kept in memory  One job selected and run via job scheduling  When it has to wait (for I/O for example), OS switches to another job • Timesharing (multitasking) is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing  Response time should be < 1 second  Each user has at least one program executing in memory process  If several jobs ready to run at the same time  CPU scheduling  If processes don’t fit in memory, swapping moves them in and out to run  Virtual memory allows execution of processes not completely in memory
  • 8.
    Process Management • Aprocess is a program in execution. • It is a unit of work within the system. • Program is a passive entity, process is an active entity. • Process needs resources to accomplish its task o CPU, memory, I/O, files o Initialization data • Process termination requires reclaim of any reusable resources • Typically system has many processes, some user, some operating system running concurrently on one or more CPUs o Concurrency or run multiple tasks at the same time, by multiplexing the CPUs among the processes / threads
  • 9.
    Process Management Activities The operatingsystem is responsible for the following activities in connection with process management: 1. Creating and deleting both user and system processes 2. Suspending and resuming processes 3. Providing mechanisms for process synchronization 4. Providing mechanisms for process communication 5. Providing mechanisms for deadlock handling. Note: A deadlock is a situation where a set of processes is blocked because each process is holding a resource and waiting for another resource.
  • 10.
    Memory Management • Accountsall data in memory before and after processing. • Accounts all instructions in memory in order to execute. • Memory management determines what is in memory when  Optimizing CPU utilization and computer response to users Memory management activities  Keeping track of which parts of memory are currently being used and by whom.  Deciding which processes (or parts thereof) and data to move into and out of memory.  Allocating and deallocating memory space as needed.
  • 11.
    Storage Management • OSprovides uniform, logical view of information storage  Abstracts physical properties to logical storage unit - file  Each medium is controlled by device (i.e., disk drive, tape drive) o Varying properties include access speed, capacity, data- transfer rate, access method (sequential or random) • File-System management  Files usually organized into directories  Access control on most systems to determine who can access what  OS activities include o Creating and deleting files and directories o Primitives to manipulate files and directories o Mapping files onto secondary storage o Backup files onto stable (non-volatile) storage media
  • 12.
    I/O Subsystem • Onepurpose of OS is to hide peculiarities of hardware devices from the user • I/O subsystem responsible for:  Memory management of I/O including buffering (storing data temporarily while it is being transferred).  Caching (storing parts of data in faster storage for performance).  Spooling (the overlapping of output of one job with input of other jobs).  General device-driver interface.  Drivers for specific hardware devices.
  • 13.
    Protection and Security •Protection – any mechanism for controlling access of processes or users to resources defined by the OS. • Security – defense of the system against internal and external attacks  Huge range, including denial-of-service, worms, viruses, identity theft, theft of service • Systems generally first distinguish among users, to determine who can do what.  User identities (user IDs, security IDs) include name and associated number, one per user  User ID then associated with all files, processes of that user to determine access control  Group identifier (group ID) allows set of users to be defined and controls managed, then also associated with each process, file  Privilege escalation allows user to change to effective ID with more rights
  • 14.
    Function of OperatingSystem • Operating systems provide an environment for execution of programs and services to programs and users • One set of operating-system services provides functions that are helpful to the user: 1. User interface - Almost all operating systems have a user interface (UI). Varies between Command-Line (CLI), Graphics User Interface (GUI), Batch. 2. Program execution - The system must be able to load a program into memory and to run that program, end execution, either normally or abnormally (indicating error). 3. I/O operations - A running program may require I/O, which may involve a file or an I/O device. 4. File-system manipulation - The file system is of particular interest. Programs need to read and write files and directories, create and delete them, search them, list file Information, permission management.
  • 15.
    1. Communications –Processes may exchange information, on the same computer or between computers over a network. Communications may be via shared memory or through message passing (packets moved by the OS) 2. Error detection – OS needs to be constantly aware of possible errors May occur in the CPU and memory hardware, in I/O devices, in user program For each type of error, OS should take the appropriate action to ensure correct and consistent computing Debugging facilities can greatly enhance the user’s and programmer’s abilities to efficiently use the system Function of Operating System
  • 16.
    Function of Operating System •Another set of OS functions exists for ensuring the efficient operation of the system itself via resource sharing. 1. Resource allocation - When multiple users or multiple jobs running concurrently, resources must be allocated to each of them. Many types of resources - Some (such as CPU cycles, main memory, and file storage) may have special allocation code, others (such as I/O devices) may have general request and release code. 2. Accounting - To keep track of which users use how much and what kinds of computer resources. 3. Protection and security - The owners of information stored in a multiuser or networked computer system may want to control use of that information, concurrent processes should not interfere with each other  Protection involves ensuring that all access to system resources is controlled.  Security of the system from outsiders requires user authentication, extends to defending external I/O devices from invalid access attempts  If a system is to be protected and secure, precautions must be instituted throughout it. A chain is only as strong as its weakest link.
  • 17.
    Evolution of Desktopand Mobile OS • Software is what brings a computer to life, and an operating system (OS) is the framework that allows all other software to run. • A computer is of no use without an OS. • There are many different operating systems available for computers of all shapes and sizes, but there are only a few main branches that dominate the consumer market: Windows, OS X and its sibling iOS, and Linux which forms the basis for Android. • The systems are very different but have borrowed and learned from each other over time.
  • 18.
    THE PAST The firstoperating systems were entirely text based. Users would type archaic commands into the terminal, and the computer would type something back. Before Windows, there was MS-DOS. Before Mac OS, there was the Apple DOS. Before Android, there was Unix. Each system accepted input from the keyboard and produced output to the screen. The major difference between the three was the hardware each operating system would run on. Evolution of Desktop and Mobile OS
  • 20.
    THE PRESENT All thatchanged in 1984 when Apple released the first Macintosh computer. The Mac’s operating system was graphical, and was the first of its kind to be available in a mass market product to the general public. The Mac was followed by the first version of Windows in 1985 which also featured a point-and-click graphical interface. Microsoft’s Windows went on to dominate the computer industry for the next twenty years, but both operating systems continued to evolve. Evolution of Desktop and Mobile OS
  • 21.
    THE PRESENT The nextmajor leap forward in operating systems happened in 2007 when Apple released the iPhone, followed quickly by Google releasing Android. While the first major shift in operating systems was from command line to graphics, the second was from keyboard and mouse to touch. Evolution of Desktop and Mobile OS
  • 22.
    THE FUTURE Given thehistorical trend of operating systems to become faster, more capable, and more personal, it’s not hard to predict a future where personal computers are reduced down to your phone. Eventually, your phone will be the only device you need, and the operating system will adapt itself to suit your style of work for whatever environment you are in. A keyboard and mouse at your desk on a big screen, and a quick- touch interface on the go. Evolution of Desktop and Mobile OS
  • 23.
    THE FUTURE Some Androidphones have already tried this, but Microsoft has been morphing Windows into the only operating system for all computing devices. The technology field thrives on innovation, competitiveness, and standing on the shoulders of the giants who came before. The evolution of operating systems has always been about making computers easier to use. No matter which operating system you prefer, the future looks bright for consumers. Evolution of Desktop and Mobile OS
  • 24.