Section 1

Preview this deck

What is an inode?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

1

All-time users

1

Favorites

0

Last updated

1 year ago

Date created

Mar 1, 2020

Cards (36)

Section 1

(36 cards)

What is an inode?

Front

The metadata of a file (i.e. its owner, size, link count, timestamps, etc.)

Back

What are the benefits of a microkernel? A main disadvantage? How does linux compromise?

Front

OS is easier to extend and port and is more secure, but it is slow because of IPC overhead. Linux has dynamically loaded kernel modules which allows new support to be added only when needed.

Back

What is multiprogramming?

Front

Multiple processes execute concurrently, and they switch out of the CPU's interest when waiting for I/O and the like.

Back

Why are almost all operating systems written in C?

Front

Since C lacks a lot of high-level language features of today (OOP, overloading, templates, etc.), There is limited overhead and therefore compilers can generate very efficient code. Also, there is little runtime support needed, no garbage collection for example. Pointers also make it easy to interact with the low-level stuff.

Back

What is a trap?

Front

A software generated interrupt.

Back

What are the two types of system programs?

Front

Those for the development and execution of programs (editors, compilers, etc), and those used for system maintenance and monitoring (task manager, virus scanners, etc).

Back

What is the main difference between polling and interrupt driven I/O?

Front

Polling: Asks whether devices have something they need handled, very inefficient compared to the devices telling the OS when they have I/O to handle.

Back

What was Linux?

Front

It was a kernel released in 1991 which, when combined with GNU tools and other libraries, created a complete OS for distribution.

Back

What is an interrupt?

Front

A message from hardware to the OS saying that something happened and they need it handled.

Back

Why was C created?

Front

For UNIX Devlopment, it was a version of B (Ken Thompson) but with types with an easily retargeted compiler which made UNIX highly portable.

Back

What is a context switch?

Front

OS suspends the current process and transfers control to a service routine using an interrupt (helps to time out lengthy processes as well)

Back

Syntax for file, find, chmod, grep, ln commands?

Front

file [file/directory] find [start place] [-name/-inum etc] [what to find] chmod [u=,o=,g=/binary] [file/directory] grep [options] pattern [files] ln [-s] [file] [link name]

Back

What is the difference between a hard link and a soft link?

Front

Hard link: Has the same inum as its linked file, and so if the file is deleted the link still works (doesn't work on directories, not cross compatible). Soft link: Has its own inum and its own file, but this just references back to the original file.

Back

What are the two modes of a CPU? How does it switch between them?

Front

User mode: non-damaging instructions allowed Kernel mode: unrestricted, anything running in this mode is trusted Mode bit is used to switch between them

Back

What is the Unix Philosophy?

Front

Everything is a file (descriptor), or as Torvalds puts it, a stream of bytes.

Back

What is the difference between concurrent and parallel computation?

Front

Concurrent: An illusion of things being executed simultaneously Parallel: Actually simultaneous.

Back

What allows an abstraction away from system calls?

Front

APIs

Back

What is the difference between a process and a thread?

Front

Process: A program in execution with its own address space. Thread: A subsequence of instructions in a process which can be executed concurrently with other subsequences. It has its own register set and call stack, but has shared code, data, and resources.

Back

What is a microkernel?

Front

A kernel where only the bare minimum (the three services) run in the kernel, and all other OS services run in user mode, and they communicate using IPC. This is in contrast to a monolithic kernel

Back

What are the two pieces of MacOS?

Front

Mach microkernel and BSD (Berkeley Software Distro) extensions onto it

Back

What was batch processing? What was the problem with it?

Front

Programs ran without human interaction. When one process finished, the next was loaded and executed. The problem was whenever a process was waiting for I/O, the CPU was idle but CPU time was expensive.

Back

What are some privileged instructions? What happens if one of these is attempted in user mode?

Front

Privileged instructions: device I/O, disable interrupts, modify registers used for scheduling, etc. If user mode tries to execute a privileged instruction, an interrupt is triggered and the OS takes over

Back

What is the idea of free software?

Front

Free to view, copy, etc without having to pay royalties (the essence of a copyleft license). This and open source are the same, except free software has an ethical argument, whereas open source is more practical.

Back

What is a system call and how are they triggered?

Front

System call: Executes a privileged instruction on behalf of a user process. Usually written in C or assembly, and is usually a trap to a location in the interrupt vector.

Back

What is a directory actually?

Front

A file containing a list of (name, inum) pairs, each inum indexing into the inode table.

Back

Define the kernel? What three services does it provide to the rest of the OS?

Front

Kernel: The only process which never terminates (it runs in kernel mode) Services: Process scheduling (for concurrency), memory management (which process owns what), interprocess communication (allowing pipes to be formed)

Back

What is the interrupt vector table and what is a maskable interrupt?

Front

Stores info about what interrupt numbers should be decoded to mean, and maskable ones can essentially be ignored.

Back

What is an operating system? Three things, in depth.

Front

Users/App interface with hardware: Allows I/O devices to be used and abstracts away the details of things like files, memory, etc Resource allocator: handles requests for resources and resolves any conflicting ones, and also does scheduling as well. Control program: creates an environment for the safe execution of programs, not allowing programs to access outside their address space or writing to restricted areas, for example

Back

How does time sharing extend on multiprogramming?

Front

It is just quicker multiprogramming, and it allows programs to interact with eachother seamlessly.

Back

How does the OS maintain control over the system?

Front

Context switching stops a process from running forever.

Back

Who was UNIX designed by?

Front

Ken Thompson and Dennis Ritchie created it on their own after Bell Labs dropped out of MULTICS, it was a smaller version and created in assembly. Wanted it to be simple for the user.

Back

What was MULTICS?

Front

Multiplexed information and computing service, it was a time sharing system for mainframes in the 60's using some modern OS features developed in PL/1 by MIT, Bell Labs, and GE

Back

What is the best strategy for implementing a shell?

Front

Don't interpret the command, but rather invoke a system program to do the work (ex. ls is a system program)

Back

How can you make system calls in C and java?

Front

C: syscall() in unistd.h Java: JNI and native methods (harder because it is architecture neutral)

Back

What were three unattractive features of the computers of the dinosaur days?

Front

Big and expensive, no universal OS, not portable

Back

Why was the GNU project started?

Front

To create a free, non proprietary OS. Developed by Richar stallman in the 80's, he also created gcc, emacs, etc. The GNU kernel was never finished.

Back