Computer System Organization and Operating System Components, Exercises of Operating Systems

An overview of computer system organization and the components of an operating system. It covers topics such as computer-system operation, interrupt handling, and individual operating system components including process management, main memory management, file management, i/o system management, secondary storage management, and networking. The document also discusses the role of an operating system in managing hardware and ensuring concurrent execution of processes.

Typology: Exercises

2015/2016

Uploaded on 08/26/2016

arif_iqbal1
arif_iqbal1 🇬🇧

4

(1)

2 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lesson 3
Objectives
Computer System Organization
Operating System Components
COMPUTER SYSTEM ORGANIZATION
Computer-system operation
One or more CPUs, device controllers connect through common bus providing
access to shared memory
Concurrent execution of CPUs and devices competing for memory cycles
I/O devices and the CPU can execute concurrently.
Each device controller is in charge of a particular device type.
Each device controller has a local buffer.
CPU moves data from/to main memory to/from local buffers
I/O is from the device to local buffer of controller.
Device controller informs CPU that it has finished its operation by causing an
interrupt.
Common functions of Interrupts:
Interrupt transfers control to the interrupt service routine generally, through the
interrupt vector, which contains the addresses of all the service routines.
Interrupt architecture must save the address of the interrupted instruction.
Incoming interrupts are disabled while another interrupt is being processed to
prevent a lost interrupt.
A trap is a software-generated interrupt caused either by an error or a user
request.
An operating system is interrupt driven.
Interrupt Handling
The operating system preserves the state of the CPU by storing registers and the
program counter.
Determines which type of interrupt has occurred:
Polling(Polling also refers to the situation where a I/O device is repeatedly checked for readiness,
and if it is not, the computer returns to a different task.)
Dr. Atta-ur-Rahman/
PAGE 3
pf3
pf4

Partial preview of the text

Download Computer System Organization and Operating System Components and more Exercises Operating Systems in PDF only on Docsity!

Lesson 3

Objectives

  • Computer System Organization
  • Operating System Components COMPUTER SYSTEM ORGANIZATION Computer-system operation
  • One or more CPUs, device controllers connect through common bus providing access to shared memory
  • Concurrent execution of CPUs and devices competing for memory cycles
  • I/O devices and the CPU can execute concurrently.
  • Each device controller is in charge of a particular device type.
  • Each device controller has a local buffer.
  • (^) CPU moves data from/to main memory to/from local buffers
  • I/O is from the device to local buffer of controller.
  • Device controller informs CPU that it has finished its operation by causing an interrupt. Common functions of Interrupts:
  • Interrupt transfers control to the interrupt service routine generally, through the interrupt vector , which contains the addresses of all the service routines.
  • Interrupt architecture must save the address of the interrupted instruction.
  • Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt.
  • A trap is a software-generated interrupt caused either by an error or a user request.
  • An operating system is interrupt driven. Interrupt Handling
  • The operating system preserves the state of the CPU by storing registers and the program counter.
  • Determines which type of interrupt has occurred:
  • Polling ( Polling also refers to the situation where a I/O device is repeatedly checked for readiness, and if it is not, the computer returns to a different task.)
  • vectored interrupt system ( An interrupt vector is the memory location of an interrupt handler, which prioritizes interrupts and saves them in a queue if more than one interrupt is waiting to be handled. An interrupt is a signal from a device attached to a computer, or from a program within the computer, that tells the OS (operating system) to stop and decide what to do next. When an interrupt is generated, the OS saves its execution state by means of a context switch, a procedure that a computer processor follows to change from one task to another while ensuring that the tasks do not conflict. Once the OS has saved the execution state, it starts to execute the interrupt handler at the interrupt vector.)
  • Separate segments of code determine what action should be taken for each type of interrupt

OPERATING SYSTEM COMPONENTS In order to get a complete overview of operating system we need to observe its individual components, their functionality and association with each other etc. these components are given subsequently.

  1. Process Management A program by itself is nothing unless its instruction executed by a CPU. A process is basically is “duration and steps of a program execution” or “unit of work in a system”.

Operating system maintains a process table for all the processes in terms of array of structures or linked lists. In time sharing systems, when more than one processes are simultaneously running sometime a process need to be freed from CPU, so kept in a suspended-mode. But before going to this mode its current status is stored in process table called core image , so that can be resumed afterwards. There are mainly two types of processes:

  • System processes (OS services)
  • User processes (user programs etc) A process may contain sub-processes inside it, so they might give a tree view. Operating systems is capable of:
  • Create/delete both system and users processes
  • The suspension/resumption of system and user processes
  • Provision of process synchronization
  • Provision of process communication
  1. (^) Main memory management

One of the main purposes of an OS is to provide an abstract version of hardware, means to display hardware in sense of some file or some named entity. For example, in windows control panel provide all hardware list in terms of directories, like printer, modem, scanner etc. Operating system manages these components by:

  • Their memory management (buffering, caching, spooling etc)
  • A general device driver interface
  • Drivers for specific hardware device
  1. Secondary storage management
  • Free space management
  • Storage allocation
  • Disk scheduling (de-fragmentation)
  1. Networking One of the most elegant operations of operating system is networking. Where more than one computer systems (no matter what kind of they are) can communicate via a common bus of some other media. In this way operating system manages:
  • Security risks
  • (^) Data transfer
  • Layers management
  • User authentication
  • Session management and much more
  1. Protection System One of the key features of operating system is to handle concurrent execution of multiple processes of different users without any interference with each other. In other words, no inter user interference, nor inter-processes interference, also which resources are allowed to which particular user and his authentication, privileges maintenance etc.