OPERATING SYSTEMS STRUCTURES - WPI

3y ago
91 Views
3 Downloads
731.38 KB
21 Pages
Last View : 8d ago
Last Download : 3m ago
Upload by : Dani Mulvey
Transcription

OPERATING SYSTEMSSTRUCTURESJerry Breecher2: OS Structures1

OPERATING SYSTEMStructuresWhat Is In This Chapter?System ComponentsSystem CallsHow Components Fit TogetherVirtual Machine2: OS Structures2

OPERATING SYSTEMSTRUCTURESSYSTEMCOMPONENTSThese are the pieces of the system we’ll be looking at:Process ManagementMain Memory ManagementFile ManagementI/O System ManagementSecondary ManagementNetworkingProtection SystemCommand-Interpreter System2: OS Structures3

OPERATING SYSTEMSTRUCTURESSYSTEMCOMPONENTSPROCESS MANAGEMENTA process is a program in execution: (A program is passive, a process active.)A process has resources (CPU time, files) and attributes that must be managed.Management of processes includes: Process Scheduling (priority, time management, . . . )Creation/terminationBlock/Unblock (suspension/resumption )SynchronizationCommunicationDeadlock handlingDebugging2: OS Structures4

OPERATING SYSTEMSTRUCTURESSystemComponentsMAIN MEMORY MANAGEMENT Allocation/de-allocation for processes, files, I/O. Maintenance of several processes at a time Keep track of who's using what memory Movement of process memory to/from secondary storage.FILE MANAGEMENTA file is a collection of related information defined by its creator. Commonly, filesrepresent programs (both source and object forms) and data.The operating system is responsible for the following activities in connections with filemanagement:File creation and deletion.Directory creation and deletion.Support of primitives for manipulating files and directories.Mapping files onto secondary storage.File backup on stable (nonvolatile) storage media.2: OS Structures5

OPERATING SYSTEMSTRUCTURESSystemComponentsI/O MANAGEMENT Buffer caching system Generic device driver code Drivers for each device - translate read/write requests into disk positioncommands.SECONDARY STORAGE MANAGEMENT Disks, tapes, optical, . Free space management ( paging/swapping ) Storage allocation ( what data goes where on disk ) Disk scheduling2: OS Structures6

OPERATING SYSTEMSTRUCTURESSystemComponentsNETWORKING Communication system between distributed processors. Getting information about files/processes/etc. on a remote machine. Can use either a message passing or a shared memory model.PROTECTION Of files, memory, CPU, etc. Means controlling of access Depends on the attributes of the file and userHow Do These All FitTogether?In essence, they all provideservices for each other.SYSTEM PROGRAMS Command Interpreters -- Program that accepts control statements(shell, GUI interface, etc.) Compilers/linkers Communications (ftp, telnet, etc.)2: OS Structures7

OPERATING SYSTEMSTRUCTURESSystemTailoringModifying the Operating System program for a particular machine. The goal is to includeall the necessary pieces, but not too many extra ones. Typically a System can support many possible devices, but any one installation hasonly a few of these possibilities. Plug and play allows for detection of devices and automatic inclusion of the code(drivers) necessary to drive these devices. A sysgen is usually a link of many OS routines/modules in order to produce anexecutable containing the code to run the drivers.2: OS Structures8

OPERATING SYSTEMSTRUCTURESSystem CallsA System Call is the main way a user program interacts with the Operating System.XregisterX: parametersfor callload address Xsystem call 13use parametersfrom table Xcode forsystemcall 13user programoperating systemFigure 3.1Figure 2.82: OS Structures9

OPERATING SYSTEMSTRUCTURESSystem CallsHOW A SYSTEM CALL WORKS Obtain access to system space Do parameter validation System resource collection ( locks onstructures ) Ask device/system for requested item Suspend waiting for device Interrupt makes this thread ready to run Wrap-up Return to userThere are 11 (or more) steps in making the system callLinux API2: OS Structures10

OPERATING SYSTEMSTRUCTURESSystem CallsExample of Windows APIConsider the ReadFile() function in theWin32 API—a function for reading from a file.A description of the parameters passed to ReadFile()HANDLE file—the file to be readLPVOID buffer—a buffer where the data will be read into and written fromDWORD bytesToRead—the number of bytes to be read into the bufferLPDWORD bytesRead—the number of bytes read during the last readLPOVERLAPPED ovl—indicates if overlapped I/O is being used2: OS Structures11

OPERATING SYSTEMSTRUCTURESSystem CallsTwo ways of passingdata between programs.Msg Passing2: OS StructuresShared Memory12

OPERATING SYSTEMSTRUCTURESSystem CallsThese are examplesof various systemcalls.2: OS Structures13

OPERATING SYSTEMSTRUCTURESHow An OperatingSystem Is PutTogetherA SIMPLE STRUCTURE:Example of MS-DOS.Application ProgrammingResident System ProgrammingNote how alllayers can touchthe hardware.Bad News!!MS-DOS DriversROM - BIOS Device Drivers2: OS Structures14

OPERATING SYSTEMSTRUCTURESHow An OperatingSystem Is PutTogetherA LAYERED STRUCTURE:Example of Windows 2000.System ServicesWindowsMGR& urityReferenceMonitorIOManagerWindows 2000 KernelHardware Abstraction Layer (HAL)2: OS Structures15

OPERATING SYSTEMSTRUCTURESA LAYERED STRUCTURE:Example of UNIX.2: OS StructuresHow An OperatingSystem Is PutTogether16

OPERATING SYSTEMSTRUCTURESVirtual MachineIn a Virtual Machine - each process "seems" to execute on its own processor with its ownmemory, devices, etc. The resources of the physical machine are shared. Virtual devices are sliced out of thephysical ones. Virtual disks are subsets of physical ones.Useful for running different OS simultaneously on the same machine.Protection is excellent, but no sharing possible.Virtual privileged instructions are trapped.Virtual UserPhysical UserVirtual MachineMonitor Mode2: OS StructuresPhysical Machine17

OPERATING SYSTEMSTRUCTURES2: OS StructuresVirtual Machine18

OPERATING SYSTEMSTRUCTURESVirtual MachineExample of MS-DOS on top of Windows 2000.DOS APPLICATIONPhysical UserBIOS DRIVERSWindows 2000Physical Machine2: OS Structures19

OPERATING SYSTEMSTRUCTURESVirtual MachineExample of Java Virtual MachineThe Java Virtual Machineallows Java code to be portablebetween various hardware andOS platforms.2: OS Structures20

OPERATING SYSTEM STRUCTURESWRAPUPWe’ve completed our second overview of an Operating System – this atthe level of a high flying plane.We’ve looked at the basic building blocks of an operating system –processes, memory management, file systems, and seen how they allconnect together.Now we’ll get into the nitty-gritty, spending considerable time on each ofthese pieces.2: OS Structures21

A System Call is the main way a user program interacts with the Operating System. code for system call 13 operating system user program use parameters from table X register X X: parameters for call load address X system call 13 Figure 3.1 Figure 2.8 OPERATING SYSTEM STRUCTURES System Calls

Related Documents:

Iron Angel Force back the invading enemy using a customizable mech-suit. by Brainstorm Productions: Eric Benson erbenson@wpi.edu Keenan Gray krgray@wpi.edu Connor Porell cgporell@wpi.edu . 2!! Game Summary Iron Angel is an exciting action-based shooter. The player is put in control of a powerful mech-

Using the WPI Robotics Library The WPI Robotics library (WPILib) is a set of software classes that interfaces with the hardware in your FRC robots control system. There are classes to handle sensors, motors, the driver station, and a number of other utility functions such as timing and field management. What is the WPI Robotics Library?

7 Terminology WPI: Worcester Polytechnic Institute, a four-year private university in Worcester, Massachusetts, USA MQP: Major Qualifying Project, a project done at WPI, usually completed in a student's senior year. It is in the student's major field, and must be completed prior to graduating. [WPI, 2014] CS: Computer Science HTML: Hypertext Markup Language, a markup language that is used .

WPI Laser Cutter User Guide The laser cutter is capable of cutting and engraving two-dimensional drawings in various materials including wood and plastic. The laser cutter owned by the WPI Department of Mechanical Engineering is a Versalaser VLS-4.60 by Universal Laser Systems. It has a 60-watt laser and a 24" x 18" cutting platform.

(AS OF CLASS OF 2022) WPI was founded on the principle that students learn most effectively by applying theory to practice. WPI has 50 years of experience integrating projects into our undergraduate curriculum. . Phy

You can email your resume to cdcalumni@wpi.edu or you can schedule an appointment with a staff member using your Handshake account. If you do not have access, please call us at (508) 831-5260. 1. Resume WRiting foR WPi Alumni

Worsted weight (#4 Medium) 10 ply 9 wpi 11—14 sts 5.5—6.5 mm I/9 to K/101/2 5 to 3 Chunky weight (#5 Bulky) 12 ply 7 wpi 8—11 sts 6.5—9 mm K/10 1/2 to M/13 3 to 00 Bulky weight (#6 Super Bulky) 5-6 wpi 5—9 sts 9 mm and larger M/13 and larger 00 and larger Types of Yarn Packagi

available from the Foisie Business School at 508-831-4665, or at business.wpi.edu. Master of Mathematics for Educators (MME) Degree WPI offers a Master in Mathematics for Educators, a part-time program for teachers of mathematics at the middle school, secondary, and community college levels. Students in this program may earn a content-based degree