Transcript Slide 1

Chapter 1: Introduction
Topics
What is an operating system
Computer System Components
History of operating systems
Operating system concepts
Operating system structure
Reference: Operating Systems Design and Implementation (2nd edition)
by Andrew S. Tanenbaum and Albert S. Woodhull
What is an Operating System(1)
• A program that acts as an intermediary
between a user of a computer and the
computer hardware.
• Operating system goals:
– Execute user programs and make solving user
problems easier.
– Make the computer system convenient to use.
• Use the computer hardware in an efficient
manner.
What is an Operating System(2)
• It is an extended machine
– Hides the messy details which must be
performed
– Presents user with a virtual machine, easier
to use
• It is a resource manager
– Each program gets time with the resource
– Each program gets space on the resource
Computer System Components
1. Hardware
• Provides basic computing resources (CPU, memory,
I/O devices).
2. Operating system
• Controls and coordinates the use of the hardware
among the various application programs for the
various users.
3.
Applications programs
•
4.
Define the ways in which the system resources are
used to solve the computing problems of the users
(compilers, database systems, video games,
business programs).
Users
•
people, machines, other computers.
Abstract View of System
Components
Architecture of Unix System
Other Application Programs
who
kernel
Hardware
vi
date
History of Operating Systems (1)
• First generation 1945 - 1955
– vacuum tubes, plug boards
• Second generation 1955 - 1965
– transistors, batch systems
• Third generation 1965 – 1980
– ICs and multiprogramming
• Fourth generation 1980 – present
– personal computers
History of Operating Systems (2)
Early batch system
– bring cards to 1401
– read cards to tape
– put tape on 7094 which does computing
– put tape on 1401 which prints output
History of Operating Systems (3)
Structure of a typical FMS job – 2nd generation
History of Operating Systems (4)
• Multiprogramming system
– three jobs in memory – 3rd generation
Operating System Concept
•
•
•
•
Processes
Files
System Calls
The shell
Operating System Concept: Process(1)
• A process is basically a program in
execution
• Each process is associated with its
address space which contains code
segment, data segment, stack segment
etc.)
• A process can open several files.
• Multitasking operating system
– Can run multiple processes concurrently.
Example: UNIX, LINUX,WINDOWS
– A process table is maintained by Operating
System (OS) to keep track of these processes.
Operating System Concept: Process(2)
• A process can create one or more child
processes
– A created two child processes, B and C
– B created three child processes, D, E, and F
• Inter Process Communication (IPC)
– Sometimes it is needed to communicate between
two processes.
Operating System Concept: Process(3)
Two processes connected by a pipe
Operating System Concept: File(1)
• A directory groups files/subdirectory
together
• A directory has entry for files and
subdirectory
• Each process has a file descriptor table
(FDT) to keep track of its open files.
Operating System Concept: File(2)
File system for a university department
Operating System Concept: File(3)
• Before mounting,
– files on floppy are inaccessible
• After mounting floppy on b,
– files on floppy are part of file hierarchy
Operating System Concept:
System Call(1)
• The interface between the OS and the
user program is defined by a set of
instructions called System calls.
• Example
– count = read(file,buffer,nbyte)
Operating System Concept:
System Call(2)
Operating System Concept:
System Call(3)
Operating System Concept:
System Call(4)
Operating System Concept:
System Call(5)
Operating System Concept:
System Call(6)
Some Win32 API calls
Operating System Concept:
Shell(1)
• It is the primary interface between a
user sitting at his terminal and the OS.
• Though it is not a part of the OS, it
serves as a good example of how the
system calls cab be used.
• When a user logs in, a shell is started
up.
Operating System Concept:
Shell(2)
• If the user now types date for example,
the shell creates a child process and runs
the date program as the child.
• While the child process is running, the
shell waits for it to terminate.
• When the child finishes, the shell types
the prompt again and tries to read the next
input.