Operating Systems: Components and History

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What are the four key components that a computer system can be divided into?

Hardware, Operating System, Application Programs, and Users.

In simple terms, describe the role of an operating system within a computer system.

It controls the hardware and provides necessary resources for programs.

What is the core of the operating system called, and what is its primary function?

The core is called the kernel, and it manages the resources and operations of the system.

Briefly describe the main goal of abstraction in the context of computer system components.

<p>The goal is to hide the complexities of hardware by creating a simplified interface for users and applications.</p> Signup and view all the answers

What are three key objectives of operating systems?

<p>Hide details of hardware, allocate resources to processes, and provide a worthwhile effective user interface.</p> Signup and view all the answers

Name three strategies used by operating systems.

<p>Batch operating systems, time-sharing systems, and real-time systems.</p> Signup and view all the answers

In the early history of operating systems, what was the primary way programs were run, and what does this entail?

<p>Programs were run as batch jobs, meaning they were processed in a group without direct user interaction.</p> Signup and view all the answers

What is spooling, and why was it introduced in early operating systems?

<p>Spooling is the process of placing data into a temporary working area for another program to process. It was introduced to improve program running time by eliminating waiting for slow I/O devices.</p> Signup and view all the answers

List at least five components of operating systems.

<p>Process management, main memory management, file management, I/O system management and command interpreter.</p> Signup and view all the answers

From 'programmer's view', what does an operating system provide for program execution?

<p>The operating system provides an environment where users can conveniently run programs.</p> Signup and view all the answers

From 'system’s view', what are three services that an operating system provides?

<p>Allocation of available resources, usage details tracking, and security and protection measures.</p> Signup and view all the answers

Outline the primary role of system calls within an operating system.

<p>System calls allow user-level processes to request specific services from the operating system that the process cannot directly access.</p> Signup and view all the answers

Explain what system programs are and provide two examples.

<p>System programs provide basic functions to users, negating the need for users to write their own environments. Examples include file management and program execution.</p> Signup and view all the answers

What is a process?

<p>A process is a prime/key element used in computation in modern computing systems, representing a program in execution.</p> Signup and view all the answers

How does CPU handle multiple processes in a Multiprogramming environment?

<p>In a multiprogramming environment, the CPU switches from one process to another, running each for a given duration.</p> Signup and view all the answers

Distinguish between foreground and background processes.

<p>Foreground processes interacts with the user while background processes do not.</p> Signup and view all the answers

What is the role of a process manager in an operating system?

<p>The process manager is responsible for tasks such as creating, terminating, suspending, resuming, and scheduling processes.</p> Signup and view all the answers

What is a PCB (Process Control Block) and what is its purpose?

<p>PCB (Process Control Block) is used to track information on how the CPU switches from process to process and store the details of each process.</p> Signup and view all the answers

What are the typical steps involved in creating a new process?

<p>Naming the process, inserting it into the system's process list, determining its initial priority, creating a process control block, and allocating initial resources.</p> Signup and view all the answers

List three possible causes of process termination.

<p>Normal exit, error exit, and fatal error.</p> Signup and view all the answers

Explain the hierarchy in processes. What are 'parent processes' and 'child processes'?

<p>When a process creates another process, it forms a hierarchical relationship: the creator is the parent process and the created is the child process.</p> Signup and view all the answers

How are signals managed in process groups in UNIX?

<p>When a user sends a signal, it is sent to all processes in the group, and each process can choose how to handle it: accept, ignore, or follow the default action.</p> Signup and view all the answers

Outline how process hierarchy is generally handled in Windows operating systems compared to UNIX.

<p>Windows does not have a strict process hierarchy; all processes are treated almost equally, using special tokens for control, while UNIX uses a group-based hierarchy.</p> Signup and view all the answers

Name 3 or more possible states of a process.

<p>Running, Ready, Blocked, New, Terminate and Waiting.</p> Signup and view all the answers

What triggers allowable state transitions in a process waiting for an I/O operation?

<p>Occur when I/O operation completes or other event process waiting for completes</p> Signup and view all the answers

Which state transition can only be initiated by the running process itself?

<p>Block</p> Signup and view all the answers

Explain the key role of Process descriptor.

<p>The OS keeps track of all processes. Process descriptor is the basic data structure used to represent specific state of process.</p> Signup and view all the answers

List at least five data fields that a process descriptor usually contains.

<p>Processor registers content, unique identification, its processor state, The address space mapping details, memory state and list of open files.</p> Signup and view all the answers

What is process scheduling?

<p>OS needs to schedule the CPU for processes and scheduling algorithms</p> Signup and view all the answers

Describe two types of Jobs with Regard to Process Execution.

<p>CPU-intensive and I/O-intensive jobs</p> Signup and view all the answers

What are at least four key factors that affect scheduling decisions in an operating system?

<p>CPU utilization, throughput, turnaround time, and waiting time.</p> Signup and view all the answers

What are the three types of schedulers?

<p>Long-term scheduler, short-term scheduler and medium-term scheduler</p> Signup and view all the answers

What is the primary responsibility of the long-term scheduler?

<p>The long term scheduler is responsible for careful selection of CPU and I/O intensive jobs for scheduling</p> Signup and view all the answers

What is the main function of the short-term scheduler (or CPU scheduler)?

<p>Selects jobs in the memory, which are ready to execute, and allocates CPU to one of them.</p> Signup and view all the answers

Explain the role provided by a medium-term scheduler.

<p>The medium-term scheduler is an intermediate level of scheduling that removes processes from memory and reloads them later to continue where they left off</p> Signup and view all the answers

In FCFS (First Come First Served) scheduling, how is the CPU allocated to processes?

<p>The CPU is allocated to the process that requests it first.</p> Signup and view all the answers

Suggest a disadvantage of FCFS (First Come First Served) Scheduling.

<p>Convoy effect: short process behind long process have long wait times.</p> Signup and view all the answers

How does the Shortest-Job-First (SJF) scheduling algorithm work?

<p>It schedules the process with the shortest CPU burst time.</p> Signup and view all the answers

What's the difference between preemptive and non-preemptive SJF (Shortest-Job-First) scheduling?

<p>In preemptive, a running process can be interrupted if a new process arrives with a shorter burst length. Non-preemptive cannot be pre-empted until it completes its CPU burst.</p> Signup and view all the answers

Flashcards

Computer Hardware

Provides basic computing resources, e.g., CPU, memory, I/O devices.

Operating System

Controls and coordinates the use of hardware among various applications and users.

Application Programs

Define the ways in which the system resources are used to solve computing problems for users.

Kernel

The system program that always runs on the computer with authority to run all hardware instructions.

Signup and view all the flashcards

Abstraction by OS

Hiding the complexity of hardware by creating a simpler interface.

Signup and view all the flashcards

Resource Allocation

Allocating computer resources such as memory and CPU to different processes.

Signup and view all the flashcards

User Interface

Providing an effective and user-friendly interface for interaction with the system.

Signup and view all the flashcards

Batch Operating Systems

Operating systems that process jobs in groups, without user interaction during execution.

Signup and view all the flashcards

Time Sharing Systems

Operating systems that allow multiple users to share the computer resources simultaneously.

Signup and view all the flashcards

Spooling

Improving program running time without waiting for slow I/O devices using buffers.

Signup and view all the flashcards

Process

A prime/key element used in doing calculations in a computing system.

Signup and view all the flashcards

Program Execution

Operating system's functionality that allows users to run programs conveniently.

Signup and view all the flashcards

I/O Operations

Operating system's method of handling input/output procedures required by programs.

Signup and view all the flashcards

Communication

OS's function to provides service when processes need to communicate offering support, irrespective of location.

Signup and view all the flashcards

Error Detection

Monitors system to find and prevent errors.

Signup and view all the flashcards

Usage Details

A service to keep track of resource usage for improving system services.

Signup and view all the flashcards

Kernel

Functions in privilege state, always running, responds to service calls/interrupts.

Signup and view all the flashcards

System Programs

Provides basic functions to users; no need to write their program environment.

Signup and view all the flashcards

Process Control Block (PCB)

A data structure used to store state details during process execution.

Signup and view all the flashcards

Process Model

Sequential use of CPU switches in order to run several programs.

Signup and view all the flashcards

Parent-Child Process

Where creator is called the parent process, and the newly created process is the child process

Signup and view all the flashcards

UNIX Process Groups

Grouping of a process with all of its child processes in UNIX.

Signup and view all the flashcards

Windows: Special Token

Assigns a handle to parent with ability to pass to another process for control.

Signup and view all the flashcards

Process State

Indicates the current condition of a process.

Signup and view all the flashcards

Process Table

Maintains a data structure (process table) with one entry per process.

Signup and view all the flashcards

Maximum Process support

System can support at one time.

Signup and view all the flashcards

Process Model

Where all the runnable software on the computer (sometimes including the operating system) is organized into a number of sequential processes.

Signup and view all the flashcards

Process Manager Algorithms

Where the process manager algorithms change the state of various processes depending on the current activity.

Signup and view all the flashcards

Multiprogramming

Ensures CPU time is shared across programs.

Signup and view all the flashcards

CPU Intensive Jobs

A job that depends more on CPU

Signup and view all the flashcards

I/O Intensive Jobs

A job that depends more on input/output

Signup and view all the flashcards

Throughput

A system utilization that is the number of jobs which are completed within a time period

Signup and view all the flashcards

Turnaround time

How long does completion of the Job take?

Signup and view all the flashcards

Waiting time

Length Queue for accessing the CPU

Signup and view all the flashcards

Interactive system

Suggested important, to minimize variance in response.

Signup and view all the flashcards

Uniprocessor system

For the running process, all others blocked or in ready queue.

Signup and view all the flashcards

Long Term scheduler

Responsible for careful selection, depending on jobs.

Signup and view all the flashcards

Medium Term scheduler

Used to remove processes from memory.

Signup and view all the flashcards

Short term scheduler

Selecting jobs in memory, allocating CPU to one of them.

Signup and view all the flashcards

First Come First Served

That is the process which requests the CPU first. Managed with queue.

Signup and view all the flashcards

Shortest-Job-First Scheduling

Associates with its next CPU burst and schedule with minimum length.

Signup and view all the flashcards

Study Notes

  • This document contains study notes for COU4302 Operating Systems, Dayschool 1.
  • The notes cover objectives, the history of operating systems, components, functions, process concepts and process states.

Course Overview

  • There are two No Book Tests each lasting one hour.
  • CAT 1 questions are from sessions 1-12.
  • CAT 2 questions are from sessions 13-25.
  • The final examination lasts 2 hours.

Computer System Components

  • A computer system is divided into four components: hardware, operating system, application programs, and users.
  • Hardware provides basic computing resources like the CPU, memory, and I/O devices.
  • The operating system controls and coordinates the use of hardware among applications and users, examples being Windows, Linux, and Unix.
  • Application programs define the ways system resources are used to solve computing problems, examples being word processors, compilers, web browsers, database systems and video games.
  • Users interact with the computer, which may include people, machines, and other computers.

About Operating Systems (OS)

  • An OS controls the hardware and provides the resources required for programs on a computer.
  • The OS makes hardware usable, keeps track of all PC resources, and efficiently manages/allocates them.
  • The OS provides functions to assist in the processing and execution of programs.
  • The core of the operating system is the "kernel".

Kernel Details

  • The kernel is a control program that functions in a privileged state and has the authority to run all hardware instructions; it is always running.
  • The kernel will respond to service calls from processes and interrupts from devices.

Objectives of an Operating System

  • The OS will hide hardware details by creating abstractions.
  • The OS will allocate resources to processes.
  • The OS will provide an effective user interface.

Strategies of Operating Systems

  • Batch Operating Systems process jobs in batches.
  • Time Sharing Systems allow multiple users to share the computer's resources simultaneously.
  • Workstations are high-performance computers designed for individual use
  • Real Time Systems are designed to respond to events within a specific time frame.
  • Network Computing distributes processing across multiple computers on a network.

History of Operating Systems

  • Early computers did not have operating systems or programming languages.
  • In the early 1950s punch cards were introduced.
  • General Motors Research Laboratories introduced the first operating system for their IBM 701.
  • Initially programs ran as batch jobs.
  • 1950: One job ran at a time, known as single-stream batch processing.
  • 1960: Batch operating systems ran several jobs at once.
  • Multiprogramming to improve memory and I/O utilization was introduced and spooling improved program running time without waiting for slow I/O devices.
  • Time sharing was later introduced.

Operating System Components

  • Process Management
  • Main Memory Management
  • File Management
  • I/O System Management
  • Secondary Storage Management
  • Networking
  • Protection System
  • Command Interpreter

Operating System Functions

  • Services provided by operating systems can be viewed from two perspectives: what they provide for programmers (programmer's view) and what they do for the system itself (system's view).

Programmer's View of OS Services

  • Program Execution: The OS provides an environment where users can conveniently run programs.
  • I/O Operations: Each program requires I/O procedures which are handled by the OS.
  • File System Manipulation: The OS provides file management services.
  • Communication: The OS provides services for processes to communicate with each other.
  • Error Detection: The OS monitors the system to detect and prevent errors.

The System's View of OS Services

  • Allocation of Available Resources: The OS handles resource requests in a multiprogramming environment.
  • Usage Details: Keeps track of which user used which type of resources for service improvement.
  • Security and Protection: The OS will protect programs, data, and control access, due to users competing for resources.

System Calls

  • System calls allow user-level processes to request services from the OS that the process itself cannot access directly.
  • Five major categories of system calls: process management, file management, device management, communication, and information management.
  • System calls are developed using high-level languages like C and C++; in Windows, they are provided as part of the WIN32 API.

System Programs

  • These provide basic functions to users, eliminating the need for users to write their own environment for programs.
  • Different OS provides these services in different ways.
  • System programs can include file management, program execution, status information, support for programming languages, file modification, and communications.

Process Concepts

  • A process is a key element used in computation in modern systems.
  • A process can be a program in execution, an asynchronous activity or the "locus (place) of control" of a procedure in execution.
  • A process’ existence is represented with a process control block in the operating system.
  • A process is the dispatchable unit of a program and is the entity to which processors are assigned.
  • Programs are passive entities until the processor selects them for execution when they become active entities.
  • While running a user program, a computer will also read from disk and output text to a screen or printer.
  • In a multiprogramming environment, the CPU switches from process to process, running each for a given duration.
  • The CPU responds to program requests, I/O requests, and error traps.
  • Process management refers to the services provided by the OS to support the administration and execution of a collection of processes in an order.
  • The CPU is running only one program at a time, giving users an idea of parallelism.

Foreground vs Background Processes

  • Foreground Processes are interactive and user driven.
  • Background Processes are not interactive, like email or print servers.

Programmer's View of Processes

  • The process manager, part of the OS, can create, terminate, suspend, and resume processes.
  • The process manager can change a process's priority, block or wakeup a process, and dispatch a process.
  • Processes can communicate with each other (inter-process communication).
  • Creating a process involves operations including naming the process, inserting it in the system's process list, determining initial priority, creating the process control block and allocating the process' initial resources.

The Process Model

  • In the process model, all runnable software on the computer will organize as sequential processes.
  • The CPU switches from process to process.
  • PCB (Process Control Block) is used to track how the CPU switches from process to process and store the details of processes.
  • A process is an activity with a program, input, output, and a state.

Process Creation

  • Processes creation occurs upon system initialization, when a running process executes a process creation call, from a user program request, or when a batch job is initiated.

Process Termination

  • Process termination can be upon normal exit or end, error exit or abort, encountering a fatal error, or being killed by a user or another process.

Hierarchy in Processes

  • When a process creates another process, it creates a hierarchical relationship where the creator is called the parent process, and the newly created process is the child process.
  • Child processes can create more child processes, forming a tree-like structure.
  • This hierarchy will allow a parent to have some control of the child process.

Process Groups in UNIX

  • In UNIX, a process and all its child processes can form a process group.
  • When a user sends a signal, like from the keyboard, it is sent to all processes in the group.
  • Each process can choose how to handle the signal: accept it, ignore it, or follow the default action, like termination.

Process Hierarchy in Windows

  • Windows does not have a strict process hierarchy and treats all processes equally.
  • Windows assigns a special token or handle to the parent instead of a parent-child relationship, which can be passed to another process for control.
  • Newer versions of Windows (Windows 7) has implemented the concept of a process tree and gives the option to end either the process or the process tree in task manager.

States of Processes

  • A process' state changes due to different events.
  • The process manager algorithms will change the state of processes depending on the current activity.
  • A process can be in one of the following states: Running, Ready, or Blocked.
  • Running State: the process currently uses the CPU
  • Ready State: the process could use a CPU, if available
  • Blocked State: the process is waiting for an event

Processes State Transition

  • New: a newly admitted process to the system
  • Ready : Process ready to be executed
  • Running : Process in execution
  • Waiting/Blocked : Process blocked to await some event
  • Terminate: Process completes execution

Allowable State Transition

  • I/O operation completes other events a process is waiting for
  • Dispatch (process name) : Ready -> Running state
  • Timer runout (process name) : Running -> Ready
  • Block (process name) : Running -> Blocked
  • Wakeup (process name) : Blocked -> Ready

Process Control Block

  • The operating system must keep track of each process status.
  • To implement the process model, the operating system maintains a data structure or table called a process table with one entry per process.
  • A process descriptor is the basic data structure for the specific state of each process.
  • Process descriptor entries are sometimes called the process control block (PCB).
  • A PCB is where information to save a process when it is suspended is stored.
  • This information is useful when the process switches states, so it can restart later as if it was never stopped.

Process Descriptor Content

  • Process descriptors contain processor registers content at when the process was last suspended and Unique identification of the process.
  • The process descriptor also contains the processor and its memory state and The address space mapping details.
  • The resources allocated and required and the number for the processor when running as well as all program counters, CPU registers, I/O status and any CPU Scheduling

Process Descriptor Fields

  • Internal process name
  • State
  • Owner
  • Parent process
  • List of reusable resources
  • List of consumable resources
  • List of file descriptors
  • Message queue
  • Protection domain
  • CPU status register content
  • CPU general register content

Operating System Design Issues

  • When an OS is configured, it has a fixed number of process descriptors that represents the maximum number of processes it can support at one time.
  • A process descriptor allocates when the process creates and releases when terminates or exits
  • The process manager manages the process descriptor, but the OS can change its various fields.

Multiprogramming

  • The CPU executes multiple jobs or tasks at a given time.
  • This ensures CPU time is shared across programs and achieves higher throughput by maximizing system resource occupation.
  • When a system employs multiprogramming, multiples processes compete for CPU concurrently.
  • Jobs are kept in the memory so when one stalls the OS takes CPU it away from it and moves it to another.
  • OS will schedule the CPU for processes and scheduling algorithms is a primary OS function.

Types of Jobs with process execution

  • CPU-intensive Jobs use more CPU time.
  • I/O-intensive Jobs use more I/O time.

Scheduling Decisions Factors

  • Decisions are affected by CPU utilization, and the throughput ,as well as turnaround time, weighting time and response time.
  • CPU utilization of 40% occurs in a lightly loaded system, compared to 90% observed in heavily loaded systems.

Important factors on scheduling decisions

  • In interactive system it is important to minimize the variance in the response time than minimizing the average response time
  • In a uniprocessor system there is only a single running process at CPU, all others are blocked or in the ready queue which is a linked list.

Schedulers

  • Job or Long-Term Scheduler
  • CPU or Short-Term Scheduler
  • Medium-Term Scheduler

Process Queuing

  • A long-term scheduler manages the Ready Queue.
  • A short-term scheduler manages the CPU
  • I/O devices have Waiting Queues.

Long-Term/Job Scheduler

  • A long-term scheduler determines which jobs are admitted to the system for processing and selects jobs from the job queue that should be loaded into main memory for execution.
  • Jobs are carefully scheduled to ensure CPU and I/O intensive jobs for scheduling are available.

Short-Term/CPU Scheduler

  • Selects jobs in memory ready to execute and allocates CPU time to one.
  • The short-term scheduler must select a new process quite often and must be fast.
  • Some time sharing systems have only the short-term scheduler.

Medium-Term Scheduler

  • It is known as medium term scheduler, and it is an additional intermediate level of scheduling for memory with virtual memory.
  • Useful for removing processes from memory and reload that processes where it left off at a later point.
  • This method named swapping and frees commited memory.

First Come First Served (FCFS)/ FIFO Scheduling

  • The process which requests CPU first gets the CPU first , implemented via FIFO queue.

Shortest-Job-First (SJR) Scheduling

  • Associate the length of its next CPU burst with each process and use those lengths to scheduling.
  • This will minimize the waiting jobs while long one is running and SJR will provide minimum average waiting time for a given set of processes.
  • If two jobs have same burst time FCFS is used.

SJF (Shortest-Job-First) Schemas

  • Non-Preemptive Scheme Once CPU is assigned to process can not be preempted until CPU burst gets complete.
  • Pre-emptive Scheme If process arrives with burst length smaller than that of the remaining running time, the former will be preempt and called Shortest-Remaining-Time-First (SRTF).

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser