index.md (1536B)
1 +++ 2 title = 'What is an OS?' 3 +++ 4 # What is an OS? 5 ## Some history 6 Batch systems: one job at a time 7 8 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. 9 10 Time sharing: single CPU can be passed between jobs, multitasking, illusion of parallelism. 11 12 You are not expected to understand this. 13 14 ## What is an OS? 15 Kernel vs user mode: 16 ![Screenshot 2018-11-09 at 13.47.46.png](640094eca22df17a21654aee082f8780.png) 17 18 OS is an extended machine — it extends & abstracts over hardware functionality 19 OS is resource manager — protects unsafe use of resources, accounting/limiting 20 21 - offers functionality through syscalls 22 - groups of syscalls offer services 23 - processes are abstractions to create user’s program 24 - each program/process has its own address space 25 - data is in files, these persist over processes 26 27 ## Processes 28 29 - process represents instance of a program in execution, with a name 30 - memory address spaces limit programs to a specific part of memory. layout depends. 31 32 ## Memory address space 33 34 very basic layout is stack (frames for function calls), data (variables), text (program code) 35 36 ![Screenshot 2018-11-09 at 13.46.40.png](cbc52110fdee2f262361bdee3d6f21ba.png) 37 38 ## Structure of the OS 39 40 ![screenshot.png](c4fe4a6540f1d2f4165a65943a276a74.png) 41 42 ## System calls 43 44 - interface offered by OS to apps for service requests 45 - interface depends on OS and hardware, so encapsulate syscall logic in libc (POSIX standard)