CS100: Introduction to Computer Science

CS100: Introduction to Computer Science

Review: CS100: Introduction to n Arithmetic/Logic Operations q Logic: AND, OR, XOR Computer Science n Masking q Rotate and Shift: circular shift, logical shift, arithmetic shift q Arithmetic: add, subtract, multiply, divide Lecture 8: Operating System n Communicating with other devices q Controller, n Specialized controllers for each type of device n General purpose controllers: USB, FireWire Chapter 3: Operating Systems Functions of Operating Systems n 3.1 The History of Operating Systems n An operating system: the software that controls the overall operation of a computer. q Provides the means for a user to store and n 3.2 Operating System Architecture retrieve files q Provides the interface for a user to request the n 3.3 Coordinating the Machine’s Activities execution of a program q Coordinates the execution of programs q … Operating Systems Evolution of Shared Computing n UNIX n Batch processing q Originally developed by AT&T in 1960s q Collecting jobs in a single batch and then execute them without further q Popular in large computer systems. interaction with the user. n DOS n Interactive processing q 1981—1997 by IBM q Allows a program being executed to carry on a dialogue with the user through remote terminals q Used PCs q Requires real-time processing n Windows (1985 -- now) n Time-sharing/Multitasking q By Microsoft, n More tasks being performed at the “same time” or serve more users at the q Add Graphical User interface to DOS systems “same time” q Wildly used in PCs n Time-sharing system: divide time into intervals, jobs takes turns to use n LINUX (1980s – now) CPU time. n Provide reasonable real-time processing for each user. q UNIX-like operating systems n Multiprocessor machines q A free software., source code is available for anyone to use and modify q Assign different tasks to different processors 1 Figure 3.1 Batch processing Figure 3.2 Interactive processing Types of Software Figure 3.3 Software classification n Application software q Performs specific tasks for users q Database systems, games, program developing software, etc. n System software q Provides infrastructure for application software q Consists of operating system and utility software q Utility software: programs for performing fundamental activities, but not included in operating systems. n E.g data compression software, network communication software. Operating System Components Figure 3.4 The shell as an interface between users and n Shell: interface between users and the internal part the operating system (kernel)of operating systems. q Text based q Graphical user interface (GUI) n Window manager: allocates block of space on the screen, keeps track of which application is associated with each window. n Kernel: Performing basic required functions n Allows different shells to access the same kernel 2 Operating System Components File Manager n Shell: interface between users and the internal part n Coordinates the use of mass storage devices of operating systems. q Maintain records of all files n Where a file is stored, which users are allowed to access it n Kernel: Performing basic required functions q Records are kept on the individual storage medium containing the related files. q File manager q Device drivers n Directory (or Folder): A user-created bundle of files q Memory manager and other directories (subdirectories) q Scheduler and dispatcher n Directory Path: A sequence of directories within directories n courses/cs100/slides on UNIX n courses\cs100\slides on WINDOWS Device Drivers Memory Manager n Software units that communicate with the controllers n Allocates space in main memory to carry out operations on the peripheral devices. n May create the illusion that the machine has more memory than it actually does (virtual memory) by playing a “shell game” in which blocks of data (pages) are shifted back and forth between n Each device driver is uniquely designed for its main memory and mass storage particular type of device and translate the generic requests to more technical steps required by the q 512MB main memory, 1024MB virtual memory device n Reserve 1024MB on a magnetic disk and store bit patterns there. n Data are divided into pages. n Transfer pages into main memory if information are needed soon. n Printer drive, disk drive n Transfer pages back into the disk if information will not be needed in short time. Scheduler and Dispatcher: Processes Process Administration n Process: The activity of executing a program n Scheduler: Adds new processes to the n Process State: Current status of the activity process table and removes completed q Value in program counter: the current position in the processes from the process table program being executed q Values in general purpose registers: q Associated memory cells n Dispatcher: Controls the allocation of time n Process Table: store information of processes slices to the processes in the process table q Memory area assigned to a process q The end of a time slice is signaled by an interrupt. q The priority of the process q q Whether the process is ready or waiting 3 Figure 3.6 Time-sharing between How Does An Operating System Get process A and process B Started (Bootstrapping/booting) n ROM: read-only memory q A portion of main memory but constructed from non-volatile memory cells. q Its contents can be read but not altered. n Bootstrap: the program stored in ROM q Run by the CPU when power is turned on q Transfers operating system from mass storage to main memory q Executes jump to operating system q The operating system then takes over and begins controlling the machine’s activity. Figure 3.5 The booting process Questions: n List the components of a typical operating system and explain the role of each. n Summarize the booting procedure. n What is the difference between a process and a program? Announcements: n Next lecture: Review Session n Monday, March 5th : first in-class exam 4.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us