lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

What is an OS_.html (3104B)


      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      3 <html><head><link rel="stylesheet" href="sitewide.css"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="exporter-version" content="Evernote Mac 7.6 (457297)"/><meta name="altitude" content="276.5"/><meta name="author" content="Alex Balgavy"/><meta name="created" content="2018-11-09 12:39:44 +0000"/><meta name="latitude" content="50.11346435546875"/><meta name="longitude" content="14.33735006690641"/><meta name="source" content="desktop.mac"/><meta name="updated" content="2018-12-03 15:34:28 +0000"/><title>What is an OS?</title></head><body><div><span style="font-weight: bold;">Some history</span></div><div>Batch systems: one job at a time</div><div>Multiprogrammed systems: store multiple jobs in memory, with an operating system that schedules, allocates, multiplexes. but one job after another, with a lot of waiting.</div><div>Time sharing: single CPU can be passed between jobs, multitasking, illusion of parallelism.</div><div><br/></div><div>You are not expected to understand this.</div><div><br/></div><div><span style="font-weight: bold;">What is an OS?</span></div><div>Kernel vs user mode:</div><div><img src="What%20is%20an%20OS_.resources/Screenshot%202018-11-09%20at%2013.47.46.png" height="460" width="794"/><br/></div><div><br/></div><div><br/></div><div>OS is an extended machine — it extends &amp; abstracts over hardware functionality</div><div>OS is resource manager — protects unsafe use of resources, accounting/limiting</div><ul><li><div>offers functionality through syscalls</div></li><li><div>groups of syscalls offer services</div></li><li><div>processes are abstractions to create user’s program</div></li><li><div>each program/process has its own address space</div></li><li><div>data is in files, these persist over processes</div></li></ul><div><br/></div><div><span style="font-weight: bold;">Processes</span></div><ul><li><div>process represents instance of a program in execution, with a name</div></li><li><div>memory address spaces limit programs to a specific part of memory. layout depends. </div></li></ul><div><br/></div><div><span style="font-weight: bold;">Memory address space</span></div><div>very basic layout is stack (frames for function calls), data (variables), text (program code)</div><div style="margin-left: 40px;"><img src="What%20is%20an%20OS_.resources/Screenshot%202018-11-09%20at%2013.46.40.png" height="391" width="424"/><br/></div><div><br/></div><div><span style="font-weight: bold;">Structure of the OS</span></div><div><br/></div><div><img src="What%20is%20an%20OS_.resources/screenshot.png" height="368" width="763"/><br/></div><div><br/></div><div><span style="font-weight: bold;">System calls</span></div><ul><li><div>interface offered by OS to apps for service requests</div></li><li><div>interface depends on OS and hardware, so encapsulate syscall logic in libc (POSIX standard)</div></li></ul><div/><div><br/></div></body></html>