Operating Systems Ceng 305 Week01-02 PDF

Document Details

EntertainingCottonPlant

Uploaded by EntertainingCottonPlant

Ankara Yıldırım Beyazıt University

2017

İhsan Tolga Medeni

Tags

operating systems computer science lectures ceng 305

Summary

This document provides an overview of Operating Systems, Ceng 305, Week 01-02. It includes introductions, topics, suggested textbook, prerequisites, grading, and other relevant details. The document appears to be lecture notes, not an exam.

Full Transcript

10/1/2017 Operating Systems Ceng 305 Week01-02 Introduction Assistant Professor Doctor İhsan Tolga Medeni MIS Dept, Ankara Yildirim Beyazit University [email protected]...

10/1/2017 Operating Systems Ceng 305 Week01-02 Introduction Assistant Professor Doctor İhsan Tolga Medeni MIS Dept, Ankara Yildirim Beyazit University [email protected] 1 10/1/2017 Content of This Lecture Course information (personnel, policy, prerequisite, agenda, etc.) Why learning OS? What is an OS? What does it do? Summary Goal Understand operating system concepts How OS works, and more importantly, why? Basis for future learning 2 10/1/2017 Suggested Textbook Modern Operating Systems, 4th Edition (Main textbook) Andrew S. Tanenbaum and Herbert Bos Instructor Ihsan Tolga Medeni, PhD TA Hatice Çataloluk, 3 10/1/2017 Prerequisite Programming experiences You will be programming in C and Java Computer organizations What is an Instruction (e.g., load, store)? What is CPU? Memory? Registers? What is Stack? Stack pointer? What is Program Counter (PC)? Course Contents Overview of computer hardware Threads and processes Synchronization and concurrency Scheduling Memory Management, Virtual Memory Disk Management and File Systems Advanced topics 4 10/1/2017 Grading Exams Mid-term – 30% Final – 40% Assignments/Quizes 30% Policy No extension to deadlines Exam Midterm, Covers first half of class Final, Covers the entire semester 5 10/1/2017 Cheating policy Academic integrity Your work in this class must be your own – we have zero tolerance policy towards cheating of any kind and any student who cheats will get a failing grade in the course Both the cheater and the student who aided the cheater will be held responsible for the cheating Before Start Any questions? 6 10/1/2017 Why learning OS? To pass class and get graduate Well known software engineers understand OS OS the foundation of all applications Companies love graduates who understand OS Microsoft, Apple, VMware or Google, can you tell me what they sell? What is an OS? How about an elevator? (Embedded OS) How about a satellite (Real Time OS) Mobile phones (Mobile OS, power consumption) PC-OS (Multi-tasking, responsiveness) Server OS (Multi-User support, Utilization of resources) 7 10/1/2017 Before details Computer Organization 8 10/1/2017 Instructions are mapped to bits in the Datapath A load word (lw, ld, move, mov) reads from memory, writes to register. After each instruction we have the Program Counter (PC) incremented to fetch the next instruction. It is very low level, complicated even only when talking about the simplest design with only CPU and memory. CPU(s) connected to device controllers, connected through a common bus providing access to shared memory. Competition for the memory! 9 10/1/2017 Complexity With more ability we have more complexity; Multiple CPU’s Caching of data Power preserving Different types of devices We expect more from computers; Multi-tasking, listen to music and run Word Processor Connectivity (Network interface) Have to be secure Reliable Etc… The OS abstracts/controls/mediates access to hardware resources (what resources?) Computation (CPUs) Volatile storage (memory) and persistent storage (disk, etc.) Communication (network, modem, etc.) Input/output devices (keyboard, display, printer, etc.) 10 10/1/2017 Simpler no tweaking device registers Device independent all disks look the same Portable same program runs on Windows, Linux, Android, OSX Worry less about interference from other applications Software layer between hardware and applications The OS is “all the code that you didn’t have to write” to implement your application 11 10/1/2017 What is Included? Manage what applications to run, when to run. Share limited resources between applications. IO Management Storage Devices CPU Enable protection against attacks and errors. (malware?) (a program in infinite loop?) Provide File System Communications (network, inter-applications) An example comparing life with/without OS Life with an OS Life without an OS file = open (“test.txt”, O_WRONLY); Blocks, platter, track, and sector write (file, “test”, 4); Where is this file on disk? Which close (file); platter, track, and sectors? Code needs to change on a different system 24 12 10/1/2017 What does an OS do? Resources Allocation Protection Reclamation Virtualization 2017-10-01 25 What does an OS do? Resources Finite resources Government: Allocation Competing demands Limited budget, Land, Protection Natural resources Examples: Reclamation CPU Virtualization Memory Disk Network 2017-10-01 26 13 10/1/2017 What does an OS do? Resources You can’t hurt me, Government: Allocation I can’t hurt you. Law and order Protection Reclamation Some degrees of Virtualization safety and security 2017-10-01 27 What does an OS do? Resources The OS gives, Government: Allocation The OS takes away Income Tax Protection Reclamation Some times involun- Virtualization tarily 2017-10-01 28 14 10/1/2017 What does an OS do? Resources Illusion of infinite, Government: Allocation private resources Social welfare and Memory vs. disk insurance Protection Time-shared CPU Reclamation Virtualization 2017-10-01 29 Windows Lines of Code; Win 3.1 = 4-5 Million Win 2000 = 11-12 Million Win XP = 45 Million Win 2003 = 50 Million Linux Kernel 15 Million Lines of Code It would take about 5.000 years for a person to code these from scratch. An estimate of re-implementing Linux Kernel = 612 Million $ 15 10/1/2017 Why you want to learn OS? Many OS concepts (e.g., protection, resource management) is needed in other places E.g., browser OS is used everywhere Your car is running on Linux/Windows 2017-10-01 31 16 10/1/2017 17 10/1/2017 18 10/1/2017 19 10/1/2017 The operating system is responsible for the following activities in connection with process management: Creating and deleting both user and system processes Suspending and resuming processes Providing mechanisms for process synchronization Providing mechanisms for process communication Providing mechanisms for deadlock handling 20 10/1/2017 21 10/1/2017 22 10/1/2017 23 10/1/2017 24 10/1/2017 History of OS 25 10/1/2017 The dark age (1945 – 55): no OS Batch systems (1955 – 65) Multiprogramming (1965 – 80) PC (and mobile) era (1980 – present) 51 The dark age ENIAC (1946): the first computer Only a single group of people designed and used it Protection and virtualization are not needed! How to Allocate and Reclaim computation time? Sign-up sheet on the wall! 52 26 10/1/2017 Batch systems (1955-65) Background: At that time, computers are used only to “compute” (instead of entertainments, etc.) Users write program using “punch card” Punch your program into cards Bring the cards to computer operators Come back after a day to get result 53 Batch systems (1955-65) OS: Read the first job from the tape Run it Write the output to another tape Read the next job and repeat the process Similar to the “sign-up sheet on the wall”, only now this process is automated 54 27 10/1/2017 Multiprogramming (1965-80) Problems with Batch systems? Responsiveness Do you want to wait for a day just to find out your program doesn’t compile? Multiple users cannot concurrently access the computer Efficiency CPU is idle while the computer is doing I/O Multiprogramming Multiple tasks are performed during the same period of time As if they are executed concurrently Now multiple users can use the same machine simultaneously 55 MULTICS MULTiplexed Information and Computing Service Initiated by MIT, Bell Labs, and General Electric Designed to support hundreds of users on a machine far less powerful than iPhone People knew how to write small, efficient programs in those days Technically successful, but not so much commercially Bell Labs and GE dropped out before it was released 56 28 10/1/2017 UNIX Written by Ken Thompson and Dennis Ritchie from Bell Labs on PDP-11 (1971) Project started because Ken wanted to play the “Space Travel” game without MULTICS Originally named as “Unics” by Brian Kernighan In 1973, Ritchie invented C programming language to ease the development of Unix 57 Linux In 1991, Linus Torvalds, then a student of Univ. of Helsinki, wanted to learn OS But at that time, no free, open-source OS is available Decided to write his own OS and “open-source” it Open-source is the key behind its popularity today 58 29 10/1/2017 PC-era (1980-present) IBM introduces PC in 1981, using Intel processors Looking for an OS for its PC At that time, an OS called CP/M is already working on Intel CPUs Bill Gates initially suggested IBM to contract CP/M CP/M founder refused to meet with IBM IBM came back to Bill Gates, and he purchased an OS named DOS (Disk Operating System), modified it, and renamed it MS-DOS 59 Graphical User Interface (GUI) The interface of the early OSes is command-line Researchers in Xerox-PARC built the first OS with graphic user interface Steve Jobs visited PARC, saw the GUI, and used it in Apple’s Lisa (1983), later Macintosh (1984) Microsoft introduced Windows in 1985 60 30 10/1/2017 OS Structures 31 10/1/2017 32 10/1/2017 33 10/1/2017 34 10/1/2017 35 10/1/2017 Ref: 1. Ding Yuan, Toronto University 2. Serdar Taşel, Çankaya University 36

Use Quizgecko on...
Browser
Browser