Unit 1
Unit 1
HANDOUT
on
OPERATING SYSTEMS
Vision
Mission
4. Course Outcomes:
1 2 3 4 5 6 7 8 9 10 11 12
CO1 H L M L
CO2 H L M L
CO3 M L M L
CO4 H L M L
CO5 H L M L
CO6 H L M L
CO7 H L M L
UNIT- 1: INRODUCTION
Operating system operations 1
Operating system services 2
System calls 1 2
Types of system calls 2
Operating –system structure 2
Concept of a file 1
Access methods 1
Directory structure 2
1
File system mounting 1
Files sharing and protection 1
Total No. of periods 56 13
CPU Scheduling
Deadlocks
Disk Scheduling
OPERATING SYSTEMS
Unit – 1
Introduction
Objectives:
Syllabus: Introduction
Operating system operations, Operating system services, System calls,
Types of system calls, Operating –system structure.
Outcomes:
Students will be able to
• Understand the structure of Operating System
LEARNING MATERIAL
UNIT-I
Definitions:
• If the operating system and the users share the hardware and software
resources of the computer system.
o With sharing, many processes could be adversely affected by a
bug in one program.
o For example, if a process gets stuck in an infinite loop, this loop
could prevent the correct operation of many other processes.
o One erroneous program might modify another program, the
data of another program, or even the operating system itself.
• A properly designed operating system must ensure that an incorrect
program cannot cause other programs to execute incorrectly.
❖ Dual-Mode Operation:
Below is a sequence of system calls to copy the contents of one file to another
file:
Fig: C program invoking printf() library call, which calls the write() system
call
❖ Simple Structure:
• Many commercial operating systems do not have well-defined structures.
❖ Layered Approach:
• A system can be made modular in many ways.
• One method is layered approach.
o Here, the operating system is broken into a number of layers or
levels.
o The bottom layer is an implementation of an abstract object made
up of data and the operations that can manipulate those data.
Advantages:
Disadvantages:
❖ Modules:
• The best current methodology for operating system design involves using
object-oriented programming techniques to create a modular kernel.
• The kernel has a set of core components and dynamically links in
additional services either during boot time or run time.
• Such a strategy uses dynamically loadable modules and is common in
modern implementations of UNIX such as Solaris, Linux and Mac OS X.
• Example 1: Solaris operating system structure:
It is organized around a core kernel with seven types of loadable kernel
modules.
1. Scheduling classes.
2. File systems.
3. Loadable system calls.
4. Executable formats.
5. STREAMS modules.
6. Miscellaneous.
7. Device and Bus drivers.
Advantages:
1. It is more flexible than layered system in that any module can call any
other module.
2. It is more efficient, because modules do not need to invoke message
passing in order to communicate.
Example 2: Mac OS X Structure
• The Apple Macintosh Mac OS X operating system uses a hybrid
structure.
• Mac OS X structures the operating system using a layered technique
where one layer consists of the Mach microkernel.
• The top layer includes application environments and a set of services
providing a graphical interface to applications.
• Below these layers is the kernel environment, which consists primarily of
the Mach microkernel and the BSD kernel.
• Mach provides memory management:
➢ Support for remote procedure calls.
➢ Inter process communication.
➢ Message passing.
➢ Thread scheduling.
• BSD component provides
➢ BSD command line interface
➢ Support for networking and file systems.
➢ Implementation of POSIX APIs, including Pthreads.
• In addition to Mach and BSD, the kernel environment provides an I/O
kit for development of device drivers and dynamically loadable modules.
******************************************************************************
UNIT-I
Assignment-Cum-Tutorial Questions
SECTION-A
Objective Questions
1. An acts as an interface between the user and the computer
system.
2. Which concept explains the working of an Operating System? [ ]
a) It is event driven
b) It is object oriented
c) It is procedure based system software
d) It is a collection of procedures that interact with each other
SECTION-B
Descriptive Questions
1. Define operating system. Explain the operations of an operating system?
2. With a neat sketch explain the Dual-mode operation?
3. Explain the need of attaching timer in operating system?
4. With a neat sketch explain the structure of operating system.
5. With a neat sketch explain the structure of traditional UNIX operating
system?
6. Describe the services that an operating-system provides to users?
7. List and explain different types of system calls?
8. What are the advantages and disadvantages of layered approach?
9. Write pros and cons of micro kernels?
10. Explain the need of module structure in operating system?