Lecture-1
Lecture-1
Lecture-1
BCSC0004
Operating Systems
BCSC0004
By
Munmi Gogoi
Assistant Professor
GLA University, Mathura
Course Overview/
Syllabus
Module Content Teaching
Hours
Introduction: Operating System and its Classification - Batch, Interactive, Multiprogramming, Time sharing, Real Time
System, Multiprocessor Systems, Multithreaded Systems, System Protection, System Calls, Reentrant Kernels, Operating
System Structure- Layered structure, Monolithic and Microkernel Systems, Operating System Components, Operating System
Functions and Services.
Processes: Process Concept, Process States, Process State Transition Diagram, Process Control Block (PCB), Process
I Scheduling Concepts, Threads and their management. 20
CPU Scheduling: Scheduling Concepts, Performance Criteria, Scheduling Algorithms, Multiprocessor Scheduling.
Process Synchronization: Principle of Concurrency, Implementation of concurrency through fork/join and parbegin/parend,
Inter Process Communication models and Schemes, Producer / Consumer Problem, Critical Section Problem, Dekker’s
solution, Peterson’s solution, Semaphores, Synchronization Hardware.
Classical Problem in Concurrency: Dining Philosopher Problem, Readers Writers Problem.
Deadlock: System model, Deadlock characterization, Prevention, Avoidance and detection, Recovery from deadlock, Combined
Approach.
II Memory Management: Multiprogramming with fixed partitions, Multiprogramming with variable partitions, Paging,
20
Segmentation, Paged segmentation.
Virtual memory concepts: Demand paging, Performance of demand paging, Page replacement algorithms, Thrashing, Locality
of reference.
I/O Management and Disk Scheduling: I/O devices, I/O subsystems, I/O buffering, Disk storage and disk scheduling.
File System: File concept, File organization and access mechanism, File directories, File allocation methods, Free space
management.
Key Terms
•Microsoft Windows,
•Apple macOS,
•Linux,
•Android and
• Apple's iOS.
Key Terms
•Booting
•On modern general purpose computers, this can take tens of seconds and typically involves
performing a power-on self-test, locating and initializing peripheral devices, and then
finding, loading and starting the operating system.
•Memory Hierarchy
•Cache Memory
•It holds frequently requested data and instructions so that they are immediately available to
the CPU when needed.
Key Terms
Kernel is a software code that reside in central core of OS. It has complete
control over system.
When operation system boots, kernel is first part of OS to load in main
memory.
Kernel remains in main memory for entire duration of computer session. The
kernel code is usually loaded in to protected area of memory.
Kernel performs it’s task like executing processes and handling interrupts in
kernel space.
User performs it’s task in user area of memory.
This memory separation is made in order to prevent user data and kernel
data from interfering with each other.
Kernel does not interact directly with user, but it interacts using SHELL and
other programs and hardware.
Kernel cont…
Kernel includes:-
1. Scheduler: It allocates the Kernel’s processing time to various
processes.
2. Supervisor: It grants permission to use computer system resources
to each process.
3. Interrupt handler : It handles all requests from the various hardware
devices which compete for kernel services.
4. Memory manager : allocates space in memory for all users of kernel
service.
kernel provides services for process management, file management, I/O
management, memory management.
System calls are used to provide these type of services.
System Call
Layered structure
Micro-kernel
Monolithic System Architecture
Structure of Operating System
Layered structure
Monolithic Structure
Contd..
Contd..
If any service in the monolithic kernel fails, the entire System fails because, in
address space, the services are connected to each other and affect each other.
It is not flexible, and to introduce a new service
Functions of Operating System
1. Process Management
Device controllers are components on the motherboard (or on expansion cards) that act as an interface
between the CPU and the actual device.
Device drivers, which are the operating system software components that interact with the devices controllers.
A special device (inside CPU) called the Interrupt Controller handles the task of receiving interrupt requests
and prioritizes them to be forwarded to the processor.
Deadlocks can occur when two (or more) processes have control of different I/O resources that are needed by
the other processes, and they are unwilling to give up control of the device.
It performs the following activities for device management.
Keeps tracks of all devices connected to system.
Designates a program responsible for every device known as Input/output controller.
Decides which process gets access to a certain device and for how long.
Allocates devices in an effective and efficient way.
Deallocates devices when they are no longer required.
5. Security & Protection
The operating system uses password protection to protect user data and similar other
techniques.
It also prevents unauthorized access to programs and user data by assigning access right
permission to files and directories.
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.
6. User Interface Mechanism
A user interface (UI) controls how you enter data and instructions and how information
is displayed on the screen
There are two types of user interfaces
1. Command Line Interface
2. Graphical user Interface
1. Command-line interface
With a graphical user interface (GUI), you interact with menus and visual images
History of Operating System
The users of this type of operating system does not interact with the computer directly.
Each user prepares his job on an off-line device like punch cards and submits it to the
computer operator
There is an operator which takes similar jobs having the same requirement and group them into
batches.
1. Batch Operating System cont..
This type of OS is used to execute more than one jobs simultaneously by a single processor.
It increases CPU utilization by organizing jobs so that the CPU always has one job to execute.
Multiprogramming operating systems use the mechanism of job scheduling and CPU scheduling.
3. Time-Sharing Operating Systems
Each task is given some time to execute so that all the tasks work smoothly.
These systems are also known as Multi-tasking Systems.
The task can be from a single user or different users also.
The time that each task gets to execute is called quantum.
After this time interval is over OS switches over to the next task.
3. Time-Sharing Operating Systems cont..
Various autonomous interconnected computers communicate with each other using a shared
communication network.
Independent systems possess their own memory unit and CPU.
These are referred to as loosely coupled systems.
Examples:- Locus, DYSEAC
6. Network Operating System
These systems run on a server and provide the capability to manage data, users,
groups, security, applications, and other networking functions.
These types of operating systems allow shared access of files, printers,
security, applications, and other networking functions over a small private
network.
The “ other" computers arc called client computers, and each computer that
connects to a network server must be running client software designed to
request a specific service.
popularly known as tightly coupled systems.
6. Network Operating System
An embedded operating system is one that is built into the circuitry of an electronic device.
Embedded operating systems are now found in automobiles, bar-code scanners, cell phones,
medical equipment, and personal digital assistants.
The most popular embedded operating systems for consumer products, such as PDAs,
include the following:
Windows XP Embedded
Windows CE .NET:- it supports wireless communications, multimedia and Web
browsing. It also allows for the use of smaller versions of Microsoft Word, Excel, and
Outlook.
Palm OS:- It is the standard operating system for Palm-brand PDAs as well as other
proprietary handheld devices.
Symbian:- OS found in “ smart” cell phones from Nokia and Sony Ericsson
Popular types of OS
Desktop Class
Windows
OS X
Unix/Linux
Chrome OS
Server Class
Windows Server
Mac OS X Server
Unix/Linux
Mobile Class
Android
iOS
Windows Phone
Desktop Class Operating Systems:-
Text Books:
Silberschatz, Galvin and Gagne (2012), “Operating Systems Concepts”,9th Edition, Wiley.
Reference Books
Harvey M Dietel (2002), “An Introduction to Operating System”, 2nd Edition, Pearson
Education.
CT Component: 80 Marks
Mid Term: 30 Marks
TA Component: 20 Marks
Attendance: 05 Marks
Memory Management
Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are not
in use.
In multiprogramming, the OS decides which process will get memory when and how
much.
De-allocates the memory when a process no longer needs it or has been terminated.
Processor Management
Keeps tracks of processor and status of process. The program responsible for this task is
known as traffic controller.
Keeps tracks of all devices. Program responsible for this task is known as the I/O
controller.
Decides which process gets the device when and for how much time.
De-allocates devices.
File Management
Keeps track of information, location, uses, status etc. The collective facilities are often
known as file system.