operating system in coa, Slides of Computer Architecture and Organization

these files contain slides on main topics of coa and covers each and every topic in detail...it is for both beginners and students

Typology: Slides

2021/2022

Available from 08/16/2022

SamenKhan
SamenKhan 🇵🇰

231 documents

1 / 39

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
+
Operating System
Support
1
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

Partial preview of the text

Download operating system in coa and more Slides Computer Architecture and Organization in PDF only on Docsity!

Operating System Support

+ Objectives and Functions

  • OS is a program that controls execution of application programs
  • OS acts as an interface between the user of a computer and the

computer hardware.

Objectives

◼ Convenience - An OS makes a computer more convenient to use.

◼ Efficiency - An OS allows the computer system resources to be used in an efficient

manner.

◼ The most important system program

◼ Masks the details of the hardware from the programmer and

provides the programmer with a convenient interface for using the

system

+ Operating System Services

  • Program creation - Editors, debuggers.
  • Program execution - Tasks such as, Instructions and data load in main memory, I/O device and file initialization
  • Access to I/O devices - OS hides details of specific set of instructions and control signals for every device. Programmer thinks in terms of simple read and write.
  • Controlled access to files - Protection mechanism to control access to files in case of multi-users.
  • System access - Protection of resources and data from unauthorized users
  • Error detection and response - Operating system deals with errors in a way to minimize impact on running application. Response may be ending program that caused the error, or retrying the operation etc.
  • Accounting - Usage statistics for various resources and monitor performance.

Operating System

as

Resource Manager

A computer is a set of resources for the movement, storage, and processing of data and for the control of these functions ◼ The OS is responsible for managing these resources The OS as a control mechanism is unusual in two respects: ◼ The OS functions in the same way as ordinary computer software – it is a program executed by the processor ◼ The OS frequently relinquishes control and must depend on the processor to allow it to regain control

+ Types of Operating Systems

◼ Interactive system

◼ The user/programmer interacts directly with the computer to request the execution of a job or to perform a transaction ◼ User may, depending on the nature of the application, communicate with the computer during the execution of the job

◼ Batch system

◼ Opposite of interactive ◼ The user’s program is batched together with programs from other users and submitted by a computer operator ◼ After the program is completed results are printed out for the user

+ Early Systems

◼ From the late 1940 s to the mid- 1950 s the

programmer interacted directly with the computer

hardware – there was no OS

◼ Processors were run from a console consisting of display lights, toggle switches, some form of input device and a printer

◼ Problems:

◼ Scheduling ◼ Sign-up sheets were used to reserve processor time ◼ This could result in wasted computer idle time if the user finished early ◼ If problems occurred the user could be forced to stop before resolving the problem ◼ Setup time ◼ A single program could involve ◼ Loading the compiler plus the source program into memory ◼ Saving the compiled program ◼ Loading and linking together the object program and common functions

+ Desirable Hardware Features ◼ Memory protection ◼ User program must not alter the memory area containing the monitor ◼ The processor hardware should detect an error and transfer control to the monitor ◼ The monitor aborts the job, prints an error message, and loads the next job ◼ Timer ◼ Used to prevent a job from monopolizing the system ◼ If the timer expires an interrupt occurs and control returns to monitor

◼ Privileged instructions

◼ Can only be executed by the monitor ◼ If the processor encounters such an instruction while executing a user program an error interrupt occurs ◼ I/O instructions are privileged so the monitor retains control of all I/O devices ◼ Interrupts ◼ Gives the OS more flexibility in relinquishing control to and regaining control from user programs

+ Multi-Programming with Two Programs

+ Multi-Programming with Three Programs

Uniprogramming Multiprogramming Processor use 20% 40% Memory use 33% 67% Disk use 33% 67% Printer use 33% 67% Elapsed time 30 min 15 min Throughput rate 6 jobs/hr 12 jobs/hr Mean response time 18 min 10 min Table 8. Effects of Multiprogramming on Resource Utilization

+ Time Sharing Systems

◼ Used when the user interacts directly with the computer

◼ Processor’s time is shared among multiple users

◼ Multiple users simultaneously access the system through

terminals, with the OS interleaving the execution of each user

program in a short burst or quantum of computation

◼ Example:

◼ If there are n users actively requesting service at one time, each user will only see on the average 1 / n of the effective computer speed

+ Process

Process: A program in execution

Process Control Block (PCB)

  • Identifier
  • State
  • Priority
  • Program counter
  • Memory pointers
  • Context data
  • I/O status
  • Accounting information

New Ready Blocked Running Exit

Figure 8.7 Five-State Process Model

Admit Dispatch Timeout Release Event Wait Event Occurs Five State Process Model