Study for the day when you don't have to worry about price tags.
--Your friends at LectureNotes

Operating Systems

by Veena Bhat
Type: NoteCourse: B.Tech Specialization: Computer Science EngineeringDownloads: 22Views: 1495Uploaded: 3 months agoAdd to Favourite

Share it with your friends

Suggested Materials

Leave your Comments


AMC ENGINEERING COLLEGE Operating System Overview Operating System Definition: OS is a resource allocator ∑ Manages all resources ∑ Decides between conflicting requests for efficient and fair resource use OS is a control program ∑ Controls execution of programs to prevent errors and improper use of the computer Operating System Structure: Multiprogramming needed for efficiency ∑ Single user cannot keep CPU and I/O devices busy at all times ∑ Multiprogramming organizes jobs (code and data) so CPU always has one to execute ∑ A subset of total jobs in system is kept in memory ∑ One job selected and run via job scheduling ∑ When it has to wait (for I/O for example), OS switches to another job Timesharing (multitasking) is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing ∑ Response time should be < 1 second ∑ Each user has at least one program executing in memory process ∑ If several jobs ready to run at the same time CPU scheduling ∑ If processes don’t fit in memory, swapping moves them in and out to run ∑ Virtual memory allows execution of processes not completely in memory Memory Layout for Multi programmed System Page 1 VEENA BHAT, DEPARTMENT OF CSE
AMC ENGINEERING COLLEGE Operating-System Operations o Interrupt driven by hardware p Software error or request creates exception or trap Division by zero, request for operating system service p Other process problems include infinite loop, processes modifying each other or the operating system q Dual-mode operation allows OS to protect itself and other system components User mode and kernel mode ∑ Mode bit provided by hardware o Provides ability to distinguish when system is running user code or kernel code p Some instructions designated as privileged, only executable in kernel mode q System call changes mode to kernel, return from call resets it to user Transition from User to Kernel Mode o Timer to prevent infinite loop / process hogging resources o Set interrupt after specific period o Operating system decrements counter ∑ When counter zero generate an interrupt Set up before scheduling process to regain control or terminate program that exceeds allotted Page 2 VEENA BHAT, DEPARTMENT OF CSE
AMC ENGINEERING COLLEGE Protection and Security: ∑ Protection – any mechanism for controlling access of processes or users to resources defined by the OS ∑ Security – defense of the system against internal and external attacks o Huge range, including denial-of-service, worms, viruses, identity theft, theft of service ∑ Systems generally first distinguish among users, to determine who can do what 1. User identities (user IDs, security IDs) include name and associated number, one per user 2. User ID then associated with all files, processes of that user to determine access control ∑ Group identifier (group ID) allows set of users to be defined and controls managed, then also associated with each process, file o Privilege escalation allows user to change to effective ID with more rights Computing Environments: Client-Server Computing o Dumb terminals supplanted by smart PCs ∑ Many systems now servers, responding to requests generated by clients ∑ Compute-server provides an interface to client to request services (i.e., database) ∑ File-server provides interface for clients to store and retrieve files Page 3 VEENA BHAT, DEPARTMENT OF CSE

Lecture Notes