Operating System: Hardware and User Interface

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

Which of the following is NOT a typical role of an operating system?

  • Providing a user interface
  • Interpreting commands
  • Managing hardware resources
  • Developing application software (correct)

The primary goal of an operating system is to make the computer system inconvenient for the user.

False (B)

What is the term for an operating system that executes multiple jobs by switching between them, allowing users to interact with each program while it is running?

Time-sharing system

In a multiprogramming system, ______ utilization to ensure the CPU always has one job to execute.

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

Match the following operating system types with their descriptions:

<p>Batch System = Processes similar jobs together to run as a group. Time-Sharing System = Allows many users to share the computer simultaneously. Real-Time System = Guarantees that critical tasks complete on time. Distributed System = Processors communicate with each other through various communication models.</p> Signup and view all the answers

Which of the following is a disadvantage of a time-sharing operating system?

<p>Higher complexity compared to multiprogrammed OS (B)</p> Signup and view all the answers

In asymmetric multiprocessing, each processor runs an identical copy of the operating system.

<p>False (B)</p> Signup and view all the answers

What is the term used to describe the ability of a system to continue operating, albeit slower, in the event of a processor failure?

<p>Increased reliability</p> Signup and view all the answers

In real-time systems, data is typically stored in ______ rather than secondary storage.

<p>short-term memory</p> Signup and view all the answers

Match the following real-time system types with their characteristics:

<p>Hard Real-Time Systems = Guarantees that critical tasks are completed on time. Soft Real-Time Systems = Gives priority to critical tasks but may occasionally miss deadlines.</p> Signup and view all the answers

Which function of the operating system is responsible for managing CPU time, memory, files, and I/O devices?

<p>Resource Management (D)</p> Signup and view all the answers

System calls provide an interface between a process and assembly language instructions.

<p>True (A)</p> Signup and view all the answers

What type of system programs provide a convenient environment for program development and execution?

<p>System programs</p> Signup and view all the answers

A program in execution is known as a ______.

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

Match each CPU scheduling state with its description:

<p>New = The process is being created. Ready = The process is waiting to be assigned to a processor. Running = Instructions are being executed. Waiting = Waiting for some event to occur.</p> Signup and view all the answers

Which CPU scheduling algorithm allocates the CPU to the process that requests it first?

<p>First Come, First Served (D)</p> Signup and view all the answers

The Shortest Job First (SJF) scheduling algorithm can only be preemptive.

<p>False (B)</p> Signup and view all the answers

What scheduling algorithm assigns a priority to each process, and the CPU is allocated to the process with the highest priority?

<p>Priority scheduling</p> Signup and view all the answers

In Round Robin scheduling, a small unit of time called a(n) ______ is used to switch between processes.

<p>time slice</p> Signup and view all the answers

Match each condition for a Critical Section problem with its description:

<p>Mutual Exclusion = If one process is in its critical section, no other process can be in its critical section. Progress = If no process is in its critical section, and processes want to enter, only those not in their remainder section can enter next. Bounded Waiting = There is a finite limit on how long a process waits to enter its critical section.</p> Signup and view all the answers

What is the synchronization tool used to solve the critical section problem, accessed through wait and signal operations?

<p>Semaphore (A)</p> Signup and view all the answers

In a binary semaphore, the integer value can range between 0 and 2.

<p>False (B)</p> Signup and view all the answers

What classical synchronization problem involves multiple philosophers thinking and eating at a shared table with limited chopsticks?

<p>Dining philosophers problem</p> Signup and view all the answers

A major difficulty in the virtual machine approach is regarding the disk system. A solution is to provide virtual disks which are also known as ______.

<p>mini disks</p> Signup and view all the answers

Match each step below with its corresponding function in the atomic transaction process:

<p>Undo = Restores the value of old data updated by a transaction to the old values. Redo = Sets the value of data updated by a transaction to the new values.</p> Signup and view all the answers

Which condition must hold to the system define as deadlock?

<p>All the above (A)</p> Signup and view all the answers

A safe state will prevent the potential execution of a deadlock if no process exceeds its maximum resources

<p>True (A)</p> Signup and view all the answers

Memory consists of words or bytes, each with its own _________.

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

The set of all logical address generated by a program is a logical address __________.

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

Match the binding of instructions to data to its address in stage with:

<p>Compile time = The address is known a priori, must recompile code if starting location changes Load time = Must generate relocatable code if memory location is not known during compile time. Execution time = Binding delayed until run time if the process can be moved during its exection.</p> Signup and view all the answers

Which scheme protects user processes from each other?

<p>Relocation-register scheme (A)</p> Signup and view all the answers

The Best-Fit algorithm allocates the largest partition to an incoming process.

<p>False (B)</p> Signup and view all the answers

What is the name memory management scheme in which the physical address space of a process can be non contiguous?

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

Every address generated by the CPU can be divided into a page number and a page________.

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

Match the following steps for handling page faults

<p>Check the PMT = Check the associated processes's for validity in its inner page table Valid = Then its main Memory. Find free frame in memory = Assign the new page to it Begin Disk read operation = Read operation to the assigned page has begun.</p> Signup and view all the answers

When a system is in thrashing state which of these problems happen?

<p>All the above (D)</p> Signup and view all the answers

The goal of a page replacement algorithm is to maximize system performance..

<p>True (A)</p> Signup and view all the answers

Which page replacement algorthim selects and replaces the page the won't be used for the longest time, ie., replace the w/ the gratest forward dsitance

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

Replaces pages based on their orders of arrival: oldest page is___.

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

Match which of the following file attributes

<p>Identifier = Unique number that finds the file Type = Information used for these systems what support different of files. Location = Pointer to deivce and location File operations = Operating System reads repositions. deltees and truncates file</p> Signup and view all the answers

When we use tree to store organization files, the tree is stored on the___________ field to allow further searching key in a particular key.

<p>Key (C)</p> Signup and view all the answers

Flashcards

Operating System (OS)

A program that manages all the computer hardware, acting as an intermediary between users and hardware.

System Goals: Convenience

A measure of how conveniently the computer system is for the user.

System Goals: Efficiency

Maximizing the utilization and efficiency of computer hardware.

Mainframe System

A type of OS designed for extensive data processing, maximizing resource utilization.

Signup and view all the flashcards

Batch System

Users submit jobs consisting of programs, data, and control information, without direct interaction.

Signup and view all the flashcards

Multiprogrammed System

Increases CPU utilization by organizing jobs so the CPU always has one to execute.

Signup and view all the flashcards

Time Sharing System

A system where the CPU executes multiple jobs by rapidly switching between them.

Signup and view all the flashcards

Personal Computer System Goals

Maximizing user convenience and responsiveness.

Signup and view all the flashcards

Multiprocessor Systems

Systems with multiple processors sharing resources like the computer bus and memory.

Signup and view all the flashcards

Symmetric Multiprocessing (SMP)

Each processor runs an identical copy of the operating system (OS).

Signup and view all the flashcards

Asymmetric Multiprocessing

A master processor assigns specific tasks to slave processors

Signup and view all the flashcards

Distributed Systems

Processors do not share memory or a clock; each a local memory.

Signup and view all the flashcards

Real Time Systems

Systems with rigid time requirements for processing data; vital for real-time operations.

Signup and view all the flashcards

Hard real time systems

Guarantees that critical tasks are completed on time; often for sudden, immediate tasks.

Signup and view all the flashcards

Soft Real-Time Systems

A less restrictive type of real-time system where occasional missed deadlines are acceptable.

Signup and view all the flashcards

Process

A program in execution; an active entity with various associated resources.

Signup and view all the flashcards

Process State

The state of a process as it executes – new, ready, running, waiting, or terminated.

Signup and view all the flashcards

Resources needed by Process

CPU, main memory, and I/O devices.

Signup and view all the flashcards

OS for Process Control

Manages processes within the systems.

Signup and view all the flashcards

Main Memory Management

Keeps track of memory use, decides process loading, and allocates space.

Signup and view all the flashcards

File Management

Provides a uniform, logical view of information storage via files.

Signup and view all the flashcards

I/O System Management

Hides hardware specifics, including buffering, caching, and spooling.

Signup and view all the flashcards

Secondary Storage Management

Provides secondary storage for data and programs.

Signup and view all the flashcards

Networking

Connecting processors that don't share memory through the lines.

Signup and view all the flashcards

Protection/Security

Preventing unauthorized process activity through multiple users execution.

Signup and view all the flashcards

Command Interpretation

Interprets user input as commands, translating it to system actions.

Signup and view all the flashcards

System calls

The interface between a process and the OS, usually via assembly language instructions.

Signup and view all the flashcards

Process Control: End, Abort

A system call to end a running program execution.

Signup and view all the flashcards

Process Control: Load, Execute

A system call to load and execute another program.

Signup and view all the flashcards

Process Control: Create/Terminate

A system call used to create a new process or job.

Signup and view all the flashcards

Process Control: Get/Set attrb.

Determine and reset process attributes.

Signup and view all the flashcards

Process Control: Wait time

Waiting for creation of new jobs/operations.

Signup and view all the flashcards

Process Control: Signal Event

Waiting/assigning events to occur based when the jobs signal signal.

Signup and view all the flashcards

File manipulation: Create

System calls that create and delete files.

Signup and view all the flashcards

File manipulation: Opens

System calls to open files and close files.

Signup and view all the flashcards

File manipulation: Read/Write/

Ability to read, write, reposition from a file.

Signup and view all the flashcards

Device M: Request/Release

A mechanism that requests and releases devices as required.

Signup and view all the flashcards

I. Maintenance: Get/Set Date

A system call to get/set the present date and/or time.

Signup and view all the flashcards

I. Maintenance: Get/Set data

Returning info about curr users and free memory.

Signup and view all the flashcards

I. Maintenance: Get/Set proc

OS stores information about system and accesses it through system calls.

Signup and view all the flashcards

Communication: Message Model

Exchanging information through communication facility or operating processes.

Signup and view all the flashcards

Study Notes

Operating System Basics

  • The operating system is a manager of hardware and software.
  • It acts as an intermediary between users and computer hardware.
  • Primary objectives include controlling computer hardware and providing an interactive user interface for command interpretation.
  • It is a fundamental component of nearly all computer systems.

Hardware Management

  • The operating system manages and controls hardware resources like the processor, memory, and disk space.
  • It displays outputs, including error notifications, on the monitor.
  • The operating system error handling procedure ensures devices function and communicate properly.

User Interface

  • The operating system organizes applications for user access, usage, and storage.
  • It provides a stable and consistent way for applications to interact with hardware, abstracting hardware details from the user.
  • It displays error messages when programs malfunction, regaining control and halting the application.

Computer System Components

  • It comprises the computer hardware, operating system, utilities, application programs, and the end user.
  • The operating system oversees and coordinates all hardware uses as well as various user application programs.
  • It is the first program loaded and remains in memory continuously.

System Goals

  • It aims to offer an environment for program execution that is characterized by its convenience to the user as primary goal.
  • Efficiency in hardware utilization is a secondary goal.

User View

  • User interaction with computer varies based on interface (Windows XP, Vista, 7).
  • Personal computer OS design prioritizes ease of use and resource utilization.
  • Mainframe/minicomputer setups involve shared resources accessed via terminals, with OS optimizing resource utilization.
  • Workstations networked with servers and other workstations require the OS to balance individual usability and resource sharing.

System View

  • From the computer's perspective, the OS mediates between hardware and software.
  • It manages resources like CPU time, storage, and I/O devices.
  • Being a control program concerned with operation usage and I/O, it manages user program execution and corrects errors.

Types of Operating Systems

  • Early Mainframe Systems handled commercial and scientific tasks, evolving from batch processing to time-sharing systems.
Batch/Early Systems
  • Early computers used card readers and tape drives for input, and line printers and card punches for output.
  • Users submitted jobs including programming, data, and control information without direct computer interaction.
  • The OS allowed automatic control transfer between jobs and resided in memory.
  • Similar jobs are batched together to speed up processing. This was know as spooling.
  • CPU downtime is the primary disadvantage.
Multiprogrammed Systems
  • This uses CPU by organizing its jobs to always have one running.
  • Keeping jobs in memory simultaneously to increase CPU usage.
  • A subset of jobs is kept in the job pool.
  • CPU can switch to another job if one job waits, improving efficiency.
  • This system provides user decision making and multitasking also know as scheduling.
Time Sharing Systems
  • Multitasking is achieved by rapidly switching between jobs for interaction.
  • Interactive systems allow user communication with OS or programs via keyboard/mouse for quick responses.
  • Short actions means less computing to each user, with the end resulting in multiple people working on the computer all at the same time.
  • Memory management and protection and disc management are advantages of using this system.
  • This also offers concurrent execution, and more complicated CPU schemes

Personal Computer System/Desktop System

  • Personal computers in the 1970s prioritized user convenience and response.
  • File protection is used when other computers have access to the PC.
  • The lack of protection led to easy data destruction via self-replicating programs.

Microprocessor/Parallel/Tightly Coupled Systems

  • These were equipped with multiple processors sharing bus, clock, memory, and peripherals. This is found in UNIX & LINUX.
  • Multiprocessor systems improve throughout, reliability, and cost.
  • Increased throughput
  • Reliability if distributed among processors, the others do not need to halt when one does
  • Multiprocessor systems lower cost, as they require less peripherals than a traditional setup
Symmetric Multiprocessing (SMP)
  • Each processor has an identical copy of the OS and can communicate.
  • Modern OS such as Windows NT, Solaris, LINUX, and OS/2 support SMP.
Asymmetric Multiprocessing (Master-Slave Processors)
  • Each processor tackles explicit tasks, with the master processor allocating and scheduling work for the slaves used by Sun's SUNOS version 4.

Distributed Systems/Loosely Coupled Systems

  • Processors have memory not shared to other clocks. Communication between these systems is done over phone lines. Function by networking, this system can share computational task with many users through a network.

Real Time Systems

  • Used when there is strict time requirements on operations.
  • With processors sensing data, the computers analyze the data and change controls over the system. A proper real time system will only return when there are correct results within the time constraints.
  • Data is stored in short term memory or read only memory.
  • These two types of Real Time Systems work such as:
  • Hard real time systems: guarantees critical task execution on time, meaning abrupt tasks are also quick.
  • Soft real time systems: critical tasks have priorities if the system can work. Meaning occasional deadlines are acceptable. For multimedia.

Basic Functions of Operating Systems

  • Some various functions for operating systems consists of the following such as:
Process Management
  • A processes execute a computer with instructions used by the CPU. Time shared user programs are processes.
  • Sends output to the printer for processes. Which uses the CPU time, files & Input/Output devices. All are provided through the OS when its creates & runs certain processes.
Main Memory and Memory Management
  • A main memory is very important to the modern computer. All data in these systems stores quickly using the CPU & Input/Output device, The main memory instructs to central locations to read & write memory instructions, which help CPU process data for disc.
File Management
  • One of the most import computer OS, is the ability to hold large amounts of data to read later.
  • With multiple media types such as magnetic tape, or optical disk, the OS can store a lot of files with lots of data.
  • This can also creates directories
Input and Output System Management
  • This hides peculiarities for the hardware from a user.
  • Sub systems within the OS hide the details to the user for convenience, and makes it easy to work with.
Secondary Storage Management
  • The main purpose to execute programs which exist in main memory while running.
  • Small amount of computer power is lost during this activity.
  • Also responsible for following actions with file management:
  • Free Space Management
  • Storage allocation
  • Disk Scheduling
Networking
  • Through communications media through a high speed buses or networks. This way they can communicate.
  • The communication networks has also had considerations, message routing and connecting with security.
Protection or Security
  • Multi users means concurrent execution where processes can be protected through memory usage.
  • Mechanisms makes files, memory segments, CPU's and other resources being used only as ones are authorized.
Command Interpretation
  • With communication it acts as a interface
System Calls
  • Interface with instructions for writing for a assembly language. Making them in a higher language.

Process Control

  • These instructions help create, abort, kill, and use processes along with managing and having the ability to edit these abilities when needed for specific instructions.

File Manipulation

  • Create files / delete files and work with data that is being stored. Read, edit text and rewrite.

Device Management

  • Request specific devices for different areas, and read write, as well as reposition

Information Maintenance

  • Set data and find out what is set to be used.

Communication

  • Communication with interfaces between the process & the OS. Which are available in the form of assembly language.

Simple Structure

  • These commercial systems doesn't have a well defined structure, which leads to operating systems that begins with small and then grows as the system grows.

Layered Approach

  • Broken OS is broken in to parts, or levels that is put on top of layers. The bottom layer is hardware / top layer is the interface.

System Programs

  • In the area of system programs, here are some that are important to take a look at:
  • Programming loading
  • Communications

Process management

  • A process is a program in execution that does instructions in a sequential order. A process includes things such as method addresses, data location, and value of the registers. Also that makes the process.
  • Programs and processing are not always the processes. Programs being passive but the process is active with actions to the directory for executions.
The processes use a scheduling algorithm to determinate when to work and what task the system should complete. The system varies with states such as:
  • New: Creating
  • Ready: Needs to assign processor
  • Running: Executing
  • Waiting: Event/instructions
  • Terminated; Complete
There are many state at ready / waiting but, there are only one state at instant.

Process Queues

  • Process then enter system it gets put into the job queue with are made of process.
  • Process that are ready & waiting gets put into read queue
Types of Queues:
  • Ready queue: a ready queue header contains pointers to the first PCB in the list, but each PCB has a pointer field that tells the nest PCB in ready queue.
  • Each list of the given process waits on a list referred to as a device queue.
  • The new process goes to ready queue awaiting execution of the CPU

Types of scheduling

  • Operating System choose processes from queues in a certain way which causes it to be in a system that will execute that will run at a faster speed through processes

  • scheduler : the parts that picks the job / processor

  • these are also are assigned to a a particular scheduler

These Types :

Long term scheduler: process done on the main drive or disk, is loaded up into memory for the purpose of multi programing. (executes less frequently then others processes) the long term scheduler is called from the program leaves the system. The processes here either Input, or Output which is also know are I/O bond or CPU bond. • I/O Bond : An program or that has a lot of tasks that do not run as often. • CPU bond : A process or program that spends more time creating computations then other I/O process. • Short- term scheduler : ready for executing ,allocates CPU to the process. The differences makes the frequency of the execution. The short term makes processes of tasks in CPU fast. ( one in hundreds of milliseconds ) • Medium term scheduler some running systems introduce another layer of scheduling for the media, where that tasks are to remove processes to then reduce its work in to memory. The processing will reintroduced so it can preform it previous processes (referred to as swapping)

Process control block

  • Referred as OS process control block to process control, or another task is known as a task control block.

Which contains the following

  • Process state: The state may be new, ready, running, waiting or terminated state.
  • Program counter:it indicates the address of the next instruction to be executed for this purpose.
  • CPU registers: The registers vary in number & type depending on the computer architecture. It includes accumulators, index registers, stack pointer & general purpose registers, plus any condition- code information must be saved when an interrupt occurs to allow the process to be continued correctly after- ward.
  • CPU scheduling information:This information includes process priority pointers to scheduling queues & any other scheduling parameters. Memory management information: This information may include such information as the value of the bar & limit registers, the page tables or the segment tables, depending upon the memory system used by the operating system. Accounting information: This information includes the amount of CPU and real time used, time limits, account number, job or process numbers and so on.
  • I/O Status Information: This information includes the list of I/O devices allocated to this process, a list of open files and so on. The PCB simply serves as the repository for any information that may vary from process to process

CPU Algorithms and Scheduling

  • CPU Scheduling deals with the problem of deciding which of the processes in the ready queue is to be allocated first to the CPU. There are four types of CPU scheduling that exist.

First Come, First Served Scheduling (FCFS) Algorithm

This is the simplest CPU scheduling algorithm. In this scheme, the process which requests the CPU first, that is allocated to the CPU first. The implementation of the FCFS algorithm is easily managed with a FIFO queue. When a process enters the ready queue its PCB is linked onto the rear of the queue.

Shortest Job First Scheduling (SJF) Algorithm

This algorithm associates with each process if the CPU is available. This scheduling is also known as shortest next CPU burst, because the scheduling is done by examining the length of the next CPU burst of the process rather than its total length.

Priority Scheduling Algorithm
  • In this scheduling a priority is associated with each process and the CPU is allocated to the process with the highest priority. Equal priority processes are scheduled in FCFS manner.
Round Robin Scheduling Algorithm
  • This type of algorithm is designed only for the time sharing system. It is similar to FCFS scheduling with preemption condition to switch between processes. A small unit of time called quantum time or time slice is used to switch between the processes. The average waiting time under the round robin policy is quiet long.

Process Synchronization

  • A co-operation process is one that can affect or be affected by other processes executing in the system. Co-operating process may either directly share a logical address space or be allotted to the shared data only through files. This concurrent access is known as Process synchronization.
Critical Section Problem
  • Consider a system consisting of n processes (P0, P1, .........P -1) each process has a segment of code which is known as critical section in which the process may be changing common variable, updating a table, writing a file and so on. The important feature of the system is that when the process is executing in its critical section no other process is to be allowed to execute in its critical section. The execution of critical sections by the processes is a mutually exclusive. The critical section problem is to design a protocol that the process can use to cooperate. Each process must request permission to enter its critical section. The section of code implementing this request is the entry section. The critical section is followed on exit section. The remaining code is the remainder section.

Semaphores

  • Synchronization for problems. It must have three following conditions that consists of

Mutual Exclusion

  • Process is executing critical selection, when other processes happens.

Progress

If no process is executing critical set / some the processes enter it should no enter into remainder.

Bounded Waiting

Number of the other processes will enters to make a change, but there could be one bound after request.

Techniques

Important sections

  • The operating system will then have the ability to make some instructions and edit different areas such as data and code.
  • This way there will be different things that can be done between the functions for its use for its application
  • Each type can be assigned to be one part in an area that helps the users through all the applications needed.

Virtual Machines

These are computer machines that can execute certain types of programs at the same time. This means there is multiple steps need to get to specific code.

  • They need help using the CPU

I/O Structure

Consists of a CPU with multiple different drivers, which requires specific devices..

I/O Interrupt

  • It start a Input or Output by loading its register with a device, it then determines the process its taking.
  • For an controller reading data it take the info into the driver, and controller interrupts the CPU with a given amount of actions to take
  • These action are started using Synchronous and asynchronous

DMA CONTROLLER

  • HIGH I/O devices in DMA, the device enters a block of data to and from buffer. From buffer it gets stored memory to the OS.
  • Operating system searches in buffer and finds driver registers to appropriate and sets its use for start and destination addresses & then transfer length which, when it’s then instructed to start I/O Operation.
  • But cycle can be high when transferring large files.
This then can be slow due to stealing memory cycles from the CPU

Storage Structure

The Storage has these two memories:

  • Main Memory
  • Secondary Memory The data resides in memory while its used or in process, but they sometimes cannot be stored permanently

Main Memory

  • Stores all storage area for CPU's usage of data and help with using the instructions. Must be resided in the correct and direct access or that can be ran on the CPU

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