Lecture Notes on Operating Systems, Lecture notes of Operating Systems

Lecture notes on operating systems, covering topics such as the history of operating systems, objectives of operating systems, system components, system calls and system programs, and process management. The notes explain the purpose of an operating system, which is to provide an environment in which a user can execute programs and make the computer system convenient to use. The document also covers the different generations of operating systems, from the earliest electronic digital computers to the personal computer and workstation age. The notes are detailed and informative, making them useful for students studying operating systems.

Typology: Lecture notes

2022/2023

Uploaded on 05/11/2023

gail
gail 🇺🇸

4.9

(10)

222 documents

1 / 103

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
2010-2011
Lecture Notes on Operating Systems
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Lecture Notes on Operating Systems and more Lecture notes Operating Systems in PDF only on Docsity!

Lecture Notes on Operating Systems

Lecture 1 : Introduction to Operating Systems

  • An operating system is a program that acts as an

intermediary between a user of a computer and the

computer hardware.

  • The purpose of an operating system is to provide an

environment in which a user can execute programs.

The primary goal of an operating system is thus to

make the computer system convenient to use.

  • A secondary goal is to use the computer hardware in

an efficient manner.

Objectives of Operating Systems

  • To hide details of hardware by creating abstraction.
  • To allocate resources to processes (Manage

resources).

  • Provide a pleasant and effective user interface.
  • The 1960 's - Third Generation The systems of the 1960 's were also batch processing systems, but they were able to take better advantage of the computer's resources by running several jobs at once.
  • Fourth Generation With the development of LSI (Large Scale Integration) circuits, chips, operating system entered in the personal computer and the workstation age. Microprocessor technology evolved to the point that it becomes possible to build desktop computers as powerful as the mainframes of the 1970 s.

History of Operating Systems

Lecture 2 : Operating Systems Structure

  • System Components
  • Operating Systems Services
  • System Calls and System Programs

System Components

  • Main-Memory Management Main-Memory is a large array of words or bytes. Each word or byte has its own address. Main memory is a repository of quickly accessible data shared by the CPU and I/O devices. The major activities of an operating system in regard to memory-management are:
  • Keep track of which part of memory are currently being used and by whom.
  • Decide which processes are loaded into memory when memory space becomes available.
  • Allocate and deallocate memory space as needed.

System Components

  • File Management

A file is a collected of related information defined by its

creator. Computer can store files on the disk (secondary

storage), which provide long term storage.

  • The creation and deletion of files.
  • The creation and deletion of directions.
  • The support of primitives for manipulating files and directions.
  • The mapping of files onto secondary storage.
  • The backup of files on stable storage media.

System Components

  • Networking A distributed system is a collection of processors that do not share memory, peripheral devices, or a clock. The processors communicate with one another through communication lines called network.
  • Protection System Protection refers to mechanism for controlling the access of programs, processes, or users to the resources defined by a computer system.
  • Command Interpreter System A command interpreter is an interface of the operating system with the user. The user gives commands with are executed by operating system (usually by turning them into system calls).

Operating Systems Services

  • Program Execution The system must be able to load a program into memory and to run it. The program must be able to end its execution, either normally or abnormally (indicating error).
  • I/O Operations A running program may require I/O. This I/O may involve a file or an I/O device.
  • File System Manipulation The output of a program may need to be written into new files or input taken from some files. The operating system provides this service.
  • Error Detection An error is one part of the system may cause malfunctioning of the complete system. To avoid such a situation the operating system constantly monitors the system for detecting the errors.

Lecture 3 : Process Management

  • The operating system is responsible for the following activities in connection with process management: the creation and deletion of both user and system processes; the scheduling of processes; and the provision of mechanisms for synchronization, communication, and deadlock handling for processes. Process, on the other hand, includes:
  • Current value of Program Counter (PC)
  • Contents of the processors registers
  • Value of the variables
  • The processes stack (SP) which typically contains temporary data such as subroutine parameter, return address, and temporary variables.
  • A data section that contains global variables.
  • ProcessProcess StateState

As a process executes, it changes state. The state of a

process is defined in part by the current activity of that

process. Each process may be in one of the following states:

  • New State: The process being created.
  • Running State: A process is said to be running if it has the CPU, that is, process actually using the CPU at that particular instant.
  • Blocked (or waiting) State: A process is said to be blocked if it is waiting for some event to happen such that as an I/O completion before it can proceed. Note that a process is unable to run until some external event happens.
  • Ready State: A process is said to be ready if it is waiting to be assigned to a processor.
  • Terminated state: The process has finished execution.
  • Process Control Block
  • Each process is represented in the operating system by a

process control block PCS)—also called a task control block.

Process state process number program counter Registers memory limits list of open files . . Figure : Process control block.

Lecture 4 : CPU Scheduling

  • CPU scheduling is the basis of multiprogrammed operating

systems. By switching the CPU among processes, the operating

system can make the computer more productive.

  • Basic Concepts

The idea of multiprogramming is relatively simple. A

process is executed until it must wait, typically for the

completion of some I/O request. In a simple computer system,

the CPU would then just sit idle.

Scheduling is a fundamental operating-system function.

Almost all computer resources are scheduled before use.