The document discusses various types of operating systems, including multi-processor systems with different memory models and distributed systems. It also covers hardware protection mechanisms such as dual-mode operation, timer usage for resource management, and memory protection through legal address ranges. Key concepts include user and kernel modes, as well as the importance of privileged instructions for I/O and memory access.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
14 views9 pages
Lect 04 OS Basics
The document discusses various types of operating systems, including multi-processor systems with different memory models and distributed systems. It also covers hardware protection mechanisms such as dual-mode operation, timer usage for resource management, and memory protection through legal address ranges. Key concepts include user and kernel modes, as well as the importance of privileged instructions for I/O and memory access.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9
OPERATING SYSTEMS CS F372
BIJU K RAVEENDRAN & TEAM
LECT #04: OS BASICS
Types of Operating Systems • Systems with graceful degradation [with hardware failures] and systems with fault tolerance • Increased throughput, reliability, [Economical] • Multi-processor [Tightly coupled system] – Asymmetric • Each processor is assigned a specific task [Co-processors] – Symmetric [SMP] • Local registers and cache for each processor but connected with a common shared memory
Monday, January 13, 2025 Biju K Raveendran @ BITS Pilani Goa 2
Types of Operating Systems • Multi-processor – Memory Model • UMA (Uniform Memory Access) • NUMA (Non-Uniform Memory Access) • NORMA (No Remote Memory Access) • Distributed Systems [Loosely coupled system] – Example: Client – Server systems and Peer to Peer system – Server systems can be Compute servers or File servers – Enables parallelism but speedup is not the goal – Adv: Resources Sharing, Computation speed up – load sharing, Reliability, Communications Monday, January 13, 2025 Biju K Raveendran @ BITS Pilani Goa 3 Hardware Protection • Dual-Mode Operation – Sharing system resources: OS ensures that an incorrect program cannot cause other programs to execute incorrectly – Hardware support to differentiate between two modes of operations • 1. User Mode – execution done on behalf of a user • 2. Monitor Mode [supervisor mode or system mode] – execution done on behalf of OS
January 13, 2025 Biju K Raveendran @ BITS Pilani Goa 4
Hardware Protection • Dual-Mode Operation – Mode bit: 1 bit in hardware to indicate the current mode • Mode bit = 0 [Monitor mode] • Mode bit = 1 [User mode] – Switch to Monitor mode when • Interrupt/fault occurs • Privileged instructions • Work to be done by the Kernel – System call changes mode to kernel, return from call resets it to user • CPU now a days support multi-mode operations – Virtual Memory Manager (VMM) mode for guest VMs January 13, 2025 Biju K Raveendran @ BITS Pilani Goa 5 Hardware Protection • [CPU protection]: Timer to prevent infinite loop / process hogging resources – Timer is set to interrupt the computer after some time period – Keep a counter • Decremented with the help of physical clock • Generates an interrupt when counter become 0 • Setting counter [Loading Timer] [by OS] is privileged instruction – Timer commonly used to implement time sharing – Timer is also used to compute the current time – Control transfers to Kernel to regain control or terminate program that exceeds allotted time January 13, 2025 Biju K Raveendran @ BITS Pilani Goa 6 Hardware Protection
User mode (mode bit=1)
Kernel mode (mode bit=0)
January 13, 2025 Biju K Raveendran @ BITS Pilani Goa 7
Hardware Protection • I/O protection – All I/O instructions are privileged instructions – Must ensure that a user program could never gain control of the computer in monitor mode • Memory Protection – Memory protection required for interrupt vector and interrupt service routines – Two registers determine the range of legal addresses a program may access • Base register – holds smallest legal memory address • Limit register – contains the size of the range – Memory outside the defined range is protected January 13, 2025 Biju K Raveendran @ BITS Pilani Goa 8 Hardware Protection
January 13, 2025 Biju K Raveendran @ BITS Pilani Goa 9