1. John Jose
Associate Professor
Department of Computer Science & Engineering
Indian Institute of Technology Guwahati
Lecture 1
Operating Systems – Classifications and Service
CS343 Operating Systems
2. What is an Operating System?
❖ A program that acts as an intermediary between a user
of a computer and the computer hardware
❖ Operating system goals:
❖ Execute user programs on hardware
❖ Make the computer system convenient to use
❖ Use the computer hardware in an efficient manner
3. Types of Operating Systems
❖ Most systems use a single general-purpose/special purpose processor
❖ There are several architectures which all require a different OS:
❖ Multiprogramming Systems
❖ Desktop PCs
❖ Parallel Systems
❖ Clustered Systems
❖ Real-time Systems
❖ Embedded Systems
4. ❖ Multiprogramming (Batch system) 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), OS switches to another job
Multiprogramming Systems
5. ❖ 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
❖ Multiple programs executing in memory
❖ If several jobs ready to run at the same time CPU scheduling
Timesharing Systems
7. Desktop PCs
❖ Personal Computers – computer system
dedicated to a single user.
❖ I/O devices – keyboards, mice, display screens,
small printers.
❖ User convenience and responsiveness.
❖ Mostly single user - do not need advanced CPU
utilization or protection features.
❖ May run several different types of operating
systems (Windows, MacOS, UNIX, Linux)
8. Parallel Systems
❖ Multiprocessor systems with more than one CPU in close communication.
❖ Tightly coupled system – processors share memory and the internal
clock; communication usually takes place through the shared memory.
❖ Loosely coupled system – multiple processors/computers with its own
memory connected together for efficiency and throughput.
9. Multiprocessor/Parallel Systems
❖ Multiprocessors systems growing in use and importance
❖ Increased throughput
❖ Economy of scale
❖ Increased reliability – graceful degradation or fault tolerance
❖ Asymmetric Multiprocessing
❖ Symmetric Multiprocessing
10. Multiprocessor Systems
❖ Asymmetric Multiprocessing
❖ Each processor is assigned a specific task; master processor
schedules and farms work to slave processors.
❖ More common in extremely large systems like mainframes with
hundreds of processors.
11. Multiprocessor Systems
❖ Symmetric Multiprocessing
❖ Each processor runs an identical copy of the operating system.
❖ The OS code is usually shared.
❖ Many processes can run at once without performance
deterioration.
❖ Most modern operating systems have SMP support.
❖ OS has to cater for protection of data.
12. Clustered Systems
❖ Like multiprocessor systems working together
❖ Usually sharing storage via a storage-area network (SAN)
❖ Provides a high-availability service which survives failures
❖Asymmetric clustering has one machine in hot-standby mode
❖Symmetric clustering has multiple nodes running applications,
monitoring each other
13. Clustered Systems
❖ Some clusters are for high-performance computing (HPC)
❖Applications must be written to use parallelization
❖ Some have distributed lock manager (DLM) to avoid conflicting
operations
14. ❖ Often used as a control device in a dedicated application such as
controlling scientific experiments, medical imaging systems, industrial
control systems, and some display systems.
❖ Well-defined fixed-time constraints.
❖ Real-Time systems may have either hard or soft real-time.
Real-Time Systems
15. ❖ Personal Digital Assistants (PDAs)
❖ Smart telephones
❖ Issues:
❖ Limited memory, Slow processors, Small
display screens.
❖ Emphasis is on I/O operations.
❖ Limited memory management and protection
Embedded Systems
16. ❖ Dual-mode operation allows OS to protect itself and other system
components
❖ User mode and kernel mode
❖ Mode bit provided by hardware
❖ Provides ability to distinguish when system is running user code or
kernel code
❖ Some instructions designated as privileged, only executable in
kernel mode
❖ System call changes mode to kernel, return from call resets it to user
Operating System in Dual Mode
19. Operating System Services
❖ The OS structure is divided into many sub-components.
❖ Process Execution
❖ Process Management
❖ Memory Management
❖ File Management
❖ Storage Management
❖ I/O Sub-system Management
❖ Protection and Security
❖ User Interface
20. Process Execution
❖ 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.
❖ OS must be able to load a program into memory, run that program, and
end execution
❖ Assign resources like CPU, memory, I/O, files, data to accomplish its task
❖ Process termination requires reclaim of any reusable resources
21. Process Management
❖ Creating and deleting both user and system processes
❖ Suspending and resuming processes
❖ Providing mechanisms for process synchronization
❖ Providing mechanisms for process communication
❖ Providing mechanisms for deadlock handling
22. Memory Management
❖ To execute a program all (or part) of the instructions must be in memory
❖ All (or part) of the data that is needed by the program must be in memory
❖ Memory management determines what is in memory and when
❖ Keeping track of which parts of memory are currently being used and by
whom
❖ Deciding which processes and data to move into and out of memory
❖ Allocating and deallocating memory space as needed
23. File Management
❖ OS provides uniform, logical view of information storage
❖ Abstracts physical properties of storage to logical storage unit - file
❖ Files are usually organized into directories
❖ OS determines access control on files/directories that determine who
can access what
❖ File-System management include
❖ Creating and deleting files and directories
❖ Primitives to manipulate files and directories
❖ Mapping files onto secondary storage
❖ Backup files onto stable (non-volatile) storage media
24. Storage Management
❖ Mass storage devices (disks/ tape drives) store data that does not fit in
main memory or data that must be kept for a long period of time
❖ Devices vary in access speed, capacity, data-transfer rate, access method
❖ OS activities in disk management includes
❖ Free-space management
❖ Storage allocation
❖ Disk scheduling
25. I/O Subsystem Management
❖ OS hides peculiarities of hardware devices from the user
❖ I/O subsystem responsible for
❖ 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)
❖ Providing device-driver interface
26. 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
❖ Distinguish among users, to determine who can do what
❖ User identities (user IDs) and associated access controls on resources
❖ Group identifier (group ID) associated access controls on resources
❖ Privilege escalation to change to give more rights
27. User Interface
❖ Provides a user-friendly platform to initiate actions from user side.
❖ The UI primarily receives command from user and executes it
❖ Command-Line Interface (CLI) allows direct command entry
❖ User-friendly desktop Graphical User Interface (GUI)
❖ Usually mouse, keyboard, and monitor used for giving inputs.
❖ Icons represent files, programs, actions, etc
❖ Various mouse buttons over objects in the interface cause various
actions (provide information, options, execute function, open directory)
❖ Many systems (Microsoft, Apple-Mac OS, UNIX) now include both CLI
and GUI interfaces