Operating Systems, Week 2 Notes
Operating Systems, Week 2 Notes CSC 4420
Popular in Operating Systems
Popular in Computer science
verified elite notetaker
This 4 page Class Notes was uploaded by Judy on Friday September 9, 2016. The Class Notes belongs to CSC 4420 at Wayne State University taught by Thair Judeh in Fall 2016. Since its upload, it has received 7 views. For similar materials see Operating Systems in Computer science at Wayne State University.
Reviews for Operating Systems, Week 2 Notes
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 09/09/16
OneNote Online https://onenote.oﬀiceapps.live.com/o/onenotefram... Week 2 Notes Tuesday, September 06, 2016 8:58 PM Multiprocessors (parallel systems) Systems that have two or more processors working in close conjunction Advantages Increased throughput Economy of Sale Increased reliability 2 types of multiprocessors a.Asymmetric - one boss processor controls b.Symmetric - Most common, each processor performs all tasks The diﬀerence between the two is on the hardware or software level Multicore Design Multiple cores on a single chip Heat becomes an issue otherwise More eﬃcient than having multiple chips Hence a dual core can appear as two standard processors Clustered Systems Composed from 2 or more individual systems Considered loosely coupled Multiprocessors are considered tightly coupled Share storage via a storage area network (SAN) Provide high availability, a service which survives failure 2 major structures a.Asymmetric - 1 machine is on standby in case the other fails, picks up the slack b.Symmetric - Multiple machines monitor each other Some systems are for high performance computing (HPC) Apps must be written to use parallelization Operating System Structure Common features in OS a.Multiprogramming (batch system) needed for eﬃciency A single user cannot keep the CPU and IO always busy A subset of total jobs is kept in memory One job is selected for job scheduling In non-multiprogramming, the CPU would sit and wait Does not provide for user interaction. b.Timesharing (multitasking) - CPU switches jobs so frequently that the user can interact with each job while its running Response time is less than one second CPU Scheduling Swapping moves them in and out to run (processes) Not desirable, slower Better to just have enough memory (RAM) or don't have so many processes open Virtual memory allows the execution of processes not completely in memory OS Operations Interrupt driven (as discussed previously) Hardware interrupt is by device Software interrupt is by an exception or trap Examples: Error, request for OS service, inﬁnite loop, processes modifying each other or OS (virus) OS code - Job scheduling, etc Needed to run more sensitive/critical processes A certain bit deﬁnes what mode of the following you are in Dual Mode - The OS protects itself Otherwise you have the user mode and the kernel mode The mode bit is provided by the hardware Some instructions are privileged, so they can only be used in kernel mode At bootup, the hardware starts in kernel mode Time (important feature) Allows the OS control over the CPU Can prevent an inﬁnite loop and process hogging Do so by setting the time (a privileged instruction) to control the amount of time the process runs Common OS components include the following 1 of 4 09/09/2016 08:04 PM OneNote Online https://onenote.oﬀiceapps.live.com/o/onenotefram... Process management A process is a program in execution (a unit of work) Programs are passive, processes are active A process needs resources to accomplish a task Termination of processes requires reclaiming reusable resources Single threaded means one program counter Multithreaded means there is one program counter per thread Main Memory management All or part of an instruction is in main memory The same goes for data needed Main memory management determines what is in memory and when Storage Management OS performs uniform logical view of info storage File System Management A ﬁle is a collection of related information Both programs and simple data make up ﬁles Key service: persistence of data between processes Files are organized into directories Secondary memory management Backs up main memory, typically a disk of some kind Speed of the computer depends on the disk subsystem and algorithms Some storage need not be fast Migration of Data Goes from hard disk to main memory to cache to hardware Cache coherency - All CPUs must have most recent value in the cache IO Subsystem Management of the IO General interface for device drivers Protection and security Ensures access by authorized users and processes Protection is any mechanism controlling access to the OS resources Security is defense against internal and external attacks Uses user IDs and group IDs Privilege escalation allows a user to change the eﬀective ID with more rights Kernel Data structures Many of the same ones from programming Single, double and circular linked lists Stacks and queues Trees (Binary search included) Hash functions Bitmaps Traditional computing environment For standalone general purpose machines Portals provide web access to internal systems Network computers (thin clients) Mobile computers (phones, tablets) on wireless networks Firewalls Mobile computing environment Diﬀerence between this and tradition is blurred in recent times Allows new types of apps (augmented reality for examples) Leading OS are iOS and Android Distributed computing environment Uses network and TCP/IP LAN, WAN, PAN etc. Network OS provides features between systems Client-Server computing Servers respond to requests by clients Compute-server and File-server systems Peer-to-Peer VoIP is best example Virtualization OS running in another oS Emulation Can have a virtual machine manager managing multiple VMs 9/8/2016 2 of 4 09/09/2016 08:04 PM OneNote Online https://onenote.oﬀiceapps.live.com/o/onenotefram... CHAPTER 2 User Helpful Services User Interface (UI) Command Line Interface (CLI) Graphical User Interface (GUI) Batch Interface: Commands are put into ﬁles which are then executed Program Execution: Loading, running, ending, execution, etc. I/O Operation: users usually cannot control I/O devices directly. File System Manipulation: read, write, create, delete etc. Communications: sharing information Error detection: detecting errors and taking the appropriate action, as well as providing availability of debugging facilities Resource Sharing Services Resource allocation for when multiple jobs are running concurrently Accounting: keeping track of who or what is using which resources Protection and Security CLI Allows direct command entry Implemented directly in the kernel via system program These can have multiple ﬂavors (shells) Main function is to get and execute the next user-speciﬁed command Commands can create, manage, etc. CLIs are implemented in 2 ways 1The command interpreter contains code to execute the command "built in commands" determine the size of the interpreter 2Commands are implemented through system programs The command interpreter doesn't understand the command in any way It uses the command to identify a ﬁle to be loaded into memory then executed Unix Shells Include Bourne, C, TC, Korn, Bash GUI User friendly desktop interface Typically uses the mouse, keyboard, etc and many people are familiar with them Invented at Xerox Many systems are both GUI and CLI together Touchscreen Interfaces Touchscreen devices required new interfaces Voice command can be used now as well API (Application Program Interface) Source code speciﬁcation is used as the interface Consists of groups of subroutines, data structures and variables Can be thought of as a "contract" between the provider of a service and the user of the API Implemented details are subject to change at any time Existing signatures and functions cannot be altered There may be undocumented functions and signatures that aren't part of the API (they aren't published) The guarantee of the contract only applies to documented functions Forms of API: 1International Standard POSIX (portable OS interface) 2Vendor speciﬁed standards (Windows API) 3Program language libraries System Calls An interface to services provided by the OS Usually in a higher level language (C++, C) Mostly accessed using API It is better to use the API rather than system calls because of portability and ease of use The OS is trusted and has super privileges, while the user does not Measures must be taken to prevent abuse System Call Implementation A number is associated with each system call System Call parameter Passing There are 3 ways the OS runs parameter passing 1Interrupts (hardware) 2Exceptions (software) 3 of 4 09/09/2016 08:04 PM OneNote Online https://onenote.oﬀiceapps.live.com/o/onenotefram... 3.Traps or system calls (software) Interrupt Process – Software Process Control: create and terminate processes Files management Information maintenance: time, system data, etc Communications Protection System Programs and Utilities Provide an environment for program development and execution Divided into: File management, Status information, ﬁle modiﬁcation, program language support, program loading and execution, communications, and background services Application programs do not pertain to the OS 4 of 4 09/09/2016 08:04 PM
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'