Fandom

Students

FAU Class Notes/Operating Systems

< FAU Class Notes

1,331pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Components of an Operating System Edit

Kernel Edit

The core of the operating system. All modern kernels have elements of all of these, the examples can be considered historical or intentional designs.

  • Monolithic - Kernel contains large amounts of functionality (device drivers, file systems) - a single "binary"
    • Example: UNIX System V, SunOS, BSD4.4, MacOS
    • Faster and easier to program, but often more bloated and hard to customize for individual purposes
  • Layered
    • POSIX design (Unix)
  • Microkernel - Kernel is very small, most functionality is abstracted away in (often user-mode) modules also known as "servers"
    • Example: QNX, Minix, vxWorks
    • Often used in embedded and real time systems
  • Hybrid (or Modular) Kernel - Elements of both monolithic and microkernel
    • Example: Windows, Linux, MacOS X, FreeBSD
    • Most kernels these days are Hybrid kernels, meaning they have fat (monolithic) kernels that have extensive services, but also have extensive module capability
  • Modular

Virtual Machines Edit

  • Virtualization allows you to run multiple operating systems on the same machine at the same time.

Example: VMWare, Qemu, VirtualBox, Xen, MS-VPC

  • Hypervisor: An operating system whose only purpose is to virtualize (run) other operating systems

Layered System Edit

See Linux kernel diagram: http://www.linuxdriver.co.il/kernel_map

Duties of an Operating System Edit

Process Management Edit

Process Management Jobs

  • Creating and deleting process
  • Suspending and resuming processes
  • Support interprocess communication (IPC)
  • Scheduling
  • Synchronization

Memory Management Edit

Memory Management Jobs

  • Keep track of memory parts
  • Allocating and deallocating memory - malloc(), calloc()
  • Moving things in and out of memory

File Management Edit

File Management Jobs

  • Creating and deleting files and directory
  • File permissions (security)
  • Searching files
  • Getting information in and out of files (I/O)

I/O Management Edit

Also known as a "kernel-level I/O subsystem"

I/O Management Jobs

  • Loading and unloading devices (device drivers)
  • Abstracting devices to the user-land applications

Networking/Sockets Edit

Allow access to other machines and interprocess communication.

Processes Edit

Process - A program in execution, contains executable code and data

PCB - Process control block. A process descriptor. Contains:

  • Program Counter
  • Process State
  • CPU Registers (Stack)
  • Scheduling Info (CPU)
  • Memory Information
  • Accounting Information (CPU Time)
  • I/O Status

Process Queues Edit

Job Queue - queue of all processes

Ready Queue - all processes ready to execute

I/O Queue - all jobs on waiting for I/O (e.g. multi-threaded filesystem)

Process State Diagram Edit

Process Other States:

  • Ready/Suspended (connected to Ready) - A process that is ready to execute but can not execute (for example, an out of memory condition)
  • Waiting/Suspended (connected to Waiting and above) - A process that can not execute even if it becomes ready (for example, an out of memory condition)

Operations on ProcessEdit

Creation

  • Startup
  • Use request
  • System call
  • Batch

Termination

  • Normal exit
  • Normal error
  • Fatal error (involuntary)
  • Explicitly killed by another process

Change Priority Block Wake Up Dispatch

ThreadsEdit

Independent flow of control that operates within the same address as other independent flows of control within a process. A thread can be considered a process that does not map it's own virtual memory or register space.

Thread mapping

  • Many to one
  • One to one

Interprocess Communication (IPC)Edit

Synchronous (blocking) - for every message sent, another must be received Asynchronous (nonblocking) - message is sent and the process continues to execute

Synchronous send and receive - rendezvous

Context Switch Edit

Pure Overhead
A Context Switch must save current PCB information, and load an another PCB.

Optimizing context switchingEdit

  • Using threads for concurrency instead of processes
  • Efficient scheduling algorithms

Semaphores Edit

  • Semaphores - global int (interger), atomic
  • Methods on a Semaphore
    • Initialization
    • Wait (p)
    • Signal (v)
  • 'Types of Semaphores
    • Mutex - binary semaphore
    • Complex Semaphores
    • Counting Semaphores

'Critical Section

  1. Mutual Exclusion
  2. Progress
  3. Bounded waiting

SchedulingEdit

  • Preemptive multitasking - Multitasking where the operating system scheduler can interrupt the execution of a process at any point. (Examples: All modern OSes: Windows 95 and above, Linux, FreeBSD, Mac OS X)
  • Non-premptive multitasking - Multitasking where a process can execute an entire CPU burst without interruption from the OS.
  • Cooperative multitasking - Multitasking where a process relinquishes control over the processor. (Example: MacOS version 9 and under, Windows 3.1 and under)

Definitions Edit

  • Deadlock - waiting process is not able to change state because needed resource is held by other waiting processes.
  • Buffer - area that stores data that is being transfered (buffering means using a buffer)
  • Cache - fast area that stories copied memory (caching means using a cache)
  • Spooling - a buffer that holds output for a slower device, usually no random-access (a queued buffer)
  • Interrupt - a event that causes a unexpected change of flow in a process or thread (a software interrupt)
  • Trap - a software generated interrupt (also known as a software exception)
  • Volatile - when the power goes out, volatile information is lost
  • System call - a system call is a type of interrupt that requests a service from the operating system
  • Dual mode operation - As logic is run in two modes: user-mode and kernel-mode, user-mode applications can request kernel-mode services via syscalls
  • Race Condition - several processes that access and manipulate the same data concurrently, in which the outome depends on a particular order of execution
  • Critical section - an area of memory where multiple processes share access

CPU Burst Edit

  • CPU Utilization
  • Throughput
  • Turnaround Time - admission to exit
  • Waiting Time - sum of time spent in ready queue
  • Response Time - one time measurement
  • FCFS
  • Shortest Job First
  • Priority
  • Round Robin
  • Shortest remaining time
  • Preemptive Priority

Fair Good CPU Use Starvation Aging Preemptive Non-Preemptive

I/O Burst Edit

Operating system spaces Edit

User-space Kernel space (aka system, supervisor, privilege)

System calls (syscall) Edit

  • Process control
  • File management
  • Device management
  • Information maintainence
  • Communication

Also on Fandom

Random Wiki