Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Computer Systems and Operating Systems: Structures, I/O, Storage, and OS Services - Prof. , Study notes of Operating Systems

An overview of computer systems and operating systems, focusing on structures, i/o, storage, and os services. Topics include various types of i/o devices, performing i/o synchronously and asynchronously, storage hierarchy, caching, and operating system services such as program execution, i/o operations, file-system manipulation, communications, error detection and recovery, resource allocation, accounting, protection, and common os components.

Typology: Study notes

Pre 2010

Uploaded on 07/30/2009

koofers-user-j3s-1
koofers-user-j3s-1 🇺🇸

10 documents

1 / 17

Toggle sidebar

Related documents


Partial preview of the text

Download Computer Systems and Operating Systems: Structures, I/O, Storage, and OS Services - Prof. and more Study notes Operating Systems in PDF only on Docsity! 1 1 CMSC 412 Fall 2005 Computer and Operating System Structures Announcements • Project #0 – Due Friday – Submission program not yet working (tomorrow hopefully) • Project #1 – Much harder than Project #0! – Posted Friday • Reading – Chapter 1 and 2 (today) – Chapter 2 and 3 (Monday) 2 2 Computer Systems I/O Subsystem Structure • Many different types of devices – disks – networks – displays – mouse – keyboard • Each has different peak performance – bandwidth • rate at which data can be moved – latency • time from request to first data back 5 5 Caching • Use of high-speed memory to hold recently-accessed data. • Requires a cache management policy. • Caching introduces another level in storage hierarchy. This requires data that is simultaneously stored in more than one level to be consistent. Migration of A From Disk to Register 6 6 Operating System Services • Program execution – Load a program into memory and to run it. • I/O operations • File-system manipulation • Communications – Between local or distributed processes – Either shared memory or message passing. • Error detection and recovery – In the CPU and memory hardware, in I/O devices, or in user programs. Additional OS Functions •Resource allocation •Allocating resources to multiple users or multiple jobs running at the same time. •Accounting •Keep track of and record which users use how much and what kinds of computer resources for account billing or for accumulating usage statistics. •Protection •Controlling all access to system resources. 7 7 Common OS Components • Process Management • Main Memory Management • File Management • I/O System Management • Secondary Storage Management • Networking • Protection System • Command-Interpreter System Process Management • A process is a program in execution. A process needs certain resources, including CPU time, memory, files, and I/O devices, to accomplish its task. • The operating system is responsible for the following activities in connection with process management. – Process creation and deletion. – process suspension and resumption. – Provision of mechanisms for: • process synchronization • process communication 10 10 Networking • A distributed system is a collection processors that do not share memory or a clock, connected through a communication network. – Communication takes place using a protocol. • Networking-related OS activities – Managing protocol state – Managing states of distributed resources (e.g. remote filesystem) Protection System • Protection refers to a mechanism for controlling access by programs, processes, or users to both system and user resources. • The protection mechanism must: – distinguish between authorized and unauthorized usage. – specify the controls to be imposed. – provide a means of enforcement. 11 11 Key Mechanism: System Calls • A software-generated interrupt – a.k.a. trap • Provide the interface between application programs and the OS kernel • Are like procedure calls – take parameters – calling routine waits for response System Call Mechanism • Use numbers to indicate what call is made • Parameters stored in registers or the stack • Why do we use system call numbers rather than directly calling a kernel subroutine? – permits changing the size and location of system call implementations without having to re-link application programs 12 12 GeekOS and x86 • Intel system call instruction – int n where n is the interrupt vector # – “call kernel routine n” – vectors 0-31 reserved • Page fault, segmentation violation, etc. • GeekOS – All system calls set n as 90 – System call number stored in eax register Types of System Calls • File Related – open, create, read, write, close, delete – get or set file attributes • Informational – get time – set system data (OS parameters) – get process information (id, time used) • Communication Related – establish a connection; terminate a connection – send, receive messages • Process control – create/terminate a process (including self) 15 15 Dual-Mode Operation • Mode bit added to computer hardware to indicate the current mode: monitor (0) or user (1). X86 actually has 4 modes (2 bits). • When an interrupt or fault occurs hardware switches to monitor mode. monitor user Interrupt/fault set user mode I/O Protection • System call mechanism prevents user mode programs from accessing devices directly. – All I/O instructions are privileged • But what if user program can overwrite interrupt handler with its own code? 16 16 Memory Protection • Must provide memory protection at least for the interrupt vector and the interrupt service routines. • In order to have memory protection, add two registers that determine the range of legal addresses a program may access: – Base register – holds the smallest legal physical memory address. – Limit register – contains the size of the range • Memory outside the defined range is protected. Base and Limit Registers 17 17 Hardware Address Protection Changing the base and limit registers are privileged operations CPU Protection • Timer – interrupts computer after specified period to ensure operating system maintains control. – Timer is decremented every clock tick. – When timer reaches the value 0, an interrupt occurs. • Commonly used to implement time sharing. • Load-timer is a privileged instruction.
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved